/* Carta 360 — estilo QUIPAS "tal cual": mismas 3 tipografías y mismos colores
   extraídos directamente de Cartas/Carta Comida 2026 DIGITAL.pdf (embebidas en
   el PDF, vendorizadas en assets/fonts/). Mobile-first. */

/* Guardilostra / Champagne & Limousines / Century751BT vienen tal cual extraídas
   del PDF real de QUIPAS: son subsets que solo incluyen los glifos que aparecen
   en su carta impresa (el resto existe en la tabla pero sin trazo). El
   unicode-range le dice al navegador exactamente qué caracteres son válidos en
   cada una, así cualquier letra fuera de ese set cae sola a la tipografía de
   respaldo en vez de desaparecer en blanco. Ver README para el detalle de
   licencias si esto se despliega más allá de la demo privada. */

@font-face {
  font-family: "Quipas Display";
  src: url("../assets/fonts/Guardilostra-Regular.ttf") format("truetype");
  unicode-range: U+0041, U+0043-0047, U+0049, U+004C-0050, U+0052-0054, U+0056;
  font-display: swap;
}

@font-face {
  font-family: "Quipas Names";
  src: url("../assets/fonts/ChampagneLimousines-Bold.ttf") format("truetype");
  font-weight: 700;
  unicode-range: U+0026, U+0030-0032, U+0037, U+0041-004A, U+004C-0056, U+0058-005A,
    U+00B4, U+00C1, U+00D3, U+00DB;
  font-display: swap;
}

@font-face {
  font-family: "Quipas Body";
  src: url("../assets/fonts/Century751BT-RomanB.ttf") format("truetype");
  unicode-range: U+002D, U+002F, U+0041-0045, U+0048, U+004A-004D, U+004F-0054, U+0056,
    U+005A, U+0061-006A, U+006C-0070, U+0072-0076, U+0079-007A, U+00B4, U+00E1, U+00E9,
    U+00ED, U+00F1, U+00F3, U+0131;
  font-display: swap;
}

@font-face {
  font-family: "Quipas Price";
  src: url("../assets/fonts/Montserrat-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* Colores exactos muestreados del PDF (tinta de texto + patrón de portada) */
  --bg: #ffffff;
  --ink: #473539;
  --ink-body: #231f20;
  --ink-muted: rgba(35, 31, 32, 0.6);
  --rule: rgba(71, 53, 57, 0.16);
  --green: #5a6748;
  --green-deep: #143f22;
  --burgundy: #5b1f2a;
  --orange: #ca5d2a;
  --rose: #a27a76;
  --pink: #f6a39f;
  --price: var(--burgundy);

  --display: "Quipas Display", "Arial Narrow", sans-serif;
  --names: "Quipas Names", Georgia, serif;
  --body: "Quipas Body", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --price-font: "Quipas Price", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  width: 100%;
  min-width: 0;
  max-width: 560px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* --- Header / selector de idioma --- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: flex-end;
  padding: 14px 18px;
  background: linear-gradient(to bottom, var(--bg) 65%, transparent);
}

.lang-switcher {
  display: flex;
  gap: 4px;
  padding: 3px;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 999px;
}

.lang-pill {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--price-font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.lang-pill.is-active {
  background: var(--burgundy);
  color: #fff;
}

/* --- Contenido --- */

#app {
  flex: 1;
  padding: 0 20px 40px;
}

/* --- Franja decorativa (recorte real del patrón de portada QUIPAS) --- */

.brand-band {
  height: 34px;
  margin: 0 -20px 22px;
  background-image: url("../assets/images/quipas-band.png");
  background-size: cover;
  background-position: center;
}

/* Home */

.hero {
  text-align: center;
  padding: 4px 0 32px;
}

.hero__logo {
  height: 44px;
  width: auto;
  margin: 0 0 10px;
}

.hero__tagline {
  font-family: var(--price-font);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin: 0;
}

.category-grid {
  display: flex;
  flex-direction: column;
}

.category-card {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  min-width: 0;
  padding: 20px 2px;
  border-bottom: 1px solid var(--rule);
}

.category-card:first-child {
  border-top: 1px solid var(--rule);
}

.category-card__name {
  font-family: var(--display);
  font-size: 30px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  min-width: 0;
  overflow-wrap: break-word;
}

.category-card__meta {
  font-family: var(--price-font);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  margin-left: 12px;
}

/* --- Destacados (Home) y Marida-con (detalle de plato) --- */

.destacados,
.marida {
  padding: 4px 0 28px;
}

.destacados__title,
.marida__title {
  font-family: var(--price-font);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 0 0 12px;
}

.marida {
  padding-top: 22px;
  border-top: 1px solid var(--rule);
}

.destacados__row,
.marida__row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.destacados__row::-webkit-scrollbar,
.marida__row::-webkit-scrollbar {
  display: none;
}

.pick-card {
  flex: 0 0 auto;
  width: 128px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pick-card .media--thumb {
  width: 128px;
  height: 128px;
  border-radius: 12px;
}

.pick-card__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.pick-card__name {
  font-family: var(--names);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.3;
  overflow-wrap: break-word;
}

.pick-card__price {
  font-family: var(--price-font);
  font-weight: 600;
  font-size: 12px;
  color: var(--price);
}

/* --- Filtros dietéticos (categoría) --- */

.diet-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 6px;
  scrollbar-width: none;
}

.diet-filters::-webkit-scrollbar {
  display: none;
}

.diet-pill {
  flex: 0 0 auto;
  appearance: none;
  border: 1px solid var(--rule);
  background: #fff;
  color: var(--ink-muted);
  font-family: var(--price-font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.diet-pill.is-active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

/* Back link */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--price-font);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  padding: 8px 0;
  margin-bottom: 8px;
}

.back-link--floating {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 10;
  background: rgba(71, 53, 57, 0.5);
  backdrop-filter: blur(6px);
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  margin-bottom: 0;
}

.page-title {
  font-family: var(--display);
  font-size: 42px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 4px 0 18px;
  overflow-wrap: break-word;
}

/* Category dish list */

.dish-list {
  display: flex;
  flex-direction: column;
}

.dish-row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 14px 2px;
  border-bottom: 1px solid var(--rule);
}

