/* ---------- Header ---------- */
.app-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--container);
  height: calc(var(--header-h) + var(--safe-top));
  padding-top: var(--safe-top);
  background: color-mix(in srgb, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--color-border);
  z-index: 40;
  display: flex;
  align-items: center;
  padding-left: 14px;
  padding-right: 14px;
  transition: transform var(--dur-med) var(--ease-out);
  will-change: transform;
}

.app-header.hide {
  transform: translateX(-50%) translateY(-100%);
}

.fly-to-cart {
  position: fixed;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), 0 0 0 2px var(--color-accent);
  pointer-events: none;
  z-index: 90;
  will-change: transform, opacity;
}

/* Sits flush and flat at the top of the page; once actually scrolled it
   lifts off the content with a real shadow and firms up its backdrop —
   still there, but no longer looking pasted onto the page. */
.app-header.scrolled {
  background: color-mix(in srgb, var(--color-bg) 96%, transparent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  border-bottom-color: transparent;
  transition: background var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out);
}

.app-header__inner {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 100%;
}

.app-header__brand { flex-shrink: 0; display: flex; align-items: center; }
.app-header__brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.02em;
  color: var(--color-ink);
  text-decoration: none;
  white-space: nowrap;
}

.app-header__logo {
  height: 52px;
  flex-shrink: 0;
}

.app-header__actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.desktop-nav {
  display: none;
}

.app-header__search {
  flex: 1;
  min-width: 0; /* let it shrink below its content's natural width instead of pushing the action icons off-screen */
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  background: var(--color-surface-2);
  /* Accent-tinted "marco" — a faint orange ring around the whole field so
     the search bar itself reads as branded, not just the button. */
  border: 1.5px solid color-mix(in srgb, var(--color-accent) 35%, var(--color-border));
  border-radius: 12px;
  padding: 0 0 0 16px;
  color: var(--color-ink-faint);
  font-size: 14px;
  overflow: hidden; /* clips the trailing button's square corners to the field's own radius */
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.app-header__search:hover { border-color: color-mix(in srgb, var(--color-accent) 55%, var(--color-border)); }

.app-header__search svg { flex-shrink: 0; width: 17px; height: 17px; }
/* The magnifier doubles as a filled accent button pinned flush to the
   trailing edge — full height, no gap, gradient sweep — so it reads as
   part of the field's frame rather than floating inside it. */
.app-header__search::after {
  content: "";
  flex-shrink: 0;
  align-self: stretch;
  width: 46px;
  margin-left: auto;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E"),
    linear-gradient(135deg, #ffb35c, var(--color-accent) 45%, color-mix(in srgb, var(--color-accent) 80%, black));
  background-repeat: no-repeat, no-repeat;
  background-position: center, center;
  background-size: 17px, cover;
}
/* The leading icon is redundant once the trailing button carries the
   magnifier — hide it rather than showing the glass twice in one pill. */
.app-header__search > svg { display: none; }
.app-header__search span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.app-header__icon-btn {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
  transition: background var(--dur-fast), transform var(--dur-fast) var(--ease-spring);
}
.app-header__icon-btn:active { background: var(--color-surface-2); transform: scale(0.9); }
.app-header__icon-btn svg { width: 22px; height: 22px; }

/* Phones (up to ~480px, covers everything from iPhone SE to 14 Plus/Pixel):
   the brand wordmark + search pill + fav/cart buttons don't all fit at full
   desktop-ish size, so tighten each a bit — this is what gives the search
   pill enough room to keep showing its label. Placed after the base rules
   above so it actually wins the cascade at this breakpoint. */
@media (max-width: 480px) {
  .app-header { padding-left: 12px; padding-right: 12px; }
  .app-header__inner { gap: 8px; }
  .app-header__brand-text { font-size: 15.5px; letter-spacing: 0.01em; }
  .app-header__icon-btn { width: 40px; height: 40px; }
  .app-header__icon-btn svg { width: 20px; height: 20px; }
  .app-header__search { height: 40px; padding: 0 0 0 12px; }
}

/* Smallest phones (iPhone SE/mini, small Android, ~380px and below): even
   with the compact sizing above there's only a sliver left for the label —
   a truncated fragment ("B…") reads like broken text, so show a clean
   icon-only pill instead of fighting for a few more pixels of it. */
@media (max-width: 380px) {
  .app-header__search { justify-content: center; }
  .app-header__search span { display: none; }
}

.badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--color-accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  display: grid;
  place-items: center;
  border: 2px solid var(--color-bg);
  transition: transform var(--dur-fast) var(--ease-spring);
}
.badge.pop { animation: badgePop 320ms var(--ease-spring); }
@keyframes badgePop { 0% { transform: scale(0); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }

/* ---------- Bottom Nav ---------- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  /* translateZ(0) forces its own GPU compositing layer — the standard fix
     for mobile browsers detaching fixed elements from the viewport when
     page content below them changes height (e.g. navigating into a tall
     product grid). Without this, the bar can drift down with the page. */
  transform: translateX(-50%) translateZ(0);
  width: 100%;
  max-width: var(--container);
  height: calc(var(--navbar-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  /* Solid surface + an accent top border, not vidrio semitransparente —
     the bar needs to read as its own element sitting above the page,
     not blend into whatever content scrolls underneath it. */
  background: var(--color-surface);
  border-top: 2px solid var(--color-accent);
  box-shadow: 0 -4px 14px -6px rgba(0, 0, 0, 0.18);
  display: flex;
  z-index: 40;
  will-change: transform;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--color-ink-faint);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  position: relative;
  transition: color var(--dur-fast);
}

.nav-item svg {
  width: 22px;
  height: 22px;
  transition: transform var(--dur-fast) var(--ease-spring);
}

.nav-item.active { color: var(--color-accent); }
.nav-item.active svg { transform: translateY(-1px) scale(1.05); }
.nav-item:active svg { transform: scale(0.88); }

.nav-item .badge { top: -2px; right: 18px; }

/* "Buscar" used to break out of the bar in a raised gradient circle — it
   ended up overlapping/overflowing the bar's edge, so it's back to a plain
   nav item: same size, same colors, same active state as its siblings. */
.nav-item--center .nav-item__ic {
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-item--center .nav-item__ic svg { width: 22px; height: 22px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-sm);
  padding: 14px 22px;
  font-weight: 700;
  font-size: 15px;
  transition: transform var(--dur-fast) var(--ease-spring), box-shadow var(--dur-fast), opacity var(--dur-fast);
  white-space: nowrap;
}
.btn:active { transform: scale(0.96); }
.btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
.btn-primary { background: var(--color-ink); color: var(--color-bg); box-shadow: var(--shadow-sm); }
.btn-accent { background: var(--color-accent); color: var(--color-bg); box-shadow: var(--shadow-md); }
.btn-whatsapp { background: var(--color-cta); color: #fff; box-shadow: var(--shadow-float); }
.btn-whatsapp:hover, .btn-whatsapp:active { background: var(--color-cta-dark); }
.btn-outline { background: transparent; border: 1.5px solid var(--color-ink); color: var(--color-ink); }
.btn-ghost { background: var(--color-surface-2); color: var(--color-ink); border: 1px solid var(--color-border); }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 13px; }
.btn:disabled { opacity: 0.45; pointer-events: none; }

/* Button-in-button: nested circular trailing icon for hero-tier CTAs */
.btn-nested {
  padding-right: 6px;
  gap: 14px;
}
.btn-nested__icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: transform var(--dur-med) var(--ease-spring);
}
.btn-nested__icon svg { width: 15px; height: 15px; }
.btn-nested:hover .btn-nested__icon,
.btn-nested:active .btn-nested__icon {
  transform: translate(2px, -1px) scale(1.06);
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  transition: transform var(--dur-fast) var(--ease-spring);
}
.icon-btn:active { transform: scale(0.88); background: var(--color-surface-2); }
.icon-btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
.icon-btn svg { width: 19px; height: 19px; }

/* ---------- Section heading ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 16px;
  margin-bottom: 14px;
}
.section-head h2 { font-size: 20px; }
.section-head a { font-size: 13px; font-weight: 700; color: var(--color-accent); }

.section {
  margin-top: 30px;
}

/* ---------- Horizontal scroller ---------- */
.h-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 16px 8px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.h-scroll::-webkit-scrollbar { display: none; }

/* ---------- Category pill ---------- */
.cat-pill {
  scroll-snap-align: start;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 74px;
}
.cat-pill__img {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-lg);
  background: var(--color-surface-2);
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: transform var(--dur-fast) var(--ease-spring);
}
.cat-pill:active .cat-pill__img { transform: scale(0.92); }
.cat-pill__img img { width: 100%; height: 100%; object-fit: cover; }
.cat-pill span {
  font-size: 11.5px;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
  color: var(--color-ink-soft);
}

