/* Shared shell (home + catalog): trust strip, sticky header, mega menu, mobile drawer, progress bar, footer, button.
   Class prefix sh-/mega/drawer/foot/cbtn so it never collides with the older home.css. Tokens: tokens.css round 7. */
html { scroll-padding-top: calc(var(--sh-h) + 12px); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--c-lime); color: var(--c-night); padding: 10px 16px; border-radius: 8px; font-weight: 700; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* button: violet on light, lime on dark. Press = scale .97 */
.cbtn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border: 0; border-radius: 12px; background: var(--c-violet); color: #fff; font: 700 1rem/1 var(--f-txt); text-decoration: none; cursor: pointer; touch-action: manipulation; transition: background-color 160ms ease, transform 160ms var(--e-out); }
.cbtn svg { width: 18px; height: 18px; flex: none; transition: transform 200ms var(--e-out); }
.cbtn--lime { background: var(--c-lime); color: var(--c-night); }
.cbtn--lg { min-height: 56px; padding: 0 28px; font-size: 1.0625rem; }
.cbtn--sm { min-height: 44px; padding: 0 18px; font-size: .9375rem; }
.cbtn:active { transform: scale(.97); }
.cbtn[aria-disabled="true"] { background: var(--c-lilac); color: var(--c-ink-2); cursor: default; }
@media (hover: hover) and (pointer: fine) {
  .cbtn:hover { background: var(--c-violet-hover); }
  .cbtn--lime:hover { background: var(--c-lime-press); }
  .cbtn:hover svg { transform: translateX(3px); }
  .cbtn[aria-disabled="true"]:hover { background: var(--c-lilac); }
}
:where(a, button, input, summary):focus-visible { outline: 3px solid var(--c-lime); outline-offset: 2px; }
.light :where(a, button, input):focus-visible { outline-color: var(--c-violet); }

/* trust strip (scrolls away; header stays) */
.sh-strip { background: var(--c-night-2); color: var(--c-on-night-dim); font: 500 .8125rem/1.2 var(--f-txt); }
.sh-strip__in { max-width: 1240px; margin: 0 auto; padding: 8px 16px; display: flex; justify-content: center; gap: 24px; }
.sh-strip span { display: inline-flex; align-items: center; gap: 6px; }
.sh-strip span span { display: inline; }
.sh-strip svg { width: 14px; height: 14px; color: var(--c-lime); }
.sh-strip .hide-m { display: none; }
.sh-strip__ast { color: var(--c-lime); font-weight: 700; text-decoration: none; padding: 4px 3px; margin: -4px -3px -4px -2px; }
.sh-strip__ast:hover, .sh-strip__ast:focus-visible { text-decoration: underline; }
@media (min-width: 700px) { .sh-strip .hide-m { display: inline-flex; } .sh-strip__in { padding-inline: 32px; } }

/* header */
.sh { position: sticky; top: 0; z-index: 50; background: var(--c-night); color: var(--c-on-night); font-family: var(--f-txt); }
.sh__in { max-width: 1240px; margin: 0 auto; height: var(--sh-h); padding: 0 8px; display: flex; align-items: center; gap: 4px; }
.sh__brand { display: flex; flex: none; padding: 4px 6px; margin-right: auto; }
.sh__brand img { display: block; height: 40px; width: auto; }
.sh__btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; height: 44px; padding: 0 10px; border: 0; border-radius: 12px; background: transparent; color: inherit; font: 600 .9375rem/1 var(--f-txt); text-decoration: none; cursor: pointer; touch-action: manipulation; transition: background-color 160ms ease, transform 160ms var(--e-out); }
/* every header icon lives in a fixed 22px box (.sh__ic) so WhatsApp, bag, menu and search share one optical size, one icon-to-label gap (8px) and one anchor for the cart badge */
.sh__btn svg { width: 22px; height: 22px; flex: none; display: block; }
.sh__ic { position: relative; display: inline-flex; flex: none; width: 22px; height: 22px; }
.sh__btn .lbl { line-height: 1; white-space: nowrap; }
.sh__btn:active { transform: scale(.96); }
.sh__btn .lbl, .sh__nav, .sh__search { display: none; }
@media (hover: hover) and (pointer: fine) { .sh__btn:hover, .sh__link:hover { background: rgba(255,255,255,.1); } }
.sh__menu { order: -1; }

