:root {
  --bg: #ffffff;
  --surface: #f5f6f9;
  --surface-alt: #f0f2f6;
  --border: #eceef2;
  --border-strong: #d9dde6;
  --ink: #111827;
  --muted: #6b7280;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #eff6ff;
  --mint-1: #b8f2d6;
  --mint-2: #e2fbe9;
  --butter-1: #fde896;
  --butter-2: #fef5ce;
  --peach-1: #fde2d4;
  --peach-2: #fff2eb;
  --whatsapp: #16a34a;
  --whatsapp-hover: #15803d;
  --danger: #dc2626;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --shadow-sm: 0 1px 2px rgb(17 24 39 / 4%), 0 6px 18px rgb(17 24 39 / 4%);
  --shadow-lg: 0 24px 60px rgb(17 24 39 / 14%);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 "Figtree", system-ui, -apple-system, sans-serif;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input { font: inherit; color: inherit; }
button { border: 0; background: none; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

svg {
  display: block;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Barrita B2B superior */
.b2b-bar {
  background: #111827;
  color: #f9fafb;
  font-size: 13px;
}

.b2b-bar__inner {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 8px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  text-align: center;
}

.b2b-bar p {
  margin: 0;
  color: #d1d5db;
}

.b2b-bar strong {
  color: #ffffff;
}

.b2b-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgb(37 99 235 / 24%);
  color: #93c5fd;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.b2b-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #ffffff;
  color: #111827;
  font-size: 12px;
  font-weight: 600;
  transition: transform .15s, background .15s;
}

.b2b-cta:hover {
  background: #eff6ff;
  transform: translateY(-1px);
}

/* Shell general */
.app-frame {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.app-shell {
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  min-height: 100vh;
}

/* Barra lateral plegable (escritorio). La columna se anima de 256px a 0
   y el contenido conserva su ancho para no reacomodarse mientras se cierra. */
@media (min-width: 921px) {
  .app-shell.menu-listo {
    transition: grid-template-columns .45s cubic-bezier(.32, .72, 0, 1);
  }
  .menu-listo .sidebar__inner {
    transition: opacity .28s ease, transform .45s cubic-bezier(.32, .72, 0, 1);
  }
  .menu-listo .sidebar {
    transition: border-color .3s ease;
  }
  .sidebar {
    overflow: clip;
  }
  .sidebar__inner {
    width: 256px;
  }
  .app-shell.sidebar-oculto {
    grid-template-columns: 0px minmax(0, 1fr);
  }
  .sidebar-oculto .sidebar {
    border-right-color: transparent;
  }
  .sidebar-oculto .sidebar__inner {
    opacity: 0;
    transform: translateX(-40px);
  }
}

.menu-toggle path {
  transition: transform .35s cubic-bezier(.32, .72, 0, 1);
}

.sidebar-oculto .menu-toggle__l3 {
  transform: translateX(6px);
}

@media (prefers-reduced-motion: reduce) {
  body .sidebar,
  body .sidebar-backdrop,
  .app-shell.menu-listo,
  .menu-listo .sidebar,
  .menu-listo .sidebar__inner,
  .menu-toggle path {
    transition: none;
  }
}

.sheet-handle,
.sidebar-backdrop {
  display: none;
}

/* Sidebar */
.sidebar {
  align-self: stretch;
  padding: 0;
  border-right: 1px solid var(--border);
  background: var(--bg);
}

.sidebar__inner {
  position: sticky;
  top: 0;
  min-height: 100vh;
  max-height: 100dvh;
  overflow-y: auto;
  padding: 24px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.sidebar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand__mark {
  position: relative;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.brand__mark::after {
  content: "";
  display: block;
  width: 24px;
  height: 3px;
  margin-top: 4px;
  border-radius: 99px;
  background: var(--accent);
}

.brand__sub {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-top: 2px;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 400;
  color: #374151;
  transition: background .15s, color .15s;
}

.nav-item:hover {
  background: var(--surface);
  color: var(--ink);
}

.nav-item.is-active {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 8px 20px rgb(37 99 235 / 24%);
}

.nav-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  display: grid;
  place-items: center;
}

.nav-item.is-active .nav-badge {
  background: rgb(255 255 255 / 22%);
  color: #ffffff;
}

.sidebar__section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 8px;
}

.sidebar__label {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mini-picks {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mini-pick {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border-radius: 14px;
  text-align: left;
  transition: background .15s;
}

.mini-pick:hover {
  background: var(--surface);
}

.mini-pick img {
  width: 42px;
  height: 28px;
  object-fit: contain;
  background: var(--surface);
  border-radius: 8px;
  padding: 2px;
}

.mini-pick div {
  min-width: 0;
  flex: 1;
}

.mini-pick strong {
  display: block;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-pick span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

.sidebar__foot {
  margin-top: auto;
  padding: 8px;
}

.b2b-link-side {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}

.b2b-link-side:hover {
  color: var(--ink);
}

.icon-btn.mobile-only,
.mobile-only { display: none; }

.topbar__brand {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

/* Área principal */
.main-area {
  min-width: 0;
  padding: 20px 32px 36px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar__left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
}

.cart-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  transition: border-color .15s, box-shadow .15s;
}

.cart-pill:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.cart-pill__count {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-size: 12px;
  display: grid;
  place-items: center;
}

.cart-pill__thumbs {
  display: inline-flex;
  align-items: center;
}

.cart-pill__thumbs img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: contain;
  background: #ffffff;
  border: 1.5px solid #ffffff;
  box-shadow: 0 1px 3px rgb(0 0 0 / 12%);
  margin-left: -8px;
}

.cart-pill__thumbs img:first-child {
  margin-left: 0;
}

/* Barra de exploración */
.explore-bar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.explore-bar__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.explore-bar h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.explore-bar__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.style-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* El contorno es una sombra interior y no un border: el borde del mismo color
   que el relleno dibujaba la curva dos veces y se veía dentado. */
.style-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 15px;
  border-radius: 999px;
  border: 0;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px var(--border-strong);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  transition: background .15s, color .15s, box-shadow .15s;
}

.style-chip:hover {
  box-shadow: inset 0 0 0 1px #c3c9d4;
  color: var(--ink);
}

.style-chip.is-active {
  background: var(--ink);
  box-shadow: none;
  color: #ffffff;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 250px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.search-box svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.search-box input {
  border: 0;
  background: none;
  width: 100%;
  font-size: 13px;
  outline: none;
}

/* Bento Hero */
.bento-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 16px;
}

.bento-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.promo-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: 24px 26px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  align-items: center;
  gap: 16px;
  min-height: 170px;
}

.promo-card--mint {
  background: linear-gradient(135deg, var(--mint-1) 0%, var(--mint-2) 100%);
}

.promo-card--butter {
  background: linear-gradient(135deg, var(--butter-1) 0%, var(--butter-2) 100%);
  min-height: 148px;
}

.promo-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgb(17 24 39 / 65%);
  margin-bottom: 6px;
}

.promo-card h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.promo-card p {
  margin: 0 0 14px;
  font-size: 13px;
  color: rgb(17 24 39 / 74%);
  max-width: 34ch;
}

.promo-btn {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgb(17 24 39 / 8%);
  transition: transform .15s;
}

.promo-btn:hover {
  transform: translateY(-1px);
}

.promo-card__visual {
  display: grid;
  place-items: center;
  height: 120px;
}

.promo-card__visual img {
  max-height: 115px;
  object-fit: contain;
  filter: drop-shadow(0 12px 16px rgb(17 24 39 / 16%));
}

.circle-arrow {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 10px rgb(17 24 39 / 8%);
  transition: transform .15s;
}

.circle-arrow:hover {
  transform: translate(1px, -1px);
}

.bento-bottom-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.promo-card--peach {
  background: linear-gradient(135deg, var(--peach-1) 0%, var(--peach-2) 100%);
}

/* Par Sol / Receta: mitad de ancho, texto arriba y anteojo abajo a la derecha */
.promo-card--compact {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 4px;
  min-height: 0;
  padding: 22px 22px 16px;
}

.promo-card--compact .promo-card__copy { padding-right: 40px; }

.promo-card--compact h2 { font-size: 19px; }

.promo-card--compact p { margin-bottom: 0; }

.promo-card--compact .promo-card__visual {
  height: 92px;
  justify-items: end;
}

.promo-card--compact .promo-card__visual img { max-height: 84px; }

.bento-featured {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

/* Tarjetas de producto */
/* Tarjeta con fondo gris suave. Las fotos llegan con fondo blanco o gris:
   con mix-blend-mode darken ese fondo toma el tono de la tarjeta y el anteojo,
   más oscuro, queda igual. Así todas las fotos se ven parejas. */
.product-card {
  --card-bg: #f3f4f6;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px 10px 16px;
  border-radius: 24px;
  background: var(--card-bg);
  transition: background .2s ease;
}

.product-card:hover { --card-bg: #eceef2; }

.product-card--tall {
  min-height: 100%;
}

.product-card__head {
  position: absolute;
  top: 22px;
  left: 22px;
  right: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  z-index: 2;
  pointer-events: none;
}

.product-card__head > * { pointer-events: auto; }

.swatches {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px rgb(17 24 39 / 12%);
}

.card-badge {
  margin-left: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #ffffff;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
}

.fav-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--muted);
  display: grid;
  place-items: center;
  box-shadow: 0 2px 6px rgb(17 24 39 / 6%);
  transition: color .15s, transform .15s;
}

.fav-circle svg {
  width: 17px;
  height: 17px;
}

.fav-circle:hover {
  color: var(--ink);
  transform: scale(1.05);
}

.fav-circle[aria-pressed="true"] {
  color: #e11d48;
}

.fav-circle[aria-pressed="true"] svg {
  fill: currentColor;
}

.product-card__media {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  border-radius: 18px;
  background: var(--card-bg);
  overflow: hidden;
  transition: background .2s ease;
  padding: 0;
  cursor: pointer;
}

/* Las destacadas se estiran al alto de las promociones: crece la foto, no un
   hueco entre el nombre y el precio. */
.product-card--tall .product-card__media {
  flex: 1;
  aspect-ratio: auto;
  min-height: 260px;
}

.product-card--tall .product-card__foot { margin-top: 0; }



.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: darken;
  transition: opacity .22s ease, transform .25s ease;
}