.dish-list .dish-row:first-child {
  border-top: 1px solid var(--rule);
}

.dish-row__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.dish-row__name {
  font-family: var(--names);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.35;
  overflow-wrap: break-word;
}

.dish-row__price {
  font-family: var(--price-font);
  font-weight: 600;
  font-size: 13px;
  color: var(--price);
}

.empty-state {
  color: var(--ink-muted);
  font-size: 14px;
  padding: 40px 0;
  text-align: center;
}

/* --- Media (video / placeholder) --- */

.media {
  position: relative;
  overflow: hidden;
  background: #201312;
}

.media--thumb {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  flex-shrink: 0;
}

.media--large {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 14px;
}

.media__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media--fallback .media__video {
  display: none;
}

.media__fallback {
  display: none;
  position: absolute;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--burgundy), #241514 55%, var(--green-deep) 130%);
  background-size: 220% 220%;
  animation: shimmer 8s ease-in-out infinite;
}

.media--fallback .media__fallback {
  display: flex;
}

.media__fallback-initial {
  font-family: var(--display);
  text-transform: uppercase;
  color: rgba(250, 244, 236, 0.3);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 4.2em;
}

.media--thumb .media__fallback-initial {
  font-size: 1.6em;
}

.media__badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: var(--price-font);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--orange);
  border: 1px solid var(--orange);
  border-radius: 999px;
  padding: 3px 10px 2px;
}

.media__fallback-text {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--price-font);
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(250, 244, 236, 0.65);
}

.media--thumb .media__fallback-text {
  display: none;
}

@keyframes shimmer {
  0% {
    background-position: 0% 0%;
  }
  50% {
    background-position: 100% 100%;
  }
  100% {
    background-position: 0% 0%;
  }
}

/* Dish detail */

.dish-detail {
  padding-top: 22px;
}

.dish-detail__name {
  font-family: var(--names);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.15;
  margin: 0 0 12px;
  overflow-wrap: break-word;
}

.dish-detail__description {
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-body);
  opacity: 0.75;
  margin: 0 0 16px;
}

.dish-detail__price {
  font-family: var(--price-font);
  font-weight: 600;
  font-size: 20px;
  color: var(--price);
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}

/* Desktop: mismo layout, más aire alrededor */

@media (min-width: 600px) {
  body {
    padding: 24px 0;
  }
  .shell {
    min-height: auto;
    border: 1px solid var(--rule);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(71, 53, 57, 0.18);
  }
}
