/* ============================================================
   Nihon · App de pedidos — estilos
   Paleta y tipografía del Manual de Marca v2.5.5
   ============================================================ */

/* ===== Fuentes self-hosted (subset latin · cubre acentos español) =====
   Antes se cargaban del CDN de Google (bloqueaban el render → LCP alto y
   filtraban la IP del cliente a Google). Ahora locales: más rápido + privado. */
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 300; font-display: swap;
  src: url('fonts/inter-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('fonts/inter-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('fonts/inter-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('fonts/inter-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Lora'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('fonts/lora-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Lora'; font-style: italic; font-weight: 400; font-display: swap;
  src: url('fonts/lora-400-italic.woff2') format('woff2');
}

:root {
  --negro: #1A1A1A;
  --crema: #F5F1EA;
  --crema-2: #EFEAE0;
  --dorado: #B8915C;
  --dorado-soft: #C9A877;
  --amarillo: #E5A823;
  --rojo-spicy: #C0392B;
  --verde: #6B8E5A;
  --texto: #444444;
  --secundario: #555555;
  --muted: #888888;
  --borde: rgba(26, 26, 26, 0.12);
  --sombra: 0 6px 24px rgba(26, 26, 26, 0.10);
  --sombra-fuerte: 0 12px 40px rgba(26, 26, 26, 0.22);
  --radio: 14px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--texto);
  background: var(--crema);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  padding-bottom: calc(96px + var(--safe-b));
}

em, i { font-family: 'Lora', Georgia, serif; font-style: italic; }

/* ===== Header ===== */
header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* En app instalada (standalone) el contenido va bajo la barra de estado:
     compensamos con el safe-area superior. En Safari el inset es 0. */
  padding: calc(14px + var(--safe-t)) 18px 14px;
  background: radial-gradient(ellipse at 50% 55%, #6a5230 0%, #3d301d 38%, #1f1812 72%, #161009 100%);
  border-bottom: 1px solid rgba(184, 145, 92, 0.5);
  position: sticky;
  top: 0;
  z-index: 40;
}
.logo { text-decoration: none; display: flex; flex-direction: column; line-height: 1; }
.brand {
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.14em;
  color: #E5A823;            /* NIHON amarillo (como la web) */
}
.brand span { font-weight: 700; color: #FFFFFF; }  /* SUSHI blanco, Bold 700 (manual) */
.descriptor {
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 9px;
  letter-spacing: 0.32em;          /* tracking exacto del logo oficial */
  text-transform: uppercase;        /* NIKKEI CUISINE en mayúsculas */
  color: rgba(255, 255, 255, 0.92); /* blanco, en línea con el logo de nihon-sushi.com */
  margin-top: 5px;
}
.header-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}
.estado {
  font-size: 12px;
  font-weight: 500;
  color: rgba(245, 241, 234, 0.6);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.estado.abierto { color: #A7C795; }
.estado.cerrado { color: rgba(245, 241, 234, 0.6); }

/* Barra de aviso cuando el local está cerrado (invita a dejar el pedido) */
.aviso-cerrado {
  background: rgba(184, 145, 92, 0.14);
  color: #1A1A1A;
  text-align: center;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 9px 16px;
  border-bottom: 1px solid rgba(184, 145, 92, 0.3);
}
.aviso-cerrado[hidden] { display: none; }

/* Sugerencia de instalar como app (aparece solo si no está instalada) */
.install-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(184, 145, 92, 0.12);
  border-bottom: 1px solid rgba(184, 145, 92, 0.3);
  padding: 10px 16px;
  font-size: 13px;
  color: #1A1A1A;
}
.install-hint[hidden] { display: none; }
.install-hint-ico { flex-shrink: 0; font-size: 15px; line-height: 1; }
.install-hint-txt { flex: 1; line-height: 1.35; }
.install-hint-txt strong { font-weight: 600; }
.install-hint-btn {
  flex-shrink: 0;
  background: var(--negro);
  color: #FFFFFF;
  border: none;
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.install-hint-x {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
  padding: 4px 6px;
  cursor: pointer;
}

/* ===== Hero ===== */
.hero {
  background:
    linear-gradient(180deg, rgba(26,26,26,0) 0%, rgba(26,26,26,0.04) 100%),
    var(--crema);
  padding: 34px 18px 26px;
  border-bottom: 1px solid var(--borde);
}
.hero-inner { max-width: 720px; margin: 0 auto; }
.hero-eyebrow {
  font-size: 11px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--dorado);
  margin-bottom: 12px;
}
.hero h1 {
  font-size: clamp(30px, 8vw, 46px);
  font-weight: 700;
  color: var(--negro);
  line-height: 1.06;
  letter-spacing: -0.01em;
}
.hero h1 em { color: var(--dorado); font-weight: 400; }
.hero-bajada {
  margin-top: 14px;
  max-width: 30em;
  color: var(--secundario);
  font-size: 15px;
}

/* ===== Toggle modo ===== */
.modo-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 22px;
  max-width: 460px;
}
.modo-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 13px 16px;
  background: #fff;
  border: 1.5px solid var(--borde);
  border-radius: var(--radio);
  cursor: pointer;
  text-align: left;
  transition: border-color .18s, box-shadow .18s, transform .12s;
  font-family: inherit;
}
.modo-btn:hover { transform: translateY(-1px); }
.modo-btn.is-active {
  border-color: var(--dorado);
  box-shadow: 0 0 0 1px var(--dorado), var(--sombra);
}
.modo-titulo { font-weight: 700; font-size: 15px; color: var(--negro); }
.modo-sub { font-size: 12px; color: var(--secundario); }