.product-card__media img.is-transparent {
  width: 92%;
  height: 92%;
  object-fit: contain;
}

.product-card--tall .product-card__media img.is-transparent {
  max-height: 290px;
}

.product-card__media img.img-hover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}

.product-card:hover .product-card__media img.img-hover {
  opacity: 1;
}

.product-card:hover .product-card__media img.img-base.has-hover {
  opacity: 0;
}

.product-card:hover .product-card__media img.img-base:not(.has-hover) {
  transform: scale(1.04);
}

.product-card__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 8px;
}

.product-card__sub {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.product-card__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.015em;
  cursor: pointer;
}

.product-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding: 0 8px;
}

/* El precio es un dato del producto, no una acción: texto oscuro sin píldora.
   El azul queda para lo que se toca. */
.price-pill {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.try-mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  transition: background .15s, border-color .15s;
}

.try-mini-btn svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.try-mini-btn:hover {
  background: var(--accent-soft);
  border-color: #bfdbfe;
  color: var(--accent-hover);
}

/* Catálogo */
.catalog-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.section-head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.result-pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.empty-state {
  padding: 48px 24px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.empty-state strong {
  font-size: 18px;
  font-weight: 600;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
}

.empty-state .btn-secondary { margin-top: 12px; }

.empty-state p {
  margin: 0 0 14px;
  color: var(--muted);
}

/* Footer */
/* Footer claro: una línea fina lo separa del catálogo, sin caja */
.store-footer {
  margin-top: 24px;
  padding: 32px 0 8px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-size: 14px;
  color: var(--muted);
}

.store-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.store-footer__brand .brand__mark {
  font-size: 24px;
  color: var(--ink);
}

.store-footer__brand p { margin: 0; }

.store-footer__b2b {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 16px;
  font-size: 13px;
}

.store-footer__b2b p { margin: 0; }

.store-footer__b2b button {
  color: var(--accent);
  font-weight: 600;
  border-radius: 4px;
}

.store-footer__b2b button:hover { color: var(--accent-hover); }

@media (max-width: 640px) {
  .store-footer {
    margin-top: 16px;
    padding-top: 28px;
  }
  .store-footer__b2b {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid var(--border);
  }
}

/* Botones reutilizables */
.btn-primary, .btn-secondary, .btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  transition: transform .15s, background .15s;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 10px 22px rgb(37 99 235 / 24%);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--surface-alt);
}

