/* ==========================================================
   JUGO DE MAGUEY · TIENDA · Componentes reutilizables
   ========================================================== */

/* ---------- Banda demo ---------- */
.demo-banner { background: var(--demo-bg); color: #3B2A8F; border-bottom: 1px solid #DCD3FF; font-size: .84rem; }
.demo-banner__inner { display: flex; align-items: center; gap: .6rem; min-height: 40px; padding-block: .4rem; }
.demo-banner__inner > .icon { color: var(--demo); }
.demo-banner p { margin: 0; flex: 1; }
.demo-banner__close { border: 0; background: none; color: inherit; width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; }
.demo-banner__close:hover { background: rgba(91, 63, 208, .1); }

/* ---------- Header translúcido (material) ---------- */
.site-header { position: sticky; top: 0; z-index: 50; }
.topbar { background: var(--brand); color: #fff; font-size: .82rem; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 36px; }
.topbar p { margin: 0; display: flex; align-items: center; gap: .45rem; }
.topbar__wa { color: #fff; text-decoration: none; font-weight: 650; display: inline-flex; align-items: center; gap: .35rem; opacity: .95; }
.topbar__wa:hover { color: var(--accent); }
.navbar {
  background: rgba(255, 255, 255, .78);
  -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), background-color var(--t) var(--ease);
}
.site-header.is-scrolled .navbar { border-bottom-color: rgba(19, 33, 28, .08); box-shadow: 0 8px 24px -18px rgba(19, 33, 28, .35); }
.navbar__inner { display: flex; align-items: center; gap: clamp(12px, 2vw, 28px); height: var(--header-h); }
.navbar__logo { flex-shrink: 0; display: block; }
.navbar__logo .logo-img { height: 52px; width: auto; }
.navbar__nav { display: flex; gap: .2rem; }
.navbar__nav a { padding: .5rem .75rem; border-radius: var(--r-sm); color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .93rem; transition: background-color var(--t) var(--ease), color var(--t) var(--ease); }
.navbar__nav a:hover { background: var(--bg-2); color: var(--ink); }
.navbar__nav a[aria-current="page"] { color: var(--brand); background: var(--brand-50); }
.navbar__actions { display: flex; align-items: center; gap: .35rem; margin-left: auto; }
.navbar__account, .navbar__cart { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .4rem .7rem; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; font-weight: 650; font-size: .92rem; position: relative; transition: background-color var(--t) var(--ease), transform var(--t-fast) var(--ease); }
.navbar__account:hover, .navbar__cart:hover { background: var(--bg-2); color: var(--ink); }
.navbar__account:active, .navbar__cart:active { transform: scale(.95); }
.navbar__cart .icon { width: 22px; height: 22px; }
.cart-count { position: absolute; top: 2px; right: 0; min-width: 20px; height: 20px; padding: 0 5px; display: grid; place-items: center; border-radius: var(--r-pill); background: var(--brand); color: #fff; font: 750 .7rem/1 var(--font-body); box-shadow: 0 0 0 2px #fff; }
.cart-count.is-bump { animation: bump 420ms var(--ease); }
@keyframes bump { 0% { transform: scale(1); } 30% { transform: scale(1.3); } 100% { transform: scale(1); } }
.navbar__menu { display: none; border: 0; background: none; width: 44px; height: 44px; border-radius: var(--r-sm); place-items: center; color: var(--ink); }
.navbar__menu:hover { background: var(--bg-2); }
.navbar__menu .icon { width: 24px; height: 24px; }
.navbar__search-mobile { display: none; padding-bottom: 10px; }

.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--ink); font: 800 .82rem/1 var(--font-display); letter-spacing: .02em; flex-shrink: 0; }
.avatar--sm { width: 30px; height: 30px; font-size: .74rem; }
.avatar--lg { width: 48px; height: 48px; font-size: 1rem; }

/* ---------- Buscador ---------- */
.search { position: relative; display: flex; align-items: center; }
.search__icon { position: absolute; left: 12px; color: var(--muted); pointer-events: none; width: 18px; height: 18px; }
.search input { padding-left: 2.4rem !important; }
.search--header { flex: 1; max-width: 420px; }
.search--header input { min-height: 42px; background: var(--bg); border-color: var(--line); border-radius: var(--r-pill); font-size: .93rem; }
.search--header input:focus { background: #fff; }
.search--lg input { min-height: 56px; font-size: 1.05rem; border-radius: var(--r-md); box-shadow: var(--sh-2); }
.search--lg .search__icon { left: 16px; width: 20px; height: 20px; }
.search--lg input { padding-left: 2.9rem !important; }

/* ---------- Footer ---------- */
.site-footer { margin-top: auto; }
.footer__cta { background: var(--accent); }
.footer__cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 34px; flex-wrap: wrap; }
.footer__cta h2 { font: 800 clamp(1.4rem, 2.4vw, 1.9rem)/1.1 var(--font-display); font-stretch: 92%; letter-spacing: -0.015em; margin: 0 0 .2rem; }
.footer__cta p { margin: 0; color: var(--ink-2); }
.footer__cta-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.footer__cta .btn--on-dark { --btn-bg: var(--ink); --btn-bd: var(--ink); --btn-fg: #fff; }
.footer__main { background: var(--dark); color: #c9d8cf; padding-top: 56px; }
.footer__grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 2rem; padding-bottom: 40px; }
.footer__brand .logo-img { width: 180px; margin-bottom: 1rem; }
.footer__brand p { max-width: 34ch; font-size: .92rem; }
.footer__grid h3 { font: 700 .78rem/1 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: #fff; margin-bottom: 1rem; }
.footer__grid nav, .footer__grid > div:not(.footer__brand) { display: flex; flex-direction: column; gap: .55rem; }
.footer__main a { color: #c9d8cf; text-decoration: none; font-size: .93rem; display: inline-flex; align-items: center; gap: .45rem; width: fit-content; }
.footer__main a:hover { color: #fff; }
.footer__social { display: flex; gap: .5rem; margin-top: 1rem; }
.footer__social a, .social-pending { width: 40px; height: 40px; display: grid !important; place-items: center; border-radius: 50%; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); }
.social-pending { opacity: .45; cursor: help; }
.footer__legal { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 20px; border-top: 1px solid rgba(255,255,255,.08); font-size: .84rem; }
.footer__legal p { margin: 0; }
.footer__legal nav { display: flex; gap: 1.2rem; flex-wrap: wrap; }

/* ---------- Tarjetas ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); }

/* Tarjeta de producto */
.grid-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: clamp(14px, 2vw, 22px); }
.grid-products--3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.product-card { display: flex; flex-direction: column; overflow: hidden; transition: box-shadow var(--t-slow) var(--ease), transform var(--t-slow) var(--ease), border-color var(--t) var(--ease); }
.product-card:hover { box-shadow: var(--sh-3); border-color: var(--line-2); }
.product-card__media { position: relative; display: block; aspect-ratio: 1 / 1; background: radial-gradient(120% 90% at 50% 100%, var(--accent-50), #fff 60%); overflow: hidden; }
.product-card__media img { width: 100%; height: 100%; object-fit: contain; padding: 14px 18px 4px; transition: transform var(--t-slow) var(--ease); }
.product-card:hover .product-card__media img { transform: scale(1.035); }
.product-card__badges { position: absolute; top: 12px; left: 12px; display: flex; gap: .35rem; }
.product-card__body { display: flex; flex-direction: column; padding: 16px 18px 18px; gap: .15rem; flex: 1; }
.product-card__body .eyebrow { margin-bottom: .25rem; }
.product-card__title { font: 750 1.06rem/1.22 var(--font-display); letter-spacing: -0.01em; margin: 0; }
.product-card__title a { color: var(--ink); text-decoration: none; }
.product-card__title a:hover { color: var(--brand); }
.product-card__presentation { color: var(--muted); font-size: .9rem; margin: .1rem 0 .6rem; }
.product-card__meta { list-style: none; display: flex; flex-direction: column; gap: .4rem; font-size: .84rem; color: var(--ink-2); margin-bottom: .8rem; }
.product-card__meta li { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.product-card__meta .icon { color: var(--muted); }
.product-card__min { font-size: .8rem; color: var(--muted); display: flex; gap: .35rem; align-items: center; margin: .6rem 0 .7rem; }
.product-card__buy { display: grid; grid-template-columns: auto 1fr; gap: .5rem; margin-top: auto; }
.product-card__buy .btn { padding-inline: .8rem; }
.product-card .link-btn { margin-top: .85rem; align-self: flex-start; font-size: .88rem; }
.product-card.is-skeleton:hover { box-shadow: var(--sh-1); }

.price { padding: .7rem .8rem; border-radius: var(--r-md); background: var(--bg); border: 1px solid var(--line); }
.price__main { display: flex; align-items: baseline; gap: .3rem; flex-wrap: wrap; }
.price__main strong { font: 800 1.45rem/1 var(--font-display); letter-spacing: -0.02em; }
.price__main > span { color: var(--muted); font-size: .85rem; }
.price__label { display: flex; justify-content: space-between; align-items: center; gap: .4rem; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: .3rem; }
.price__main { margin-bottom: .1rem; }
.price__sub { margin: .3rem 0 0; font-size: .82rem; color: var(--muted); }
.price__tax { margin: .35rem 0 0; padding-top: .35rem; border-top: 1px dashed var(--line-2); font-size: .74rem; font-weight: 650; color: var(--muted); }
.price__tier { margin: .35rem 0 0; font-size: .8rem; color: var(--ok); display: flex; gap: .3rem; align-items: center; }

/* ---------- Píldoras, badges, etiquetas demo ---------- */
.pill { display: inline-flex; align-items: center; padding: .28rem .6rem; border-radius: var(--r-pill); font: 750 .7rem/1 var(--font-body); letter-spacing: .04em; text-transform: uppercase; }
.pill--brand { background: var(--brand); color: #fff; }
.pill--accent { background: var(--accent); color: var(--ink); }
.pill--soft { background: var(--bg-2); color: var(--ink-2); text-transform: none; letter-spacing: 0; font-weight: 650; }

.badge { display: inline-flex; align-items: center; gap: .38rem; padding: .28rem .6rem; border-radius: var(--r-pill); font-size: .78rem; font-weight: 650; line-height: 1.2; white-space: nowrap; }
.badge .icon { width: 14px; height: 14px; }
.badge__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge--ok { background: var(--ok-bg); color: var(--ok); }
.badge--warn { background: var(--warn-bg); color: var(--warn); }
.badge--info { background: var(--info-bg); color: var(--info); }
.badge--brand { background: var(--brand-50); color: var(--brand-700); }
.badge--muted { background: var(--bg-2); color: var(--muted); }
.badge--danger { background: var(--danger-bg); color: var(--danger); }
.badge--demo { background: var(--demo-bg); color: var(--demo); }

.demo-tag { display: inline-flex; align-items: center; gap: .25rem; padding: .12rem .42rem; border: 1px dashed #B8A9F5; border-radius: var(--r-xs); background: var(--demo-bg); color: var(--demo); font: 650 .66rem/1.2 var(--font-body); letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; vertical-align: middle; }
.demo-tag .icon { width: 11px; height: 11px; }

.list-tag { display: inline-flex; align-items: center; gap: .25rem; padding: .12rem .42rem; border: 1px solid #A8D5BA; border-radius: var(--r-xs); background: var(--ok-bg); color: var(--ok); font: 650 .66rem/1.2 var(--font-body); letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; vertical-align: middle; }
.list-tag .icon { width: 11px; height: 11px; }
.save { display: inline-block; padding: .1rem .4rem; border-radius: var(--r-xs); background: var(--ok-bg); color: var(--ok); font-weight: 700; font-size: .78rem; }
.hint { display: flex; align-items: center; gap: .3rem; color: var(--ok); font-size: .8rem; margin-top: .25rem; }

.notice { display: flex; gap: .65rem; align-items: flex-start; padding: .85rem 1rem; border-radius: var(--r-md); background: var(--info-bg); color: #1f4a3c; font-size: .9rem; margin: 0 0 1rem; }
.notice > .icon { margin-top: 2px; }
.notice--demo { background: var(--demo-bg); color: #3B2A8F; }
.notice--strong { border: 1px solid currentColor; border-color: rgba(91, 63, 208, .25); }
.notice:not(.notice--demo).notice--strong { background: var(--warn-bg); color: #6B4000; border-color: rgba(154, 91, 0, .25); }
.notice--inline { display: inline-flex; padding: .3rem .6rem; margin: 0; font-size: .78rem; border-radius: var(--r-sm); }

/* ---------- Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; }
.chips li, .chip { display: inline-flex; align-items: center; gap: .3rem; padding: .4rem .75rem; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line-2); font-size: .85rem; font-weight: 550; color: var(--ink-2); }
.chip { cursor: pointer; transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease), color var(--t) var(--ease), transform var(--t-fast) var(--ease); }
.chip:hover { border-color: var(--ink-2); }
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip--active { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand-700); }
.chip--active .icon { width: 14px; height: 14px; }

/* ---------- Cantidad ---------- */
.qty { display: inline-flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); overflow: hidden; height: 44px; }
.qty:focus-within { border-color: var(--brand); box-shadow: var(--ring); }
.qty__btn { width: 40px; border: 0; background: transparent; display: grid; place-items: center; color: var(--ink); transition: background-color var(--t) var(--ease); }
.qty__btn:hover:not(:disabled) { background: var(--bg-2); }
.qty__btn:active:not(:disabled) { background: var(--line); }
.qty__btn:disabled { color: var(--subtle); opacity: .5; cursor: not-allowed; }
.qty__btn .icon { width: 16px; height: 16px; }
.qty__input { width: 52px !important; min-height: 0 !important; height: 100%; border: 0 !important; border-radius: 0 !important; padding: 0 !important; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; box-shadow: none !important; background: transparent !important; }
.qty--compact { height: 40px; }
.qty--compact .qty__btn { width: 36px; }

/* ---------- Escalas de precio ---------- */
.tiers { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; font-size: .9rem; }
.tiers__row { display: grid; grid-template-columns: 1.2fr 1fr .8fr; gap: .5rem; padding: .7rem 1rem; border-top: 1px solid var(--line); align-items: center; transition: background-color var(--t) var(--ease); }
.tiers__row:first-child { border-top: 0; }
.tiers__row--head { background: var(--bg); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tiers__row.is-current { background: var(--accent-50); box-shadow: inset 3px 0 0 var(--accent); font-weight: 600; }
.tiers__row span:last-child { text-align: right; }
.tiers--4 .tiers__row { grid-template-columns: 1fr 1fr 1fr .8fr; }
.tiers__row span { font-variant-numeric: tabular-nums; }
.tiers__row--head span:nth-child(2), .tiers__row span:nth-child(2) { font-variant-numeric: tabular-nums; }

/* ---------- Resumen de compra ---------- */
.summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--sh-2); }
.summary__title { font: 750 1.1rem/1.2 var(--font-display); margin-bottom: 1rem; }
.summary__lines { list-style: none; display: grid; gap: .8rem; padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--line); }
.summary__lines li { display: grid; grid-template-columns: 44px 1fr auto; gap: .7rem; align-items: center; font-size: .9rem; }
.summary__lines img { width: 44px; height: 55px; object-fit: contain; background: var(--bg); border-radius: 8px; }
.summary__lines p { margin: 0; font-weight: 600; line-height: 1.25; }
.summary__lines small { color: var(--muted); }
.summary__rows { display: grid; gap: .55rem; font-size: .93rem; }
.summary__rows > div { display: flex; justify-content: space-between; gap: 1rem; }
.summary__rows dt { color: var(--ink-2); }
.summary__rows dt small { color: var(--subtle); font-size: .75rem; display: block; }
.summary__rows dd { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
.summary__rows .is-save dd, .summary__rows .is-save dt { color: var(--ok); }
.summary__total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.summary__total span { font-weight: 700; }
.summary__total strong { font: 850 1.65rem/1 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.summary__tax { margin: .9rem 0 0; padding: .6rem .7rem; border-radius: var(--r-sm); background: var(--accent-50); border: 1px solid var(--accent-100); font-size: .8rem; color: var(--ink-2); display: flex; gap: .4rem; }
.summary__tax .icon { color: var(--warn); margin-top: 2px; }
.summary__note { margin: .6rem 0 0; font-size: .78rem; color: var(--demo); display: flex; gap: .35rem; }
.summary__actions { display: grid; gap: .5rem; margin-top: 14px; }
.assurances { list-style: none; display: grid; gap: .5rem; margin-top: 16px; font-size: .84rem; color: var(--muted); }
.assurances li { display: flex; gap: .45rem; align-items: center; }
.assurances .icon { color: var(--ok); }
.assurances--row { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin: 1rem 0; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; z-index: 200; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: .5rem; width: min(440px, calc(100vw - 24px)); pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: .6rem; padding: .75rem .6rem .75rem 1rem;
  background: rgba(19, 33, 28, .92); color: #fff; border-radius: var(--r-md); box-shadow: 0 18px 40px -12px rgba(0,0,0,.45);
  -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%);
  font-size: .9rem; font-weight: 500;
  opacity: 0; transform: translateY(14px) scale(.97); transition: opacity 260ms var(--ease), transform 340ms var(--ease);
}
.toast.is-in { opacity: 1; transform: none; }
.toast.is-out { opacity: 0; transform: translateY(8px) scale(.98); transition-duration: 200ms; }
.toast p { flex: 1; margin: 0; line-height: 1.35; }
.toast > .icon { width: 20px; height: 20px; }
.toast--success > .icon { color: #6EE7A0; }
.toast--error > .icon { color: #FF8A8F; }
.toast--info > .icon, .toast--warning > .icon { color: var(--accent); }
.toast-action { border: 0; background: rgba(255,255,255,.14); color: #fff; font-weight: 700; font-size: .84rem; padding: .45rem .7rem; border-radius: 8px; white-space: nowrap; }
.toast-action:hover { background: rgba(255,255,255,.24); }
.toast-close { border: 0; background: none; color: rgba(255,255,255,.7); width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; }
.toast-close:hover { color: #fff; background: rgba(255,255,255,.1); }

/* ---------- Modal (<dialog>) ---------- */
.modal { border: 0; padding: 0; background: transparent; max-width: min(440px, calc(100vw - 32px)); width: 100%; overflow: visible; }
.modal::backdrop { background: rgba(19, 33, 28, .45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: fade-in 200ms var(--ease); }
.modal[open] .modal-card { animation: modal-in 320ms var(--ease); }
.modal-card { background: var(--surface); border-radius: var(--r-xl); padding: 28px; box-shadow: var(--sh-3); text-align: center; }
.modal-icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px; background: var(--accent-100); color: var(--warn); }
.modal-icon.is-danger { background: var(--danger-bg); color: var(--danger); }
.modal-icon .icon { width: 24px; height: 24px; }
.modal-title { font: 800 1.3rem/1.2 var(--font-display); letter-spacing: -0.01em; }
.modal-text { color: var(--muted); }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: 20px; }
@keyframes modal-in { from { opacity: 0; transform: scale(.94) translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Sheets / drawers (resorte + arrastre en motion.js) ---------- */
.sheet-root { position: fixed; inset: 0; z-index: 150; }
.sheet-scrim { position: absolute; inset: 0; background: rgba(19, 33, 28, .42); opacity: 0; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.sheet { position: absolute; background: var(--surface); box-shadow: var(--sh-3); display: flex; flex-direction: column; will-change: transform; touch-action: pan-y; outline: none; }
.sheet--right { top: 0; right: 0; bottom: 0; width: min(380px, 88vw); border-radius: var(--r-xl) 0 0 var(--r-xl); transform: translateX(100%); }
.sheet--bottom { left: 0; right: 0; bottom: 0; max-height: 88vh; border-radius: var(--r-xl) var(--r-xl) 0 0; transform: translateY(100%); padding-bottom: env(safe-area-inset-bottom); }
.sheet.is-dragging { cursor: grabbing; user-select: none; }
.sheet-grabber { display: grid; place-items: center; padding: 10px 0 4px; cursor: grab; touch-action: none; }
.sheet-grabber span { width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; flex: 1; padding: 8px 20px 20px; }
.sheet--right .sheet-body { padding-top: 16px; }

.drawer-menu { display: flex; flex-direction: column; gap: 1rem; min-height: 100%; }
.drawer-menu__head { display: flex; align-items: center; justify-content: space-between; }
.drawer-menu__head .logo-img { height: 44px; width: auto; }
.drawer-menu__user { display: flex; align-items: center; gap: .75rem; padding: .8rem; border-radius: var(--r-md); background: var(--bg); text-decoration: none; color: var(--ink); }
.drawer-menu__user span:nth-child(2) { flex: 1; display: grid; }
.drawer-menu__user small { color: var(--muted); }
.drawer-menu__cta { display: grid; gap: .5rem; }
.drawer-menu__nav { display: grid; }
.drawer-menu__nav a { display: flex; align-items: center; gap: .8rem; padding: .85rem .5rem; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; transition: background-color var(--t) var(--ease); border-radius: 8px; }
.drawer-menu__nav a:active { background: var(--bg-2); }
.drawer-menu__nav .icon { color: var(--muted); width: 20px; height: 20px; }
.drawer-menu__wa { margin-top: auto; display: flex; align-items: center; justify-content: center; gap: .5rem; padding: .85rem; border-radius: var(--r-md); background: var(--ok-bg); color: var(--ok); text-decoration: none; font-weight: 700; }

/* ---------- Estados vacíos / error ---------- */
.empty { text-align: center; padding: clamp(36px, 6vw, 64px) 20px; display: grid; justify-items: center; gap: .3rem; }
.empty__icon { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--accent-100); color: var(--ink-2); margin-bottom: .6rem; }
.empty__icon .icon { width: 28px; height: 28px; }
.empty__title { font: 750 1.2rem/1.25 var(--font-display); margin: 0; }
.empty__text { color: var(--muted); max-width: 46ch; margin: 0 0 .8rem; }
.empty--error .empty__icon { background: var(--danger-bg); color: var(--danger); }

/* ---------- Migas ---------- */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem; font-size: .84rem; color: var(--muted); margin-bottom: .9rem; }
.crumbs li { display: inline-flex; align-items: center; gap: .3rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand); }
.crumbs .icon { width: 14px; height: 14px; }
.crumbs [aria-current] { color: var(--ink-2); font-weight: 600; }

/* ---------- Tablas responsive ---------- */
.table-wrap { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.table th { text-align: left; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: .8rem 1rem; background: var(--bg); border-bottom: 1px solid var(--line); }
.table td { padding: .85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: .92rem; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color var(--t) var(--ease); }
.table tbody tr:hover { background: #f6f9f5; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table__action { width: 52px; text-align: right; }
.cell-product { display: flex; align-items: center; gap: .7rem; }
.cell-product img { width: 40px; height: 50px; object-fit: contain; }
.file-btns { display: flex; gap: .3rem; }

/* ---------- Pestañas ---------- */
.tabs { display: flex; gap: .35rem; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin-bottom: 1rem; -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); mask-image: linear-gradient(90deg, #000 92%, transparent); }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex-shrink: 0; display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .85rem; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface); font-weight: 600; font-size: .88rem; color: var(--ink-2); transition: all var(--t) var(--ease); }
.tab:hover { border-color: var(--ink-2); }
.tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.tab__count { font-size: .74rem; padding: .05rem .4rem; border-radius: var(--r-pill); background: var(--bg-2); color: var(--muted); font-variant-numeric: tabular-nums; }
.tab[aria-selected="true"] .tab__count { background: rgba(255,255,255,.18); color: #fff; }

/* ---------- Tarjeta de pedido ---------- */
.order-list { display: grid; gap: 14px; }
.order-card { padding: 18px 20px; display: grid; gap: 14px; }
.order-card__head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.order-card__head h3 { font: 800 1.15rem/1.2 var(--font-mono); margin: 0; }
.order-card__head h3 a { color: var(--ink); text-decoration: none; }
.order-card__head h3 a:hover { color: var(--brand); }
.order-card__head .eyebrow { margin-bottom: .2rem; }
.order-card__head .muted { margin: .15rem 0 0; font-size: .85rem; }
.order-card__badges { display: flex; gap: .4rem; flex-wrap: wrap; align-items: flex-start; }
.order-card__body { display: grid; grid-template-columns: auto 1fr auto; gap: 1.2rem; align-items: center; padding-block: 12px; border-block: 1px solid var(--line); }
.thumbs { display: flex; }
.thumbs img { width: 48px; height: 60px; object-fit: contain; background: var(--bg); border: 2px solid #fff; border-radius: 10px; margin-left: -12px; }
.thumbs img:first-child { margin-left: 0; }
.order-card__items { list-style: none; font-size: .88rem; display: grid; gap: .15rem; }
.order-card__facts { display: flex; gap: .6rem 1.5rem; flex-wrap: wrap; }
.order-card__facts dt { font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 650; }
.order-card__facts dd { font-weight: 600; font-variant-numeric: tabular-nums; }
.order-card__actions { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- Timeline de envío ---------- */
.tl { list-style: none; position: relative; display: grid; gap: 0; margin-top: 8px; }
.tl__item { display: grid; grid-template-columns: 40px 1fr; gap: .9rem; position: relative; padding-bottom: 18px; }
.tl__item:last-child { padding-bottom: 0; }
.tl__item::before { content: ""; position: absolute; left: 19px; top: 40px; bottom: 0; width: 2px; background: var(--line); }
.tl__item:last-child::before { display: none; }
.tl__item.is-done::before { background: var(--ok); }
.tl__dot { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-2); color: var(--subtle); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); position: relative; z-index: 1; }
.tl__dot .icon { width: 18px; height: 18px; }
.tl__item.is-done .tl__dot { background: var(--ok-bg); color: var(--ok); box-shadow: 0 0 0 1px rgba(27,122,69,.25); }
.tl__item.is-current .tl__dot { background: var(--brand); color: #fff; box-shadow: 0 0 0 5px var(--brand-50); }
.tl__item.is-current .tl__dot::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--brand); opacity: 0; animation: pulse 2.4s var(--ease) infinite; }
.tl__item.is-incident .tl__dot { background: var(--warn-bg); color: var(--warn); box-shadow: 0 0 0 1px rgba(154,91,0,.3); }
.tl__content { padding-top: 8px; }
.tl__label { margin: 0; font-weight: 650; }
.tl__item.is-pending .tl__label { color: var(--subtle); font-weight: 550; }
.tl__item.is-current .tl__label { color: var(--brand-700); }
.tl__item.is-incident .tl__label { color: var(--warn); }
.tl__meta { margin: .1rem 0 0; font-size: .84rem; color: var(--muted); }
.tl__note { margin: .4rem 0 0; font-size: .86rem; padding: .55rem .75rem; border-radius: var(--r-sm); background: var(--warn-bg); color: #6B4000; }
@keyframes pulse { 0% { opacity: .6; transform: scale(.9); } 70%, 100% { opacity: 0; transform: scale(1.35); } }

/* ---------- Barra de progreso ---------- */
.progress { height: 8px; border-radius: 4px; background: var(--bg-2); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--brand)); transition: width 800ms var(--ease); }

/* ---------- Elección (radios en tarjeta) ---------- */
.choice-list { display: grid; gap: .6rem; margin-bottom: 1rem; }
.choice { display: flex; gap: .85rem; align-items: flex-start; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--surface); cursor: pointer; transition: border-color var(--t) var(--ease), background-color var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.choice:hover { border-color: var(--line-2); }
.choice:has(input:checked) { border-color: var(--brand); background: #f4f8f3; box-shadow: 0 0 0 3px var(--brand-50); }
.choice input { appearance: none; -webkit-appearance: none; flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-2); margin-top: 2px; transition: border var(--t) var(--ease); }
.choice input:checked { border: 6px solid var(--brand); }
.choice input:focus-visible { box-shadow: var(--ring); outline: none; }
.choice__body { display: grid; gap: .15rem; flex: 1; font-size: .92rem; }
.choice__body strong { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.choice__icon { width: 40px; height: 40px; border-radius: 12px; background: var(--bg); display: grid; place-items: center; flex-shrink: 0; color: var(--ink-2); }
.choice__price { font: 800 1.1rem/1 var(--font-display); white-space: nowrap; font-variant-numeric: tabular-nums; }
.choice.is-skeleton { display: block; cursor: default; min-height: 76px; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: .6rem; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.faq details[open] { border-color: var(--line-2); box-shadow: var(--sh-2); }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.15rem; font-weight: 650; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { transition: transform var(--t-slow) var(--ease); color: var(--brand); }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq details p { padding: 0 1.15rem 1.1rem; color: var(--ink-2); margin: 0; }
.faq details[open] p { animation: view-in var(--t-slow) var(--ease); }

/* ---------- Barra móvil fija ---------- */
.mobile-bar { display: none; }

/* ---------- Responsive de componentes ---------- */
@media (max-width: 1100px) {
  .search--header { max-width: 280px; }
  .navbar__nav a { padding-inline: .55rem; }
}
@media (max-width: 900px) {
  :root { --header-h: 62px; }
  .navbar__nav, .search--header, .navbar__account-label { display: none; }
  .navbar__menu { display: grid; }
  .navbar__search-mobile { display: block; }
  .navbar__logo .logo-img { height: 42px; }
  .topbar__inner span { font-size: .78rem; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .topbar__wa { display: none; }
  .topbar p { min-width: 0; }
  .topbar p span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar p { min-width: 0; }
  .topbar p span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .demo-banner { font-size: .78rem; }
  .form-grid { grid-template-columns: 1fr; }
  .modal-actions { grid-template-columns: 1fr; }
  .modal-actions .btn--primary, .modal-actions .btn--danger { order: -1; }
  .footer__cta-actions, .footer__cta-actions .btn { width: 100%; }
  .order-card__body { grid-template-columns: 1fr; }
  .order-card__facts { justify-content: space-between; }
  .order-card__actions .btn { flex: 1; }

  /* Tablas → tarjetas apiladas */
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
  .table tbody tr:last-child { border-bottom: 0; }
  .table td { border: 0; padding: .25rem 0; display: flex; justify-content: space-between; gap: 1rem; text-align: right; }
  .table td::before { content: attr(data-label); font-size: .78rem; font-weight: 650; color: var(--muted); text-align: left; }
  .table td.table__action { display: none; }
  .table td .cell-product { text-align: left; }
  .table--items td[data-label="Producto"] { flex-direction: column; text-align: left; }
}

/* Transparencia reducida / contraste alto: materiales sólidos */
@media (prefers-reduced-transparency: reduce) {
  .navbar { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .toast { background: var(--ink); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .sheet-scrim, .modal::backdrop { -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  .navbar { background: #fff; border-bottom: 1px solid var(--ink); }
  .demo-tag { border-style: solid; }
}

/* ==========================================================
   JUGO DE MAGUEY · componentes de marca (tienda B2C)
   ========================================================== */
.brandmark { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; }
.brandmark .logo-img { width: 44px; height: 44px; border-radius: 12px; box-shadow: var(--sh-1); }
.brandmark__text { display: flex; flex-direction: column; line-height: 1.05; }
.brandmark__text strong { font: 400 1.15rem/1.05 var(--font-serif); letter-spacing: -0.005em; }
.brandmark__text small { font: 600 .68rem/1.2 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: .2rem; }
.brandmark--white, .brandmark--white .brandmark__text small { color: #eef5f0; }
.brandmark--white .brandmark__text small { color: #a5bfb2; }
.navbar__logo .logo-img { height: 44px; width: 44px; }
.footer__brand .brandmark { margin-bottom: 1rem; }
.footer__brand .logo-img { width: 52px; height: 52px; margin: 0; }
.footer__credit { width: 100%; text-align: center; color: #a5bfb2; }
.footer__credit a { color: var(--accent-400) !important; font-weight: 700; display: inline !important; }
.footer__grid { grid-template-columns: 1.3fr 1fr 1.2fr 1fr; }
.chips a { color: inherit; text-decoration: none; }
.ship__cities .chips li { padding: 0; }
.ship__cities .chips a { display: block; padding: .4rem .75rem; border-radius: var(--r-pill); transition: background var(--t-fast) var(--ease); }
.ship__cities .chips a:hover { background: rgba(255,255,255,.1); color: #fff; }
.ship__cities .chips a:active { transform: scale(.97); }

/* Paquetes rápidos (1 · 3 · 6 botellas) */
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; border: 0; padding: 0; margin: 0 0 1rem; }
.packs > legend { margin-bottom: .5rem; }
.pack { position: relative; cursor: pointer; }
.pack input { position: absolute; opacity: 0; inset: 0; }
.pack__body { position: relative; display: flex; flex-direction: column; gap: .15rem; padding: .8rem .85rem; border-radius: var(--r-md); border: 1.5px solid var(--line-2); background: var(--surface); transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), transform 100ms var(--ease); }
.pack__body b { font-weight: 750; font-size: .98rem; }
.pack__body > span { color: var(--muted); font-size: .86rem; font-variant-numeric: tabular-nums; }
.pack__body em { position: absolute; top: -.6rem; right: .6rem; font: 700 .64rem/1 var(--font-body); font-style: normal; letter-spacing: .06em; text-transform: uppercase; background: var(--accent); color: var(--ink); padding: .25rem .45rem; border-radius: var(--r-pill); }
.pack:active .pack__body { transform: scale(.97); }
.pack input:checked + .pack__body { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); background: #f4f8f3; }
.pack input:checked + .pack__body > span { color: var(--brand); font-weight: 650; }
.pack input:focus-visible + .pack__body { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (max-width: 640px) {
  .brandmark__text small { display: none; }
  .brandmark__text strong { font-size: 1.02rem; }
  .navbar__logo .logo-img, .brandmark .logo-img { width: 38px; height: 38px; }
  .navbar__logo { min-width: 0; flex-shrink: 1; }
  .navbar__inner { gap: .5rem; }
}
@media (max-width: 360px) { .brandmark__text { display: none; } }

/* Formas de pago aceptadas (texto, sin logotipos de marcas) */
.paymethods { display: grid; gap: .55rem; margin-top: 1rem; }
.paymethods__title { display: flex; align-items: center; gap: .4rem; margin: 0; font-weight: 700; font-size: .86rem; color: var(--ink-2); }
.paymethods__title .icon { width: 16px; height: 16px; color: var(--brand); }
.paymethods__list { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; }
.pm { display: inline-flex; align-items: center; gap: .35rem; padding: .32rem .6rem; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line-2); font: 650 .78rem/1.1 var(--font-body); color: var(--ink-2); white-space: nowrap; }
.pm .icon { width: 14px; height: 14px; color: var(--muted); }
.pm--oxxo .icon { color: var(--accent); }
.paymethods__note { margin: 0; font-size: .78rem; color: var(--muted); }
.paymethods--compact { padding-top: .9rem; border-top: 1px dashed var(--line-2); }
.paymethods--dark .paymethods__title { color: #eef5f0; }
.paymethods--dark .paymethods__title .icon { color: var(--accent-400); }
.paymethods--dark .pm { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); color: #eef5f0; }
.paymethods--dark .pm .icon { color: #a5bfb2; }
.paymethods--dark .paymethods__note { color: #a5bfb2; }
.footer__pay { padding-block: 0 22px; }