/* mobile search row */
.sh__search { order: 9; flex: 1 0 100%; padding: 0 4px 12px; }
.sh.search-open .sh__in { flex-wrap: wrap; height: auto; min-height: var(--sh-h); }
.sh.search-open .sh__search { display: block; }

/* shared search field (header + hero) */
.sfield { position: relative; display: flex; align-items: center; background: #fff; color: var(--c-ink); border-radius: 12px; }
.sfield > svg { flex: none; width: 20px; height: 20px; margin-left: 14px; color: var(--c-ink-2); }
.sfield input { flex: 1; min-width: 0; height: 46px; padding: 0 12px; border: 0; background: transparent; color: var(--c-ink); font: 500 1rem/1 var(--f-txt); outline: 0; border-radius: 12px; -webkit-appearance: none; appearance: none; }
.sfield input::placeholder { color: var(--c-ink-2); opacity: 1; }
.sfield input::-webkit-search-cancel-button { display: none; }
.sfield:focus-within { box-shadow: 0 0 0 3px var(--c-lime); }
.suggest { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; background: var(--c-card); color: var(--c-ink); border-radius: 14px; box-shadow: 0 16px 40px rgba(28,18,51,.28); overflow: hidden; transform-origin: top; animation: sug 160ms var(--e-out); }
.suggest[hidden] { display: none; }
.suggest a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; color: inherit; text-decoration: none; min-height: 52px; }
.suggest img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--c-lilac); }
.suggest b { display: block; font-weight: 600; font-size: .9375rem; }
.suggest small { color: var(--c-ink-2); font-size: .8125rem; }
.suggest .more { font-weight: 600; color: var(--c-violet); min-height: 44px; }
.suggest a:hover, .suggest a:focus-visible { background: var(--c-lilac); }
@keyframes sug { from { opacity: 0; transform: translateY(-4px) scale(.98); } }

/* progress bar: owner's pick (home-c-premium). Scroll-driven CSS; header.js falls back to rAF */
.sh__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--c-lime); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; }
@supports (animation-timeline: scroll()) {
  .sh__bar { animation: sh-bar linear both; animation-timeline: scroll(root block); }
  @keyframes sh-bar { to { transform: scaleX(1); } }
}