/* ---------- Product card (grid) ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0 16px;
}

.p-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: transform var(--dur-fast) var(--ease-spring), box-shadow var(--dur-fast);
  position: relative;
  display: flex;
  flex-direction: column;
}
.p-card:active { transform: scale(0.97); }

.p-card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--color-surface-2);
  overflow: hidden;
}
.p-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out);
}
.p-card:active .p-card__media img { transform: scale(1.05); }

.p-card__fav {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--color-surface) 85%, transparent);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  z-index: 2;
}
.p-card__fav svg { width: 17px; height: 17px; stroke: var(--color-ink); fill: none; transition: all var(--dur-fast) var(--ease-spring); }
.p-card__fav.active svg { fill: var(--color-danger); stroke: var(--color-danger); }
.p-card__fav.pop svg { animation: favPop 380ms var(--ease-spring); }
@keyframes favPop { 0% { transform: scale(1); } 40% { transform: scale(1.4); } 100% { transform: scale(1); } }

.p-card__tags {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2;
}
.tag {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  color: #fff;
  width: fit-content;
}
.tag-oferta { background: var(--color-danger); }
.tag-nuevo { background: var(--color-secondary); color: var(--color-secondary-ink); }
.tag-mas-vendido { background: var(--color-secondary); color: var(--color-secondary-ink); }
.tag-premium { background: var(--color-bg); color: var(--color-ink); border: 1px solid var(--color-ink); }
.tag-agotado { background: var(--color-ink); color: #fff; }

/* ---------- Star rating ---------- */
.stars { display: inline-flex; align-items: center; gap: 1px; color: var(--color-accent); flex-shrink: 0; }
.stars .star--empty { color: var(--color-border); }
.p-tile__rating { display: flex; align-items: center; gap: 5px; margin: 2px 0 4px; }
.p-tile__rating-count { font-size: 10.5px; color: var(--color-ink-faint); font-weight: 600; }
.p-tile__ship--low { color: var(--color-danger) !important; }

