/* ── Gustavo Domicilios · licorera a domicilio ──────────────────────
   Tema oscuro premium (bar de noche) + dorado licor + verde para pedir.
   Móvil primero, estilo app de domicilios (catálogo → carrito → checkout).
   ------------------------------------------------------------------- */

:root {
  --bg: #0E0C13;
  --bg2: #14111C;
  --surface: #1B1725;
  --card: #221D30;
  --card2: #2A2438;
  --line: rgba(255, 255, 255, .09);
  --line2: rgba(255, 255, 255, .16);
  --text: #F3F0F7;
  --muted: #9E97AE;

  --gold: #E8B04B;
  --gold-dark: #C6902E;
  --go: #22C55E;          /* verde "pedir / confirmar" */
  --go-dark: #17A34A;
  --red: #F04438;

  --radius: 16px;
  --shadow: 0 18px 46px rgba(0, 0, 0, .5);
  --fd: 'Sora', system-ui, sans-serif;
  --fb: 'Inter', system-ui, sans-serif;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bot: env(safe-area-inset-bottom, 0px);
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body { font-family: var(--fb); background: var(--bg); color: var(--text); line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--fd); font-weight: 700; line-height: 1.15; }
input, button, select { font-family: inherit; font-size: 1rem; }
a { color: inherit; text-decoration: none; }