.btn-whatsapp {
  background: var(--whatsapp);
  color: #ffffff;
  box-shadow: 0 10px 22px rgb(22 163 74 / 22%);
}

.btn-whatsapp:hover {
  background: var(--whatsapp-hover);
  transform: translateY(-1px);
}

/* Modales */
dialog.modal {
  width: min(980px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  padding: 0;
  border: 0;
  border-radius: var(--radius-xl);
  background: #ffffff;
  color: var(--ink);
  box-shadow: var(--shadow-lg);
}

dialog::backdrop {
  background: rgb(17 24 39 / 48%);
  backdrop-filter: blur(5px);
}

.modal-close {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  flex: none;
}

.modal-close:hover {
  background: var(--surface-alt);
}

.spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--border-strong);
  border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Vistas: catálogo y página de producto comparten el flujo de .main-area */
.vista { display: contents; }

/* Página de producto */
.pdp {
  --photo-bg: #f3f4f6;
}

.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 0;
  font-size: 13px;
  color: var(--muted);
}

.breadcrumb li + li::before {
  content: "/";
  margin: 0 10px;
  color: var(--border-strong);
}

.breadcrumb a {
  font-weight: 600;
  border-radius: 6px;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb [aria-current] {
  color: var(--ink);
  font-weight: 700;
}

.pdp-floatbar,
.pdp-price-inline {
  display: none;
}

.pdp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 20px;
  align-items: start;
}

.pdp-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

/* Galería en mosaico */
.pdp-gallery {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 12px;
}

.pdp-stage {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-xl);
  background: var(--photo-bg);
  overflow: hidden;
}

.pdp-stage__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: darken;
}