/* ---------- Coupon row (cart drawer) ---------- */
.coupon-row { display: flex; gap: 8px; margin: 10px 0; }
.coupon-row input {
  flex: 1; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--color-border);
  font-size: 13px; text-transform: uppercase;
}
.coupon-row input::placeholder { text-transform: none; }
.coupon-row button {
  padding: 0 16px; border-radius: 10px; border: 1px solid var(--color-ink); background: var(--color-ink);
  color: #fff; font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
.coupon-feedback { font-size: 12px; font-weight: 600; margin: -4px 0 6px; }
.coupon-feedback.ok { color: var(--color-success); }
.coupon-feedback.err { color: var(--color-danger); }
.coupon-applied {
  display: flex; align-items: center; justify-content: space-between; margin: 10px 0;
  background: var(--color-accent-soft); border: 1px dashed var(--color-accent); border-radius: 10px;
  padding: 8px 12px; font-size: 12.5px; font-weight: 700; color: var(--color-accent-dark);
}
.coupon-applied button { color: var(--color-ink-faint); font-size: 11px; text-decoration: underline; }

/* ---------- Order tracking timeline ---------- */
.order-card {
  border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 16px; margin-bottom: 14px;
  background: var(--color-surface);
}
.order-card__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.order-card__id { font-weight: 800; font-size: 14px; }
.order-card__date { font-size: 11.5px; color: var(--color-ink-faint); }
.order-timeline { display: flex; align-items: flex-start; gap: 0; margin: 14px 0; }
.order-step { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; }
.order-step__dot {
  width: 20px; height: 20px; border-radius: 50%; background: var(--color-border); display: grid; place-items: center;
  color: #fff; font-size: 10px; margin-bottom: 6px; z-index: 1;
}
.order-step.done .order-step__dot { background: var(--color-accent); }
.order-step.active .order-step__dot { background: var(--color-accent); box-shadow: 0 0 0 4px var(--color-accent-soft); }
.order-step__line {
  position: absolute; top: 10px; left: -50%; width: 100%; height: 2px; background: var(--color-border); z-index: 0;
}
.order-step:first-child .order-step__line { display: none; }
.order-step.done .order-step__line, .order-step.active .order-step__line { background: var(--color-accent); }
.order-step__label { font-size: 10.5px; font-weight: 700; color: var(--color-ink-faint); }
.order-step.done .order-step__label, .order-step.active .order-step__label { color: var(--color-ink); }

/* ---------- Payment trust badges (product page) ---------- */
.pay-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pay-badge {
  font-size: 10.5px; font-weight: 700; border: 1px solid var(--color-border); border-radius: 6px;
  padding: 4px 8px; color: var(--color-ink-soft);
}

/* ---------- Reviews ---------- */
.review-summary { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.review-summary__avg { font-size: 34px; font-weight: 800; line-height: 1; }
.review-item { padding: 14px 0; border-bottom: 1px solid var(--color-border); }
.review-item__head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.review-item__author { font-weight: 700; font-size: 13px; }
.review-item__date { font-size: 11px; color: var(--color-ink-faint); }
.review-item__verified { font-size: 10.5px; color: var(--color-success); font-weight: 700; }
.review-item__comment { font-size: 13.5px; color: var(--color-ink-soft); line-height: 1.6; }
.review-stars-input { display: flex; gap: 4px; margin: 6px 0 2px; }
.review-stars-input svg { cursor: pointer; }

.p-card__body {
  padding: 10px 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.p-card__cat { font-size: 10.5px; color: var(--color-ink-faint); font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; }
.p-card__name {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}
.p-card__price-row { display: flex; align-items: baseline; gap: 6px; margin-top: 2px; flex-wrap: wrap; }
.p-card__price { font-size: 15.5px; font-weight: 800; }
.p-card__compare { font-size: 12px; color: var(--color-ink-faint); text-decoration: line-through; }
.p-card__discount { font-size: 11px; font-weight: 800; color: var(--color-danger); }

/* ---------- Price hierarchy (tile + PDP) ----------
   "Antes" sits small, above the real price, instead of racing it on the
   same line — the eye lands on the current price first, the crossed-out one
   reads as context, not competition. */
.p-tile__compare-top, .pdp-compare-top {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--color-ink-faint);
  text-decoration: line-through;
  font-weight: 600;
}
/* Solid savings pill (marketplace pattern — "45% OFF" in a filled green
   badge, not a plain red percentage) so a discount reads as a deal signal
   at a glance instead of blending into the surrounding price text. */
.deal-pill {
  text-decoration: none;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #fff;
  background: var(--color-success);
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}
.p-tile__installments, .pdp-installments {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-ink-soft);
}
.p-tile__ship--free { color: var(--color-success) !important; }

.p-card__add {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-ink);
  color: var(--color-bg);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-md);
  z-index: 2;
  transition: transform var(--dur-fast) var(--ease-spring);
}
.p-card__add svg { width: 16px; height: 16px; }
.p-card__add:active { transform: scale(0.85); }

/* ---------- Hero (double-bezel: outer shell + inner core) ---------- */
.hero-shell {
  margin: 4px 16px 0;
  padding: 7px;
  border-radius: calc(var(--radius-xl) + 8px);
  background: linear-gradient(165deg, rgba(22,22,22,0.06), rgba(22,22,22,0.01));
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.5);
}
.hero {
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
  aspect-ratio: 4 / 5;
  background: linear-gradient(160deg, #FF622D, #E5501D 55%, #C94515);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px 24px;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.15), inset 0 0 0 1px rgba(255,255,255,0.06);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 85% -10%, rgba(255, 255, 255, 0.08), transparent 60%);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
.hero__eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #FFFFFF;
  margin-bottom: 12px;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 5px 12px 5px 5px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
}
.hero__eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: #FFFFFF; flex-shrink: 0; }
.hero h1 {
  font-size: 34px;
  line-height: 1.06;
  margin-bottom: 14px;
  position: relative;
  max-width: 260px;
}
.hero p {
  font-size: 14px;
  opacity: 0.82;
  margin-bottom: 22px;
  max-width: 260px;
  position: relative;
  line-height: 1.55;
}
.hero .btn { position: relative; width: fit-content; }

/* ---------- Search bar (page) ---------- */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 12px 16px;
  margin: 0 16px 14px;
}
.search-bar input {
  border: none;
  outline: none;
  background: none;
  flex: 1;
  font-size: 15px;
}
.search-bar svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--color-ink-faint); }
/* The input's own outline is suppressed above (it sits flush inside the
   pill, a native ring would look clipped) — without this, a keyboard user
   tabbing into search got zero visual confirmation that it was focused. */
.search-bar:focus-within {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 25%, transparent);
}

.chip-row { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px 14px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  padding: 9px 15px;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--dur-fast) var(--ease-spring);
}
.chip.active { background: var(--color-ink); color: var(--color-bg); border-color: var(--color-ink); }
.chip:active { transform: scale(0.95); }
.chip:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
.chip .count { opacity: 0.6; font-weight: 500; }

/* ---------- Bottom sheet ---------- */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: var(--color-overlay);
  z-index: 72;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-med) var(--ease-out);
}
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }

.sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 100%);
  width: 100%;
  max-width: var(--container);
  max-height: 86vh;
  background: var(--color-bg);
  border-radius: 26px 26px 0 0;
  z-index: 73;
  display: flex;
  flex-direction: column;
  transition: transform var(--dur-med) var(--ease-out);
  box-shadow: 0 -20px 50px rgba(0,0,0,0.2);
}
.sheet.open { transform: translate(-50%, 0); }
.sheet__handle {
  width: 100%;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  touch-action: none;
  cursor: grab;
}
.sheet__handle::after {
  content: "";
  width: 36px;
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--color-border);
}
.sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px 16px;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}
.sheet__header h3 { font-size: 18px; }
.sheet__body { overflow-y: auto; padding: 16px 20px; flex: 1; }
.sheet__footer {
  padding: 14px 20px calc(16px + var(--safe-bottom));
  border-top: 1px solid var(--color-border);
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

/* ---------- Install prompt ---------- */
.install-sheet__body {
  padding: 4px 24px calc(28px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.install-sheet__icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  margin-bottom: 16px;
}
.install-sheet__body h3 { font-size: 19px; margin-bottom: 8px; }
.install-sheet__body p { font-size: 13.5px; line-height: 1.6; color: var(--color-ink-soft); max-width: 34ch; }
.install-steps { width: 100%; display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.install-step {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  font-size: 13px;
  color: var(--color-ink-soft);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}
.install-step strong { color: var(--color-ink); font-weight: 700; }
.install-step__num {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.install-sheet__actions { width: 100%; display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }

.filter-group { margin-bottom: 22px; }
.filter-group h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--color-ink-faint); margin-bottom: 12px; font-weight: 700; }
.filter-options { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Toast ---------- */
.toast-stack {
  position: fixed;
  left: 50%;
  bottom: calc(var(--navbar-h) + var(--safe-bottom) + 14px);
  transform: translateX(-50%);
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: calc(100% - 32px);
  max-width: calc(var(--container) - 32px);
  align-items: center;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-ink);
  color: var(--color-bg);
  padding: 13px 18px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: toastIn 320ms var(--ease-spring);
  max-width: 100%;
}
.toast.leaving { animation: toastOut 220ms var(--ease-out) forwards; }
@keyframes toastIn { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes toastOut { to { transform: translateY(10px); opacity: 0; } }
.toast svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--color-accent); }

/* ---------- Empty state ---------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 60px 30px;
  color: var(--color-ink-soft);
}
.empty-state svg { width: 56px; height: 56px; margin-bottom: 18px; color: var(--color-ink-faint); }
.empty-state h3 { font-size: 17px; margin-bottom: 8px; color: var(--color-ink); }
.empty-state p { font-size: 13.5px; margin-bottom: 20px; max-width: 260px; }

/* ---------- Chat FAB ---------- */
.chat-fab {
  position: fixed;
  right: max(16px, calc((100vw - var(--container)) / 2 + 16px));
  bottom: calc(var(--navbar-h) + var(--safe-bottom) + 16px);
  height: 46px;
  padding: 0 18px 0 14px;
  border-radius: var(--radius-pill);
  background: #25D366;
  display: flex;
  align-items: center;
  gap: 9px;
  box-shadow: 0 10px 24px rgba(37, 211, 102, 0.4);
  z-index: 45;
  transition: transform var(--dur-fast) var(--ease-spring);
  will-change: transform;
}
.chat-fab svg { width: 19px; height: 19px; flex-shrink: 0; }
.chat-fab:active { transform: scale(0.95); }
.chat-fab__label {
  color: #fff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.chat-fab__dot {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  animation: chat-fab-pulse 2s ease-out infinite;
}
@keyframes chat-fab-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,255,255,0.55); }
  70% { box-shadow: 0 0 0 6px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

/* ---------- Chat widget ---------- */
.chat-sheet { max-height: 78vh; }
.chat-sheet__header { gap: 12px; }
.chat-avatar {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--color-accent-soft);
  color: var(--color-accent-dark);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
}
.chat-sheet__title { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.chat-sheet__title h3 { font-size: 15.5px; }
.chat-sheet__status { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--color-ink-faint); }
.chat-sheet__status i { width: 6px; height: 6px; border-radius: 50%; background: var(--color-accent); flex-shrink: 0; }

.chat-body { display: flex; flex-direction: column; }
.chat-messages { display: flex; flex-direction: column; gap: 10px; padding-bottom: 6px; }
.chat-msg { display: flex; }
.chat-msg.user { justify-content: flex-end; }
.chat-msg.bot { justify-content: flex-start; }
.chat-bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.55;
}
.chat-msg.bot .chat-bubble { background: var(--color-surface-2); color: var(--color-ink); border-bottom-left-radius: 4px; }
.chat-msg.user .chat-bubble { background: var(--color-ink); color: var(--color-bg); border-bottom-right-radius: 4px; }
.chat-typing__bubble { display: flex; align-items: center; gap: 4px; padding: 13px 16px; }
.chat-typing__bubble i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-ink-faint);
  opacity: 0.5;
  animation: chat-typing-bounce 1s ease-in-out infinite;
}
.chat-typing__bubble i:nth-child(2) { animation-delay: 0.15s; }
.chat-typing__bubble i:nth-child(3) { animation-delay: 0.3s; }
@keyframes chat-typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-3px); opacity: 1; }
}

.chat-quick {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 20px calc(16px + var(--safe-bottom));
  border-top: 1px solid var(--color-border);
}
.chat-quick__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-ink);
  transition: border-color var(--dur-fast), background var(--dur-fast), transform var(--dur-fast) var(--ease-spring);
}
.chat-quick__btn svg { flex-shrink: 0; opacity: 0.5; }
.chat-quick__btn:hover { border-color: var(--color-accent); background: var(--color-accent-soft); }
.chat-quick__btn:active { transform: scale(0.98); }
/* WhatsApp — filled solid green so it visibly stands out from the plain
   FAQ buttons above it, not just a tinted outline. */