/* ── Botones ────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font-family: var(--fd); font-weight: 700; padding: .8rem 1.4rem; border-radius: 12px; border: 2px solid transparent; cursor: pointer; color: var(--text); background: var(--card2); transition: transform .12s, background .2s, border-color .2s, opacity .2s; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-lg { padding: 1rem 1.6rem; font-size: 1.05rem; }
.btn-sm { padding: .5rem .9rem; font-size: .88rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--go); color: #04210F; border: none; }
.btn-primary:hover:not(:disabled) { background: var(--go-dark); }
.btn-ghost { background: transparent; border-color: var(--line2); color: var(--text); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ── Age gate ───────────────────────────────────────────────────── */
.agegate { position: fixed; inset: 0; z-index: 100; background: radial-gradient(700px 400px at 50% 0%, #241633, var(--bg) 70%); display: grid; place-items: center; padding: 2rem 1.4rem; }
.agegate.hidden { display: none; }
.agegate-card { max-width: 400px; text-align: center; }
.ag-logo { font-size: 3rem; margin-bottom: .4rem; }
.agegate h1 { font-size: 2.3rem; font-weight: 800; }
.agegate h1 span { color: var(--gold); }
.agegate > .agegate-card > p { color: var(--muted); margin: .6rem 0 1.6rem; }
.ag-btns { display: flex; flex-direction: column; gap: .7rem; }
.ag-legal { font-size: .72rem; color: #6D6580; margin-top: 1.4rem; line-height: 1.5; }

/* ── Header ─────────────────────────────────────────────────────── */
.head { position: sticky; top: 0; z-index: 40; background: rgba(14, 12, 19, .92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); padding-top: var(--safe-top); }
.head-in { display: flex; align-items: center; justify-content: space-between; padding: .8rem 1.1rem .5rem; max-width: 1080px; margin: 0 auto; }
.brand { font-family: var(--fd); font-weight: 800; font-size: 1.25rem; display: inline-flex; align-items: center; gap: .45rem; }
.brand em { font-style: normal; font-weight: 500; font-size: .8rem; color: var(--gold); letter-spacing: .5px; }
.cart-btn { position: relative; background: var(--card); border: 1px solid var(--line2); color: var(--text); font-size: 1.2rem; width: 46px; height: 46px; border-radius: 12px; cursor: pointer; }
.cart-count { position: absolute; top: -6px; right: -6px; background: var(--gold); color: #241600; font-family: var(--fd); font-weight: 800; font-size: .72rem; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 50px; display: grid; place-items: center; }
.head-sub { display: flex; gap: .5rem; overflow-x: auto; padding: 0 1.1rem .7rem; max-width: 1080px; margin: 0 auto; scrollbar-width: none; }
.head-sub::-webkit-scrollbar { display: none; }
.pill { flex-shrink: 0; font-size: .76rem; font-weight: 600; color: var(--muted); background: var(--card); border: 1px solid var(--line); padding: .3rem .7rem; border-radius: 50px; white-space: nowrap; }

/* ── Filtros ────────────────────────────────────────────────────── */
.filters { position: sticky; top: 0; z-index: 30; background: var(--bg); padding: .9rem 1.1rem .4rem; max-width: 1080px; margin: 0 auto; }
.search { display: flex; align-items: center; gap: .5rem; background: var(--card); border: 1px solid var(--line2); border-radius: 12px; padding: .7rem .9rem; }
.search span { color: var(--muted); }
.search input { flex: 1; background: none; border: none; color: var(--text); outline: none; }
.search input::placeholder { color: var(--muted); }
.cats { display: flex; gap: .5rem; overflow-x: auto; padding: .8rem 0 .3rem; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat { flex-shrink: 0; background: var(--card); border: 1.5px solid var(--line); color: var(--muted); font-family: var(--fd); font-weight: 600; font-size: .88rem; padding: .5rem .9rem; border-radius: 50px; cursor: pointer; white-space: nowrap; transition: all .15s; }
.cat.sel { background: var(--gold); color: #241600; border-color: var(--gold); }

/* ── Catálogo ───────────────────────────────────────────────────── */
.catalog { max-width: 1080px; margin: 0 auto; padding: .6rem 1.1rem calc(7rem + var(--safe-bot)); }
.cat-title { font-family: var(--fd); font-weight: 700; font-size: 1.15rem; margin: 1.4rem 0 .8rem; }
.cat-title:first-child { margin-top: .4rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .9rem; }
.prod { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.prod-img { aspect-ratio: 1; display: grid; place-items: center; font-size: 3.2rem; position: relative; }
.prod-tag { position: absolute; top: .5rem; left: .5rem; background: var(--red); color: #fff; font-family: var(--fd); font-weight: 700; font-size: .66rem; padding: .15rem .5rem; border-radius: 50px; }
.prod-body { padding: .8rem; display: flex; flex-direction: column; flex: 1; }
.prod-name { font-weight: 600; font-size: .92rem; line-height: 1.25; }
.prod-vol { color: var(--muted); font-size: .78rem; margin-top: .1rem; }
.prod-foot { margin-top: auto; padding-top: .7rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.prod-price { font-family: var(--fd); font-weight: 800; color: var(--gold); font-size: 1.05rem; }
.add { background: var(--go); color: #04210F; border: none; width: 34px; height: 34px; border-radius: 10px; font-size: 1.3rem; font-weight: 700; cursor: pointer; display: grid; place-items: center; }
.add:active { transform: scale(.9); }
.stepper { display: flex; align-items: center; gap: .2rem; background: var(--card2); border-radius: 10px; }
.stepper button { background: none; border: none; color: var(--go); font-size: 1.2rem; font-weight: 800; width: 30px; height: 34px; cursor: pointer; }
.stepper b { font-family: var(--fd); min-width: 20px; text-align: center; font-size: .95rem; }
.empty-search { text-align: center; color: var(--muted); padding: 3rem 1rem; }

/* ── Barra de pedido flotante ───────────────────────────────────── */
.cartbar { position: fixed; left: 1rem; right: 1rem; bottom: calc(1rem + var(--safe-bot)); z-index: 45; display: flex; align-items: center; gap: .8rem; background: var(--go); color: #04210F; border: none; border-radius: 14px; padding: .95rem 1.1rem; cursor: pointer; box-shadow: 0 12px 30px rgba(34, 197, 94, .4); max-width: 1056px; margin: 0 auto; font-family: var(--fd); font-weight: 700; }
.cartbar[hidden] { display: none; }
.cartbar-count { background: rgba(4, 33, 15, .2); min-width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: .9rem; }
.cartbar-text { flex: 1; text-align: left; }
.cartbar-total { font-weight: 800; }

/* ── Cajón del carrito ──────────────────────────────────────────── */
.drawer-bg { position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, .6); }
.drawer-bg[hidden] { display: none; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 56; width: min(420px, 100%); background: var(--bg2); border-left: 1px solid var(--line); display: flex; flex-direction: column; transform: translateX(100%); transition: transform .28s cubic-bezier(.2,.7,.3,1); }
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: calc(1rem + var(--safe-top)) 1.2rem 1rem; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 1.3rem; }
.drawer-x { background: none; border: none; color: var(--muted); font-size: 1.2rem; cursor: pointer; }
.drawer-body { flex: 1; overflow-y: auto; padding: 1rem 1.2rem; }
.ci { display: flex; gap: .8rem; align-items: center; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.ci-img { width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center; font-size: 1.6rem; flex-shrink: 0; }
.ci-info { flex: 1; min-width: 0; }
.ci-name { font-weight: 600; font-size: .9rem; }
.ci-price { color: var(--muted); font-size: .8rem; }
.ci-right { text-align: right; }
.ci-sub { font-family: var(--fd); font-weight: 700; color: var(--gold); font-size: .92rem; margin-bottom: .3rem; }
.drawer-empty { text-align: center; color: var(--muted); padding: 3rem 1rem; }
.drawer-foot { padding: 1.1rem 1.2rem calc(1.1rem + var(--safe-bot)); border-top: 1px solid var(--line); }
.sumline { display: flex; justify-content: space-between; font-size: .92rem; color: var(--muted); margin-bottom: .4rem; }
.sumline.total { color: var(--text); font-family: var(--fd); font-weight: 800; font-size: 1.2rem; margin: .6rem 0 1rem; }
.sumline.total span:last-child { color: var(--gold); }
.free-note { color: var(--go); font-size: .8rem; margin-bottom: .8rem; }

/* ── Modal checkout ─────────────────────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.6); display: grid; place-items: end center; }
.modal[hidden] { display: none; }
.modal-card { background: var(--bg2); width: 100%; max-width: 560px; max-height: 94vh; border-radius: 20px 20px 0 0; display: flex; flex-direction: column; }
@media (min-width: 620px) { .modal { place-items: center; } .modal-card { border-radius: 20px; max-height: 90vh; } }
.modal-head { display: flex; align-items: center; gap: .6rem; padding: calc(1rem + var(--safe-top)) 1.2rem 1rem; border-bottom: 1px solid var(--line); }
.modal-head h2 { flex: 1; font-size: 1.2rem; text-align: center; }
.modal-back, .modal-x { background: none; border: none; color: var(--muted); font-size: 1.3rem; cursor: pointer; }
.modal-body { flex: 1; overflow-y: auto; padding: 1.2rem; }
.co-step { margin-bottom: 1.6rem; }
.co-step h3 { font-size: 1.05rem; margin-bottom: .8rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.form-grid .full { grid-column: 1 / -1; }
.modal label { display: flex; flex-direction: column; gap: .3rem; font-size: .8rem; font-weight: 600; color: var(--muted); }
.modal input { background: var(--card); border: 1.5px solid var(--line2); border-radius: 10px; padding: .7rem .8rem; color: var(--text); outline: none; font-weight: 400; }
.modal input:focus { border-color: var(--gold); }
.geo { margin-top: .8rem; }
.geo-status { display: block; font-size: .8rem; color: var(--go); margin-top: .5rem; }

.pays { display: flex; flex-direction: column; gap: .5rem; }
.pay { display: flex; align-items: center; gap: .7rem; background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; padding: .8rem .9rem; cursor: pointer; }
.pay.sel { border-color: var(--gold); background: var(--card2); }
.pay-ico { font-size: 1.3rem; }
.pay-name { flex: 1; font-weight: 600; font-size: .92rem; }
.pay-check { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line2); }
.pay.sel .pay-check { border-color: var(--gold); background: var(--gold); box-shadow: inset 0 0 0 3px var(--card2); }
.pay-extra { margin-top: .8rem; }
.pay-box { background: var(--card); border: 1px dashed var(--line2); border-radius: 12px; padding: .9rem; font-size: .9rem; color: var(--muted); }
.pay-box b { color: var(--gold); }
.pay-box label { color: var(--muted); margin-top: .6rem; }
.pay-box .change { color: var(--go); font-weight: 700; margin-top: .5rem; }
.pay-box .change.bad { color: var(--red); }

.co-summary { background: var(--card); border-radius: 12px; padding: 1rem; }
.co-summary .sumline { color: var(--muted); }
.modal-foot { padding: 1rem 1.2rem calc(1rem + var(--safe-bot)); border-top: 1px solid var(--line); }
.co-note { text-align: center; color: var(--muted); font-size: .78rem; margin-top: .6rem; }

/* ── Toast ──────────────────────────────────────────────────────── */
.toast { position: fixed; left: 50%; bottom: calc(6rem + var(--safe-bot)); transform: translateX(-50%) translateY(20px); background: var(--card2); border: 1px solid var(--line2); color: var(--text); padding: .7rem 1.2rem; border-radius: 50px; font-size: .9rem; opacity: 0; pointer-events: none; transition: .25s; z-index: 80; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
