/* ═══════════════════════════════════════════════════
   Cafetería Doñana — Carta QR
   Mobile-first. Sin frameworks. Sin fuentes externas.
   ═══════════════════════════════════════════════════ */

:root {
  --ink:      #201915;
  --muted:    #6d625a;
  --paper:    #f7f1e8;
  --porcelain:#fffaf2;
  --coffee:   #6f3f25;
  --coffee-dk:#4e2c17;
  --green:    #2f5d50;
  --line:     #ded2c3;
  --accent:   #c47b38;
  --review:   #e8a012;
  --warn:     #a33820;

  --topbar-h: 52px;
  --nav-h:    64px;
  --max-w:    560px;
  --px:       20px;   /* page horizontal padding */
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 16px;
  line-height: 1.5;
  /* space for sticky bottom nav */
  padding-bottom: calc(var(--nav-h) + 8px);
}

a { color: inherit; }
ul { list-style: none; }

/* ── Layout helpers ── */
.page-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
}

/* ════════════════════════════════
   TOPBAR
   ════════════════════════════════ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  background: rgba(247, 241, 232, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 0 var(--px);
}

.topbar-inner {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: normal;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}

.brand span { color: var(--accent); }

/* Logotipo en topbar */
.brand-bird {
  width: 30px;
  height: auto;
  flex-shrink: 0;
  mix-blend-mode: multiply;   /* elimina el fondo negro sobre crema */
  -webkit-mix-blend-mode: multiply;
}

/* Logotipo grande en hero de inicio */
.hero-bird-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.hero-bird {
  width: 160px;
  height: auto;
  mix-blend-mode: multiply;
  -webkit-mix-blend-mode: multiply;
  filter: drop-shadow(0 4px 12px rgba(111,63,37,0.12));
}

/* ════════════════════════════════
   BOTTOM NAVIGATION
   ════════════════════════════════ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(12, 12, 12, 0.82);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 -18px 44px rgba(32, 25, 21, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  display: flex;
  justify-content: space-around;
  align-items: stretch;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.78);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
  letter-spacing: 0.04em;
  padding: 8px 4px;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s, background 0.15s, transform 0.12s;
}

.nav-item svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
}

.nav-item.active {
  color: #fffaf2;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  margin: 7px 6px;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.nav-item:active {
  transform: scale(0.96);
}

/* ════════════════════════════════
   BUTTONS
   ════════════════════════════════ */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.20), rgba(255, 255, 255, 0.07)),
    rgba(12, 12, 12, 0.82);
  color: #fffaf2;
  box-shadow:
    0 10px 28px rgba(32, 25, 21, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  text-decoration: none;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.12s, transform 0.1s, border-color 0.15s;
  width: 100%;
}

.btn:active {
  opacity: 0.9;
  transform: scale(0.97);
  border-color: rgba(255, 255, 255, 0.34);
}

.btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke: currentColor;
}

.google-g {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke: none;
}

.btn-review .google-g,
.btn-resena-main .google-g {
  width: 22px;
  height: 22px;
  stroke: none;
}

.google-word {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  white-space: nowrap;
}