.chat-quick__btn--operator {
  border-color: #1FAE5A;
  background: linear-gradient(160deg, #25D366, #1FAE5A);
  color: #fff;
  box-shadow: 0 4px 12px -4px rgba(37, 211, 102, 0.55);
}
.chat-quick__btn--operator span { display: flex; align-items: center; }
.chat-quick__btn--operator svg { opacity: 1; }
.chat-quick__btn--operator:hover { background: linear-gradient(160deg, #29e072, #1FAE5A); border-color: #1FAE5A; }

/* Phone call — same visual weight as the WhatsApp button but its own
   color (blue) so the two "talk to a person" options read as distinct
   choices, not variations of the same button. */
.chat-quick__btn--call {
  border-color: #1c6fd9;
  background: linear-gradient(160deg, #3B82F6, #1c6fd9);
  color: #fff;
  box-shadow: 0 4px 12px -4px rgba(59, 130, 246, 0.55);
}
.chat-quick__btn--call span { display: flex; align-items: center; }
.chat-quick__btn--call svg { opacity: 1; }
.chat-quick__btn--call:hover { background: linear-gradient(160deg, #529bfb, #1c6fd9); border-color: #1c6fd9; }

/* ---------- Cart line item ---------- */
.cart-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border);
}
.cart-item__img {
  width: 76px;
  height: 76px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface-2);
  flex-shrink: 0;
}
.cart-item__img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cart-item__name { font-size: 13.5px; font-weight: 700; line-height: 1.3; }
.cart-item__unit { font-size: 12px; color: var(--color-ink-faint); }
.cart-item__row { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.qty-control {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--color-surface-2);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.qty-control button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 700;
  transition: background var(--dur-fast);
}
.qty-control button:active { background: var(--color-border); }
.qty-control span { min-width: 26px; text-align: center; font-weight: 700; font-size: 13.5px; }
.cart-item__price { font-weight: 800; font-size: 14.5px; }
.cart-item__remove {
  color: var(--color-ink-faint);
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
}
.cart-item__remove svg { width: 16px; height: 16px; }

/* ---------- Summary ---------- */
.summary-row { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--color-ink-soft); padding: 6px 0; }
.summary-row.total { font-size: 17px; font-weight: 800; color: var(--color-ink); padding-top: 12px; margin-top: 6px; border-top: 1px solid var(--color-border); }

/* ---------- Fixed buy bar ----------
   Pinned just above the bottom nav (never overlaps it) so the nav — home,
   categories, search, favorites, cart, profile — stays reachable and fully
   visible on every screen, including the product page. Fixed (not sticky)
   so its position is exact from the very first paint, no scroll-dependent
   transition. */
.buy-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%) translateZ(0);
  width: 100%;
  max-width: var(--container);
  bottom: calc(var(--navbar-h) + var(--safe-bottom));
  background: color-mix(in srgb, var(--color-bg) 94%, transparent);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--color-border);
  padding: 12px 16px;
  display: flex;
  gap: 10px;
  z-index: 30;
  will-change: transform;
}
.buy-bar .btn { flex: 1; }

@media (min-width: 900px) {
  .buy-bar { bottom: 0; padding: 12px 16px calc(12px + var(--safe-bottom)); }
}

/* ---------- Gallery ---------- */
.gallery {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--color-surface-2);
  overflow: hidden;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery img { width: 100%; height: 100%; object-fit: cover; flex-shrink: 0; scroll-snap-align: start; }
.gallery-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}
.gallery-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  transition: all var(--dur-fast);
}
.gallery-dots span.active { background: #fff; width: 18px; border-radius: var(--radius-pill); }

/* ---------- Skeleton card ---------- */
.p-card.skeleton-card .p-card__media, .p-card.skeleton-card .p-card__body > * { background: var(--color-surface-2); }

/* ---------- Accordion (specs/faq) ---------- */
.accordion-item { border-bottom: 1px solid var(--color-border); }
.accordion-item summary {
  padding: 16px 0;
  font-weight: 700;
  font-size: 14.5px;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.accordion-item summary::-webkit-details-marker { display: none; }
.accordion-item summary .chev { transition: transform var(--dur-fast) var(--ease-out); width: 16px; height: 16px; }
.accordion-item[open] summary .chev { transform: rotate(180deg); }
.accordion-item .accordion-body { padding-bottom: 16px; font-size: 13.5px; color: var(--color-ink-soft); line-height: 1.6; }

/* ---------- Page transition ---------- */
.view-enter { animation: viewIn 320ms var(--ease-out); }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px) scale(0.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .view-enter { animation: none; }
}

/* ---------- Misc ---------- */
.px { padding-left: 16px; padding-right: 16px; }
.divider { height: 1px; background: var(--color-border); margin: 20px 16px; }
.trust-strip { display: flex; padding: 0 16px; gap: 10px; margin-top: 24px; }
.trust-card {
  flex: 1;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), var(--shadow-sm);
  transition: transform var(--dur-med) var(--ease-spring), box-shadow var(--dur-med) var(--ease-out);
}
.trust-card:hover {
  transform: translateY(-3px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), var(--shadow-md);
}
.trust-card svg { width: 22px; height: 22px; color: var(--color-accent); }
.trust-card span { font-size: 10.5px; font-weight: 700; line-height: 1.3; color: var(--color-ink-soft); }

/* =========================================================
   Desktop layout (>= 900px) — full storefront, no phone frame
   ========================================================= */