.pdp-stage__img.is-transparent {
  object-fit: contain;
  padding: 24px;
}

.pdp-stage__3d {
  position: absolute;
  inset: 0;
  cursor: grab;
}

.pdp-stage__3d:active { cursor: grabbing; }

.pdp-stage__loading {
  position: absolute;
  inset: 0;
  background: rgb(242 242 242 / 88%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.pdp-stage__tag {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 0 0 1px var(--border-strong);
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
}

/* contain: size hace que el mosaico tome la altura de la foto principal
   en vez de crecer con las imágenes. */
.pdp-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 12px;
  contain: size;
}

.pdp-tiles[data-cantidad="1"],
.pdp-tiles[data-cantidad="2"] {
  grid-template-columns: 1fr;
}

.pdp-tiles[data-cantidad="3"] > :last-child,
.pdp-tiles[data-cantidad="5"] > :last-child {
  grid-column: 1 / -1;
}

.pdp-tile {
  position: relative;
  min-height: 0;
  border-radius: var(--radius-lg);
  background: var(--photo-bg);
  overflow: hidden;
}

.pdp-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: darken;
  transition: transform .35s ease;
}

.pdp-tile--3d img {
  object-fit: contain;
  padding: 10% 14%;
}

.pdp-tile:hover img { transform: scale(1.04); }

.pdp-tile__label {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgb(255 255 255 / 92%);
  box-shadow: 0 0 0 1px var(--border-strong);
  font-size: 12px;
  font-weight: 600;
}

.pdp-tile--3d .pdp-tile__label {
  box-shadow: none;
  background: var(--ink);
  color: #ffffff;
}

.pdp-tile:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Tarjetas */
.pdp-card {
  padding: 22px;
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.pdp-card h2,
.pdp-card__title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.pdp-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
}

.pdp-card__head span {
  font-size: 12px;
  color: var(--muted);
}

