/* =============================================================
   1. Tokens — oscuro cálido + ámbar
   ============================================================= */
:root {
  --bg:     #120d0a;
  --bg-2:   #1b1410;
  --bg-3:   #251c16;
  --cream:  #f4ead8;
  --cream-2:#d9ccb6;
  --mute:   #9a8b76;
  --amber:  #e8a33d;
  --amber-d:#c9861f;
  --line:   rgba(244,234,216,.12);
  --serif:  "Fraunces", Georgia, serif;
  --sans:   "Inter", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: 76px; }
body { font-family: var(--sans); font-size: 16px; line-height: 1.6; color: var(--cream); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--serif); text-wrap: balance; line-height: 1.1; letter-spacing: -0.015em; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

/* =============================================================
   3. Utilities
   ============================================================= */
.container { width: min(1120px, 100% - 2rem); margin-inline: auto; }
.skip-link { position: fixed; top: -100px; left: 1rem; padding: .6rem 1rem; background: var(--cream); color: var(--bg); z-index: 9999; border-radius: 8px; }
.skip-link:focus { top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.demo-bar { background: var(--amber); color: var(--bg); text-align: center; font-size: .78rem; font-weight: 600; padding: .4rem 1rem; }
.note { font-size: .85rem; color: var(--mute); font-style: italic; margin-bottom: 1.5rem; }
.opt { font-weight: 400; color: var(--mute); }

/* =============================================================
   4. Typography
   ============================================================= */
.kicker { font-size: .76rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--amber); margin-bottom: .9rem; }
.section-title { font-weight: 500; font-size: clamp(2rem, 4.6vw, 3.4rem); max-width: 18ch; margin-bottom: .8rem; }
.section-title em, .hero-title em { font-style: italic; color: var(--amber); }

/* =============================================================
   5. Components
   ============================================================= */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .95rem 1.5rem; border-radius: 999px; font-weight: 600; transition: transform .3s var(--ease-out), background .3s; }
.btn:hover { transform: translateY(-2px); }
.btn-amber { background: var(--amber); color: var(--bg); }
.btn-amber:hover { background: var(--amber-d); }
.btn-ghost { border: 1px solid rgba(244,234,216,.35); }
.btn-sm { padding: .55rem 1.1rem; font-size: .9rem; }
.btn-block { width: 100%; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; display: inline-block; }

.nav { position: sticky; top: 0; z-index: 50; background: rgba(18,13,10,.92); border-bottom: 1px solid var(--line); }
.nav-inner { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { font-family: var(--serif); font-size: 1.4rem; font-weight: 700; }
.brand em { font-style: italic; color: var(--amber); font-weight: 500; }
.nav-status { display: none; align-items: center; gap: .5rem; font-size: .85rem; color: var(--cream-2); }

.field { display: grid; gap: .35rem; margin-bottom: .9rem; border: 0; padding: 0; }
.field label, .field legend { font-weight: 600; font-size: .9rem; }
.field input, .field select { font: inherit; width: 100%; padding: .75rem .9rem; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--cream); }
.chips { display: flex; gap: .5rem; margin-top: .3rem; }
.chip input { position: absolute; opacity: 0; }
.chip span { display: inline-block; padding: .5rem 1rem; border-radius: 999px; border: 1px solid var(--line); cursor: pointer; }
.chip input:checked + span { background: var(--amber); color: var(--bg); border-color: var(--amber); font-weight: 600; }
.chip input:focus-visible + span { outline: 2px solid var(--amber); }
.form-error { color: #ff8a80; font-size: .9rem; margin-bottom: .7rem; }
.fine { font-size: .78rem; color: var(--mute); text-align: center; margin-top: .7rem; }

/* =============================================================
   6. Sections
   ============================================================= */
.hero { position: relative; min-height: 86vh; min-height: 86svh; display: flex; align-items: flex-end; padding: 5rem 0 3.5rem; overflow: clip; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(1.1); }
.hero-tint { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18,13,10,.35) 0%, rgba(18,13,10,.7) 50%, rgba(18,13,10,.97) 100%); }
.hero-inner { position: relative; }
.hero-title { font-weight: 700; font-size: clamp(2.6rem, 7vw, 5.2rem); max-width: 15ch; margin-bottom: 1.1rem; }
.hero-title em { font-weight: 500; }
.hero-sub { font-size: 1.1rem; color: var(--cream-2); max-width: 52ch; margin-bottom: 1.8rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-bottom: 2rem; }
.hero-facts { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; color: var(--cream-2); font-size: .92rem; }
.hero-facts strong { color: var(--amber); font-weight: 600; }