.google-word .google-letter {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.btn-primary {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.08)),
    rgba(111, 63, 37, 0.88);
  color: #fffaf2;
  border-color: rgba(255, 250, 242, 0.24);
  box-shadow:
    0 10px 28px rgba(111, 63, 37, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.btn-green {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.08)),
    rgba(47, 93, 80, 0.88);
  color: #fffaf2;
  border-color: rgba(255, 250, 242, 0.24);
  box-shadow:
    0 10px 28px rgba(47, 93, 80, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.btn-outline {
  color: #fffaf2;
}

.btn-review {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.10)),
    rgba(232, 160, 18, 0.88);
  color: var(--ink);
  border-color: rgba(255, 250, 242, 0.34);
  box-shadow:
    0 10px 28px rgba(232, 160, 18, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

/* ════════════════════════════════
   HOME — HERO
   ════════════════════════════════ */
.hero {
  padding: 44px var(--px) 28px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.hero-eyebrow {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.hero-name {
  font-size: clamp(38px, 11vw, 56px);
  font-weight: normal;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 6px;
}

.hero-name em {
  font-style: normal;
  color: var(--coffee);
}

.hero-address {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  color: var(--muted);
  margin-top: 10px;
}

/* ── Button grid on home ── */
.btn-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px var(--px) 0;
}

/* ── Divider ── */
.divider {
  height: 1px;
  background: var(--line);
  margin: 28px var(--px);
}

/* ── Section label ── */
.section-label {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 var(--px);
  margin-bottom: 12px;
  display: block;
}

/* ── Horario ── */
.horario-block {
  padding: 0 var(--px);
}

.horario-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
}

.horario-row:last-child { border-bottom: none; }

.horario-row .day   { color: var(--muted); }
.horario-row .hours { font-weight: 700; color: var(--ink); }
.horario-row .hours.closed { font-weight: normal; color: var(--muted); }

/* ── Price notice ── */
.price-notice {
  margin: 0 var(--px);
  padding: 12px 14px;
  background: var(--porcelain);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

/* ════════════════════════════════
   CARTA — CATEGORY NAV (sticky)
   ════════════════════════════════ */
.cat-nav-wrap {
  position: sticky;
  top: var(--topbar-h);
  z-index: 40;
  background: rgba(247, 241, 232, 0.78);
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.32);
}

.cat-nav {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 10px var(--px);
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
}

.cat-nav::-webkit-scrollbar { display: none; }

.cat-chip {
  flex-shrink: 0;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.26)),
    rgba(255, 250, 242, 0.58);
  color: var(--coffee-dk);
  box-shadow:
    0 6px 18px rgba(32, 25, 21, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.14s, color 0.14s, border-color 0.14s, transform 0.12s;
}

.cat-chip.active {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.20), rgba(255, 255, 255, 0.07)),
    rgba(12, 12, 12, 0.82);
  color: #fffaf2;
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow:
    0 8px 24px rgba(32, 25, 21, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.cat-chip:active {
  transform: scale(0.96);
}

/* ════════════════════════════════
   CARTA — SECTIONS & PRODUCTS
   ════════════════════════════════ */
.carta-section {
  padding: 28px var(--px) 0;
  /* scroll-margin-top so the sticky bars don't cover anchors */
  scroll-margin-top: calc(var(--topbar-h) + 54px);
}

.section-header {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--coffee);
}

.section-name {
  font-size: 20px;
  font-weight: normal;
  color: var(--coffee);
  letter-spacing: 0.02em;
}

.section-nota {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  margin-top: 5px;
  line-height: 1.4;
}