.pdp-row {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

/* Identidad del armazón */
.pdp-ident {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 26px;
}

.pdp-ident__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pdp-brand {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.pdp-ident h1 {
  margin: 0;
  font-size: clamp(32px, 3.6vw, 46px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.02;
  outline: none;
}

.pdp-badge {
  margin: 4px 0 0;
  align-self: flex-start;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-size: 12px;
  font-weight: 600;
}

.pdp-group {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.pdp-group h2 {
  font-size: 13px;
  font-weight: 600;
}

.pdp-colors {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pdp-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pdp-colors li {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pdp-color__dot {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgb(17 24 39 / 10%);
}

/* Compra */
.pdp-buy {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pdp-buybar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 16px 24px;
  border-radius: var(--radius-lg);
  background: var(--ink);
  color: #ffffff;
}

.pdp-price {
  font-size: clamp(22px, 2vw, 28px);
  white-space: nowrap;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.pdp-tryon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  flex: 1 0 auto;
  justify-content: center;
  transition: background .15s;
}

.pdp-tryon:hover { background: var(--accent-soft); }

.pdp-tryon svg { color: var(--accent); }

.pdp-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  font-size: 14px;
  font-weight: 600;
  transition: background .15s;
}

.pdp-add:hover { background: var(--surface); }

.pdp-add__icon {
  display: inline-grid;
  place-items: center;
}

.pdp-add__icon svg {
  width: 19px;
  height: 19px;
  stroke-width: 1.6;
}

.pdp-add__price,
.pdp-tryon-inline {
  display: none;
}

/* Columna lateral */
.pdp-side {
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pdp-desc {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.pdp-specs {
  margin: 16px 0 0;
  display: grid;
  gap: 0;
  font-size: 13px;
}

.pdp-specs div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--border-strong);
}

.pdp-specs dt { color: var(--muted); }

.pdp-specs dd {
  margin: 0;
  font-weight: 600;
}

.pdp-acc summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
  border-radius: 8px;
}

.pdp-acc summary::-webkit-details-marker { display: none; }

.pdp-acc summary svg {
  width: 18px;
  height: 18px;
  transition: transform .2s;
}

.pdp-acc:not([open]) summary svg { transform: rotate(180deg); }

.pdp-acc summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.pdp-steps {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pdp-steps li {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: #ffffff;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.pdp-steps li > span:last-child {
  display: flex;
  flex-direction: column;
}

.pdp-steps strong {
  color: var(--ink);
  font-size: 13px;
}

.pdp-steps__icon {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ink);
  color: #ffffff;
  display: grid;
  place-items: center;
}

.pdp-steps__icon svg {
  width: 17px;
  height: 17px;
}

.pdp-reviews ul {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 13px;
}

.pdp-reviews p {
  margin: 4px 0 0;
  color: var(--muted);
}

.pdp-related {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 12px;
}

@media (max-width: 1280px) {
  .pdp-layout { grid-template-columns: minmax(0, 1fr); }
  .pdp-side {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

@media (max-width: 760px) {
  /* En celular la página de producto toma toda la pantalla: sin barra superior
     ni breadcrumb, con la foto a sangre y los botones flotando encima. */
  .en-producto .topbar,
  .en-producto .breadcrumb {
    display: none;
  }

  /* minmax(0, 1fr): con 1fr la columna no se achica por debajo de la fila de
     colores (que no se parte) y el celular ensancha la página. */
  .pdp-layout,
  .pdp-row,
  .pdp-side,
  .pdp-gallery {
    grid-template-columns: minmax(0, 1fr);
  }

  .pdp-gallery { gap: 10px; }

  /* 4:3 es la proporción de las fotos: a sangre sin recortar el armazón.
     El espacio extra arriba deja lugar a los botones flotantes. */
  .pdp-stage {
    margin: -16px -16px 0;
    aspect-ratio: auto;
    padding-top: 56px;
    border-radius: 0 0 28px 28px;
  }
  .pdp-stage__img {
    aspect-ratio: 4 / 3;
    height: auto;
  }
  .pdp-stage__3d { top: 56px; }

  .pdp-stage::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 22%;
    background: linear-gradient(rgb(242 242 242 / 0%), rgb(242 242 242 / 70%));
    pointer-events: none;
  }

  .pdp-stage__tag { display: none; }

  .pdp-floatbar {
    position: absolute;
    top: calc(12px + env(safe-area-inset-top));
    left: 12px;
    right: 12px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .pdp-floatbar__group {
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: rgb(255 255 255 / 86%);
    backdrop-filter: blur(10px);
  }

  .pdp-float-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgb(255 255 255 / 86%);
    backdrop-filter: blur(10px);
    color: var(--ink);
  }

  .pdp-floatbar__group .pdp-float-btn {
    width: 36px;
    height: 36px;
    background: transparent;
    backdrop-filter: none;
  }

  .pdp-float-btn.fav-toggle[aria-pressed="true"] svg {
    fill: #e11d48;
    stroke: #e11d48;
  }

  .pdp-float-btn__count {
    position: absolute;
    top: 2px;
    right: 0;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--accent);
    color: #ffffff;
    font-size: 10px;
    font-weight: 600;
    line-height: 16px;
    text-align: center;
  }

  /* Tira de vistas bajo la foto principal */
  .pdp-tiles,
  .pdp-tiles[data-cantidad] {
    contain: none;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 84px;
    grid-auto-rows: auto;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -16px;
    padding: 0 16px;
  }
  .pdp-tiles::-webkit-scrollbar { display: none; }
  .pdp-tiles[data-cantidad] > :last-child { grid-column: auto; }
  .pdp-tile {
    aspect-ratio: 1 / 1;
    border-radius: 16px;
  }
  .pdp-tile__label { display: none; }
  .pdp-tile--3d .pdp-tile__label {
    display: block;
    left: 50%;
    bottom: 6px;
    transform: translateX(-50%);
    padding: 3px 8px;
    font-size: 10px;
    white-space: nowrap;
  }

  /* Contenido sin tarjeta, como una ficha continua */
  .pdp-ident {
    padding: 4px 0 0;
    background: none;
    gap: 4px;
  }
  .pdp-ident #pdp-fav { display: none; }
  .pdp-ident h1 { font-size: 30px; }
  .pdp-price-inline {
    display: block;
    margin: 6px 0 0;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
  }
  .pdp-group { margin-top: 14px; }
  /* Probarme en vivo: a lo ancho, entre el precio y los colores */
  .pdp-tryon-inline {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    border-radius: 999px;
    border: 1.5px solid var(--ink);
    font-size: 15px;
    font-weight: 600;
  }
  .pdp-tryon-inline svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.6;
    color: var(--accent);
  }
  .pdp-tryon-inline:active { background: var(--surface); }

  /* Barra fija: sólo "Agregar al pedido" */
  .pdp-buybar { display: none; }
  .pdp-buy {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    display: block;
    padding: 18px 16px calc(14px + env(safe-area-inset-bottom));
    background: linear-gradient(rgb(255 255 255 / 0%), #ffffff 34%);
  }
  .pdp-add {
    width: 100%;
    justify-content: flex-start;
    gap: 12px;
    min-height: 58px;
    padding: 0 22px 0 8px;
    border: 0;
    border-radius: 999px;
    background: var(--accent);
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 12px 28px rgb(37 99 235 / 28%);
  }
  .pdp-add:hover,
  .pdp-add:active { background: var(--accent-hover); }
  .pdp-add__icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #ffffff;
    color: var(--accent);
  }
  .pdp-add__price {
    display: block;
    margin-left: auto;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    opacity: .85;
  }

  .en-producto .main-area { padding-bottom: 104px; }
  .en-producto .toast { bottom: calc(100px + env(safe-area-inset-bottom)); }

}

@media (prefers-reduced-motion: reduce) {
  .pdp-tile img,
  .pdp-acc summary svg { transition: none; }
  .pdp-tile:hover img { transform: none; }
}

/* Carrito drawer */
dialog.drawer {
  margin: 0 0 0 auto;
  width: min(440px, 100%);
  height: 100dvh;
  max-height: 100dvh;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  color: var(--ink);
  box-shadow: var(--shadow-lg);
}

.drawer__panel {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.drawer__head {
  padding: 22px 22px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.drawer__head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.drawer__head p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cart-empty {
  margin: auto 0;
  text-align: center;
  padding: 24px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.cart-empty__icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--surface);
  display: grid;
  place-items: center;
  color: var(--accent);
}

.cart-empty p {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--muted);
  max-width: 28ch;
}

.cart-items {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-item {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}

.cart-item__img {
  width: 74px;
  height: 58px;
  border-radius: 12px;
  background: #ffffff;
  object-fit: contain;
  padding: 4px;
}

.cart-item__info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cart-item__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.cart-item__top strong {
  font-size: 14px;
  font-weight: 600;
}

.cart-item__remove {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin: -6px -6px 0 0;
  border-radius: 50%;
  color: var(--muted);
  transition: color .15s, background .15s;
}

.cart-item__remove svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.6;
}

.cart-item__remove:hover {
  color: var(--danger);
  background: #fef2f2;
}

.cart-item__meta {
  font-size: 12px;
  color: var(--muted);
}

.cart-item__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--border);
}

.qty-control button {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-weight: 700;
}

.qty-control button:hover {
  background: var(--surface);
}

.qty-control span {
  font-size: 13px;
  font-weight: 600;
  min-width: 16px;
  text-align: center;
}

.drawer__foot {
  padding: 16px 22px calc(18px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #ffffff;
}

.cart-subtotal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
}

.cart-subtotal strong {
  font-size: 20px;
  font-weight: 700;
}

/* Modal B2B */
dialog.b2b-modal {
  width: min(560px, calc(100% - 28px));
}

.b2b-modal__body {
  position: relative;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.b2b-modal__body > .modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
}

.b2b-modal h2 {
  margin: 4px 0 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  padding-right: 36px;
}

.b2b-lead {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.b2b-list {
  margin: 0;
  padding: 16px 18px 16px 32px;
  border-radius: var(--radius-md);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
}

.b2b-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 32px);
  text-align: center;
  padding: 10px 18px;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 40;
}

