:root{
  --bg:#0b0b0b;
  --fg:#f6f6f6;
  --muted:#bdbdbd;
  --card:#151515;
  --border:#262626;
  --accent:#f5f5f0; /* blanco roto */
}

/* Reset */
*{ box-sizing:border-box }
html,body{
  margin:0; padding:0;
  background:var(--bg); color:var(--fg);
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,"Helvetica Neue",Arial,sans-serif;
  overflow-x:hidden;
}
html{ scroll-behavior:smooth }
a{ color:inherit; text-decoration:none }
.container{ max-width:1100px; margin:auto; padding:0 16px }

/* ========== BOTONES (unificados y más compactos) ========== */
.btn{
  display:inline-block; background:var(--accent); color:#000;
  padding:10px 16px; border-radius:10px; font-weight:700;
  text-decoration:none; transition:transform .2s, box-shadow .2s;
  box-shadow:0 4px 12px rgba(0,0,0,.4);
}
.btn:hover{ transform:scale(1.05); background:#a37d58; color:#fff; box-shadow:0 6px 14px rgba(0,0,0,.6) }

.btn-outline{
  display:inline-block; background:transparent;
  border:1px solid var(--accent); color:var(--accent);
  padding:8px 14px; border-radius:10px; text-decoration:none;
  box-shadow:0 6px 20px rgba(0,0,0,.5);
}
.btn-outline:hover{ background:var(--accent); color:#000 }

.btn-sm{ padding:6px 12px; border-radius:10px; font-weight:700; font-size:14px }
.btn-group{ display:flex; gap:10px; margin-top:10px }

/* ========== HEADER FULLSCREEN ========== */
header.hero{
  min-height:100svh; padding:16px;
  display:flex; flex-direction:column; align-items:center; justify-content:flex-start;
  text-align:center; gap:12px; overflow:auto;
  padding-bottom:calc(16px + env(safe-area-inset-bottom));
  background:
    radial-gradient(800px 300px at 50% -10%, rgba(199,161,122,.10), transparent 60%),
    radial-gradient(800px 300px at 50% 110%, rgba(255,255,255,.05), transparent 60%),
    url('logo-bg.png') center/cover no-repeat;
  position:relative; z-index:1;
}
.hero .logo{
  max-width:min(420px,85vw); max-height:clamp(120px,28vh,360px); height:auto;
  filter:drop-shadow(0 18px 48px rgba(0,0,0,.75));
}
.hero .btn{ margin-top:14px }

/* Cajas del hero (dos columnas, responsive) */
.hero-cards{
  width:min(900px,100%); margin:8px auto 0;
  display:grid; grid-template-columns:1fr 1fr; gap:12px;
}
@media (max-width:720px){
  .hero-cards{ grid-template-columns:1fr }
}
.cta-bottom{
  position:sticky; bottom:12px; align-self:center; margin-top:12px;
}
@media (max-height:740px){
  .hero .logo{ max-height:22vh }
  .hero-cards{ gap:10px }
  .card-cta{ padding:12px }
  .cta-bottom{ bottom:8px }
}

.card-cta{
  background:rgba(10,10,10,.86);
  border:1px solid rgba(255,255,255,.12);
  border-radius:14px; padding:16px; text-align:left; color:#f3f3f3;
  backdrop-filter:saturate(120%) blur(2px);
  box-shadow:0 8px 28px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.03);
}
.card-cta h3{ margin:0 0 8px; color:var(--accent); font-size:18px; text-shadow:0 1px 0 rgba(0,0,0,.7), 0 0 18px rgba(0,0,0,.25) }
.card-cta .phone{ font-size:18px; margin:6px 0 10px }

/* Horarios */
.hours{ list-style:none; padding:0; margin:0; display:grid; gap:6px; color:#e8e8e8 }
.hours li{ text-shadow:0 1px 0 rgba(0,0,0,.6) }
.hours li.today{
  color:#fff; font-weight:700;
  background:rgba(199,161,122,.25); border-radius:6px; padding:2px 6px;
}

/* ========== SECCIONES GENERALES ========== */
section{ padding:36px 0; border-top:1px solid var(--border) }
h2{ font-size:clamp(22px, 3.2vw, 28px); margin:0 0 16px; color:var(--accent) }
#carta{ scroll-margin-top:16px } /* ancla con offset */

/* ========== CARTA ========== */
.card{
  background:rgba(15,15,15,.9);
  border:1px solid var(--accent);
  border-radius:16px; padding:18px;
}

/* (legend ya no se usa, lo dejamos por si lo reutilizas) */
.legend{
  display:flex; gap:10px; flex-wrap:wrap; align-items:center; justify-content:flex-start;
  padding:10px 12px; margin-bottom:14px; border-radius:14px;
  background:rgba(15,15,15,.85);
  border:1px solid rgba(255,255,255,.08);
  box-shadow:inset 0 10px 24px rgba(0,0,0,.32), 0 6px 18px rgba(0,0,0,.28);
  color:var(--muted); font-size:12px;
}

/* --- Masonry con multi-column en desktop (adiós huecos altos) --- */
.menu{ 
  display:block;           /* móvil: 1 columna normal */
  margin-top:14px;
}
@media (min-width:880px){
  .menu{
    column-count:2;        /* número de columnas en escritorio */
    column-gap:18px;       /* separación entre columnas */
  }
}

.menu-cat{
  background:var(--card);
  border:1px solid var(--border);
  padding:14px;
  border-radius:14px;
  break-inside:avoid;      /* no partir tarjetas entre columnas */
  margin-bottom:16px;      /* separador vertical (sustituye gap de grid) */
}

/* Título de categoría pegajoso (solo en móvil/una columna) */
.menu-cat h3{
  margin:0 0 8px; font-size:20px; color:var(--accent);
  position:sticky; top:0;
  background:rgba(21,21,21,.92);
  backdrop-filter: blur(2px) saturate(120%);
  padding:8px 10px;
  margin:-14px -14px 8px;     /* ancho completo de la tarjeta */
  border-bottom:1px solid rgba(255,255,255,.06);
  border-top-left-radius:14px; border-top-right-radius:14px;
}
/* En desktop (multi-column) desactivamos sticky para evitar glitches */
@media (min-width:880px){
  .menu-cat h3{
    position:static;
    background:transparent;
    backdrop-filter:none;
    padding:0;
    margin:0 0 8px;
    border:none;
    border-radius:0;
  }
}

/* Descripción de categoría: más discreta */
.menu-cat .cat-desc {
  font-size: 0.9em;        /* un poco más pequeña */
  color: #666;             /* menos protagonista */
  margin: 0.25em 0 0.75em; /* separadita */
  line-height: 1.3;
  white-space: normal;     /* permite varias líneas */
  overflow: visible;       /* que no se corte */
  text-overflow: unset;    /* sin puntos suspensivos */
}
@media (max-width:520px){
  .menu-cat .cat-desc{
    font-size:13px; line-height:1.3;
    display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
  }
}

.item{
  display:flex; align-items:flex-start; justify-content:space-between;
  gap:14px; padding:10px 0; border-bottom:1px dashed rgba(255,255,255,.09);
}
.item:last-child{ border-bottom:none }
.item .name{ font-weight:600 }
.item .desc{ color:var(--muted); font-size:14px; margin-top:4px }

/* Precios con mejor alineación óptica */
.price{
  white-space:nowrap; font-weight:800; letter-spacing:.1px;
  min-width:5.5ch; text-align:right;
}

.tags{ display:flex; gap:8px; flex-wrap:wrap; margin-top:6px }

.tag,.badge{
  font-size:13px; font-weight:600; letter-spacing:.2px; color:#f2f2f2;
  padding:4px 10px; border-radius:999px;
  border:1px solid rgba(255,255,255,.18);
  background:linear-gradient(180deg, rgba(28,28,28,.92) 0%, rgba(18,18,18,.92) 100%);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.04), 0 2px 8px rgba(0,0,0,.35);
  text-shadow:0 1px 0 rgba(0,0,0,.5);
}
@media (max-width:480px){
  .tags{ gap:6px }
  .tag,.badge{ font-size:11px; padding:2px 8px }
}
.tag:hover,.badge:hover,
.tag:focus-visible,.badge:focus-visible{
  border-color:rgba(199,161,122,.55);
  box-shadow:inset 0 0 0 1px rgba(199,161,122,.25), 0 3px 10px rgba(0,0,0,.45);
  outline:none;
}

/* Bloque de notas de la carta (legal/suplementos) */
.menu-notes{
  margin-top:14px; padding:10px 12px;
  background:rgba(255,255,255,.035);
  border:1px dashed rgba(255,255,255,.12);
  border-radius:10px; color:#bdbdbd;
  font-size:.9rem; line-height:1.35;
}
.menu-notes p{ margin:0 }
.menu-notes p + p{ margin-top:6px }

/* ========== INFO (si la usas debajo del header) ========== */
#info h1{ margin:0 0 6px; font-size:26px }
.info-grid{ display:grid; grid-template-columns:repeat(auto-fit, minmax(220px,1fr)); gap:12px 18px }
#info h3{ margin:6px 0 4px; font-size:18px; color:var(--accent) }
#info p{ margin:2px 0; color:var(--muted) }
#info .btn-outline{ margin-top:8px }

/* ========== FOOTER ========== */
footer{ padding:20px 0; border-top:1px solid var(--border); color:#9a9a9a; text-align:center }

/* ========== MODAL RESERVA (sin verdes) ========== */
.modal{
  position:fixed; inset:0; background:rgba(0,0,0,.7);
  display:flex; align-items:center; justify-content:center; z-index:1000;
}
.modal[hidden]{ display:none }
.modal-content{
  background:#fff; color:#222; padding:1.5rem; border-radius:12px;
  max-width:400px; width:90%; box-shadow:0 10px 30px rgba(0,0,0,.4); position:relative; font-family:inherit;
}
.modal-content h3{ margin:0 0 1rem; font-size:1.3rem; text-align:center }
.modal-content label{ display:block; font-size:.9rem; margin:.5rem 0 .2rem }
.modal-content input,
.modal-content textarea,
.modal-content select{
  width:100%; padding:.5rem; border-radius:6px; border:1px solid #ccc; margin-bottom:.8rem; font-size:.95rem;
}
.modal-content textarea{ resize:vertical; min-height:60px }
.modal-actions{ display:flex; justify-content:flex-end; gap:.6rem }
.modal-actions button{
  padding:.5rem 1rem; border:none; border-radius:6px; cursor:pointer; font-size:.95rem;
}
.modal-actions .btn-primary{ background:var(--accent); color:#000 }
.modal-actions .btn-primary:hover{ background:#a37d58; color:#fff }
.modal-actions .btn-secondary{ background:#eee; color:#333 }

.field-error{ color:#ff6b6b; font-size:.9rem; margin-top:4px }
.modal-content input.has-error,
.modal-content textarea.has-error{ border-color:#ff6b6b; outline:0 }

/* ========== Fondo patrón + overlay oscuro ========== */
body{
  position:relative;
  background-image:url('background.jpg');
  background-repeat:repeat;
  background-size:2000px auto;
  background-position:center;
}
body::before{
  content:""; position:fixed; inset:0; pointer-events:none;
  background:linear-gradient(to bottom, rgba(0,0,0,.78), rgba(0,0,0,.74));
  z-index:0;
}
header.hero, main, footer{ position:relative; z-index:1 }

/* ========== Utilidades ========== */
[hidden]{ display:none !important }
.link-like{
  background:transparent; border:1px solid var(--border);
  padding:6px 10px; border-radius:10px; color:var(--fg); cursor:pointer;
}
.link-like:hover{ border-color:var(--accent); color:var(--accent) }


/* Evitar que los botones queden “pintados” en móviles */
a, button { -webkit-tap-highlight-color: transparent; }
.btn, .btn-outline { user-select: none; -webkit-user-select: none; }
.btn:focus, .btn-outline:focus { outline: none; }
.btn:focus-visible, .btn-outline:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.btn:active, .btn-outline:active { filter: brightness(0.95); transform: translateY(0); }
@media (hover:hover) {
  .btn:hover { transform: scale(1.05); background:#a37d58; color:#fff; box-shadow:0 6px 14px rgba(0,0,0,.6) }
  .btn-outline:hover { background: var(--accent); color:#000; }
}

/* Notas pequeñas (si las usas aún en párrafos sueltos) */
.small-note {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  margin: 2px 0;
}
.small-note:first-of-type {
  margin-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 10px;
}
/* Mostrar la descripción completa también en móvil */
@media (max-width:520px){
  .menu-cat .cat-desc{
    display: block !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
    overflow: visible !important;
    white-space: normal !important;
  }
}

/* Píldoras planas, no clicables */
.tag, .badge{
  display:inline-block;
  font-size:12px;
  font-weight:700;
  letter-spacing:.2px;
  padding:3px 9px;
  border-radius:999px;
  margin:2px 0;
  cursor:default;
  pointer-events:none;

  /* plano (sin borde ni sombras) */
  border:none;
  background:#2a2a2a;
  color:#fff;
  box-shadow:none;
  text-shadow:none;
  transition:none;
}

/* anula cualquier hover heredado */
.tag:hover, .badge:hover,
.tag:focus-visible, .badge:focus-visible{
  border:none;
  box-shadow:none;
  outline:none;
}

/* --- PILLS: tamaño discreto + paleta pastel --- */
.tags{ gap:6px; margin-top:4px }

.tag, .badge{
  display:inline-block;
  font-size:11px;             /* más pequeñas */
  font-weight:600;
  letter-spacing:.15px;
  padding:2px 8px;            /* menos padding */
  border-radius:8px;          /* menos redondeo */
  margin:2px 0;
  cursor:default; pointer-events:none;

  border:none;
  background:#2a2a2a10;       /* base muy suave/transparente */
  color:#eee;
  box-shadow:none; text-shadow:none;
  opacity:.95;                /* bajamos protagonismo */
}

/* Pastel por alérgeno (usa data-key generado en app.js) */
.tag[data-key="gluten"]         { background:#E7A6A6; color:#2b1a1a; }
.tag[data-key="lacteos"], 
.tag[data-key="lactosa"]        { background:#A8C8E8; color:#142033; }
.tag[data-key="huevos"], 
.tag[data-key="huevo"]          { background:#F9E17A; color:#3a2a00; } /* Amarillo suave tirando a limón */
.tag[data-key="mostaza"]        { background:#EABF8B; color:#3a210b; } /* Naranja pastel clarito */
.tag[data-key="frutos-secos"]   { background:#CBB3E6; color:#2b1f3a; }
.tag[data-key="pescado"]        { background:#A9E0D0; color:#103a33; }
.tag[data-key="moluscos"]       { background:#9FD5D1; color:#0d3331; }
.tag[data-key="marisco"]        { background:#9EDAE0; color:#0e2f33; }
.tag[data-key="soja"]           { background:#D8B57A; color:#3a2b16; }
.tag[data-key="apio"]           { background:#B7D38C; color:#233011; }
.tag[data-key="sesamo"]         { background:#C8B88A; color:#2f2a16; }
.tag[data-key="sulfitos"]       { background:#D0D0D0; color:#222; }

/* Flags */
.tag[data-key="vegano"]         { background:#B5E4C5; color:#103b20; }
.tag[data-key="vegetariano"]    { background:#C7EDCF; color:#12391e; }
.tag[data-key="picante"]        { background:#F4B1B1; color:#3a1616; }

.item-out {
  opacity: 0.5;
  text-decoration: line-through;
}
#loading {
  text-align: center;
  margin: 20px;
  font-style: italic;
}
/* Horario: por defecto solo HOY; al expandir muestra SEMANA y esconde los textos de HOY */
#card-horario .hours.full-week{ display:none; }
#card-horario.expanded .hours.full-week{ display:grid; } /* o block, según tu layout */
#card-horario.expanded .hours-today .day,
#card-horario.expanded .hours-today .range{ display:none !important; }

/* por si acaso algún inline/JS pone hidden */
[hidden]{ display:none !important; }


footer .badges{
  margin-top:8px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:center;
  align-items:center;
}
footer .badges img{
  height:20px;
  display:block;
}
@media (max-width:480px){
  footer .badges img{ height:18px; }
}