.section { padding: 4.5rem 0 5rem; }
.section-alt { background: var(--bg-2); border-top: 1px solid var(--line); }

.menu-tabs { position: sticky; top: 64px; z-index: 20; display: flex; gap: .5rem; overflow-x: auto; padding: .7rem 0; background: var(--bg); margin-bottom: .5rem; scrollbar-width: none; }
.menu-tabs a { white-space: nowrap; padding: .5rem 1rem; border-radius: 999px; border: 1px solid var(--line); font-size: .9rem; }
.menu-tabs a:hover { border-color: var(--amber); color: var(--amber); }
.cat-title { font-size: 1.6rem; font-weight: 500; font-style: italic; color: var(--amber); margin: 2rem 0 1rem; scroll-margin-top: 130px; }
.items { display: grid; gap: .9rem; }
.item { display: flex; flex-direction: column; background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; transition: border-color .3s, transform .4s var(--ease-out); }
.item:hover { border-color: rgba(232,163,61,.5); transform: translateY(-3px); }
.item.in-cart { border-color: var(--amber); }
.item img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.item-body { padding: 1.1rem 1.2rem 1.2rem; display: flex; flex-direction: column; flex: 1; }
.item h4 { font-size: 1.2rem; font-weight: 500; margin-bottom: .3rem; }
.item p { color: var(--mute); font-size: .92rem; margin-bottom: .9rem; }
.item-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.price { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; }
.qty { display: flex; align-items: center; gap: .5rem; }
.qty button { width: 38px; height: 38px; border-radius: 50%; background: var(--amber); color: var(--bg); font-size: 1.3rem; font-weight: 700; line-height: 1; }
.qty button.minus { background: var(--bg-3); color: var(--cream); }
.qty span { min-width: 1.4rem; text-align: center; font-weight: 600; }
.qty .add { width: auto; padding: 0 1rem; border-radius: 999px; font-size: .92rem; }

.why { display: grid; gap: 2rem; }
.why-list { list-style: none; padding: 0; display: grid; gap: 1rem; }
.why-list li { color: var(--cream-2); padding-left: 1.2rem; border-left: 2px solid var(--amber); }
.why-list strong { color: var(--cream); }

.footer { border-top: 1px solid var(--line); padding: 2.2rem 0 7rem; color: var(--mute); font-size: .9rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.footer a { color: var(--amber); font-weight: 600; }
.credits { font-size: .72rem; margin-top: 1rem; }
.credits a { color: inherit; font-weight: 400; text-decoration: underline; }

/* Carrito */
.cart-bar { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 65; }
.cart-bar[hidden] { display: none; }
.cart-open { width: 100%; max-width: 520px; margin: 0 auto; display: flex; align-items: center; gap: .8rem; padding: .9rem 1.2rem; border-radius: 999px; background: var(--amber); color: var(--bg); font-weight: 600; box-shadow: 0 20px 40px -14px rgba(0,0,0,.8); }
.cart-open span:nth-child(2) { flex: 1; text-align: left; }
.cart-count { display: grid; place-items: center; min-width: 28px; height: 28px; border-radius: 50%; background: var(--bg); color: var(--amber); font-size: .85rem; }
.sheet { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); }
.sheet-panel { position: relative; width: min(520px, 100%); max-height: 92svh; overflow-y: auto; background: var(--bg-2); border-radius: 22px 22px 0 0; padding: 1.2rem 1.3rem 1.6rem; border: 1px solid var(--line); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .8rem; }
.sheet-head h2 { font-size: 1.6rem; font-weight: 500; }
.order-lines { list-style: none; padding: 0; display: grid; gap: .5rem; margin-bottom: .8rem; }
.order-lines li { display: flex; justify-content: space-between; gap: 1rem; font-size: .95rem; padding-bottom: .5rem; border-bottom: 1px dashed var(--line); }
.order-total { display: flex; justify-content: space-between; font-size: 1.1rem; margin-bottom: 1rem; }
.order-total strong { font-family: var(--serif); color: var(--amber); font-size: 1.4rem; }