@media (min-width: 900px) {

  .app-header {
    max-width: 100%;
    background: transparent;
    backdrop-filter: none;
    border-bottom: none;
    height: auto;
    padding: 14px 24px 0;
    display: block;
  }
  .app-header.hide { transform: translateX(-50%) translateY(-130%); }

  .app-header__inner {
    max-width: var(--container-wide);
    margin: 0 auto;
    background: color-mix(in srgb, var(--color-bg) 90%, transparent);
    backdrop-filter: blur(18px) saturate(1.4);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-md);
    padding: 8px 10px 8px 20px;
    height: 64px;
  }

  .app-header__logo { height: 50px; }

  .desktop-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
  }

  .desktop-nav__link {
    padding: 9px 14px;
    border-radius: var(--radius-pill);
    font-size: 13.5px;
    font-weight: 700;
    color: var(--color-ink-soft);
    transition: all var(--dur-fast) var(--ease-out);
    white-space: nowrap;
  }
  .desktop-nav__link:hover { background: var(--color-surface-2); color: var(--color-ink); }
  .desktop-nav__link.active { color: var(--color-accent); }

  .app-header__search {
    max-width: 340px;
    margin-left: auto;
  }

  /* Bottom tab bar is a mobile pattern only — desktop uses the header nav */
  .bottom-nav { display: none; }
  .chat-fab {
    right: max(24px, calc((100vw - var(--container-wide)) / 2 + 24px));
    bottom: 28px;
  }
  .toast-stack {
    bottom: 28px;
    max-width: 380px;
  }

  main#view { padding-bottom: 0; }

  /* Content grids get real breathing room */
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 20px;
    padding: 0 8px;
  }

  .px { padding-left: 8px; padding-right: 8px; }

  .section { margin-top: 44px; }
  .section-head { padding: 0 8px; margin-bottom: 18px; }
  .section-head h2 { font-size: 24px; }

  .hero {
    margin: 8px 8px 0;
    aspect-ratio: auto;
    height: 420px;
    padding: 48px;
    border-radius: var(--radius-xl);
  }
  .hero h1 { font-size: 44px; max-width: 420px; }
  .hero p { font-size: 15.5px; max-width: 380px; }

  .h-scroll { padding: 2px 8px 8px; }

  .search-bar { margin: 0 8px 18px; max-width: 480px; }
  .chip-row { padding: 0 8px 18px; }

  .trust-strip { padding: 0 8px; }

  /* Product detail gallery: contained, not full-bleed */
  .gallery {
    max-width: 520px;
    margin: 8px auto 0;
    border-radius: var(--radius-xl);
  }

  /* Sheets behave like centered modals, not full-bleed mobile drawers */
  .sheet {
    max-width: 420px;
    left: 50%;
    bottom: auto;
    top: 50%;
    transform: translate(-50%, -46%);
    border-radius: var(--radius-xl);
    max-height: 80vh;
    opacity: 0;
    transition: transform var(--dur-med) var(--ease-out), opacity var(--dur-med) var(--ease-out);
  }
  .sheet.open { transform: translate(-50%, -50%); opacity: 1; }

  .buy-bar { max-width: 600px; border-radius: var(--radius-xl) var(--radius-xl) 0 0; box-shadow: var(--shadow-lg); }
}

@media (min-width: 1300px) {
  .gallery { max-width: 560px; }
}

/* ---------- Grid / list view toggle ---------- */
.view-toggle {
  margin-left: auto;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  display: grid;
  place-items: center;
  color: var(--color-ink-soft);
  transition: background var(--dur-fast), color var(--dur-fast);
}
.view-toggle svg { grid-area: 1 / 1; }
.view-toggle svg[data-icon="list"] { display: none; }
.view-toggle.is-list svg[data-icon="grid"] { display: none; }
.view-toggle.is-list svg[data-icon="list"] { display: block; }
.view-toggle:active { background: var(--color-surface-2); }

/* ---------- List view (catalog) ----------
   Same .p-tile markup, just laid out as a row: fixed-size thumbnail on the
   left, everything else stacked to its right. Lets someone scan specs and
   prices down a column instead of hunting across a grid — useful once
   they're comparing rather than browsing. */
.tile-grid.is-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: none;
  border: none;
}
/* .p-tile.p-tile--list (both classes on one selector, not a descendant
   combinator) beats editorial.css's plain `.p-tile { flex-direction:
   column }` on specificity — a single-class `.p-tile--list` rule ties with
   it and loses, since editorial.css loads after this file. */
.p-tile.p-tile--list {
  flex-direction: row;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 8px;
  gap: 12px;
}
.p-tile--list .p-tile__media {
  width: 96px;
  height: 96px;
  flex: 0 0 96px;
  aspect-ratio: 1 / 1;
  padding: 8px;
}
.p-tile--list .p-tile__body {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
}
.p-tile--list .p-tile__name { min-height: 0; -webkit-line-clamp: 1; }
.p-tile--list .p-tile__add { position: static; margin-left: auto; }
.p-tile--list .p-tile__row { flex-direction: row; align-items: center; }
.p-tile--list .p-tile__tags, .p-tile--list .p-tile__fav { top: 6px; }

/* ---------- Buy bar hierarchy ----------
   "Agregar" used to be a full solid-border outline button, pulling as much
   visual weight as "Comprar ahora" right next to it. It's the secondary
   action — a quieter, flatter treatment here so the WhatsApp CTA reads as
   the one thing to do, without changing either button's markup or the
   flex:1/flex:1 split that keeps them tappable at the same width. */
.buy-bar .btn-outline {
  background: var(--color-surface-2);
  border-color: transparent;
  color: var(--color-ink-soft);
  box-shadow: none;
}

/* ---------- Promo banner (catalog) ----------
   Two independent pieces: a FIXED brand bar (product count, average
   rating — no invented follower count) that's always on screen, and below
   it an optional rotating carousel of promo slides — configured from the
   admin panel (Promociones), so it simply doesn't render when there's
   nothing configured yet. Carousel slides stack absolutely and cross-fade;
   only `.active` is interactive/visible to assistive tech. */
.promo-banner { margin: 14px 16px 6px; display: flex; flex-direction: column; gap: 8px; }

.promo-brand-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}
.promo-slide__logo { width: 42px; height: 42px; border-radius: var(--radius-md); object-fit: cover; flex-shrink: 0; }
.promo-slide__info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.promo-slide__name { font-family: var(--font-display); font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 5px; color: var(--color-ink); }
.promo-slide__meta { font-size: 11.5px; color: var(--color-ink-faint); }
.promo-slide__preview { display: none; gap: 6px; margin-left: auto; }
.promo-slide__preview img {
  width: 34px; height: 34px; border-radius: 7px; object-fit: contain;
  background: var(--color-surface-2); border: 1px solid var(--color-border); padding: 3px;
}
.promo-slide__link { font-size: 12.5px; font-weight: 700; color: var(--color-accent-dark); flex-shrink: 0; margin-left: auto; }
@media (min-width: 620px) {
  .promo-slide__preview { display: flex; }
  .promo-slide__link { margin-left: 0; }
}