/* Responsive */
@media (max-width: 1180px) {
  .bento-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .mobile-only,
  .icon-btn.mobile-only { display: grid; }
  .topbar__brand.mobile-only { display: block; }
  .app-shell {
    grid-template-columns: 1fr;
  }
  .main-area {
    padding: 16px 16px 28px;
  }
  /* Menú como hoja inferior: sube hasta el 90 % del alto */
  .sidebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    max-height: 90dvh;
    padding: 0;
    border: 0;
    border-radius: 28px 28px 0 0;
    background: #ffffff;
    box-shadow: 0 -20px 60px rgb(17 24 39 / 20%);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(calc(100% + 24px));
    transition: transform .5s cubic-bezier(.32, .72, 0, 1);
  }
  .sidebar.is-open { transform: translateY(var(--arrastre, 0px)); }
  .sidebar.is-dragging { transition: none; }
  .sidebar__inner {
    position: static;
    min-height: 0;
    max-height: 90dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 10px 20px calc(22px + env(safe-area-inset-bottom));
    gap: 22px;
  }
  .sheet-handle {
    display: block;
    flex: none;
    align-self: center;
    width: 40px;
    height: 5px;
    margin-bottom: -6px;
    border-radius: 99px;
    background: var(--border-strong);
  }
  .sheet-handle,
  .sidebar__head {
    touch-action: none;
    cursor: grab;
  }
  .sidebar__head { padding: 0; }
  .sidebar__head .brand { cursor: pointer; }

  .nav-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .nav-item {
    position: relative;
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
    padding: 16px;
    border-radius: 22px;
    background: var(--surface);
    font-size: 15px;
    color: var(--ink);
  }
  .nav-item:first-child {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }
  .nav-item svg {
    width: 22px;
    height: 22px;
  }
  .nav-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    margin: 0;
  }

  .sidebar__section { padding: 0; }
  .sidebar__section:not(.sidebar__recent) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .sidebar__section:not(.sidebar__recent) .sidebar__label { grid-column: 1 / -1; }

  .mini-picks {
    flex-direction: row;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    margin: 0 -20px;
    padding: 0 20px;
    scroll-padding: 0 20px;
  }
  .mini-picks::-webkit-scrollbar { display: none; }
  .mini-pick {
    flex: none;
    width: 156px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 8px 8px 12px;
    border-radius: 20px;
    background: var(--surface);
    scroll-snap-align: start;
  }
  .mini-pick img {
    width: 100%;
    height: 84px;
    background: #ffffff;
    border-radius: 14px;
    padding: 6px;
  }
  .mini-pick div { padding: 0 4px; }

  .sidebar__foot {
    margin-top: 0;
    padding: 16px 0 0;
    border-top: 1px solid var(--border);
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 25;
    background: rgb(17 24 39 / 42%);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .4s ease;
  }
  .menu-movil-abierto .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
  body.menu-movil-abierto { overflow: hidden; }
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .b2b-bar__inner {
    padding: 8px 12px;
    font-size: 12px;
  }
  .promo-card {
    grid-template-columns: 1fr;
    padding: 20px;
  }
  .promo-card__visual {
    height: 96px;
  }
  .bento-featured,
  .product-grid {
    grid-template-columns: 1fr;
  }
  .bento-bottom-row { gap: 10px; }
  .promo-card.promo-card--compact { padding: 16px 16px 12px; }
  .promo-card--compact .promo-card__copy { padding-right: 34px; }
  .promo-card--compact h2 { font-size: 16px; }
  .promo-card--compact p { display: none; }
  .promo-card--compact .circle-arrow {
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
  }
  .promo-card--compact .promo-card__visual { height: 72px; }
  .promo-card--compact .promo-card__visual img { max-height: 64px; }
  .search-box {
    width: 100%;
  }
}