/* ===== Nav de secciones sticky ===== */
.catnav {
  position: sticky;
  top: calc(60px + var(--safe-t));  /* sigue al header, que crece con el safe-area en app instalada */
  z-index: 30;
  background: var(--crema);
  border-bottom: 1px solid var(--borde);
  overflow: hidden;
  min-height: 55px;            /* reserva altura antes de que el JS cargue los chips → evita salto (CLS) */
}
.catnav-track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 11px 16px;
  scrollbar-width: none;
  max-width: 920px;
  margin: 0 auto;
}
.catnav-track::-webkit-scrollbar { display: none; }
.catnav-chip {
  flex: 0 0 auto;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--borde);
  background: #fff;
  color: var(--secundario);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}
.catnav-chip.is-active {
  background: var(--negro);
  color: var(--crema);
  border-color: var(--negro);
}

/* ===== Buscador ===== */
.buscador-wrap { max-width: 920px; margin: 0 auto; padding: 14px 16px 0; }
.buscador {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  font-family: inherit;
  font-size: 15px;
  background: #fff;
  color: var(--negro);
}
.buscador:focus { outline: none; border-color: var(--dorado); box-shadow: 0 0 0 1px var(--dorado); }

/* ===== Carta ===== */
.carta { max-width: 920px; margin: 0 auto; padding: 8px 16px 40px; min-height: 70vh; /* reserva espacio mientras carga la carta → evita salto (CLS) */ }
.cargando { text-align: center; color: var(--muted); padding: 60px 0; }

.seccion { padding-top: 30px; scroll-margin-top: var(--nav-offset, 116px); }
.seccion-eyebrow {
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--dorado);
}
.seccion-titulo {
  font-size: 26px;
  font-weight: 700;
  color: var(--negro);
  margin-top: 4px;
  letter-spacing: -0.01em;
}
.seccion-titulo em { color: var(--dorado); font-weight: 400; }
.seccion-bajada {
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  color: var(--secundario);
  margin-top: 4px;
  font-size: 15px;
}
.seccion-linea {
  height: 1px;
  background: linear-gradient(90deg, var(--dorado), transparent);
  margin: 14px 0 4px;
}
.subseccion {
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  font-size: 16px;
  color: var(--negro);
  margin: 20px 0 6px;
}

.item-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid var(--borde);
}
.item-main { flex: 1; min-width: 0; }
.item-aside {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 96px;
}
.item-foto {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--crema-2);
  box-shadow: var(--sombra);
}
/* Placeholder de marca (platos sin foto) — avatar Nihon con gradiente */
.item-foto.placeholder, .linea-foto.placeholder { background: var(--negro); }
.item-nombre {
  font-weight: 500;
  font-size: 16px;
  color: var(--negro);
}
.item-desc { font-size: 13.5px; color: var(--secundario); margin-top: 3px; }
.item-precio {
  font-weight: 500;
  font-size: 15px;
  color: var(--dorado);
  white-space: nowrap;
  margin-top: 6px;
}