.promo-carousel { position: relative; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--color-border); }
.promo-carousel__track { position: relative; height: 68px; }
.promo-carousel__slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 500ms var(--ease-out);
  color: #fff;
}
.promo-carousel__slide.active { opacity: 1; pointer-events: auto; }
@media (prefers-reduced-motion: reduce) { .promo-carousel__slide { transition: none; } }

.promo-slide__icon { font-size: 26px; flex-shrink: 0; line-height: 1; }
.promo-slide__copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.promo-slide__copy strong { font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.promo-slide__copy span { font-size: 12px; opacity: 0.92; line-height: 1.35; }

.promo-carousel__dots {
  position: absolute;
  right: 8px;
  bottom: 6px;
  z-index: 2;
  display: flex;
  gap: 5px;
  padding: 3px 5px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(4px);
}
.promo-carousel__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  transition: opacity var(--dur-fast), width var(--dur-fast), background var(--dur-fast);
}
.promo-carousel__dot.active { background: #fff; width: 16px; border-radius: 3px; }

/* ---------- PDP image zoom ---------- */
.pdp-zoom-btn {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.92);
  color: var(--color-ink);
  font-size: 12px;
  font-weight: 700;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(6px);
}
.pdp-zoom-btn:active { transform: scale(0.95); }
.img-zoom-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(10,10,10,0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-med) var(--ease-out);
}
.img-zoom-overlay.open { opacity: 1; pointer-events: auto; }
.img-zoom-overlay img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius-lg);
  transform: scale(0.96);
  transition: transform var(--dur-med) var(--ease-out);
}
.img-zoom-overlay.open img { transform: scale(1); }
.img-zoom-close {
  position: absolute;
  top: calc(16px + var(--safe-top));
  right: 16px;
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.2);
  color: #fff;
}

/* ---------- PDP: Mercado Libre-style layout ----------
   Mobile: media stacks above the buy box, both full width, in normal flow —
   the fixed bottom bar (.buy-bar) stays the reachable action row. Desktop
   (≥900px): thumbnail rail + large photo on the left, buy box pinned on
   the right, the way ML/Amazon separate "look at it" from "buy it". */
.pdp-ml-media { padding: 16px 16px 0; }
.pdp-ml-rail {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.pdp-ml-rail::-webkit-scrollbar { display: none; }
.pdp-ml-thumb {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface-2);
  overflow: hidden;
  padding: 4px;
}
.pdp-ml-thumb.active { border-color: var(--color-accent); }
.pdp-ml-thumb img { width: 100%; height: 100%; object-fit: contain; }
.pdp-ml-main {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--color-surface-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.pdp-ml-main img { width: 100%; height: 100%; object-fit: contain; padding: 8%; }

.pdp-ml-buybox {
  margin: 16px 16px 0;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}
.pdp-ml-toprow { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.pdp-ml-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.pdp-ml-brandlink { font-size: 11.5px; font-weight: 700; color: var(--color-accent-dark); text-transform: uppercase; letter-spacing: 0.03em; margin-top: 10px; display: block; }
.pdp-ml-title { font-family: var(--font-display); font-size: 22px; font-weight: 500; line-height: 1.18; margin: 4px 0 8px; }
.pdp-ml-rating { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; }
.pdp-ml-rating-num { font-size: 12.5px; font-weight: 700; }
.pdp-ml-rating-count { font-size: 12.5px; color: var(--color-ink-faint); text-decoration: underline; }
.pdp-ml-price { font-size: 30px; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.pdp-ml-price small { font-size: 14px; font-weight: 600; }
.pdp-ml-shipping { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; padding: 14px 0; border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.pdp-ml-ship-line { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--color-ink-soft); }
.pdp-ml-ship-line--free { color: var(--color-success); font-weight: 700; }
.pdp-ml-ship-line svg { flex-shrink: 0; }
.pdp-ml-field { margin: 14px 0; }
.pdp-ml-field__label { display: block; font-size: 12.5px; font-weight: 700; color: var(--color-ink-soft); margin-bottom: 8px; }
.pdp-ml-seller {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}
.pdp-ml-seller__avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: var(--color-accent-soft); color: var(--color-accent-dark);
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 14px;
}
.pdp-ml-seller__info { display: flex; flex-direction: column; font-size: 11.5px; color: var(--color-ink-soft); }
.pdp-ml-seller__info strong { font-size: 13px; color: var(--color-ink); }

/* ---------- Characteristics spec table ---------- */
.pdp-chartable { border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; }
.pdp-chartable__row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 16px; font-size: 13px; border-bottom: 1px solid var(--color-border); }
.pdp-chartable__row:nth-child(odd) { background: var(--color-surface-2); }
.pdp-chartable__row:last-child { border-bottom: none; }
.pdp-chartable__row span:first-child { color: var(--color-ink-faint); font-weight: 600; }
.pdp-chartable__row span:last-child { font-weight: 700; text-align: right; }

@media (min-width: 900px) {
  .pdp-ml-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: start;
    max-width: 1200px;
    margin: 8px auto 0;
    padding: 0 8px;
  }
  /* Grid items default to min-width:auto, which floors their shrinkability
     at their content's min-content size — without this a wide child
     anywhere in the media column could force the whole grid to overflow
     instead of the 1fr column actually shrinking to fit. */
  .pdp-ml-media { min-width: 0; padding: 0; }
  .pdp-ml-buybox { position: sticky; top: calc(var(--header-h) + 24px); margin: 0; }
  .pdp-ml-below { max-width: 1200px; margin: 0 auto; padding: 0 8px; }
  /* The buy box's own buttons are reachable on desktop (no thumb-zone
     constraint) — the fixed bottom bar would just duplicate them. */
  .buy-bar { display: none; }
}

/* ---------- Home hero carousel (full-bleed, fades into cards) ----------
   No card frame, no rounded corners, no side margin — the banner runs edge
   to edge exactly like the marketplace reference, and its bottom fades
   into the page background so the benefit cards underneath feel like a
   continuation of the same section rather than a hard cut. */