/* Cabecera del catálogo compacta en celular: cuatro filas sin saltos de línea */
@media (max-width: 640px) {
  .main-area { gap: 18px; }

  .topbar { gap: 10px; }

  .cart-pill {
    position: relative;
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
  }
  .cart-pill > span:not([class]),
  .cart-pill__thumbs {
    display: none;
  }
  .cart-pill__count {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 10px;
    box-shadow: 0 0 0 2px #ffffff;
  }

  .explore-bar { gap: 12px; }
  .explore-bar__head { gap: 12px; }
  .explore-bar h1 { font-size: 26px; line-height: 1.1; }

  /* nowrap: con wrap la línea toma el ancho de toda la fila de estilos y
     el celular ensancha la página para que entre. */
  .explore-bar__tools {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 10px;
  }

  /* Estilos en una sola fila deslizable */
  .style-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -16px;
    padding: 0 16px;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
  }
  .style-chips::-webkit-scrollbar { display: none; }
  .style-chip { flex: none; }

  .search-box {
    order: -1;
    min-width: 0;
    width: 100%;
    min-height: 42px;
  }
  .search-box input { font-size: 16px; } /* 16px evita el zoom automático de iOS */
}

/* En celular cada sección de anteojos es una fila deslizable: la tarjeta ocupa
   el 78 % del ancho para que se asome la siguiente. */
@media (max-width: 760px) {
  .product-grid,
  .bento-featured {
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 78%;
    gap: 12px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    margin: 0 -16px;
    padding: 0 16px 4px;
    scroll-padding: 0 16px;
  }
  .product-grid::-webkit-scrollbar,
  .bento-featured::-webkit-scrollbar { display: none; }
  .product-grid > .product-card,
  .bento-featured > .product-card { scroll-snap-align: start; }
}

/* Pedido: detalles comunes */
.drawer .sheet-handle { display: none; }

.drawer__head h2 { letter-spacing: -0.01em; }

.drawer__head p { max-width: 34ch; line-height: 1.4; }

.cart-empty strong { font-size: 17px; }

.cart-empty__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.cart-empty__actions svg {
  width: 17px;
  height: 17px;
}