/* mega menu (desktop) */
.mega { position: absolute; left: 0; right: 0; top: 100%; background: var(--c-cream); color: var(--c-ink); border-bottom: 1px solid var(--c-line); box-shadow: 0 24px 40px rgba(28,18,51,.18); opacity: 0; transform: translateY(-8px); transition: opacity 180ms var(--e-out), transform 180ms var(--e-out); pointer-events: none; }
.mega[hidden] { display: none; }
.mega.is-open { opacity: 1; transform: none; pointer-events: auto; }
.mega__in { max-width: 1240px; margin: 0 auto; padding: 24px 32px 28px; }
.mega__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.mega__head h2 { margin: 0; font: 800 1.125rem/1 var(--f-disp); letter-spacing: -.01em; }
.mega__head a { color: var(--c-violet); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.mega__head a:hover { text-decoration: underline; }
.mega__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.mega__tile { position: relative; display: block; color: inherit; text-decoration: none; border-radius: var(--c-r); overflow: hidden; background: var(--c-lilac); }
.mega__img { display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.mega__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 500ms var(--e-out); }
.mega__txt { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px 12px; }
.mega__name { font: 700 1rem/1.2 var(--f-txt); }
.mega__n { font: 500 .8125rem/1.2 var(--f-txt); color: var(--c-ink-2); }
.cat-ph { position: absolute; left: 8px; top: 8px; padding: 3px 8px; border-radius: 999px; background: rgba(28,18,51,.78); color: #fff; font: 600 .6875rem/1.2 var(--f-txt); }
@media (hover: hover) and (pointer: fine) { .mega__tile:hover img { transform: scale(1.05); } }

@media (min-width: 960px) {
  .sh__in { padding: 0 32px; gap: 8px; }
  .sh__brand { margin-right: 20px; }
  .sh__brand img { height: 48px; }
  .sh__menu, .sh__btn--s { display: none; }
  .sh__nav { display: flex; align-items: center; gap: 2px; margin-right: auto; }
  .sh__link { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px; border: 0; border-radius: 12px; background: transparent; color: inherit; font: 600 .9375rem/1 var(--f-txt); text-decoration: none; cursor: pointer; transition: background-color 160ms ease; }
  .sh__link svg { width: 16px; height: 16px; transition: transform 200ms var(--e-out); }
  .sh__link[aria-expanded="true"] { background: rgba(255,255,255,.14); }
  .sh__link[aria-expanded="true"] svg { transform: rotate(180deg); }
  .sh__search { display: block; order: 0; flex: 0 1 380px; padding: 0; margin-right: 8px; }
  .sh__btn .lbl { display: inline; }
  .sh.search-open .sh__in { flex-wrap: nowrap; height: var(--sh-h); }
}

/* mobile drawer (native dialog: focus trap + Esc for free) */
.drawer { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: var(--c-ink); }
.drawer::backdrop { background: rgba(28,18,51,.55); opacity: 0; transition: opacity 240ms ease; }
.drawer.is-in::backdrop { opacity: 1; }
.drawer__panel { width: min(88vw, 360px); height: 100%; overflow-y: auto; overscroll-behavior: contain; background: var(--c-cream); display: flex; flex-direction: column; transform: translateX(-100%); transition: transform 260ms var(--e-out); padding-bottom: env(safe-area-inset-bottom); }
.drawer.is-in .drawer__panel { transform: none; }
.drawer__top { display: flex; align-items: center; justify-content: space-between; min-height: var(--sh-h); padding: 8px 8px 8px 20px; background: var(--c-night); border-bottom: 3px solid var(--c-lime); }
.drawer__top img { height: 40px; width: auto; display: block; }
.drawer__top .sh__btn { color: #fff; }
.drawer .drawer__panel h2 { margin: 24px 20px 6px; font: 800 .75rem/1 var(--f-txt); letter-spacing: .08em; text-transform: uppercase; color: var(--c-ink-2); }
.drawer ul { list-style: none; margin: 0; padding: 0 12px; }
.drawer li + li { border-top: 1px solid var(--c-line); }
.drawer li a { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 58px; padding: 6px 8px; border-radius: 12px; color: var(--c-ink); text-decoration: none; font: 700 1.125rem/1.2 var(--f-txt); }
.drawer li a::after { content: ""; flex: none; width: 8px; height: 8px; border-top: 2px solid var(--c-violet); border-right: 2px solid var(--c-violet); transform: rotate(45deg); opacity: .7; }
.drawer li a:active { background: var(--c-lilac); }
.drawer li img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; background: var(--c-lilac); }
.drawer li small { display: block; font-weight: 500; font-size: .8125rem; color: var(--c-ink-2); }
.drawer__foot { margin-top: auto; padding: 16px 20px 20px; display: grid; gap: 10px; border-top: 1px solid var(--c-line); background: #fff; }
.drawer__foot p { margin: 0; font-size: .875rem; color: var(--c-ink-2); text-align: center; }
body.no-scroll { overflow: hidden; }

/* footer: structure of the staging footer (brand | policies | contact), restyled to the trust palette */
.foot { background: var(--c-night); color: var(--c-on-night-dim); font-family: var(--f-txt); padding: 56px 0 24px; border-top: 3px solid var(--c-lime); }
.foot .container { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 900px) { .foot .container { padding-inline: 32px; } }
.foot__grid { display: grid; gap: 36px; }
@media (min-width: 800px) { .foot__grid { grid-template-columns: 1.4fr 1fr 1.2fr; gap: 48px; } }
.foot__brand img { display: block; height: 40px; width: auto; }
.foot__brand p { margin: 16px 0 20px; max-width: 32ch; line-height: 1.5; }
.foot h2 { margin: 0 0 14px; font: 700 1rem/1 var(--f-disp); color: #fff; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.foot li a, .foot__hours { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: inherit; text-decoration: none; }
.foot li a:hover { color: #fff; text-decoration: underline; }
.foot svg { width: 18px; height: 18px; flex: none; color: var(--c-lime); }
.foot__bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.14); font-size: .875rem; }
.foot__bar p, .foot__legal { margin: 0; }
.foot__mp { display: inline-flex; align-items: center; gap: 8px; }
.foot__bar { align-items: flex-start; }
.foot__legal { margin-top: 6px; font-size: .8125rem; opacity: .85; max-width: 70ch; }
.foot__legal a { color: var(--c-lime); text-decoration: underline; text-underline-offset: 2px; }
.foot__legal a:hover { color: #fff; }
.foot__mp { padding-top: 1px; }

/* ===== Cart count badge on the header Carrito button (assets/js/cart-bubble.js). Absent when the cart is empty. ===== */
.sh__badge { position: absolute; top: -8px; left: 12px; min-width: 18px; height: 18px; padding: 0 5px; display: grid; place-items: center; box-sizing: border-box; border-radius: 9px; background: var(--c-lime); color: var(--c-night); font: 800 .6875rem/1 var(--f-txt); box-shadow: 0 0 0 2px var(--c-night); animation: shBadgeIn 220ms var(--e-out); pointer-events: none; } /* anchored to the top-right of the 22px bag box (.sh__ic) at every width */
@keyframes shBadgeIn { from { transform: scale(.5); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sh__badge { animation: none; } }

/* current section in the nav (no JS: the Tienda page sets data-flow="catalog") */
body[data-flow="catalog"] .sh__nav a[href="/catalogo/"] { background: rgba(255,255,255,.14); }

/* Tienda page: perks row under the hero + in-page search (header stays lean) */
.tienda-perks { list-style: none; margin: var(--s3, 24px) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tienda-perks li { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 12px; border: 1px solid var(--glass-bd, rgba(255,255,255,.18)); border-radius: 999px; background: var(--glass, rgba(255,255,255,.06)); font: 500 .9375rem/1.2 var(--f-txt, inherit); }
.tienda-perks svg { width: 18px; height: 18px; flex: none; color: var(--c-lime, #c8f560); }
.tsearch { position: relative; display: flex; align-items: center; flex: 1 1 220px; max-width: 340px; margin-left: auto; }
.tsearch svg { position: absolute; left: 14px; width: 18px; height: 18px; opacity: .7; pointer-events: none; }
.tsearch input { width: 100%; min-height: 48px; padding: 0 16px 0 42px; border: 1px solid var(--glass-bd, rgba(255,255,255,.18)); border-radius: 12px; background: #24104f; color: inherit; font: 400 1rem var(--font-text, inherit); }
.tsearch input::placeholder { color: inherit; opacity: .6; }
@media (max-width: 599px) { .tsearch { max-width: none; flex-basis: 100%; margin-left: 0; order: 3; } .tienda-perks li { flex: 1 1 100%; } }

.sh-strip--bf { background: var(--c-lime); color: var(--c-night); }
.sh-strip__bf { color: inherit; font-weight: 600; text-align: center; text-decoration: none; }
.sh-strip__bf b { text-transform: uppercase; letter-spacing: .04em; font-weight: 800; }
.sh-strip__bf:hover, .sh-strip__bf:focus-visible { text-decoration: underline; }