.hero-carousel {
  position: relative;
  width: 100%;
  /* Shorter than the banners' own ~25:9 export ratio, on purpose — these
     particular images carry a bottom footer strip ("Envíos rápidos /
     Compra segura / Atención especializada") that reads as redundant once
     the real benefit-cards row already covers the same ground right below.
     Cropping it off means future banner exports should keep headline/offer
     content within the TOP ~80% of the 2500×900 canvas, since object-
     position:top biases the crop to remove from the bottom, not center. */
  aspect-ratio: 3.2 / 1;
  overflow: hidden;
  background: var(--color-surface-2);
}
.hero-carousel__track { position: absolute; inset: 0; }
.hero-carousel__slide {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 700ms var(--ease-out);
}
.hero-carousel__slide.active { opacity: 1; pointer-events: auto; }
@media (prefers-reduced-motion: reduce) { .hero-carousel__slide { transition: none; } }
.hero-carousel__slide img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.hero-carousel__dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 7px;
}
.hero-carousel__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.55);
  cursor: pointer;
  transition: background var(--dur-fast), width var(--dur-fast);
}
.hero-carousel__dot.active { background: #fff; width: 18px; border-radius: 3px; }


/* ---------- Home hero (compact, premium) ----------
   Slimmer than a typical marketplace banner — restrained type, a thin rule
   instead of a shouting all-caps headline, a quiet gradient instead of a
   candy-bright one, and a small refined badge instead of a comic-style
   sticker. Mobile: stacks, media behind/below the text. Desktop: side by
   side, still short. */
.promo-hero {
  position: relative;
  background: linear-gradient(155deg, #FCEEE5 0%, #FBF7F3 55%, #FCEEE5 100%);
  padding: calc(22px + var(--safe-top)) 20px 96px;
  overflow: hidden;
}
.promo-hero__text { position: relative; z-index: 2; max-width: 24ch; }
.promo-hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
  margin-bottom: 10px;
}
.promo-hero__eyebrow::before { content: ""; width: 20px; height: 1px; background: currentColor; opacity: 0.7; }
.promo-hero__title {
  font-family: var(--font-display);
  font-size: clamp(22px, 6vw, 28px);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 14px;
  color: var(--color-ink);
  letter-spacing: -0.01em;
}
.promo-hero__title em { font-style: italic; font-weight: 400; color: var(--color-accent-dark); }
.promo-hero__pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 6px 14px 6px 6px;
  text-align: left;
}
.promo-hero__pill:active { transform: scale(0.97); }
.promo-hero__pill-ic {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: var(--color-accent-soft); color: var(--color-accent-dark);
  display: grid; place-items: center;
}
.promo-hero__pill-ic svg { width: 13px; height: 13px; }
.promo-hero__pill strong { font-size: 12px; font-weight: 700; line-height: 1.2; color: var(--color-ink); }
.promo-hero__pill strong span { display: block; font-size: 10px; font-weight: 500; color: var(--color-ink-faint); }
.promo-hero__link {
  display: block;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-ink-soft);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 2px;
  width: fit-content;
}
.promo-hero__media {
  position: absolute;
  right: 2%;
  bottom: -2%;
  width: 44%;
  max-width: 190px;
  z-index: 1;
}
.promo-hero__media img { width: 100%; filter: drop-shadow(0 16px 18px rgba(0,0,0,0.14)); }
.promo-hero__media video {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 24px rgba(0,0,0,0.16);
}
.promo-hero__sticker {
  position: absolute;
  top: 14px;
  right: 4%;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--color-ink);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  line-height: 1;
}
.promo-hero__sticker br { display: none; }
.promo-hero__sticker em { font-style: normal; color: var(--color-accent); }

@media (min-width: 620px) {
  .promo-hero { padding: 32px 40px; display: flex; align-items: center; gap: 36px; min-height: 0; }
  .promo-hero__text { max-width: 42%; }
  .promo-hero__media { position: static; width: 24%; max-width: 190px; margin-left: auto; }
  .promo-hero__sticker { top: 12px; right: 12px; }
}
@media (min-width: 900px) {
  .promo-hero { max-width: 1200px; margin: 8px auto 0; border-radius: var(--radius-xl); padding: 40px 56px; }
}

/* ---------- Home benefit-card row ---------- */
.hb-wrap { padding: 16px 16px 4px; margin-top: 0; position: relative; z-index: 3; }
.hb-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.hb-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-fast) var(--ease-spring), box-shadow var(--dur-fast);
}
.hb-card:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .hb-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
}
.hb-card__ic {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--color-accent-soft); color: var(--color-accent-dark);
  display: grid; place-items: center; flex-shrink: 0;
}
/* Category cards reuse the same circle, filled with a real product photo
   instead of an svg glyph — same size/position, same card shell. */
.hb-card__ic--photo { overflow: hidden; }
.hb-card__ic--photo img { width: 100%; height: 100%; object-fit: cover; }
.hb-wrap__title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  margin: 4px 0 8px;
  color: var(--color-ink);
}
.hb-card__ic svg { width: 21px; height: 21px; }
.hb-card strong { font-family: var(--font-display); font-size: 13.5px; font-weight: 600; color: var(--color-ink); }
.hb-card p { font-size: 10.5px; color: var(--color-ink-faint); line-height: 1.4; margin: 0; }
.hb-card--editorial {
  grid-row: span 2;
  background-size: cover;
  background-position: center;
  color: #fff;
  justify-content: flex-end;
  min-height: 190px;
  position: relative;
  isolation: isolate;
}
.hb-card--editorial::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(0deg, rgba(10,10,10,0.75) 15%, transparent 60%);
  border-radius: inherit;
}
.hb-card--editorial strong { color: #fff; font-size: 14.5px; }
.hb-card__cta {
  font-size: 10.5px; font-weight: 700; background: var(--color-accent);
  padding: 6px 12px; border-radius: 999px; color: #fff;
}

@media (min-width: 620px) {
  .hb-wrap { max-width: 1200px; margin: 20px auto 0; padding: 0 8px 4px; }
  .hb-row { grid-template-columns: repeat(6, 1fr); }
  .hb-card--editorial { grid-row: auto; }
}