/* Badges */
.badges { display: inline-flex; gap: 7px; margin-left: 7px; vertical-align: middle; }
.badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.badge.new { color: var(--amarillo); }
.badge.chef { color: var(--dorado); }
.badge.spicy { color: var(--rojo-spicy); }
.badge.veggie { color: var(--verde); }

/* Control add / stepper */
.item-ctrl { flex: 0 0 auto; align-self: center; }
.add-btn {
  border: 1.5px solid var(--dorado);
  background: #fff;
  color: var(--dorado);
  font-weight: 700;
  font-size: 14px;
  width: 40px; height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
}
.add-btn:hover { background: var(--dorado); color: #fff; }
.stepper {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--negro);
  border-radius: 999px;
  padding: 3px;
}
.stepper button {
  width: 32px; height: 32px;
  border: none;
  background: transparent;
  color: var(--crema);
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 50%;
  font-family: inherit;
}
.stepper button:hover { background: rgba(245, 241, 234, 0.16); }
.stepper .qty { min-width: 22px; text-align: center; color: var(--crema); font-weight: 600; font-size: 14px; }

/* ===== FAB carrito ===== */
.carrito-fab {
  position: fixed;
  left: 16px; right: 16px;
  bottom: calc(16px + var(--safe-b));
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 560px;
  margin: 0 auto;
  padding: 15px 20px;
  background: var(--negro);
  color: var(--crema);
  border: none;
  border-radius: var(--radio);
  box-shadow: var(--sombra-fuerte);
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  animation: fab-in .25s ease;
}
@keyframes fab-in { from { transform: translateY(20px); opacity: 0; } }
.fab-count {
  background: var(--dorado);
  color: var(--negro);
  font-weight: 700;
  min-width: 26px; height: 26px;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 7px;
  font-size: 13px;
}
.fab-label { font-weight: 600; flex: 1; text-align: left; }
.fab-total { font-weight: 700; }

/* ===== Drawer ===== */
.drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(26, 26, 26, 0.5);
  z-index: 50;
  animation: fade .2s ease;
}
@keyframes fade { from { opacity: 0; } }
.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(440px, 100%);
  background: var(--crema);
  z-index: 60;
  display: flex;
  flex-direction: column;
  box-shadow: var(--sombra-fuerte);
  animation: slide .26s cubic-bezier(.22,.61,.36,1);
}
@keyframes slide { from { transform: translateX(100%); } }
.drawer-head {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  /* En app instalada el drawer va top:0 → bajamos el título y la ✕ por debajo
     de la barra de estado para que la ✕ sea tappable. */
  padding: calc(18px + var(--safe-t)) 20px 18px;
  border-bottom: 1px solid var(--borde);
  background: var(--crema-2);
}
.drawer-scroll { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.drawer-head h2 { font-size: 19px; color: var(--negro); font-weight: 700; }
.drawer-close {
  border: none; background: none; font-size: 20px; cursor: pointer; color: var(--secundario);
  width: 36px; height: 36px; border-radius: 50%;
}
.drawer-close:hover { background: var(--borde); }

.drawer-body { padding: 8px 20px; }
.linea {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid var(--borde);
}
.linea-foto { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 9px; object-fit: cover; background: var(--crema-2); }
.linea-main { flex: 1; min-width: 0; }
.linea-nombre { font-size: 14.5px; color: var(--negro); font-weight: 500; }
.linea-precio { font-size: 13px; color: var(--muted); margin-top: 2px; }
.linea-sub { font-size: 14px; font-weight: 600; color: var(--dorado); white-space: nowrap; align-self: center; }
.vacio { text-align: center; color: var(--muted); padding: 40px 0; }

.drawer-form { padding: 6px 20px 12px; }
.campo { display: block; margin-bottom: 13px; }
.campo > span { display: block; font-size: 13px; font-weight: 500; color: var(--secundario); margin-bottom: 5px; }
.campo input, .campo select, .campo textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--borde);
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  background: #fff;
  color: var(--negro);
}
.campo input:focus, .campo select:focus, .campo textarea:focus {
  outline: none; border-color: var(--dorado); box-shadow: 0 0 0 1px var(--dorado);
}
.campo-recordar {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--secundario);
  cursor: pointer;
  margin: 2px 0 4px;
}
.campo-recordar input { width: 17px; height: 17px; accent-color: var(--dorado); flex: 0 0 auto; }
.campo-modo {
  font-size: 13px;
  color: var(--secundario);
  background: var(--crema-2);
  border: 1px solid var(--borde);
  border-radius: 10px;
  padding: 10px 13px;
  margin-bottom: 13px;
}
.campo-modo strong { color: var(--negro); }
.campo-modo .cambiar { color: var(--dorado); cursor: pointer; font-weight: 600; margin-left: 6px; }