.cart-subtotal > span {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.btn-whatsapp svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.btn-whatsapp { white-space: nowrap; }

/* Entrada y salida del panel lateral (escritorio) */
dialog.drawer[open] { animation: pedido-entra-lado .42s cubic-bezier(.32, .72, 0, 1); }
dialog.drawer.is-closing { animation: pedido-sale-lado .3s cubic-bezier(.4, 0, 1, 1) forwards; }
dialog.drawer[open]::backdrop { animation: fondo-entra .35s ease; }
dialog.drawer.is-closing::backdrop { animation: fondo-sale .3s ease forwards; }

@keyframes pedido-entra-lado { from { transform: translateX(100%); } }
@keyframes pedido-sale-lado { to { transform: translateX(100%); } }
@keyframes fondo-entra { from { opacity: 0; } }
@keyframes fondo-sale { to { opacity: 0; } }

body:has(dialog[open]) { overflow: hidden; }

/* En celular el pedido es una hoja inferior, como el menú */
@media (max-width: 920px) {
  dialog.drawer {
    margin: auto 0 0;
    width: 100%;
    max-width: 100%;
    height: fit-content; /* auto estira el dialog modal entre top y bottom */
    max-height: 90dvh;
    border-radius: 28px 28px 0 0;
    box-shadow: 0 -20px 60px rgb(17 24 39 / 20%);
    transform: translateY(var(--arrastre, 0px));
    transition: transform .4s cubic-bezier(.32, .72, 0, 1);
  }
  dialog.drawer.is-dragging { transition: none; }
  dialog.drawer[open] { animation-name: pedido-entra-abajo; animation-duration: .5s; }
  dialog.drawer.is-closing { animation-name: pedido-sale-abajo; animation-duration: .32s; }

  .drawer__panel {
    height: auto;
    max-height: 90dvh;
  }
  .drawer .sheet-handle {
    display: block;
    margin: 10px auto -4px;
    touch-action: none;
  }
  .drawer__head {
    padding: 14px 20px 14px;
    touch-action: none;
  }
  .drawer__body { padding: 16px 20px; }
  .cart-empty { padding: 12px 4px 20px; }
  .drawer__foot { padding: 14px 20px calc(16px + env(safe-area-inset-bottom)); }
}

@keyframes pedido-entra-abajo { from { transform: translateY(100%); } }
@keyframes pedido-sale-abajo {
  from { transform: translateY(var(--arrastre, 0px)); }
  to { transform: translateY(100%); }
}

@media (prefers-reduced-motion: reduce) {
  dialog.drawer,
  dialog.drawer[open],
  dialog.drawer[open]::backdrop {
    animation: none;
    transition: none;
  }
}

/* Botón de pago (carrito y checkout) */
.btn-pagar {
  width: 100%;
  min-height: 54px;
  font-size: 15px;
}

.btn-pagar svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.7;
}

/* Finalizar compra */
.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
  gap: 24px;
  align-items: start;
}

.checkout-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.checkout h1 {
  margin: 0 0 4px;
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 700;
  letter-spacing: -0.02em;
  outline: none;
}

.checkout-step {
  margin: 0;
  padding: 22px;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.checkout-step legend {
  float: left;
  width: 100%;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
}

.checkout-step__num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ink);
  color: #ffffff;
  font-size: 13px;
  display: grid;
  place-items: center;
  font-variant-numeric: tabular-nums;
}

.checkout-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field--wide { grid-column: 1 / -1; }

.field > span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}

.field small {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.field input,
.field select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: #ffffff;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
}

.field input:focus-visible,
.field select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}

.checkout-form-enviado .field input:invalid {
  border-color: var(--danger);
}

.choice-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  border: 1.5px solid var(--border);
  background: #ffffff;
  cursor: pointer;
  transition: border-color .15s;
}

.choice:has(input:checked) { border-color: var(--accent); }

.choice:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.choice input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--accent);
}

.choice__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}

.choice__body strong {
  font-size: 15px;
  color: var(--ink);
}

.choice__price {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.checkout-summary {
  position: sticky;
  top: 20px;
  padding: 24px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.checkout-summary h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.checkout-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkout-items li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.checkout-items__img {
  position: relative;
  width: 64px;
  height: 48px;
  border-radius: 12px;
  background: var(--surface);
}

.checkout-items__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.checkout-items__img span {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--ink);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  display: grid;
  place-items: center;
}

.checkout-items__name { font-weight: 600; }

.checkout-items strong {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.checkout-totals {
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}

.checkout-totals div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.checkout-totals dt { color: var(--muted); }

.checkout-totals dd {
  margin: 0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.checkout-totals__total {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 18px;
}

.checkout-totals__total dt { color: var(--ink); font-weight: 700; }
.checkout-totals__total dd { font-weight: 700; }

.checkout-pay {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checkout-note {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.checkout-vacio,
.checkout-ok {
  max-width: 520px;
  margin: 24px auto;
  padding: 36px 28px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.checkout-vacio p,
.checkout-ok > p {
  margin: 0 0 8px;
  color: var(--muted);
}

.checkout-ok__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
}

.checkout-ok__icon svg {
  width: 30px;
  height: 30px;
  stroke-width: 2.2;
}

.checkout-ok__datos {
  width: 100%;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  text-align: left;
  font-size: 14px;
}

.checkout-ok__datos div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border-strong);
}

.checkout-ok__datos dt { color: var(--muted); }
.checkout-ok__datos dd { margin: 0; font-weight: 600; }

/* Pasarela simulada */
dialog.gateway {
  width: min(320px, calc(100% - 32px));
  border-radius: var(--radius-lg);
}

.gateway__body {
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.gateway__body p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 920px) {
  .checkout-layout { grid-template-columns: minmax(0, 1fr); }
  .checkout-summary { position: static; }
}

@media (max-width: 640px) {
  .checkout-step { padding: 18px; }
  .checkout-grid { grid-template-columns: minmax(0, 1fr); }
  .choice { padding: 14px; gap: 12px; }
  .checkout-summary { padding: 20px; }
  .checkout-ok,
  .checkout-vacio { margin: 8px 0; padding: 28px 20px; }
  .checkout-ok__datos div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