/* ── Product item ── */
.product-item {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.product-item:last-child { border-bottom: none; }

.product-item.unavailable { opacity: 0.42; }

.product-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.product-info { flex: 1; min-width: 0; }

.product-name {
  font-size: 15px;
  font-weight: normal;
  color: var(--ink);
  line-height: 1.3;
}

.product-unavail {
  display: inline-block;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
  margin-left: 6px;
}

.product-desc {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.35;
}

/* Tags */
.product-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.tag {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
}

.tag-recomendado { background: #fdecd0; color: #7a3e00; }
.tag-nuevo       { background: #d0f0e0; color: #165232; }
.tag-picante     { background: #fdddd0; color: #7a1800; }
.tag-vegetariano { background: #d8f0cc; color: #274e14; }
.tag-singluten   { background: #ecdff5; color: #4a1470; }

/* Allergens */
.product-allergens {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 6px;
}

.allergen-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 7px;
  font-weight: 800;
  line-height: 1;
  color: var(--porcelain);
  letter-spacing: 0;
  flex-shrink: 0;
}

.allergen-gluten     { background: #d95d2a; }
.allergen-huevo      { background: #e99a22; }
.allergen-pescado    { background: #1f6fb4; }
.allergen-crustaceos { background: #0f91c9; }
.allergen-lacteos    { background: #18a8c8; }
.allergen-sesamo     { background: #8a8278; }
.allergen-sulfitos   { background: #6f287d; font-size: 6px; }
.allergen-soja       { background: #2f7047; }
.allergen-frutos     { background: #c24f64; }
.allergen-default    { background: var(--muted); }

.allergen-legend {
  margin: 30px var(--px) 0;
  padding-top: 16px;
  border-top: 2px solid var(--coffee);
}

.allergen-legend-title {
  font-size: 18px;
  font-weight: normal;
  color: var(--coffee);
  margin-bottom: 10px;
}

.allergen-legend-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

.allergen-legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  color: var(--ink);
}

/* Precios */
.price-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
}

.price-single {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--coffee);
  white-space: nowrap;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 5px;
  white-space: nowrap;
}

.price-format {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.03em;
  min-width: 42px;
  text-align: right;
}

.price-value {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--coffee);
  min-width: 52px;
  text-align: right;
}

/* ════════════════════════════════
   MENÚ DEL DÍA
   ════════════════════════════════ */
.menu-dia-wrap {
  padding: 24px var(--px);
}

/* When unavailable */
.menu-unavailable {
  padding: 56px var(--px) 32px;
  text-align: center;
}

.menu-unavailable-icon {
  font-size: 52px;
  margin-bottom: 18px;
}

.menu-unavailable-title {
  font-size: 24px;
  font-weight: normal;
  color: var(--ink);
  margin-bottom: 10px;
}

.menu-unavailable-text {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  color: var(--muted);
}

/* When available */
.menu-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--coffee);
}

.menu-title {
  font-size: 24px;
  font-weight: normal;
  color: var(--coffee);
}

.menu-precio {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--coffee);
  white-space: nowrap;
}

.menu-schedule {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
  margin-top: 6px;
}

.menu-group {
  margin-bottom: 22px;
}

.menu-group-title {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.menu-item {
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  color: var(--ink);
}

.menu-item:last-child { border-bottom: none; }

.menu-includes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.include-pill {
  padding: 5px 14px;
  background: var(--porcelain);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  color: var(--muted);
}

.menu-aviso {
  margin-top: 22px;
  padding: 12px 14px;
  background: var(--porcelain);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
  line-height: 1.4;
}

/* ════════════════════════════════
   CONTACTO
   ════════════════════════════════ */
.contacto-wrap {
  padding: 24px var(--px);
}

.contact-card {
  background: var(--porcelain);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.contact-label {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
  display: block;
}

.contact-value {
  font-size: 17px;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 14px;
}

.contact-value:last-child { margin-bottom: 0; }

.btn-contact-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ════════════════════════════════
   FOOTER
   ════════════════════════════════ */
.footer {
  padding: 20px var(--px) 10px;
  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.65;
  border-top: 1px solid var(--line);
  margin-top: 32px;
}

/* ════════════════════════════════
   LOADING / ERROR STATES
   ════════════════════════════════ */
.loading-msg,
.error-msg {
  padding: 52px var(--px);
  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.55;
}

.error-msg { color: var(--warn); }
.error-msg .error-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
}

/* ════════════════════════════════
   DESKTOP centering (no layout changes)
   En escritorio el contenido se centra sin
   diseño específico — solo mobile es objetivo.
   ════════════════════════════════ */
@media (min-width: 600px) {
  .topbar,
  .cat-nav-wrap,
  .bottom-nav {
    /* Bottom nav centered on wide screens */
    max-width: var(--max-w);
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    width: 100%;
    border-radius: 0;
  }

  .topbar {
    left: 0;
    right: 0;
    transform: none;
    max-width: 100%;
  }

  .cat-nav-wrap {
    left: 0;
    right: 0;
    transform: none;
    max-width: 100%;
  }
}