.drawer-foot {
  flex: 0 0 auto;
  padding: 14px 20px calc(16px + var(--safe-b));
  border-top: 1px solid var(--borde);
  background: var(--crema-2);
}
.resumen { font-size: 14px; color: var(--secundario); margin-bottom: 12px; }
.resumen .linea-resumen { display: flex; justify-content: space-between; padding: 3px 0; }
.resumen .total { font-size: 18px; font-weight: 700; color: var(--negro); border-top: 1px solid var(--borde); margin-top: 6px; padding-top: 8px; }
.enviar-btn {
  width: 100%;
  padding: 15px;
  background: var(--verde);
  color: #fff;
  border: none;
  border-radius: var(--radio);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: filter .15s;
}
.enviar-btn:hover { filter: brightness(1.06); }
.enviar-btn:disabled { background: var(--muted); cursor: not-allowed; }
.enviar-nota { font-size: 11.5px; color: var(--muted); text-align: center; margin-top: 8px; }

/* ===== Footer ===== */
.site-footer {
  text-align: center;
  padding: 30px 18px;
  color: var(--secundario);
  font-size: 13px;
  border-top: 1px solid var(--borde);
  background: var(--crema-2);
}
.site-footer strong { color: var(--negro); }
.site-footer p { margin: 3px 0; }
.footer-nota { color: var(--muted); font-size: 11.5px; margin-top: 10px; }
.footer-wa { color: var(--dorado); text-decoration: none; font-weight: 500; border-bottom: 1px solid rgba(184, 145, 92, 0.45); white-space: nowrap; }
.footer-wa:hover { color: var(--negro); border-bottom-color: var(--negro); }

@media (min-width: 720px) {
  .carta { display: block; }
  /* Grilla de 2 columnas: filas alineadas izquierda/derecha (antes era columns:2,
     flujo continuo que dejaba la 2ª columna desalineada cuando había subtítulos). */
  .seccion-items {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 36px;
    align-items: stretch;        /* cada fila empareja altura → divisores parejos */
  }
  .subseccion { grid-column: 1 / -1; }   /* el subtítulo ocupa el ancho completo y arranca su grupo */
}

/* ===== Asistente / chat ===== */
.chat-fab {
  position: fixed;
  right: 16px;
  bottom: calc(16px + var(--safe-b));
  z-index: 46;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--negro);
  color: var(--crema);
  border: none;
  border-radius: 999px;
  box-shadow: var(--sombra-fuerte);
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  transition: bottom .2s, transform .12s;
}
.chat-fab:hover { transform: translateY(-1px); }
.chat-fab-ico { color: var(--dorado); font-size: 15px; }
body.con-carrito .chat-fab { bottom: calc(86px + var(--safe-b)); }
body.chat-abierto .chat-fab { display: none; }

