/* Carta+ — demo "FOGÓN" con video real (platos de Vanessa) para
   mostrar a restaurantes. Misma plantilla que la carta de QUIPAS (mismas
   clases, mismo comportamiento), pero acá la paleta y la tipografía no son
   arbitrarias: salen de los propios videos — fondos oscuros y madera,
   ámbar de la luz cálida y los cócteles, vino de las salsas y el cóctel de
   arándano, verde azulado de la vajilla de cerámica — con tipografías
   100% libres (Google Fonts, sin restricción de licencia): Spectral
   (serif cálido, literario) + Karla (sans humanista). Mobile-first. */

:root {
  --bg: #15130f;
  --ink: #f1e8d8;
  --ink-body: #e0d3ba;
  --ink-muted: rgba(241, 232, 216, 0.6);
  --rule: rgba(241, 232, 216, 0.14);
  --amber: #c98a3f;
  --amber-deep: #8a5a24;
  --wine: #7a2431;
  --teal: #3f6b68;
  --price: var(--amber);

  --display: "Spectral", Georgia, serif;
  --names: "Spectral", Georgia, serif;
  --body: "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --price-font: "Karla", -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: rgba(241, 232, 216, 0.05);
  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(--amber);
  color: var(--bg);
}

/* --- Contenido --- */

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

/* --- Franja decorativa: un emblema, no un patrón repetido — hairline fina
   con un rombo ámbar al centro flanqueado por dos puntos (teal/vino),
   como el sello que separa secciones en una carta impresa de autor. --- */

.brand-band {
  position: relative;
  height: 28px;
  margin: 0 -20px 24px;
  background-image: linear-gradient(to right, transparent, var(--rule) 15%, var(--rule) 85%, transparent),
    radial-gradient(circle at calc(50% - 34px) 50%, var(--teal) 0 3px, transparent 4px),
    radial-gradient(circle at calc(50% + 34px) 50%, var(--wine) 0 3px, transparent 4px);
  background-size: 100% 1px, 100% 100%, 100% 100%;
  background-position: center, center, center;
  background-repeat: no-repeat;
}

.brand-band::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  transform: translate(-50%, -50%) rotate(45deg);
  border: 1.5px solid var(--amber);
  background: var(--bg);
}

/* Home */

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

.hero__logo {
  font-family: var(--display);
  font-weight: 600;
  font-size: 40px;
  letter-spacing: 0.08em;
  margin: 0 0 10px;
  color: var(--ink);
}

.hero__tagline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: var(--price-font);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin: 0;
}

.hero__location {
  margin: 8px 0 0;
  font-family: var(--price-font);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  text-align: center;
}

.hero__tagline::before,
.hero__tagline::after {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--rule);
}

.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-weight: 600;
  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);
}

/* Referencia en USD junto al precio en soles (tipo de cambio fijo, ver
   i18n.js) — siempre más discreta que el precio real, que es en soles.
   El "·" antes, en vez de solo un margen, separa los dos números aunque el
   line-break los junte en una columna angosta. */
.price-usd {
  font-weight: 500;
  color: var(--ink-muted);
  margin-left: 4px;
}

.price-usd::before {
  content: "· ";
}

/* --- 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: rgba(241, 232, 216, 0.05);
  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(--wine);
  border-color: var(--wine);
  color: var(--ink);
}

/* 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(21, 19, 15, 0.55);
  backdrop-filter: blur(6px);
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  margin-bottom: 0;
}

.page-title {
  position: relative;
  font-family: var(--display);
  font-weight: 600;
  font-size: 42px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 4px 0 24px;
  padding-bottom: 14px;
  overflow-wrap: break-word;
}

.page-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 2px;
  background: var(--amber);
}

/* 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: #1c1712;
}

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

.media--large {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(201, 138, 63, 0.35), 0 24px 48px rgba(0, 0, 0, 0.45);
}

.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(--wine), #1c1712 55%, var(--teal) 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);
  font-weight: 600;
  text-transform: uppercase;
  color: rgba(241, 232, 216, 0.25);
  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(--amber);
  border: 1px solid var(--amber);
  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(241, 232, 216, 0.7);
}

.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(--display);
  font-style: italic;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-body);
  opacity: 0.85;
  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);
}

.dish-detail__price-usd {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-muted);
  margin-left: 6px;
}

.dish-detail__price-usd::before {
  content: "· ";
}

.dish-detail__allergens {
  margin: 10px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.dish-detail__allergens-label {
  font-family: var(--price-font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.allergen-chip {
  font-family: var(--body);
  font-size: 11.5px;
  color: var(--ink-body);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 3px 10px;
}

/* --- Crédito de Carta+ al pie: pequeño y tenue, no compite con la marca
   del restaurante --- */

.credit {
  padding: 4px 20px 28px;
  text-align: center;
  font-family: var(--price-font);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.credit a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
}

/* El logotipo de Carta+ va como máscara para tomar el color de texto de
   cada carta (claro sobre fondo oscuro, oscuro sobre fondo claro). */
.credit__logo {
  width: 57px;
  height: 18px;
  background: var(--ink);
  -webkit-mask: url("../img/carta-plus.png") center / contain no-repeat;
  mask: url("../img/carta-plus.png") center / contain no-repeat;
}

/* 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(0, 0, 0, 0.55);
  }
}
