/* =========================================================
   Mar y Tierra — sistema visual "Horizonte"
   Abismo (mar) arriba, Brasa (parrilla) como acción.
   ========================================================= */

:root {
  color-scheme: light;
  /* Paleta base */
  --abismo: #0E2A3B;
  --abismo-2: #163E54;
  --salitre: #EEF2F1;
  --brasa: #C2410C;
  --brasa-hover: #A3360A;
  --alga: #2F5D50;
  --arena: #D8C39A;
  --carbon: #1E1B19;

  /* Roles semánticos */
  --bg: var(--salitre);
  --surface: #FFFFFF;
  --text: var(--carbon);
  --text-muted: #55605E;
  --text-on-dark: #F4F7F6;
  --text-on-dark-muted: #AFC3CC;
  --line: #D6DEDC;
  --line-strong: #B9C6C3;
  --focus: #1D6FA3;
  --success: var(--alga);
  --danger: #B42318;

  /* Tipografía */
  --font-display: 'Gloock', 'Times New Roman', serif;
  --font-body: 'Karla', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --fs-xs: .8125rem;
  --fs-sm: .9375rem;
  --fs-base: 1rem;
  --fs-md: 1.1875rem;
  --fs-lg: 1.5rem;
  --fs-xl: 2rem;
  --fs-2xl: clamp(2.25rem, 5vw, 3.25rem);
  --fs-hero: clamp(2.75rem, 8vw, 5.5rem);

  /* Espacio y forma */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-pill: 999px;
  --shadow-float: 0 12px 32px -12px rgba(14, 42, 59, .35);
  --shadow-sheet: 0 -16px 48px -16px rgba(14, 42, 59, .4);

  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --t-fast: 150ms;
  --t-med: 240ms;

  --maxw: 1180px;
  --header-h: 64px;
  --bottomnav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.55;
  overscroll-behavior-y: none;
  padding-bottom: calc(var(--bottomnav-h) + env(safe-area-inset-bottom));
}
@media (min-width: 900px) { body { padding-bottom: 0; } }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.08; margin: 0; letter-spacing: -.01em; }
h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-md); }
p { margin: 0; }
.muted { color: var(--text-muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.on-dark :focus-visible { outline-color: var(--arena); }

.skip-link { position: absolute; left: 8px; top: -60px; z-index: 200; background: var(--abismo); color: #fff; padding: 10px 16px; border-radius: var(--r-sm); }
.skip-link:focus { top: 8px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--s4); }
@media (min-width: 700px) { .wrap { padding: 0 var(--s5); } }
.section { padding: var(--s8) 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s5); flex-wrap: wrap; }
.section-head p { max-width: 52ch; margin-top: var(--s2); }

.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon--lg { width: 28px; height: 28px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 48px; padding: 0 var(--s5);
  border: 1.5px solid transparent; border-radius: var(--r-pill);
  font-weight: 700; font-size: var(--fs-base); text-decoration: none; text-align: center; line-height: 1.2;
  transition: background-color var(--t-fast) var(--ease-out), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--brasa); color: #fff; }
.btn--primary:hover { background: var(--brasa-hover); }
.btn--dark { background: var(--abismo); color: #fff; }
.btn--dark:hover { background: var(--abismo-2); }
.btn--ghost { background: transparent; border-color: var(--line-strong); color: var(--text); }
.btn--ghost:hover { border-color: var(--abismo); }
.btn--light { background: #fff; color: var(--abismo); }
.btn--light:hover { background: var(--salitre); }
.btn--link { background: none; border: 0; padding: 0; min-height: 44px; color: var(--abismo); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.btn--block { width: 100%; }
.btn--sm { min-height: 40px; padding: 0 var(--s4); font-size: var(--fs-sm); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.btn--whatsapp { background: #1F7A4D; color: #fff; }
.btn--whatsapp:hover { background: #18633E; }

.icon-btn {
  width: 44px; height: 44px; display: inline-grid; place-items: center;
  border-radius: var(--r-pill); border: 1.5px solid var(--line); background: var(--surface);
  transition: border-color var(--t-fast), background-color var(--t-fast);
}
.icon-btn:hover { border-color: var(--abismo); }

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--abismo); color: var(--text-on-dark);
}
.site-header .wrap { display: flex; align-items: center; gap: var(--s4); height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand-mark { width: 34px; height: 34px; }
.brand-name { font-family: var(--font-display); font-size: 1.35rem; line-height: 1; }
.main-nav { display: none; gap: var(--s1); }
.main-nav a { text-decoration: none; padding: 10px 14px; border-radius: var(--r-pill); color: var(--text-on-dark-muted); font-weight: 600; transition: color var(--t-fast), background-color var(--t-fast); }
.main-nav a:hover { color: #fff; }
.main-nav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.1); }
@media (min-width: 900px) { .main-nav { display: flex; } }

.mode-chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; max-width: 220px;
  padding: 0 14px; border-radius: var(--r-pill); border: 1.5px solid rgba(255,255,255,.25);
  background: transparent; color: #fff; font-weight: 600; font-size: var(--fs-sm);
}
.mode-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mode-chip:hover { border-color: var(--arena); }
.cart-btn { position: relative; background: var(--brasa); border-color: var(--brasa); color: #fff; }
.cart-btn:hover { background: var(--brasa-hover); border-color: var(--brasa-hover); }
.cart-count {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 10px; background: var(--arena); color: var(--carbon);
  font-size: 12px; font-weight: 700; display: grid; place-items: center;
}
.cart-count[data-empty="true"] { display: none; }
@media (max-width: 520px) { .mode-chip { max-width: 140px; } }

/* ---------- Navegación inferior (móvil) ---------- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--bottomnav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface); border-top: 1px solid var(--line);
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  text-decoration: none; font-size: 12px; font-weight: 600; color: var(--text-muted);
}
.bottom-nav a[aria-current="page"] { color: var(--brasa); }
@media (min-width: 900px) { .bottom-nav { display: none; } }

/* ---------- Hero Horizonte ---------- */
.hero { position: relative; background: var(--abismo); color: var(--text-on-dark); overflow: hidden; }
.hero-sea { padding: var(--s8) 0 var(--s9); position: relative; }
.hero-sea::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 80% at 85% 10%, rgba(80,150,180,.25), transparent 70%),
    repeating-linear-gradient(180deg, transparent 0 22px, rgba(255,255,255,.035) 22px 23px);
}
.hero h1 { font-size: var(--fs-hero); max-width: 12ch; position: relative; }
.hero-lead { margin-top: var(--s4); max-width: 46ch; font-size: var(--fs-md); color: var(--text-on-dark-muted); position: relative; }
.horizon { display: block; width: 100%; height: 90px; margin-top: -89px; position: relative; }
.horizon path { fill: var(--salitre); }
.horizon .wave-line { fill: none; stroke: var(--arena); stroke-width: 2; stroke-dasharray: 2200; stroke-dashoffset: 2200; animation: draw 1.6s var(--ease-out) .2s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.hero-land { background: var(--salitre); color: var(--text); padding-bottom: var(--s7); }
.mode-picker {
  position: relative; margin-top: -48px; z-index: 2;
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-float);
  padding: var(--s5);
}
.mode-picker-title { font-family: var(--font-display); font-size: var(--fs-lg); margin-bottom: var(--s4); }
.mode-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); }
.mode-option {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left;
  min-height: 96px; padding: var(--s4); border-radius: var(--r-md);
  border: 1.5px solid var(--line); background: var(--surface);
  transition: border-color var(--t-fast), background-color var(--t-fast);
}
.mode-option:hover { border-color: var(--abismo); }
.mode-option[aria-checked="true"] { border-color: var(--brasa); background: #FBF1EC; }
.mode-option .icon { width: 26px; height: 26px; color: var(--abismo); }
.mode-option[aria-checked="true"] .icon { color: var(--brasa); }
.mode-option strong { font-size: var(--fs-md); line-height: 1.15; }
.mode-option small { color: var(--text-muted); font-size: var(--fs-xs); line-height: 1.3; }
@media (max-width: 560px) {
  .mode-options { grid-template-columns: 1fr; }
  .mode-option { flex-direction: row; align-items: center; min-height: 64px; gap: 14px; }
  .mode-option small { display: block; }
}
.mode-fields { margin-top: var(--s5); display: grid; gap: var(--s4); }
.mode-fields[hidden] { display: none; }
.mode-fields .actions { display: flex; gap: var(--s3); flex-wrap: wrap; }

/* ---------- Formularios ---------- */
.field { display: grid; gap: 6px; }
.field label, .field .label { font-weight: 700; font-size: var(--fs-sm); }
.field .hint { font-size: var(--fs-xs); color: var(--text-muted); }
.field .error { font-size: var(--fs-xs); color: var(--danger); font-weight: 600; }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 10px 14px;
  border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface);
  font-size: 16px; transition: border-color var(--t-fast);
}
.textarea { min-height: 88px; resize: vertical; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--abismo-2); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.grid-2 { display: grid; gap: var(--s4); }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip {
  min-height: 40px; padding: 0 14px; border-radius: var(--r-pill);
  border: 1.5px solid var(--line-strong); background: var(--surface); font-weight: 600; font-size: var(--fs-sm);
  transition: border-color var(--t-fast), background-color var(--t-fast), color var(--t-fast);
}
.chip:hover { border-color: var(--abismo); }
.chip[aria-pressed="true"], .chip[aria-checked="true"] { background: var(--abismo); color: #fff; border-color: var(--abismo); }
.chip[disabled] { opacity: .4; cursor: not-allowed; text-decoration: line-through; }

.radio-cards { display: grid; gap: var(--s2); }
.radio-card { display: flex; align-items: center; gap: var(--s3); padding: 14px var(--s4); border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--surface); cursor: pointer; transition: border-color var(--t-fast); }
.radio-card:hover { border-color: var(--abismo); }
.radio-card:has(input:checked) { border-color: var(--brasa); background: #FBF1EC; }
.radio-card input { width: 20px; height: 20px; accent-color: var(--brasa); flex: none; }
.radio-card .rc-body { flex: 1; }
.radio-card .rc-body small { display: block; color: var(--text-muted); }

.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line-strong); border-radius: var(--r-pill); background: var(--surface); }
.stepper button { width: 44px; height: 44px; border: 0; background: none; display: grid; place-items: center; border-radius: var(--r-pill); }
.stepper button:hover { background: var(--salitre); }
.stepper output { min-width: 28px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.stepper--sm button { width: 36px; height: 36px; }

/* ---------- Menú ---------- */
.page-head { background: var(--abismo); color: var(--text-on-dark); padding: var(--s7) 0 var(--s6); }
.page-head p { color: var(--text-on-dark-muted); margin-top: var(--s3); max-width: 56ch; font-size: var(--fs-md); }

.menu-toolbar { position: sticky; top: var(--header-h); z-index: 40; background: var(--salitre); border-bottom: 1px solid var(--line); }
.menu-toolbar .wrap { padding-top: var(--s3); padding-bottom: var(--s3); display: grid; gap: var(--s3); }
.cat-tabs { display: flex; gap: var(--s2); overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--s4) * -1); padding: 0 var(--s4); }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tabs a { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: var(--r-pill); text-decoration: none; font-weight: 600; border: 1.5px solid var(--line-strong); background: var(--surface); }
.cat-tabs a[aria-current="true"] { background: var(--abismo); border-color: var(--abismo); color: #fff; }
.search-row { display: flex; gap: var(--s2); align-items: center; }
.search { position: relative; flex: 1; }
.search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.search .input { padding-left: 44px; border-radius: var(--r-pill); }

.menu-layout { display: grid; gap: var(--s6); padding-top: var(--s6); padding-bottom: var(--s8); }
@media (min-width: 1024px) { .menu-layout { grid-template-columns: 1fr 340px; align-items: start; } }
.menu-cat { scroll-margin-top: calc(var(--header-h) + 130px); margin-bottom: var(--s7); }
.menu-cat-head { display: flex; align-items: baseline; gap: var(--s3); padding-bottom: var(--s3); border-bottom: 2px solid var(--abismo); margin-bottom: var(--s2); }
.menu-cat-head p { color: var(--text-muted); font-size: var(--fs-sm); }
.dish-list { list-style: none; margin: 0; padding: 0; display: grid; }
@media (min-width: 760px) { .dish-list { grid-template-columns: 1fr 1fr; column-gap: var(--s6); } }
.dish {
  display: grid; grid-template-columns: 1fr auto; gap: 6px var(--s4); align-items: start;
  padding: var(--s4) 0; border-bottom: 1px solid var(--line);
}
.dish-btn { all: unset; cursor: pointer; display: grid; gap: 6px; border-radius: var(--r-sm); }
.dish-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.dish-name { font-family: var(--font-display); font-size: 1.3rem; line-height: 1.15; }
.dish-desc { color: var(--text-muted); font-size: var(--fs-sm); max-width: 48ch; }
.dish-price { font-weight: 700; font-variant-numeric: tabular-nums; }
.dish-side { display: flex; flex-direction: column; align-items: end; gap: var(--s2); }
.add-btn { width: 44px; height: 44px; border-radius: var(--r-pill); border: 0; background: var(--brasa); color: #fff; display: grid; place-items: center; transition: background-color var(--t-fast), transform var(--t-fast); }
.add-btn:hover { background: var(--brasa-hover); }
.add-btn:active { transform: scale(.92); }
.add-btn.bump { animation: bump .35s var(--ease-out); }
@keyframes bump { 40% { transform: scale(1.18); } }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: var(--r-sm); background: var(--salitre); border: 1px solid var(--line); color: var(--text-muted); }
.tag--fav { background: #F6EEDC; border-color: var(--arena); color: #6B5420; }
.tag--hot { background: #FBEAE2; border-color: #F0C3AE; color: var(--brasa-hover); }
.tag--sea { background: #E3EEF3; border-color: #C3D7E1; color: var(--abismo-2); }
.empty-state { padding: var(--s7) var(--s4); text-align: center; color: var(--text-muted); display: grid; gap: var(--s3); justify-items: center; }

/* Resumen lateral del carrito (escritorio) */
.cart-aside { display: none; position: sticky; top: calc(var(--header-h) + 140px); background: var(--surface); border-radius: var(--r-lg); padding: var(--s5); border: 1px solid var(--line); }
@media (min-width: 1024px) { .cart-aside { display: block; } }

/* Barra flotante del carrito (móvil) */
.cart-bar {
  position: fixed; left: var(--s3); right: var(--s3); z-index: 55;
  bottom: calc(var(--bottomnav-h) + env(safe-area-inset-bottom) + var(--s3));
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  min-height: 56px; padding: 0 var(--s4) 0 var(--s5); border-radius: var(--r-pill);
  background: var(--brasa); color: #fff; border: 0; font-weight: 700; box-shadow: var(--shadow-float);
  transform: translateY(0); transition: transform var(--t-med) var(--ease-out), opacity var(--t-med);
}
.cart-bar.is-hidden { transform: translateY(140%); opacity: 0; pointer-events: none; }
.cart-bar .pill { background: rgba(0,0,0,.2); border-radius: var(--r-pill); padding: 6px 12px; font-variant-numeric: tabular-nums; }
@media (min-width: 1024px) { .cart-bar { display: none !important; } }

/* ---------- Diálogos / hojas ---------- */
dialog { border: 0; padding: 0; color: var(--text); background: transparent; max-width: none; max-height: none; }
dialog::backdrop { background: rgba(14, 42, 59, .55); }
.sheet {
  position: fixed; inset: auto 0 0 0; margin: 0; width: 100%;
  max-height: 92vh; display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: var(--shadow-sheet);
}
.sheet[open] { animation: sheet-in var(--t-med) var(--ease-out); }
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } }
@media (min-width: 700px) {
  .sheet { inset: 0; margin: auto; width: min(560px, calc(100% - 48px)); max-height: 86vh; border-radius: var(--r-lg); }
  .sheet--drawer { inset: 0 0 0 auto; margin: 0; height: 100%; max-height: none; width: 420px; border-radius: 0; }
  .sheet--drawer[open] { animation: drawer-in var(--t-med) var(--ease-out); }
}
@keyframes drawer-in { from { transform: translateX(40px); opacity: 0; } }
.sheet-head { display: flex; align-items: start; justify-content: space-between; gap: var(--s3); padding: var(--s5) var(--s5) var(--s3); }
.sheet-body { padding: 0 var(--s5) var(--s5); overflow-y: auto; overscroll-behavior: contain; flex: 1; display: grid; gap: var(--s5); align-content: start; }
.sheet-foot { padding: var(--s4) var(--s5) calc(var(--s4) + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; gap: var(--s3); align-items: center; }
.sheet-grabber { width: 40px; height: 4px; border-radius: 2px; background: var(--line-strong); margin: 10px auto 0; }
@media (min-width: 700px) { .sheet-grabber { display: none; } }

.option-group { border: 0; padding: 0; margin: 0; display: grid; gap: var(--s2); }
.option-group legend { font-weight: 700; margin-bottom: var(--s2); display: flex; gap: var(--s2); align-items: center; }
.req { font-size: 12px; font-weight: 700; color: var(--brasa-hover); background: #FBEAE2; padding: 2px 8px; border-radius: var(--r-sm); }

/* Líneas del carrito */
.cart-lines { list-style: none; padding: 0; margin: 0; display: grid; }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: 6px var(--s3); padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.cart-line-name { font-weight: 700; }
.cart-line-opts { font-size: var(--fs-xs); color: var(--text-muted); }
.cart-line-price { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.cart-line-actions { display: flex; align-items: center; gap: var(--s2); grid-column: 1 / -1; }
.totals { display: grid; gap: 6px; padding-top: var(--s3); font-variant-numeric: tabular-nums; }
.totals div { display: flex; justify-content: space-between; gap: var(--s3); }
.totals .grand { font-size: var(--fs-md); font-weight: 700; padding-top: var(--s2); border-top: 1px solid var(--line); margin-top: var(--s1); }
.totals .discount { color: var(--alga); font-weight: 600; }
.notice { display: flex; gap: var(--s3); align-items: start; padding: var(--s3) var(--s4); border-radius: var(--r-md); background: #E7EFEC; color: var(--alga); font-size: var(--fs-sm); font-weight: 600; }
.notice--warm { background: #F6EEDC; color: #6B5420; }
.progress { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--alga); border-radius: 4px; transition: width var(--t-med) var(--ease-out); }

/* ---------- Toast ---------- */
.toast-region { position: fixed; z-index: 300; left: 50%; transform: translateX(-50%); top: calc(var(--header-h) + 12px); display: grid; gap: var(--s2); width: min(420px, calc(100% - 32px)); pointer-events: none; }
.toast { display: flex; align-items: center; gap: var(--s3); padding: 12px 16px; border-radius: var(--r-md); background: var(--carbon); color: #fff; font-weight: 600; box-shadow: var(--shadow-float); animation: toast-in var(--t-med) var(--ease-out); pointer-events: auto; }
.toast .icon { color: var(--arena); }
.toast.out { animation: toast-out var(--t-fast) ease-in forwards; }
@keyframes toast-in { from { transform: translateY(-12px); opacity: 0; } }
@keyframes toast-out { to { transform: translateY(-8px); opacity: 0; } }

/* ---------- Inicio: secciones ---------- */
.favorites { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.fav {
  position: relative; display: grid; gap: var(--s2); align-content: start;
  padding: var(--s5); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line);
}
.fav-origin { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 700; color: var(--text-muted); }
.fav h3 { font-size: 1.45rem; }
.fav-foot { display: flex; align-items: center; justify-content: space-between; margin-top: var(--s3); }

.modes-explain { display: grid; gap: var(--s5); }
@media (min-width: 800px) { .modes-explain { grid-template-columns: repeat(3, 1fr); } }
.mode-explain { display: grid; gap: var(--s2); align-content: start; padding-top: var(--s4); border-top: 2px solid var(--abismo); }
.mode-explain .icon { color: var(--brasa); width: 28px; height: 28px; }

.split-band { background: var(--abismo); color: var(--text-on-dark); border-radius: var(--r-lg); overflow: hidden; display: grid; }
@media (min-width: 860px) { .split-band { grid-template-columns: 1.1fr 1fr; } }
.split-band .band-copy { padding: var(--s7) var(--s6); display: grid; gap: var(--s4); align-content: center; }
.split-band .band-copy p { color: var(--text-on-dark-muted); max-width: 44ch; }
.split-band .band-art { background: var(--abismo-2); display: grid; place-items: center; padding: var(--s6); }

.branches { display: grid; gap: var(--s4); }
@media (min-width: 760px) { .branches { grid-template-columns: repeat(3, 1fr); } }
.branch { padding: var(--s5) 0; border-top: 1px solid var(--line-strong); display: grid; gap: 6px; }
.branch h3 { font-size: 1.4rem; }
.branch p { display: flex; gap: 8px; align-items: start; color: var(--text-muted); font-size: var(--fs-sm); }
.branch .icon { width: 18px; height: 18px; margin-top: 2px; }

.site-footer { background: var(--carbon); color: #CFCAC4; padding: var(--s7) 0 var(--s6); margin-top: var(--s8); }
.site-footer .wrap { display: grid; gap: var(--s5); }
@media (min-width: 760px) { .site-footer .wrap { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer a { color: #fff; }
.site-footer h3 { color: #fff; font-size: var(--fs-md); margin-bottom: var(--s2); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }

/* ---------- Checkout ---------- */
.steps { list-style: none; padding: 0; margin: 0 0 var(--s5); display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); counter-reset: step; }
.steps li { display: grid; gap: 6px; font-size: var(--fs-sm); font-weight: 700; color: var(--text-muted); counter-increment: step; }
.steps li::before { content: ""; height: 4px; border-radius: 2px; background: var(--line); }
.steps li span::before { content: counter(step) ". "; }
.steps li[data-state="done"]::before { background: var(--alga); }
.steps li[data-state="current"]::before { background: var(--brasa); }
.steps li[data-state="current"] { color: var(--text); }
.checkout-layout { display: grid; gap: var(--s6); padding-top: var(--s6); padding-bottom: var(--s8); }
@media (min-width: 1000px) { .checkout-layout { grid-template-columns: 1fr 380px; align-items: start; } }
.panel { background: var(--surface); border-radius: var(--r-lg); padding: var(--s5); border: 1px solid var(--line); display: grid; gap: var(--s5); }
@media (min-width: 700px) { .panel { padding: var(--s6); } }
.panel-actions { display: flex; justify-content: space-between; gap: var(--s3); flex-wrap: wrap-reverse; }
.summary { position: sticky; top: calc(var(--header-h) + 16px); }
.tip-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s2); }
.tip-options .chip { padding: 0 6px; }

/* ---------- Reservas: croquis ---------- */
.reserve-layout { display: grid; gap: var(--s6); padding-top: var(--s6); padding-bottom: var(--s8); }
@media (min-width: 1000px) { .reserve-layout { grid-template-columns: 360px 1fr; align-items: start; } }
.floor-wrap { background: var(--surface); border-radius: var(--r-lg); border: 1px solid var(--line); padding: var(--s4); display: grid; gap: var(--s4); }
@media (min-width: 700px) { .floor-wrap { padding: var(--s5); } }
.floor { width: 100%; height: auto; touch-action: manipulation; user-select: none; }
.floor .zone { fill: #F4F7F6; stroke: var(--line-strong); stroke-width: 1.5; }
.floor .zone--terraza { fill: #EAF1F3; }
.floor .zone--privado { fill: #F6F1E6; }
.floor .zone-label { font-family: var(--font-display); font-size: 17px; fill: var(--abismo); }
.floor .zone-sub { font-family: var(--font-body); font-size: 11px; fill: var(--text-muted); }
.floor .fixture { fill: #DCE3E1; stroke: var(--line-strong); }
.floor .fixture-label { font-family: var(--font-body); font-size: 11px; font-weight: 700; fill: var(--text-muted); }
.floor .sea { fill: var(--abismo); }
.floor .sea-line { fill: none; stroke: var(--arena); stroke-width: 1.5; }
.floor .sea-label { font-family: var(--font-body); font-size: 11px; font-weight: 700; fill: #D6E4EA; }
.floor .tbl { cursor: pointer; outline: none; }
.floor .tbl .top { fill: #fff; stroke: var(--alga); stroke-width: 2.5; transition: fill var(--t-fast), stroke var(--t-fast); }
.floor .tbl .seat { fill: var(--alga); opacity: .55; }
.floor .tbl text { font-family: var(--font-body); font-size: 12px; font-weight: 700; fill: var(--alga); pointer-events: none; text-anchor: middle; dominant-baseline: central; }
.floor .tbl:hover .top { fill: #E7EFEC; }
.floor .tbl:focus-visible .top { stroke: var(--focus); stroke-width: 4; }
.floor .tbl[data-state="busy"] { cursor: not-allowed; }
.floor .tbl[data-state="busy"] .top { fill: #E4E4E2; stroke: #A5A9A7; stroke-dasharray: 4 3; }
.floor .tbl[data-state="busy"] .seat { fill: #A5A9A7; }
.floor .tbl[data-state="busy"] text { fill: #7C807E; }
.floor .tbl[data-state="small"] { cursor: not-allowed; opacity: .38; }
.floor .tbl[aria-pressed="true"] .top { fill: var(--brasa); stroke: var(--brasa-hover); }
.floor .tbl[aria-pressed="true"] .seat { fill: var(--brasa); opacity: 1; }
.floor .tbl[aria-pressed="true"] text { fill: #fff; }
.floor .tbl[aria-pressed="true"] .top { animation: pick .3s var(--ease-out); transform-box: fill-box; transform-origin: center; }
@keyframes pick { 40% { transform: scale(1.12); } }
.legend { display: flex; flex-wrap: wrap; gap: var(--s4); font-size: var(--fs-sm); color: var(--text-muted); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 16px; height: 16px; border-radius: 50%; display: inline-block; border: 2.5px solid var(--alga); background: #fff; }
.legend i.busy { border-color: #A5A9A7; border-style: dashed; background: #E4E4E2; }
.legend i.sel { border-color: var(--brasa-hover); background: var(--brasa); }
.table-info { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; padding: var(--s4); border-radius: var(--r-md); background: var(--salitre); }
.time-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: var(--s2); }
.list-plain { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s3); }
.res-item { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); padding: var(--s4); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); flex-wrap: wrap; }

/* ---------- Fidelidad ---------- */
.member-card {
  position: relative; overflow: hidden; border-radius: 22px; padding: var(--s5);
  min-height: 210px; display: grid; align-content: space-between; gap: var(--s5);
  background: var(--abismo); color: #fff; box-shadow: var(--shadow-float);
}
.member-card[data-tier="coral"] { background: linear-gradient(160deg, #7A2E1A, #C2410C); }
.member-card[data-tier="ancla"] { background: linear-gradient(160deg, #1E1B19, #3A3430); }
.member-card[data-tier="arena"] { background: linear-gradient(160deg, var(--abismo), #24566F); }
.member-card .mc-top { display: flex; justify-content: space-between; align-items: start; gap: var(--s3); }
.member-card .mc-tier { font-family: var(--font-display); font-size: var(--fs-lg); }
.member-card .mc-points { font-family: var(--font-display); font-size: 3rem; line-height: 1; }
.member-card .mc-wave { position: absolute; right: -10px; bottom: -6px; width: 70%; opacity: .25; pointer-events: none; }
.member-card .mc-name { color: rgba(255,255,255,.8); }
.loyalty-layout { display: grid; gap: var(--s6); padding-top: var(--s6); padding-bottom: var(--s8); }
@media (min-width: 960px) { .loyalty-layout { grid-template-columns: 400px 1fr; align-items: start; } }
.rewards { display: grid; gap: var(--s3); }
@media (min-width: 640px) { .rewards { grid-template-columns: 1fr 1fr; } }
.reward { display: grid; gap: var(--s2); padding: var(--s4); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); align-content: space-between; }
.reward-top { display: flex; justify-content: space-between; gap: var(--s3); align-items: start; }
.reward-cost { font-weight: 700; color: var(--alga); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tiers { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.tiers th, .tiers td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tiers th { font-weight: 700; }
.tiers tr[data-current="true"] td { background: #F6EEDC; }
.tiers .tier-name { font-family: var(--font-display); font-size: 1.15rem; }
.history { list-style: none; padding: 0; margin: 0; }
.history li { display: flex; justify-content: space-between; gap: var(--s3); padding: 10px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.history .plus { color: var(--alga); font-weight: 700; }
.history .minus { color: var(--brasa-hover); font-weight: 700; }

/* ---------- Seguimiento ---------- */
.track { display: grid; gap: 0; list-style: none; padding: 0; margin: 0; }
.track li { display: grid; grid-template-columns: 36px 1fr; gap: var(--s3); position: relative; padding-bottom: var(--s5); }
.track li::before { content: ""; position: absolute; left: 17px; top: 36px; bottom: 0; width: 2px; background: var(--line); }
.track li:last-child::before { display: none; }
.track li[data-state="done"]::before { background: var(--alga); }
.track .dot { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line-strong); background: var(--surface); color: var(--text-muted); }
.track li[data-state="done"] .dot { background: var(--alga); border-color: var(--alga); color: #fff; }
.track li[data-state="current"] .dot { border-color: var(--brasa); color: var(--brasa); box-shadow: 0 0 0 6px rgba(194,65,12,.15); }
.track li[data-state="current"] strong { color: var(--brasa-hover); }
.track small { display: block; color: var(--text-muted); }
.order-card { display: grid; gap: var(--s2); padding: var(--s4); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.order-card-top { display: flex; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; align-items: center; }
.status-pill { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: var(--r-pill); background: #E7EFEC; color: var(--alga); }
.status-pill[data-live="true"] { background: #FBEAE2; color: var(--brasa-hover); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .horizon .wave-line { stroke-dashoffset: 0; }
}
.mode-option > span { display: grid; gap: 4px; }
dialog:not([open]) { display: none !important; }
.brand-name { white-space: nowrap; }
@media (max-width: 400px) { .brand-name { display: none; } }
.floor-scroll { overflow-x: auto; overscroll-behavior-x: contain; margin: 0 calc(var(--s4) * -1); padding: 0 var(--s4); }
.floor-scroll .floor { min-width: 680px; }
.floor-hint { font-size: var(--fs-xs); color: var(--text-muted); }
@media (min-width: 760px) { .floor-scroll { margin: 0; padding: 0; } .floor-scroll .floor { min-width: 0; } .floor-hint { display: none; } }

[hidden] { display: none !important; }
.checkout-layout > *, .reserve-layout > *, .loyalty-layout > *, .menu-layout > * { min-width: 0; }
.btn--link.btn--sm { padding: 0; }
.brand-name { display: grid; gap: 3px; }
.brand-title { font-family: var(--font-display); font-size: 1.3rem; letter-spacing: .06em; line-height: 1; }
.brand-tag { font-family: var(--font-body); font-size: 11px; font-weight: 600; letter-spacing: .02em; color: var(--arena); line-height: 1; }

/* ---------- Logo LA MAYOR ---------- */
.logo { display: block; height: auto; }
.site-header .brand { color: #fff; }
.site-header .logo--mark { height: 26px; width: auto; }
.brand--footer { color: #fff; }
.brand--footer .logo--full { width: 220px; }
@media (max-width: 380px) { .site-header .logo--mark { height: 22px; } .mode-chip { max-width: 112px; } }

/* ---------- Hero con logo y video opcional ---------- */
.hero-sea { isolation: isolate; }
.hero-media { position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .8s ease; background-size: cover; background-position: center; }
.hero-media.is-ready { opacity: 1; }
.hero-media video { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,42,59,.55) 0%, rgba(14,42,59,.78) 70%, var(--abismo) 100%); }
.hero-inner { position: relative; display: grid; gap: var(--s4); }
.hero-logo { color: #fff; margin: 0; }
.hero-logo .logo--full { width: min(620px, 100%); }
.hero-claim { font-family: var(--font-display); font-size: clamp(1.6rem, 4vw, 2.4rem); line-height: 1.1; max-width: 22ch; }
.hero .hero-lead { margin-top: 0; }
@media (prefers-reduced-motion: no-preference) {
  .hero-logo .logo--full { animation: logo-in .9s var(--ease-out) both; }
  @keyframes logo-in { from { opacity: 0; transform: translateY(10px); } }
}
.noscript { margin: 0; padding: 14px 16px; background: var(--brasa); color: #fff; font-weight: 700; text-align: center; }
.hero .hero-logo { max-width: none; font-size: inherit; line-height: 1; }