.chat-panel {
  position: fixed;
  z-index: 70;
  right: 16px;
  bottom: calc(16px + var(--safe-b));
  width: min(390px, calc(100% - 24px));
  height: min(580px, calc(100% - 90px));
  display: flex;
  flex-direction: column;
  background: var(--crema);
  border: 1px solid var(--borde);
  border-radius: 18px;
  box-shadow: var(--sombra-fuerte);
  overflow: hidden;
  animation: chat-in .22s ease;
}
@keyframes chat-in { from { transform: translateY(16px); opacity: 0; } }
.chat-head {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  background: var(--negro);
  color: var(--crema);
}
.chat-head-info { display: flex; flex-direction: column; line-height: 1.2; }
.chat-head-titulo { font-weight: 700; font-size: 15px; }
.chat-head-titulo::before { content: '✦'; color: var(--dorado); margin-right: 6px; }
.chat-head-sub { font-size: 11.5px; color: var(--dorado-soft); }
.chat-close {
  border: none; background: none; color: var(--crema); font-size: 17px; cursor: pointer;
  width: 32px; height: 32px; border-radius: 50%;
}
.chat-close:hover { background: rgba(245, 241, 234, 0.16); }

.chat-msgs {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  -webkit-overflow-scrolling: touch;
}
.chat-msg {
  max-width: 84%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 14.5px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.chat-msg.bot { align-self: flex-start; background: #fff; color: var(--texto); border-bottom-left-radius: 4px; box-shadow: var(--sombra); }
.chat-msg.user { align-self: flex-end; background: var(--negro); color: var(--crema); border-bottom-right-radius: 4px; }
.chat-msg.typing { color: var(--muted); letter-spacing: 2px; animation: pulso 1.1s infinite; }
@keyframes pulso { 50% { opacity: 0.4; } }

.chat-form {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  padding: 10px 12px calc(10px + var(--safe-b));
  border-top: 1px solid var(--borde);
  background: var(--crema-2);
}
.chat-input {
  flex: 1;
  padding: 11px 14px;
  border: 1px solid var(--borde);
  border-radius: 999px;
  font-family: inherit;
  font-size: 15px;
  background: #fff;
  color: var(--negro);
}
.chat-input:focus { outline: none; border-color: var(--dorado); box-shadow: 0 0 0 1px var(--dorado); }
.chat-send {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--verde);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}
.chat-send:hover { filter: brightness(1.06); }

@media (max-width: 480px) {
  .chat-panel { right: 8px; left: 8px; width: auto; height: min(70vh, calc(100% - 90px - var(--safe-t) - var(--safe-b))); bottom: calc(8px + var(--safe-b)); }
}

/* ===== Mi cuenta ===== */
.cuenta-btn {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: #F5F1EA;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.cuenta-btn:hover { border-color: var(--dorado); color: #fff; }

.cuenta-overlay { position: fixed; inset: 0; background: rgba(26, 26, 26, 0.5); z-index: 80; animation: fade .2s ease; }
.cuenta-panel {
  position: fixed; z-index: 90;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(390px, calc(100% - 28px));
  /* restamos los safe-areas para que el modal centrado no quede bajo la barra de estado/indicador */
  max-height: calc(100% - 48px - var(--safe-t) - var(--safe-b));
  display: flex; flex-direction: column;
  background: var(--crema);
  border-radius: 18px;
  box-shadow: var(--sombra-fuerte);
  overflow: hidden;
  animation: chat-in .22s ease;
}
.cuenta-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; background: var(--negro); color: var(--crema);
}
.cuenta-head h2 { font-size: 17px; font-weight: 700; }
.cuenta-head h2::before { content: '✦'; color: var(--dorado); margin-right: 7px; }
.cuenta-close { border: none; background: none; color: var(--crema); font-size: 17px; cursor: pointer; width: 32px; height: 32px; border-radius: 50%; }
.cuenta-close:hover { background: rgba(245, 241, 234, 0.16); }
.cuenta-body { padding: 18px; overflow-y: auto; }

.cuenta-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.cuenta-tab {
  flex: 1; padding: 9px; border: 1px solid var(--borde); background: #fff;
  border-radius: 10px; font-family: inherit; font-size: 14px; font-weight: 600;
  color: var(--secundario); cursor: pointer;
}
.cuenta-tab.is-active { background: var(--negro); color: var(--crema); border-color: var(--negro); }

.cuenta-btn-pri {
  width: 100%; padding: 13px; margin-top: 4px; border: none; border-radius: var(--radio);
  background: var(--verde); color: #fff; font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
}
.cuenta-btn-pri:hover { filter: brightness(1.06); }
.cuenta-btn-pri:disabled { background: var(--muted); cursor: not-allowed; }
.cuenta-btn-sec {
  width: 100%; padding: 12px; margin-top: 8px; border: 1px solid var(--borde);
  background: #fff; color: var(--negro); border-radius: var(--radio);
  font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.cuenta-btn-sec:hover { border-color: var(--dorado); }
.cuenta-link {
  display: block; width: 100%; margin-top: 12px;
  background: none; border: none; color: var(--dorado);
  font-family: inherit; font-size: 13px; cursor: pointer;
  text-align: center; text-decoration: underline;
}
.cuenta-link:hover { color: var(--negro); }

.cuenta-msg { font-size: 13px; margin-top: 10px; text-align: center; }
.cuenta-msg.error { color: var(--rojo-spicy); }
.cuenta-msg.ok { color: var(--verde); }
.footer-nota a { display: inline-block; padding: 5px 0; }
.cuenta-mail { font-size: 14.5px; color: var(--negro); margin-bottom: 8px; }
.cuenta-nota { font-size: 12.5px; color: var(--muted); margin-top: 14px; line-height: 1.45; }

/* Historial de pedidos en "Mi cuenta" */
.cuenta-historial { margin-top: 18px; }
.cuenta-sub { font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--negro); margin: 0 0 10px; }
.cuenta-pedidos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cuenta-pedidos li { border: 1px solid var(--borde); border-radius: 12px; padding: 12px 14px; background: var(--crema-2); }
.cuenta-pedido-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.cuenta-pedido-fecha { font-size: 12.5px; color: var(--muted); }
.cuenta-pedido-total { font-size: 14px; font-weight: 700; color: var(--dorado); white-space: nowrap; }
.cuenta-pedido-items { font-size: 13.5px; color: var(--negro); margin-top: 5px; line-height: 1.4; }
.cuenta-pedido-modo { font-size: 12px; color: var(--muted); margin-top: 4px; }
.cuenta-pedido-acciones { display: flex; gap: 8px; margin-top: 10px; }
.cuenta-rep { flex: 1; background: var(--amarillo); color: var(--negro); border: 0; border-radius: 999px; padding: 9px 14px; font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.cuenta-rep:hover { filter: brightness(1.06); }
.cuenta-del { background: transparent; color: var(--muted); border: 1px solid var(--borde); border-radius: 999px; padding: 9px 14px; font-family: inherit; font-size: 13px; cursor: pointer; }
.cuenta-del:hover { border-color: var(--rojo-spicy); color: var(--rojo-spicy); }
.cuenta-del:disabled { opacity: 0.5; cursor: not-allowed; }

/* Pantalla "pedido enviado" (gracias) */
.gracias-overlay { position: fixed; inset: 0; background: rgba(26, 26, 26, 0.55); z-index: 60; }
.gracias {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: calc(100% - 40px); max-width: 380px; z-index: 61;
  background: var(--crema); border-radius: 20px; padding: 30px 24px 22px;
  text-align: center; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.gracias-x { position: absolute; top: 12px; right: 14px; background: none; border: 0; font-size: 18px; line-height: 1; color: var(--muted); cursor: pointer; }
.gracias-ico { font-size: 42px; }
.gracias-titulo { font-size: 22px; font-weight: 700; color: var(--negro); margin: 8px 0; }
.gracias-texto { font-size: 14px; color: var(--muted); line-height: 1.5; margin-bottom: 20px; }
.gracias-otro { display: block; width: 100%; margin-top: 10px; background: var(--verde); border: 0; border-radius: 999px; padding: 13px; font-family: inherit; font-size: 15px; font-weight: 700; color: #fff; cursor: pointer; }
.gracias-otro:hover { filter: brightness(1.06); }
.gracias-login { background: none; border: 0; padding: 0; font-family: inherit; font-size: 12px; font-weight: 700; color: var(--dorado); text-decoration: underline; cursor: pointer; }

/* Botón "Vaciar" en el encabezado del carrito */
.drawer-head-acciones { display: flex; align-items: center; gap: 6px; }
.drawer-vaciar { background: none; border: 0; font-family: inherit; font-size: 13px; color: var(--muted); cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.drawer-vaciar:hover { color: var(--rojo-spicy); }