.pay-panel { text-align: center; display: grid; gap: .8rem; padding: 2rem 1.4rem; border-radius: 22px; margin: auto 0; }
.pay-icon { font-size: 3rem; line-height: 1; }
.pay-panel h2 { font-size: 1.7rem; font-weight: 500; }
.pay-text { color: var(--cream-2); }
.btn[disabled] { opacity: .6; pointer-events: none; }

/* Chat */
.chat-fab { position: fixed; right: 1rem; bottom: 1rem; z-index: 60; padding: .85rem 1.1rem; border-radius: 999px; background: var(--cream); color: var(--bg); font-weight: 600; box-shadow: 0 18px 40px -14px rgba(0,0,0,.8); }
body.has-cart .chat-fab { bottom: 5.4rem; }
.chat { position: fixed; right: 1rem; bottom: 1rem; left: 1rem; z-index: 70; max-height: min(620px, calc(100svh - 2rem)); display: flex; flex-direction: column; background: var(--bg-2); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 40px 80px -30px rgba(0,0,0,.9); }
.chat[hidden] { display: none; }
.chat-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); }
.chat-name { font-family: var(--serif); font-weight: 700; font-size: 1.1rem; }
.chat-status { font-size: .78rem; color: var(--mute); display: flex; align-items: center; gap: .4rem; }
.chat-close { font-size: 1.6rem; line-height: 1; width: 36px; height: 36px; border-radius: 50%; }
.chat-close:hover { background: var(--bg-3); }
.chat-log { flex: 1; overflow-y: auto; padding: 1rem 1.2rem; display: flex; flex-direction: column; gap: .6rem; min-height: 180px; }
.msg { max-width: 85%; padding: .7rem .95rem; border-radius: 16px; font-size: .95rem; line-height: 1.45; white-space: pre-line; }
.msg-bot { background: var(--bg-3); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg-user { background: var(--amber); color: var(--bg); align-self: flex-end; border-bottom-right-radius: 4px; }
.msg-typing { color: var(--mute); font-style: italic; }
.chat-suggest { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0 1.2rem .8rem; }
.chat-suggest button { font-size: .82rem; padding: .45rem .8rem; border-radius: 999px; border: 1px solid var(--line); }
.chat-suggest button:hover { border-color: var(--amber); color: var(--amber); }
.chat-form { display: flex; gap: .5rem; padding: .8rem 1.2rem; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; min-width: 0; font: inherit; color: var(--cream); padding: .75rem 1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); }
.chat-form button { width: 44px; height: 44px; border-radius: 50%; background: var(--amber); color: var(--bg); flex-shrink: 0; }
.chat-wa { display: block; text-align: center; padding: .75rem; font-weight: 600; color: var(--amber); border-top: 1px solid var(--line); }

/* =============================================================
   7. Responsive
   ============================================================= */
@media (min-width: 720px) {
  .items { grid-template-columns: repeat(2, 1fr); }
  .chat { left: auto; width: 380px; }
  .nav-status { display: flex; }
}
@media (min-width: 960px) {
  .items { grid-template-columns: repeat(3, 1fr); }
  .why { grid-template-columns: 1fr 1.2fr; align-items: center; gap: 4rem; }
}
