:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --primary: #2563eb; /* azul moderno - confianza y profesionalismo */
  --accent: #10b981;  /* verde - salud, confianza, positivo */
  --radius: 12px;
  --shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
  --sidebar-width: 280px;
  --sidebar-collapsed: 72px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Montserrat", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  line-height: 1.4;
}

/* Accesibilidad: enlace “Saltar al contenido” */
.skip-link {
  position: absolute;
  left: -999px;
  top: 12px;
  z-index: 2000;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
  box-shadow: var(--shadow);
}
.skip-link:focus {
  left: 16px;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .22), var(--shadow);
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  background: #0f172a;
  color: #e5e7eb;
  font-size: 12px;
  padding: 10px 0;
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar__link { color: #e5e7eb; }
.topbar__sep { opacity: .6; margin: 0 8px; }
.topbar .logo {
  font-size: 20px;
}
.topbar .logo__mark {
  padding: 6px 8px;
  font-size: 18px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.promo-banner {
  position: relative;
  z-index: 999;
}

.header-main {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  width: 100%;
}

.header-main .container {
  max-width: none;
  width: 100%;
  padding-left: 24px;
  padding-right: 24px;
}

.promo-banner .container {
  max-width: none;
  width: 100%;
  padding-left: 24px;
  padding-right: 24px;
}
.header-main__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 10px 0;
  position: relative;
  width: 100%;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.header-tool {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.menu-toggle:hover {
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary);
}

.header-tool:hover {
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary);
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
}

.header-tool svg {
  width: 22px;
  height: 22px;
}
.logo {
  font-weight: 900;
  letter-spacing: 0.5px;
  font-size: 24px;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.logo:hover {
  transform: scale(1.02);
  text-decoration: none;
}

.logo__mark {
  padding: 8px 10px;
  border-radius: 12px;
  background: #111827;
  color: #fff;
  transition: all 0.2s ease;
}

.logo__mark--accent {
  background: var(--accent);
  margin-left: 8px;
}

.logo:hover .logo__mark--accent {
  background: #34d399;
}

.logo-img {
  height: 32px;
  width: auto;
  display: block;
  transition: opacity 0.2s ease;
}

.header-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex-shrink: 0;
}
.header-logo .logo-img {
  height: 28px;
}
.header-logo .logo-img--mark { display: block; }
.header-logo .logo-img--wordmark { display: none; }

.sidebar__logo:hover .logo-img {
  opacity: 0.85;
}

.search {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  flex: 1 1 0%; /* Ocupa todo el espacio disponible en el grid */
}
.search__input {
  flex: 1;
  padding: 8px 78px 8px 16px; /* espacio para clear + botón buscar */
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  background: #fff;
  font-size: 14px;
  transition: all 0.2s ease;
  width: 100%;
  height: 36px;
}
.search__input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}
.search__input::placeholder {
  color: var(--muted);
  opacity: 0.7;
}
.search__button {
  position: absolute;
  right: 8px;
  padding: 6px;
  background: transparent;
  color: var(--muted);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}
.search__button:hover {
  background: rgba(37, 99, 235, .1);
  color: var(--primary);
  transform: scale(1.05);
}
.search__button svg {
  width: 16px;
  height: 16px;
}

.search__clear {
  position: absolute;
  right: 40px;
  padding: 6px;
  background: transparent;
  color: var(--muted);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: none; /* solo cuando hay texto */
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}
.search.search--has-value .search__clear { display: flex; }
.search__clear:hover {
  background: rgba(37, 99, 235, .1);
  color: var(--primary);
  transform: scale(1.05);
}
.search__clear svg {
  width: 16px;
  height: 16px;
}

.header-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-shrink: 0; /* No se comprime, mantiene su tamaño */
}

.header-action-wrap {
  position: relative;
  display: inline-flex;
}

.mini-cart {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(360px, calc(100vw - 32px));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(17, 24, 39, .18);
  z-index: 1200;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.header-action-wrap:hover .mini-cart,
.header-action-wrap:focus-within .mini-cart,
.header-action-wrap.is-open .mini-cart {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.mini-cart__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.mini-cart__count { color: var(--muted); font-weight: 800; font-size: 12px; }
.mini-cart__body {
  padding: 10px 14px;
  max-height: 320px;
  overflow: auto;
}
.mini-cart__loading { color: var(--muted); font-weight: 700; }
.mini-cart__empty { color: var(--muted); font-weight: 700; }
.mini-cart__item {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(17, 24, 39, .06);
}
.mini-cart__item:last-child { border-bottom: none; }
.mini-cart__img {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #f3f4f6;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.mini-cart__img img { width: 100%; height: 100%; object-fit: cover; }
.mini-cart__name { font-weight: 900; font-size: 13px; line-height: 1.25; }
.mini-cart__meta { margin-top: 4px; color: var(--muted); font-weight: 700; font-size: 12px; display: flex; justify-content: space-between; gap: 10px; }
.mini-cart__footer {
  border-top: 1px solid var(--border);
  padding: 12px 14px;
  background: rgba(17, 24, 39, .02);
}
.mini-cart__total { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.mini-cart__actions { display: grid; gap: 8px; }

@media (max-width: 860px) {
  /* En móvil, mantenemos el click directo al carrito y evitamos overlays que tapen UI */
  .mini-cart { display: none; }
}

.header-action {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  color: var(--text);
  background: transparent;
  transition: all 0.2s ease;
  text-decoration: none;
}

.header-action:hover {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  text-decoration: none;
  transform: translateY(-1px);
}

.header-action svg {
  width: 24px;
  height: 24px;
  stroke-width: 2;
}

.header-action--search { display: none; }

.header-action__badge {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--accent);
  color: #0f172a; /* Texto oscuro para mejor contraste (6.99:1) con verde */
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

/* Banner de notificaciones y ofertas */
.promo-banner {
  background: linear-gradient(135deg, var(--accent) 0%, #34d399 100%);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  position: relative;
  display: block;
}

.promo-banner--hidden {
  display: none;
}

.promo-banner__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 24px;
  position: relative;
  gap: 16px;
}
.promo-banner__close {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.promo-banner__close:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-50%) scale(1.03);
}
.promo-banner__close:active {
  transform: translateY(-50%) scale(0.97);
}
.promo-banner__close svg { display: block; }

.promo-banner__content {
  flex: 1;
  text-align: center;
  overflow: hidden;
}

.promo-banner__text {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  display: inline-block;
  animation: scroll-text 30s linear infinite;
}

@keyframes scroll-text {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* (Sin botón de cierre: el banner siempre visible) */

/* Sidebar styles */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  max-width: 85vw;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar--open {
  opacity: 1;
  visibility: visible;
}

.sidebar__overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.sidebar__inner {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  max-width: 85vw;
  background: var(--surface);
  border-right: 1px solid var(--border);
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 2;
  overflow: hidden;
}

.sidebar--open .sidebar__inner {
  transform: translateX(0);
}

.sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar__logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.sidebar__logo:hover { text-decoration: none; }
.sidebar__logo .logo-img { width: auto; }
.sidebar__logo .logo-img--wordmark { height: 38px; }
.sidebar__logo .logo-img--mark { height: 34px; }

.sidebar__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.sidebar__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
}

.sidebar__close:hover {
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary);
}

.sidebar__quick {
  padding: 8px 12px;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.sidebar__divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
  flex-shrink: 0;
}

.sidebar__nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 0;
}

.sidebar__item {
  display: block;
}

.sidebar__item--has-children {
  position: relative;
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: all 0.15s ease;
  width: 100%;
}
.sidebar__quick .sidebar__link {
  padding: 8px;
  gap: 0;
  justify-content: center;
}

.sidebar__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .3px;
  flex-shrink: 0;
}
.sidebar__icon svg {
  width: 18px;
  height: 18px;
}

.sidebar__label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar__item--has-children .sidebar__link {
  padding-right: 48px;
}

.sidebar__link:hover {
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary);
}

.sidebar__toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.sidebar__toggle:hover {
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary);
}

.sidebar__arrow {
  width: 12px;
  height: 12px;
  transition: transform 0.2s ease;
}

.sidebar__item--open .sidebar__arrow {
  transform: rotate(180deg);
}

.sidebar__submenu {
  display: none;
  background: rgba(37, 99, 235, 0.04);
  border-left: 3px solid var(--primary);
  padding: 8px 0;
}

.sidebar__item--open .sidebar__submenu {
  display: block;
}

.sidebar__submenu__link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px 10px 32px;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  transition: all 0.15s ease;
}

.sidebar__submenu__link:hover {
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary);
}

.sidebar__submenu__link--all {
  font-weight: 700;
  color: var(--primary);
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
  padding-bottom: 12px;
}

.sidebar__submenu__link--all svg {
  width: 16px;
  height: 16px;
  opacity: 0.8;
}

/* Desktop: sidebar fijo siempre visible (estilo CigaretteElec) */
@media (min-width: 981px) {
  /* Padding fijo siempre, NO cambia en hover para evitar CLS */
  body {
    padding-left: var(--sidebar-collapsed);
  }

  .sidebar {
    opacity: 1;
    visibility: visible;
    width: var(--sidebar-collapsed);
    max-width: none;
    /* El sidebar expandido será un overlay, no cambiará el ancho del contenedor */
  }


  .sidebar__overlay { display: none; }
  
  /* Resetear reglas base del sidebar__inner en desktop */
  .sidebar__inner {
    transform: none !important;
    max-width: none;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    background: var(--surface);
    border-right: 1px solid var(--border);
    /* En estado colapsado, ocupa 72px (100% del sidebar) */
  }
  
  /* Cuando se expande, el inner se expande como overlay */
  body.layout--sidebar-expanded .sidebar__inner {
    position: fixed !important;
    top: 0;
    left: 0 !important;
    width: var(--sidebar-width);
    bottom: 0;
    z-index: 10001;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    transform: none !important;
  }
  
  .sidebar__close { display: none; }
  .menu-toggle { display: none; }
  .header-tools { display: none; }

  /* Header desktop: el buscador debe ocupar TODO el espacio disponible */
  .header-main__inner {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .header-logo { display: flex; }
  .header-logo .logo-img--wordmark { display: block; }
  .header-logo .logo-img--mark { display: none; }
  .search { grid-column: 2; }
  .header-actions { grid-column: 3; justify-self: end; }

  /* Estado colapsado (solo iconos) */
  .sidebar__logo .logo-img--wordmark { display: none; }
  .sidebar__logo .logo-img--mark { display: block; }
  .sidebar__header { padding: 14px 10px; justify-content: center; }

  .sidebar__label { display: none; }
  .sidebar__link {
    justify-content: center;
    padding: 10px 0;
  }
  .sidebar__item--has-children .sidebar__link { padding-right: 0; }

  .sidebar__toggle {
    opacity: 0;
    pointer-events: none;
  }

  /* Si hubiera submenús abiertos, no mostrarlos en modo iconos */
  .sidebar__item--open .sidebar__submenu { display: none; }

  /* Estado expandido (hover/focus) - controlado por JS (clase en body) */
  body.layout--sidebar-expanded .sidebar__logo .logo-img--wordmark { display: block; }
  body.layout--sidebar-expanded .sidebar__logo .logo-img--mark { display: none; }
  body.layout--sidebar-expanded .sidebar__header { padding: 16px 20px; justify-content: flex-start; }

  body.layout--sidebar-expanded .sidebar__label { display: inline; }
  body.layout--sidebar-expanded .sidebar__link {
    justify-content: flex-start;
    padding: 12px 20px;
  }
  body.layout--sidebar-expanded .sidebar__toggle {
    opacity: 1;
    pointer-events: auto;
  }
  body.layout--sidebar-expanded .sidebar__item--open .sidebar__submenu { display: block; }
}

.nav-cats {
  display: none;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 100;
}

.nav-cats__overlay {
  display: none;
}
.nav-cats__inner {
  display: flex;
  gap: 8px;
  padding: 12px 0;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
}
.nav-cats__inner::-webkit-scrollbar {
  height: 4px;
}
.nav-cats__inner::-webkit-scrollbar-track {
  background: transparent;
}
.nav-cats__inner::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}
.nav-cats__link {
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.nav-cats__link:hover {
  background: rgba(37, 99, 235, .08);
  color: var(--primary);
  border-color: rgba(37, 99, 235, .2);
  text-decoration: none;
}
.nav-cats__link--has-sub {
  position: relative;
}
.nav-cats__arrow-icon {
  width: 12px;
  height: 12px;
  opacity: 0.6;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}
.nav-cats__dropdown {
  position: relative;
}
.nav-cats__dropdown:hover .nav-cats__arrow-icon {
  transform: rotate(180deg);
  opacity: 1;
}
.nav-cats__dropdown:hover .nav-cats__link--has-sub {
  color: var(--primary);
}
.nav-cats__dropdown:hover .nav-cats__submenu,
.nav-cats__dropdown:focus-within .nav-cats__submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.nav-cats__submenu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.08);
  min-width: 240px;
  max-width: 600px;
  padding: 12px 0;
  margin-top: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  pointer-events: none;
}
.nav-cats__dropdown--multi-column .nav-cats__submenu {
  min-width: 500px;
  max-width: 700px;
}
/* Ajustar posición si está cerca del borde derecho */
.nav-cats__dropdown:last-child .nav-cats__submenu,
.nav-cats__dropdown:nth-last-child(2) .nav-cats__submenu {
  left: auto;
  right: 0;
}
.nav-cats__dropdown--multi-column:last-child .nav-cats__submenu,
.nav-cats__dropdown--multi-column:nth-last-child(2) .nav-cats__submenu {
  right: 0;
  left: auto;
}
.nav-cats__submenu__list {
  display: flex;
  flex-direction: column;
}
.nav-cats__submenu__list--columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}
.nav-cats__submenu__link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  color: var(--text);
  transition: all 0.15s ease;
  line-height: 1.5;
}
.nav-cats__submenu__link:hover {
  background: rgba(37, 99, 235, .08);
  color: var(--primary);
  text-decoration: none;
  padding-left: 24px;
}
.nav-cats__submenu__link--all {
  font-weight: 700;
  color: var(--primary);
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
  padding-bottom: 12px;
  padding-top: 12px;
}
.nav-cats__submenu__link--all:hover {
  background: rgba(37, 99, 235, .1);
  padding-left: 20px;
}
.nav-cats__submenu__link--all svg {
  width: 16px;
  height: 16px;
  opacity: 0.8;
}

main { padding: 18px 0 40px; }

.breadcrumbs {
  margin: 0 0 24px;
  padding: 0;
}
.breadcrumbs ol,
.breadcrumbs__list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
}
.breadcrumbs li,
.breadcrumbs__item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.breadcrumbs li::after,
.breadcrumbs__item:not(:last-child)::after {
  content: '›';
  color: var(--muted);
  font-size: 16px;
  font-weight: 400;
  opacity: 0.5;
  margin-left: 0;
}
.breadcrumbs li:last-child::after,
.breadcrumbs__item:last-child::after {
  content: "";
}
.breadcrumbs a,
.breadcrumbs__link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  padding: 4px 0;
}
.breadcrumbs a:hover,
.breadcrumbs__link:hover {
  color: var(--primary-hover, #1e40af);
  text-decoration: underline;
}
.breadcrumbs__current {
  color: var(--text);
  font-weight: 600;
  padding: 4px 0;
}
@media (max-width: 640px) {
  .breadcrumbs {
    margin-bottom: 20px;
  }
  .breadcrumbs ol,
  .breadcrumbs__list {
    font-size: 13px;
    gap: 6px;
  }
  .breadcrumbs li::after,
  .breadcrumbs__item:not(:last-child)::after {
    font-size: 14px;
  }
}

.messages { margin: 12px 0; display: grid; gap: 8px; }
.message {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
}
.message--error { border-color: rgba(239, 68, 68, .35); }
.message--success { border-color: rgba(16, 185, 129, .35); }
.message--info { border-color: rgba(37, 99, 235, .35); }

.search-banner { border-color: rgba(37, 99, 235, .35); }
.search-banner__title { font-weight: 900; margin-bottom: 6px; }
.search-banner__body { color: var(--text); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn--primary { 
  background: var(--primary); 
  border-color: var(--primary); 
  color: #fff; 
}
.btn--primary:hover {
  background: #1d4ed8; /* Azul más oscuro en hover */
  border-color: #1d4ed8;
  color: #fff;
}
.btn--accent { 
  background: #059669; /* Verde más oscuro para mejor contraste */
  border-color: #059669; 
  color: #fff; /* Texto blanco para máximo contraste (4.5:1+ WCAG AA) */
}
.btn--accent:hover {
  background: #047857; /* Verde aún más oscuro en hover */
  border-color: #047857;
  color: #fff;
}
.btn--ghost { background: transparent; }
.btn--block { width: 100%; }
.btn--small { padding: 8px 12px; font-size: 13px; }
.btn__spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: rgba(255, 255, 255, .95);
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
.btn--ghost .btn__spinner {
  border-color: rgba(17, 24, 39, .18);
  border-top-color: rgba(17, 24, 39, .70);
}

.btn-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}
.btn-group > label.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  background: #fff;
  transition: all .15s ease;
}
.btn-group > label.btn input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.btn-group > label.btn:hover {
  border-color: #93c5fd;
  color: #1d4ed8;
}
.btn-group > label.btn:has(input:checked) {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
  box-shadow: 0 6px 18px rgba(29, 78, 216, .18);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(17, 24, 39, .12);
  font-size: 12px;
}

.hero {
  background: linear-gradient(135deg, rgba(37, 99, 235, .08), rgba(16, 185, 129, .06));
  border: 1px solid rgba(17, 24, 39, .08);
  border-radius: 24px;
  padding: 48px 32px;
  box-shadow: 0 8px 32px rgba(17, 24, 39, .08);
  margin-bottom: 48px;
}
.hero__inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}
.hero__title {
  margin: 0 0 16px;
  font-size: 42px;
  font-weight: 900;
  color: #111827;
  letter-spacing: -0.5px;
  line-height: 1.2;
}
.hero__subtitle {
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}
.hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 40px;
}
.hero__features {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  padding-top: 32px;
  border-top: 1px solid rgba(17, 24, 39, .08);
}
.hero__feature {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}
.hero__feature svg {
  width: 24px;
  height: 24px;
  color: var(--primary);
  flex-shrink: 0;
}

.section {
  margin-top: 48px;
}
.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
}
.section__head--split {
  align-items: center;
}
.section__title {
  margin: 0;
  font-size: 28px;
  font-weight: 900;
  color: #111827;
  letter-spacing: -0.3px;
}
.section__link {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  transition: all 0.2s ease;
}
.section__link:hover {
  color: var(--accent);
  text-decoration: underline;
}
.section__meta {
  color: var(--muted);
  font-size: 13px;
}

/* FAQ (info pages) */
.faq {
  display: grid;
  gap: 10px;
  max-width: 90ch;
}
.faq__item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}
.faq__q {
  cursor: pointer;
  font-weight: 800;
  color: var(--text);
}
.faq__a {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
}
.faq__a a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.faq__a a:hover {
  color: var(--accent);
}
.faq__item[open] {
  border-color: rgba(37, 99, 235, .25);
  box-shadow: 0 6px 16px rgba(17, 24, 39, .06);
}

.grid {
  display: grid;
  gap: 20px;
  animation: fadeIn 0.4s ease;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.grid--cats {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

/* Subcategorías compactas horizontales */
.section--subcats {
  margin-bottom: 24px;
  padding: 0;
}

.subcats-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 0 16px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.subcats-scroll::-webkit-scrollbar {
  height: 6px;
}

.subcats-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.subcats-scroll::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.subcats-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

.subcat-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  min-width: auto;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s ease;
  flex-shrink: 0;
  cursor: pointer;
  white-space: nowrap;
}

.subcat-item:hover {
  border-color: var(--primary);
  background: rgba(37, 99, 235, 0.04);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
  text-decoration: none;
  color: var(--primary);
}

.subcat-item:active {
  transform: translateY(0);
}

.subcat-item__icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.subcat-item:hover .subcat-item__icon {
  color: var(--primary);
}

.subcat-item__icon svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.5;
}

.subcat-item__label {
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  line-height: 1.4;
  color: inherit;
  transition: color 0.2s ease;
  white-space: nowrap;
}

/* Cuando hay subcategorías, queremos el bloque de filtros justo debajo */
.section--after-subcats {
  margin-top: 24px;
}
.grid--products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  width: 100%;
}
.grid--products[data-view="list"] {
  grid-template-columns: 1fr;
  gap: 0;
}
.grid--products[data-view="list"] .card--product {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  gap: 24px;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  padding: 20px;
  transition: all 0.2s ease;
}
.grid--products[data-view="list"] .card--product:first-child {
  border-top: 1px solid var(--border);
}
.grid--products[data-view="list"] .card--product:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: rgba(37, 99, 235, .3);
  background: var(--surface);
}
.grid--products[data-view="list"] .card--product:active {
  transform: translateX(2px);
}
.grid--products[data-view="list"] .card__image {
  width: 200px;
  height: 200px;
  flex-shrink: 0;
  border-radius: 12px;
}
.grid--products[data-view="list"] .card__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0;
  min-height: auto;
}
.grid--products[data-view="list"] .card__title {
  font-size: 18px;
  margin-bottom: 8px;
  min-height: auto;
}
.grid--products[data-view="list"] .card__desc {
  font-size: 14px;
  margin-bottom: 12px;
  -webkit-line-clamp: 3;
}
.grid--products[data-view="list"] .card__footer {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.grid--products[data-view="list"] .card__price {
  font-size: 20px;
}
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* En móvil, los formularios en 2 columnas quedan demasiado estrechos */
@media (max-width: 767px) {
  .grid--2 { grid-template-columns: 1fr; }
}

/* Grid responsive con sidebar */
@media (min-width: 1200px) and (max-width: 1399px) {
  .grid--products { 
    grid-template-columns: repeat(3, minmax(0, 1fr)); 
  }
}

@media (min-width: 1400px) {
  .grid--products { 
    grid-template-columns: repeat(4, minmax(0, 1fr)); 
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(17, 24, 39, .03);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.card--product {
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(17, 24, 39, .12);
  border-color: rgba(37, 99, 235, .2);
  text-decoration: none;
}
.card:active {
  transform: translateY(-2px);
}

/* /buscar/ AJAX: estados de carga */
[data-search-filters].is-loading {
  opacity: 0.7;
  pointer-events: none;
}
[data-search-results].is-loading {
  opacity: 0.98;
}

/* Skeleton básico (evita saltos visuales al recargar resultados por AJAX) */
.card--skeleton {
  pointer-events: none;
}
.card--skeleton:hover,
.card--skeleton:active {
  transform: none;
  box-shadow: 0 1px 0 rgba(17, 24, 39, .03);
  border-color: var(--border);
}
.skeleton {
  display: block;
  border-radius: 12px;
  background: linear-gradient(
    90deg,
    rgba(15, 23, 42, 0.06) 0%,
    rgba(15, 23, 42, 0.12) 50%,
    rgba(15, 23, 42, 0.06) 100%
  );
  background-size: 220% 100%;
  animation: shimmer 1.15s ease-in-out infinite;
}
.skeleton--img {
  width: 100%;
  height: 100%;
  min-height: 220px;
}
.skeleton--line {
  height: 14px;
  width: 100%;
}
.skeleton--line.skeleton--line-sm {
  height: 12px;
  width: 70%;
}
.skeleton--price {
  height: 16px;
  width: 96px;
}
.skeleton--pill {
  height: 22px;
  width: 78px;
  border-radius: 999px;
}

@keyframes shimmer {
  0% { background-position: 180% 0; }
  100% { background-position: -180% 0; }
}
.card--product {
  display: flex;
  flex-direction: column;
}
.card__body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 140px;
  flex: 1;
}
.card__title {
  font-weight: 800;
  font-size: 15px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
  color: var(--text);
  margin-bottom: 4px;
}
.card__category {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  opacity: 0.7;
}
.card__desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
  margin-top: 4px;
}
.card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.card__meta { color: var(--muted); font-size: 13px; margin-top: 6px; }
.card__price {
  font-weight: 900;
  color: var(--primary);
  font-size: 18px;
  letter-spacing: -0.3px;
}
.card__price-note {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.card__unit-price {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 800;
  color: rgba(17, 24, 39, .55);
}
.card__image {
  aspect-ratio: 1 / 1;
  /* Fondo neutro para fotos de producto (muchas vienen ya sobre blanco) */
  background: #fff;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  /* Evitar CLS: reservar espacio antes de cargar */
  min-height: 200px;
}
.card__image img {
  width: 100%;
  height: 100%;
  /* En catálogo (material de oficina) preferimos VER el producto completo.
     Con cover muchas fotos se recortan y “se ven mal”. */
  object-fit: contain;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  /* Asegurar que la imagen respete el aspect-ratio del contenedor */
  aspect-ratio: 1 / 1;
}
.card:hover .card__image img {
  transform: scale(1.08);
}
.card__badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
  backdrop-filter: blur(4px);
}
.card__badge--out {
  background: rgba(239, 68, 68, 0.95);
  color: #fff;
}
.card__badge--var {
  background: rgba(37, 99, 235, 0.95);
  color: #fff;
}
/* UX: Badges pequeños y discretos */
.card__badge--out-small {
  background: rgba(239, 68, 68, 0.85);
  color: #fff;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 700;
  top: 8px;
  right: 8px;
}
.card__badge--var-small {
  background: rgba(37, 99, 235, 0.85);
  color: #fff;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 700;
  top: 8px;
  right: 8px;
}
.card__stock {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.card__stock--in {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.card__stock--in::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  display: inline-block;
}
.card__stock--out {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.card__stock--out::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #ef4444;
  border-radius: 50%;
  display: inline-block;
}
/* UX: Estado sin stock discreto */
.card__stock--out-small {
  background: rgba(239, 68, 68, 0.08);
  color: #991b1b;
  border: 1px solid rgba(239, 68, 68, 0.15);
  font-size: 11px;
  padding: 4px 8px;
  font-weight: 600;
}
.card__stock--out-small::before {
  width: 4px;
  height: 4px;
  background: #991b1b;
}

/* Product card actions (selector + add to cart) */
.card__link {
  text-decoration: none;
  color: inherit;
  display: block;
  flex: 1;
}
.card__link:hover {
  text-decoration: none;
}
.card__actions {
  padding: 12px 16px !important;
  border-top: 1px solid var(--border);
  display: flex !important;
  flex-direction: column;
  gap: 8px;
  background: rgba(249, 250, 251, 0.5);
  margin-top: auto;
  visibility: visible !important;
  opacity: 1 !important;
}
.card__variant-select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}
.card__variant-select:hover {
  border-color: rgba(37, 99, 235, .35);
}
.card__variant-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}
.card__variant-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.card__add-btn {
  width: 100%;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.card__add-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.card__add-btn:not(:disabled):hover {
  background: #1d4ed8; /* Azul más oscuro en hover */
  border-color: #1d4ed8;
  color: #fff; /* Asegurar texto blanco en hover */
}

/* Quantity selector in product cards */
.card__qty {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.card__qty-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  display: block;
}
.card__actions .qty__stepper {
  display: grid;
  grid-template-columns: 32px 1fr 32px;
  gap: 6px;
  align-items: center;
  width: 100%;
}
.card__actions .qty__btn {
  height: 32px;
  width: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-size: 16px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: all 0.2s ease;
}
.card__actions .qty__btn:hover {
  background: rgba(37, 99, 235, .08);
  border-color: rgba(37, 99, 235, .35);
  color: var(--primary);
}
.card__actions .qty__input {
  height: 32px;
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  padding: 0;
  background: #fff;
}

/* UX: Tarjetas diferenciadas para sin stock vs en stock */
.card--product--out-of-stock {
  opacity: 0.92;
}
.card--product--out-of-stock .card__image {
  filter: grayscale(15%);
}
.card__actions--out-of-stock {
  gap: 8px;
}
.card__actions--in-stock {
  gap: 8px;
}

/* UX: CTA para alerta de stock */
.card__alert-btn {
  min-height: 48px; /* Mobile-first: CTA táctil */
  font-weight: 700;
  font-size: 14px;
}

/* UX: Sección de cantidad (oculta inicialmente, se muestra al hacer click en "Añadir") */
.card__add-section {
  display: none;
}
.card__add-section[data-add-section] {
  animation: slideDown 0.2s ease;
}
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* UX: Acciones secundarias (favoritos, comparar) */
.card__actions-secondary {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 4px;
}
.btn--icon-only {
  width: 44px; /* Mobile-first: botón táctil mínimo */
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  border-radius: 8px;
  transition: all 0.2s ease;
}
.btn--icon-only:hover {
  background: rgba(37, 99, 235, .08);
  border-color: rgba(37, 99, 235, .35);
  color: var(--primary);
}
.btn--icon-only.is-active {
  background: rgba(37, 99, 235, .12);
  border-color: rgba(37, 99, 235, .35);
  color: var(--primary);
}
.btn--icon-only:active {
  transform: scale(0.95);
}

/* UX: Mobile-first - CTA principal mínimo 48px */
.card__add-btn {
  min-height: 48px; /* Mobile-first: CTA táctil */
  font-weight: 700;
  font-size: 14px;
}

/* UX: Compactar tarjeta para mobile (menos altura) */
@media (max-width: 768px) {
  .card--product .card__body {
    min-height: 120px;
    padding: 12px;
  }
  .card__title {
    font-size: 14px;
    min-height: 2.4em;
  }
  .card__footer {
    padding-top: 6px;
  }
  .card__actions {
    padding: 10px 12px !important;
  }
}

.card--cat {
  padding: 20px;
  transition: all 0.2s ease;
  text-decoration: none;
}
.card--cat:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, .12);
}
.card--cat .card__title {
  font-size: 16px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 8px;
}
.card--cat .card__desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 12px;
}
.card--cat .card__meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.card--cat .card__meta svg {
  transition: transform 0.2s ease;
}
.card--cat:hover .card__meta svg {
  transform: translateX(4px);
}

.img-placeholder {
  color: var(--muted);
  font-size: 12px;
  padding: 12px;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}
.img-placeholder--lg {
  height: 420px;
  display: grid;
  place-items: center;
}
.card__image .img-placeholder {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.6;
}

.page-head {
  margin: 0 0 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.page-head__quick {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.page-head__quick .pill {
  background: var(--surface);
}

/* Guías: hero + “ver más” en categorías relacionadas */
.guide-hero {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.guide-hero img {
  display: block;
  width: 100%;
  height: auto;
}
.pill-more {
  display: inline-flex;
  align-items: center;
}
.pill-more > summary {
  list-style: none;
}
.pill-more > summary::-webkit-details-marker {
  display: none;
}
.pill--more {
  cursor: pointer;
  user-select: none;
  border-style: dashed;
}
.pill-more__list {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pill-more[open] > summary {
  border-color: rgba(37, 99, 235, 0.35);
  color: var(--primary);
}
.page-title {
  margin: 0 0 8px;
  font-size: 32px;
  font-weight: 900;
  color: #111827;
  letter-spacing: -0.5px;
}
.page-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

/* “Leer más” (contenido ampliado SEO sin empujar el catálogo) */
.readmore {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
}
.readmore > summary {
  list-style: none;
}
.readmore > summary::-webkit-details-marker {
  display: none;
}
.readmore__content {
  max-height: 260px;
  overflow: hidden;
  position: relative;
  order: 1;
}
.readmore__content::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 90px;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, var(--surface) 75%);
  pointer-events: none;
}
.readmore.is-open .readmore__content,
.readmore[open] .readmore__content {
  max-height: none;
}
.readmore.is-open .readmore__content::after,
.readmore[open] .readmore__content::after {
  display: none;
}
.readmore__toggle {
  margin-top: 12px;
  order: 2;
}
.readmore__label--less { display: none; }
.readmore[open] .readmore__label--more { display: none; }
.readmore[open] .readmore__label--less { display: inline; }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.panel__title { margin: 0 0 10px; font-size: 16px; font-weight: 900; }
.panel__text { margin: 0; color: var(--muted); }

.field { display: grid; gap: 6px; margin: 10px 0; }
.field__label { font-size: 12px; color: var(--muted); }
.field__input {
  padding: 12px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  background: #fff;
}
.field__input:focus { border-color: rgba(37, 99, 235, .6); box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); }

.product {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 22px;
}
.pdp { display: grid; grid-template-columns: 1fr 420px; gap: 22px; align-items: start; }
.pdp__main { min-width: 0; }
.pdp__head { margin: 4px 0 10px; }
.pdp__title { margin: 0; font-size: 30px; letter-spacing: -0.2px; }
.pdp__meta { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }

.pdp__brand { margin-top: 6px; color: var(--muted); font-weight: 700; font-size: 13px; }

/* PDP móvil: evitar que la buybox quede demasiado abajo */
@media (max-width: 860px) {
  .pdp {
    grid-template-columns: 1fr;
  }
  .pdp__buybox {
    grid-row: 2;
  }
  .pdp__main {
    grid-row: 1;
  }
}

/* PDP móvil: sticky CTA (precio + botón) */
.pdp-sticky {
  display: none;
}
@media (max-width: 767px) {
  body.has-pdp-sticky main.container {
    /* Evita que el sticky tape el final del contenido */
    padding-bottom: 110px;
  }
  .pdp-sticky {
    display: block;
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 1200; /* por encima del header (1000) */
    opacity: 0;
    transform: translateY(140%);
    pointer-events: none;
    transition: transform 0.22s ease, opacity 0.22s ease;
  }
  .pdp-sticky.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .pdp-sticky__inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
  }
  .pdp-sticky__meta {
    flex: 1;
    min-width: 0;
  }
  .pdp-sticky__price {
    font-weight: 900;
    font-size: 16px;
    letter-spacing: -0.2px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .pdp-sticky__stock {
    margin-top: 2px;
    font-size: 12px;
    font-weight: 800;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .pdp-sticky__btn {
    flex: 0 0 auto;
    padding: 12px 14px;
    border-radius: 14px;
    white-space: nowrap;
  }
}

.pdp__badges {
  position: absolute;
  left: 10px;
  top: 10px;
  display: flex;
  gap: 8px;
  z-index: 2;
}
.pdp-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(17, 24, 39, .12);
  color: #111827;
  backdrop-filter: blur(6px);
}
.pdp-badge--in { color: #065f46; border-color: rgba(16, 185, 129, .25); }
.pdp-badge--out { color: #991b1b; border-color: rgba(239, 68, 68, .25); }
.pdp-badge--muted { color: #374151; }

/* Accesibilidad: solo lectores */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Buybox: beneficios + microcopy */
.buybox__benefits {
  margin-top: 12px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid rgba(17, 24, 39, .08);
  border-radius: 14px;
}
.buybox__benefits-title {
  font-weight: 900;
  font-size: 13px;
  color: #111827;
}
.buybox__benefits-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: #111827;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.45;
}
.buybox__social {
  margin-top: 10px;
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}
.buybox__social-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
a.buybox__social-item:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.buybox__microcopy {
  width: 100%;
  margin-top: 10px;
  color: var(--muted);
  font-weight: 800;
  font-size: 12px;
  text-align: center;
}

/* Variantes: swatches */
.field__label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.field__hint { color: var(--muted); font-weight: 700; font-size: 12px; }
.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.swatch {
  appearance: none;
  border: 1px solid rgba(17, 24, 39, .12);
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 900;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1.1;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.swatch:hover { transform: translateY(-1px); box-shadow: 0 10px 18px rgba(17, 24, 39, .08); border-color: rgba(37, 99, 235, .35); }
.swatch.is-active { border-color: rgba(37, 99, 235, .65); box-shadow: 0 12px 22px rgba(37, 99, 235, .14); }
.swatch.is-out,
.swatch:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; transform: none; }
.swatch__label {
  display: inline-block;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.swatch__img {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  border: 1px solid rgba(17, 24, 39, .10);
  background: #fff;
}
.swatch.is-active .swatch__img {
  border-color: rgba(37, 99, 235, .45);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .12);
}
.swatch.is-out .swatch__img,
.swatch:disabled .swatch__img {
  filter: grayscale(1);
}
.swatch__meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  border: 1px solid rgba(17, 24, 39, .12);
  background: rgba(17, 24, 39, .04);
  color: rgba(17, 24, 39, .75);
  flex-shrink: 0;
}
.swatch__meta--out {
  border-color: rgba(239, 68, 68, .28);
  background: rgba(239, 68, 68, .10);
  color: #dc2626;
}
.swatch__meta--low {
  border-color: rgba(245, 158, 11, .30);
  background: rgba(245, 158, 11, .12);
  color: #92400e;
}
.swatch.is-out {
  border-color: rgba(239, 68, 68, .22);
  background: rgba(239, 68, 68, .04);
}
.swatch.is-out .swatch__label {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(239, 68, 68, .55);
}

/* PDP: swatches compactos en móvil (menos altura, scroll horizontal) */
@media (max-width: 767px) {
  .swatches {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    gap: 6px;
  }
  .swatches::-webkit-scrollbar { display: none; }
  .swatch {
    flex: 0 0 auto;
    padding: 8px 10px;
    font-size: 12px;
    border-radius: 999px;
  }
  .swatch__img {
    width: 24px;
    height: 24px;
    border-radius: 8px;
  }
  /* En móvil, el badge de “Solo X” añade mucho ruido visual */
  .swatch__meta--low { display: none; }
}

/* Secciones PDP post-fold */
.pdp-section { margin-top: 18px; }
.pdp-list { margin: 10px 0 0; padding-left: 18px; }
.pdp-list li { margin: 6px 0; }
.pdp-compat { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pdp-compat__col { padding: 12px; border: 1px solid rgba(17, 24, 39, .08); border-radius: 14px; background: #fff; }
.pdp-compat__title { font-weight: 900; font-size: 13px; color: #111827; }
@media (max-width: 980px) {
  .pdp-compat { grid-template-columns: 1fr; }
}

/* Descripción optimizada (SEO + UX) */
.pdp-seo {
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid rgba(17, 24, 39, .08);
  border-radius: 16px;
  margin: 0 0 14px;
}
.pdp-seo__intro {
  margin: 0 0 10px;
  font-weight: 900;
  color: #111827;
}
.pdp-seo h3 {
  margin: 12px 0 6px;
  font-size: 14px;
  font-weight: 950;
  color: #111827;
}
.pdp-seo ul {
  margin: 8px 0 0;
}

/* Cross-sell: esenciales */
.pdp-essentials { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pdp-essentials__card {
  display: block;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(17, 24, 39, .08);
  background: #fff;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.pdp-essentials__card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(17, 24, 39, .08); border-color: rgba(37, 99, 235, .25); }
.pdp-essentials__title { font-weight: 950; color: #111827; }
.pdp-essentials__text { margin-top: 6px; color: var(--muted); font-weight: 700; font-size: 13px; line-height: 1.35; }
@media (max-width: 980px) {
  .pdp-essentials { grid-template-columns: 1fr; }
}

/* Confianza final */
.pdp-trust {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
@media (max-width: 980px) {
  .pdp-trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.product__gallery { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; }
.pdp__gallery { position: relative; }
.product__gallery-main {
  aspect-ratio: 1 / 1;
  background: #fff;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  padding: 12px;
}
.product__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.3s ease;
}
@media (hover: hover) and (pointer: fine) {
  .product__gallery-main { cursor: zoom-in; }
  .product__gallery-main:hover .product__image { transform: scale(1.03); }
}

@media (max-width: 640px) {
  .product__gallery-main { padding: 8px; }
  /* PDP móvil: galería a ancho completo (evita sensación de “no responsive”) */
  .pdp__gallery {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
  .pdp__gallery .product__gallery-main {
    border-radius: 0;
  }
  .pdp__gallery .product__thumbs {
    padding-left: 16px;
    padding-right: 16px;
  }
}
.pdp__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(17, 24, 39, .10);
  background: rgba(255,255,255,.95);
  box-shadow: 0 8px 20px rgba(17, 24, 39, .12);
  cursor: pointer;
  line-height: 1;
  color: #111827;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 900;
  transition: all 0.2s ease;
  z-index: 10;
}
.pdp__nav:hover {
  background: rgba(255,255,255,1);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-50%) scale(1.05);
}
.pdp__nav:active {
  transform: translateY(-50%) scale(0.95);
}
.pdp__nav--prev { left: 14px; }
.pdp__nav--next { right: 14px; }
.pdp__counter {
  position: absolute;
  left: 14px;
  bottom: 14px;
  font-size: 12px;
  font-weight: 800;
  color: rgba(17, 24, 39, .75);
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(17, 24, 39, .10);
  padding: 6px 10px;
  border-radius: 999px;
}

/* PDP: botón visible para ampliar la galería (especialmente útil en móvil) */
.pdp__zoom {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 11;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(17, 24, 39, .10);
  background: rgba(255,255,255,.92);
  color: #111827;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(17, 24, 39, .12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform .15s ease, border-color .15s ease, color .15s ease;
}
.pdp__zoom:hover {
  text-decoration: none;
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}
.pdp__zoom:active {
  transform: translateY(0);
}
.pdp__zoom:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .18), 0 8px 20px rgba(17, 24, 39, .12);
}
@media (max-width: 640px) {
  .pdp__zoom {
    top: 10px;
    right: 10px;
  }
}

/* PDP lightbox */
.pdp-lightbox {
  width: min(980px, calc(100% - 24px));
  border: none;
  padding: 0;
  border-radius: 18px;
  background: #000;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(17, 24, 39, .35);
}
.pdp-lightbox::backdrop {
  background: rgba(17, 24, 39, .72);
  backdrop-filter: blur(2px);
}
.pdp-lightbox__img {
  width: 100%;
  height: min(78vh, 760px);
  object-fit: contain;
  display: block;
  background: #000;
}
.pdp-lightbox__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(0, 0, 0, .35);
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.pdp-lightbox__close:hover {
  background: rgba(0, 0, 0, .55);
  border-color: rgba(255, 255, 255, .35);
}
.pdp-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(0, 0, 0, .35);
  color: #fff;
  cursor: pointer;
  line-height: 1;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 900;
}
.pdp-lightbox__nav:hover {
  background: rgba(0, 0, 0, .55);
  border-color: rgba(255, 255, 255, .35);
}
.pdp-lightbox__nav--prev { left: 14px; }
.pdp-lightbox__nav--next { right: 14px; }
.pdp-lightbox__counter {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  color: rgba(255, 255, 255, .92);
  background: rgba(0, 0, 0, .35);
  border: 1px solid rgba(255, 255, 255, .18);
}
.product__thumbs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--border);
  background: #fff;
}
.product__thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.product__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product__thumb:hover { transform: translateY(-1px); border-color: rgba(37, 99, 235, .35); box-shadow: 0 6px 14px rgba(17, 24, 39, .08); }
.product__thumb.is-active { border-color: rgba(37, 99, 235, .65); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.product__info { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 18px; }
/* Override .product__info cuando es .pdp__buybox */
.product__info.pdp__buybox {
  background: #fff;
  border: none;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 18px 40px rgba(17, 24, 39, .10);
  position: sticky;
  top: calc(var(--site-header-height, 72px) + 12px);
  align-self: start;
  margin: 0;
}
.product__title { margin: 0 0 10px; font-size: 22px; }
.product__meta { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { font-size: 12px; color: var(--muted); border: 1px solid var(--border); padding: 6px 10px; border-radius: 999px; display: inline-flex; align-items: center; }
.pill--success { background: rgba(16, 185, 129, 0.10); color: #059669; border-color: rgba(16, 185, 129, 0.25); }
.pill--danger { background: rgba(239, 68, 68, 0.10); color: #dc2626; border-color: rgba(239, 68, 68, 0.25); }
.pill--primary { background: rgba(37, 99, 235, 0.10); color: #2563eb; border-color: rgba(37, 99, 235, 0.25); font-weight: 800; }
.pill--inactive { background: rgba(17, 24, 39, 0.04); color: var(--muted); border-color: rgba(17, 24, 39, 0.10); }
.pill--tpd { background: rgba(37, 99, 235, 0.10); color: #2563eb; border-color: rgba(37, 99, 235, 0.25); font-weight: 600; }
.pill--tracking { background: rgba(139, 92, 246, 0.10); color: #7c3aed; border-color: rgba(139, 92, 246, 0.25); font-weight: 600; }
.product__price { font-size: 26px; font-weight: 900; color: var(--primary); margin: 12px 0; }
.product__price-note {
  display: block;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--muted);
  margin-top: 0.25rem;
}
.product__stock-info {
  padding: 0.5rem;
  margin-top: 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
}
.product__attributes { margin: 16px 0; padding: 16px; background: #f9fafb; border-radius: var(--radius); }
.product__variants { margin: 16px 0; padding: 16px; background: #f0f9ff; border: 1px solid rgba(37, 99, 235, .2); border-radius: var(--radius); }
.product__variants-note { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.h3 { margin: 0 0 12px; font-size: 14px; font-weight: 800; }
.attrs { display: grid; gap: 8px; margin: 0; }
.attr { display: grid; grid-template-columns: 140px 1fr; gap: 8px; align-items: start; }
.attr__key { margin: 0; font-weight: 600; font-size: 13px; color: var(--muted); }
.attr__value { margin: 0; font-size: 13px; color: var(--text); }
.product__desc { margin-top: 16px; }
.h2 { margin: 0 0 10px; font-size: 16px; }
.prose {
  color: #374151;
  line-height: 1.7;
}
.prose ul,
.prose ol {
  padding-left: 24px;
  margin: 12px 0;
}
.prose li {
  margin: 8px 0;
}
.prose strong {
  font-weight: 800;
  color: #111827;
}
.muted { color: var(--muted); }

.pdp__buybox .product__trust {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0 0;
}
.trust {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
}
.trust__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--primary);
  stroke-width: 2;
}
.trust__text { font-size: 12px; font-weight: 700; color: #374151; }

/* Productos relacionados */
.related-products {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.related-products .section__title {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 24px;
  color: #111827;
}

/* Tabs PDP */
.product-tabs { margin-top: 18px; }
.tabs {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.tabs__nav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  background: #fff;
}
.tabs__tab {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 12px 14px;
  font-weight: 800;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.tabs__tab.is-active {
  color: var(--text);
  border-bottom-color: var(--primary);
}
.tabs__panes {
  padding: 20px;
  min-height: 120px;
}
.tabs__pane { display: none; }
.tabs__pane.is-active {
  display: block;
  animation: fadeIn 0.3s ease;
}
/* PDP tabs: móvil (nav sticky + scroll horizontal) */
@media (max-width: 767px) {
  .tabs__nav {
    position: sticky;
    top: calc(var(--site-header-height, 72px) + 8px);
    z-index: 120; /* por encima del contenido, por debajo del header (1000) */
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }
  .tabs__nav::-webkit-scrollbar { display: none; }
  .tabs__tab {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  /* Al saltar por hash (#tab-attrs, etc), evitar que el header lo tape */
  .tabs__tab[id^="tab-"] {
    scroll-margin-top: calc(var(--site-header-height, 72px) + 12px);
  }
  .tabs__pane[id^="pane-"] {
    scroll-margin-top: calc(var(--site-header-height, 72px) + 64px);
  }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.attrs--wide .attr { grid-template-columns: 200px 1fr; }

/* Notificación de carrito */
.cart-notification {
  position: fixed;
  top: 100px;
  right: 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(17, 24, 39, .15);
  padding: 16px 20px;
  z-index: 10000;
  transform: translateX(400px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 320px;
}
.cart-notification--show {
  transform: translateX(0);
  opacity: 1;
}
.cart-notification__content {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cart-notification__icon {
  width: 20px;
  height: 20px;
  color: #22c55e;
  flex-shrink: 0;
}
.cart-notification--info .cart-notification__icon { color: var(--primary); }
.cart-notification--error .cart-notification__icon { color: #ef4444; }
.cart-notification__text {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}
.cart-notification__headline { font-weight: 900; }
.cart-notification__sub { font-size: 13px; font-weight: 700; }
.cart-notification__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 12px;
  flex-wrap: wrap;
}

/* Validación visual (reutilizable) */
input.is-invalid,
select.is-invalid,
textarea.is-invalid {
  border-color: rgba(239, 68, 68, .65) !important;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, .12) !important;
}

/* Confirm modal (simple y consistente) */
.ui-dialog {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0;
  width: min(560px, calc(100% - 32px));
  box-shadow: 0 20px 60px rgba(17, 24, 39, .22);
}
.ui-dialog::backdrop {
  background: rgba(17, 24, 39, .45);
}
.ui-dialog__inner {
  background: var(--surface);
  padding: 18px;
}
.ui-dialog__title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 900;
}
.ui-dialog__text { margin: 0; color: var(--muted); }
.ui-dialog__field { margin-top: 12px; display: grid; gap: 6px; }
.ui-dialog__label { font-size: 13px; font-weight: 900; color: var(--text); }
.ui-dialog__input {
  width: 100%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
}
.ui-dialog__input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}
.ui-dialog__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
}

@media (max-width: 640px) {
  .cart-notification {
    top: 80px;
    right: 16px;
    left: 16px;
    max-width: none;
    transform: translateY(-100px);
  }
  .cart-notification--show {
    transform: translateY(0);
  }
}

/* Sticky buybox en desktop - ahora manejado por .product__info.pdp__buybox */
.buybox__top {
  margin-bottom: 16px;
}
.buybox__row--top {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding: 20px;
  background: rgba(17, 24, 39, .02);
  border: 1px solid rgba(17, 24, 39, .08);
  border-radius: 16px;
  margin-bottom: 0;
}
.buybox__variant-col {
  flex: 0 0 calc(50% - 8px);
  min-width: 0;
  box-sizing: border-box;
}
.buybox__variant-col .field {
  width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}
.buybox__qty-col .qty {
  width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}
.buybox__variant-col .field__label,
.buybox__qty-col .qty__label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 8px;
  display: block;
  height: 14px;
  line-height: 14px;
}
.buybox__variant-col .field__input {
  width: 100%;
  box-sizing: border-box;
  font-size: 14px;
  font-weight: 600;
  padding: 0 16px;
  height: 48px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  transition: all 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
.buybox__variant-col .field__input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .1);
  outline: none;
}
.buybox__variant-col .field__input:hover {
  border-color: rgba(37, 99, 235, .4);
}
.buybox__qty-col {
  flex: 0 0 calc(50% - 8px);
  min-width: 0;
  box-sizing: border-box;
}
.buybox__qty-col--full {
  flex: 1 1 100%;
  max-width: 100%;
}
.buybox__qty-row { flex: 1; min-width: 0; }
.pdp__buybox .buybox__qty-col .qty {
  width: 100%;
  max-width: 100%;
}
.buybox__stock-row {
  font-size: 12px;
  font-weight: 800;
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.buybox__delivery {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(34, 197, 94, .08);
  border: 1px solid rgba(34, 197, 94, .2);
  border-radius: 12px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.buybox__delivery:hover {
  text-decoration: none;
  transform: translateY(-1px);
  border-color: rgba(34, 197, 94, .35);
  box-shadow: 0 10px 18px rgba(17, 24, 39, .08);
}
.buybox__delivery:active {
  transform: translateY(0);
}
.buybox__delivery:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .18), 0 10px 18px rgba(17, 24, 39, .08);
}
.buybox__delivery-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(34, 197, 94, .15);
  color: #22c55e;
  flex-shrink: 0;
}
.buybox__delivery-icon svg {
  width: 18px;
  height: 18px;
}
.buybox__delivery-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.buybox__delivery-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(17, 24, 39, .6);
}
.buybox__delivery-date {
  font-size: 14px;
  font-weight: 800;
  color: #16a34a;
}
.buybox__stock { font-size: 12px; font-weight: 800; color: #2563eb; display: inline-flex; align-items: center; gap: 8px; }
.buybox__stock--in { color: #2563eb; }
.buybox__stock--out { color: #dc2626; }
.buybox__stock--na { color: var(--muted); }
.buybox__stock-dot { width: 8px; height: 8px; border-radius: 999px; display: inline-block; }
.buybox__stock-dot--in { background: #22c55e; }
.buybox__stock-dot--out { background: #ef4444; }
.buybox__stock-dot--na { background: #94a3b8; }
.buybox__fav {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: all 0.2s ease;
}
.buybox__fav:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}
.buybox__fav.is-active {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #ef4444;
}
.buybox__fav.is-active svg {
  fill: rgba(239, 68, 68, 0.10);
}
.buybox__fav svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}
.buybox__price {
  font-size: 36px;
  font-weight: 900;
  color: #111827;
  margin: 0 0 16px;
  line-height: 1.2;
  letter-spacing: -0.5px;
}
.buybox__price .product__price-note {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 4px;
  letter-spacing: 0;
}
.buybox__unit-price {
  margin: -10px 0 14px;
  font-size: 13px;
  font-weight: 800;
  color: rgba(17, 24, 39, .60);
}
.buybox__form .field__input { border-radius: 14px; }
.buybox__form { margin: 0; }
.buybox__actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}
.buybox__actions .btn--block {
  width: 100%;
}
.buybox__actions .buybox__fav {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
}

/* Botón favoritos en cards */
.fav-btn {
  padding: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.fav-btn:hover {
  background: rgba(239, 68, 68, 0.10);
  border-color: rgba(239, 68, 68, 0.30);
  color: #ef4444;
}
.fav-btn.is-active {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #ef4444;
}
.buybox__row--top .field--compact { margin: 0; }
.field--compact { margin: 0; }
.buybox__row { margin: 16px 0; }
.buybox__row--qty { margin-top: 0; margin-bottom: 16px; }
.pdp__buybox .qty { width: 100%; }
.pdp__buybox .buybox__top .qty { margin: 0; }
.qty__presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.qty__preset-btn {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  transition: all 0.2s ease;
  line-height: 1;
}
.qty__preset-btn:hover {
  border-color: rgba(37, 99, 235, .35);
  background: rgba(37, 99, 235, .06);
  color: var(--primary);
}
.qty__preset-btn.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.qty__preset-btn--more {
  border-style: dashed;
}
.pdp__buybox .qty__stepper {
  display: flex;
  gap: 6px;
  align-items: center;
  width: 100%;
}
.pdp__buybox .qty__btn {
  height: 48px;
  width: 42px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.2s ease;
  color: var(--text);
  flex-shrink: 0;
}
.pdp__buybox .qty__btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: scale(1.05);
}
.pdp__buybox .qty__btn:active {
  transform: scale(0.95);
}
.pdp__buybox .qty__input {
  height: 48px;
  flex: 1;
  min-width: 0;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  padding: 0;
  box-sizing: border-box;
}

/* Cards de highlights */
.pdp__highlights {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.pdp-card {
  background: #fff;
  border: 1px solid rgba(17, 24, 39, .08);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 22px rgba(17, 24, 39, .06);
  transition: all 0.2s ease;
}
.pdp-card:hover {
  border-color: rgba(37, 99, 235, .2);
  box-shadow: 0 12px 28px rgba(17, 24, 39, .1);
  transform: translateY(-2px);
}
.pdp-card__label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.pdp-card__value {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 900;
  color: #111827;
  line-height: 1.3;
}
.pdp__all {
  display: inline-flex;
  margin-top: 12px;
  font-weight: 800;
  font-size: 13px;
  color: var(--primary);
  transition: all 0.2s ease;
  text-decoration: none;
}
.pdp__all:hover {
  color: var(--accent);
  text-decoration: underline;
}

@media (max-width: 980px) {
  .pdp { grid-template-columns: 1fr; }
  .pdp__title { font-size: 24px; }
  .pdp__highlights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .buybox__price { font-size: 32px; }
  /* En tablet/móvil, primero galería y debajo buybox (más natural para PDP) */
  .pdp__main { grid-row: 1; }
  .pdp__buybox { grid-row: 2; }
  .product__info.pdp__buybox {
    position: relative;
    top: 0;
    margin-top: 0;
  }
  .buybox__row--top {
    flex-wrap: wrap;
  }
  .buybox__variant-col {
    flex: 1 1 100%;
    min-width: 0;
    max-width: 100%;
  }
  .buybox__qty-col {
    flex: 1 1 100%;
    min-width: 0;
    max-width: 100%;
  }
  .buybox__actions {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .buybox__actions .btn--block {
    width: 100%;
  }
  .pdp__buybox .product__trust {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 640px) {
  .pdp__title { font-size: 20px; }
  .pdp__highlights { grid-template-columns: 1fr; }
  .buybox__price { font-size: 28px; }
  .buybox__qty-col {
    width: 100%;
  }
  .buybox__row--top {
    gap: 8px;
  }
  .buybox__actions {
    grid-template-columns: 1fr;
  }
  .buybox__actions .buybox__fav {
    width: 100%;
    height: 44px;
  }
  .product__thumbs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Cart */
.cart {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: start;
}
.cart__items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cart-item {
  display: grid;
  grid-template-columns: 120px 1fr auto auto;
  gap: 20px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  align-items: start;
  transition: box-shadow 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}
.cart-item.is-removing {
  opacity: 0;
  transform: translateY(6px);
}
.cart-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.cart-item__image {
  width: 120px;
  height: 120px;
  overflow: hidden;
  border-radius: var(--radius);
  background: #f9fafb;
  flex-shrink: 0;
}
.cart-item__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cart-item__image a {
  display: block;
  width: 100%;
  height: 100%;
}
.img-placeholder--sm {
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}
.cart-item__img {
  width: 120px;
  height: 120px;
  overflow: hidden;
  border-radius: var(--radius);
  background: #f9fafb;
  flex-shrink: 0;
}
.cart-item__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cart-item__info {
  flex: 1;
  min-width: 0;
}
.cart-item__title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.3;
}
.cart-item__title a {
  color: var(--text);
  text-decoration: none;
}
.cart-item__title a:hover {
  color: var(--primary);
}
.cart-item__variant,
.cart-item__meta,
.cart-item__sku {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0;
}
.cart-item__price {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cart-item__price-unit {
  font-size: 14px;
  color: var(--muted);
}
.cart-item__price-total {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.cart-item__quantity,
.cart-item__qty {
  display: flex;
  align-items: center;
}
.cart-item__qty-form,
.cart-item__qtyform {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cart-item__qty-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cart-item__qty-label-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
}
.cart-item__qty-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}
.cart-item__qty-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 6px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: var(--text);
}
.cart-item__qty-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.cart-item__qty-input {
  width: 60px;
  height: 32px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  padding: 0 8px;
}
.cart-item__qty-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}
.cart-item__remove {
  display: flex;
  align-items: flex-start;
}
.cart-item__total {
  font-weight: 900;
  text-align: right;
  font-size: 18px;
}
.btn--sm {
  padding: 8px 12px;
  font-size: 14px;
  min-height: 32px;
}
.btn--link {
  background: none;
  border: none;
  color: var(--muted);
  padding: 8px 0;
  font-size: 14px;
  text-decoration: underline;
  cursor: pointer;
}
.btn--link:hover {
  color: var(--primary);
}

/* Cart: barra sticky móvil (Total + CTA) */
.cart-mobile-bar {
  display: none;
}
@media (max-width: 767px) {
  body.has-cart-mobile-bar main.container {
    padding-bottom: 110px;
  }
  .cart-mobile-bar {
    display: block;
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 998;
  }
  .cart-mobile-bar__inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
  }
  .cart-mobile-bar__meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .cart-mobile-bar__label {
    font-size: 12px;
    font-weight: 800;
    color: var(--muted);
  }
  .cart-mobile-bar__total {
    font-size: 16px;
    font-weight: 950;
    letter-spacing: -0.2px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .cart-mobile-bar__btn {
    flex: 0 0 auto;
    padding: 12px 14px;
    border-radius: 14px;
    white-space: nowrap;
  }
}

/* Checkout: pasos (Carrito → Datos → Pago) */
.checkout-steps {
  margin-top: 10px;
}
.checkout-steps__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.checkout-steps__sep {
  color: var(--muted);
  font-weight: 900;
}

/* Checkout: barra sticky móvil (Total + CTA) */
.checkout-mobile-bar {
  display: none;
}
@media (max-width: 767px) {
  body.has-checkout-mobile-bar main.container {
    padding-bottom: 110px;
  }
  .checkout-mobile-bar {
    display: block;
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 998;
  }
  .checkout-mobile-bar__inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
  }
  .checkout-mobile-bar__meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .checkout-mobile-bar__label {
    font-size: 12px;
    font-weight: 800;
    color: var(--muted);
  }
  .checkout-mobile-bar__total {
    font-size: 16px;
    font-weight: 950;
    letter-spacing: -0.2px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .checkout-mobile-bar__btn {
    flex: 0 0 auto;
    padding: 12px 14px;
    border-radius: 14px;
    white-space: nowrap;
  }
}

.cart__summary {
  position: sticky;
  top: 20px;
}
.cart-summary,
.summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.cart-summary__title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.cart-summary__row,
.summary__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  font-size: 14px;
}
.cart-summary__row--total {
  border-top: 2px solid var(--border);
  margin-top: 8px;
  padding-top: 16px;
  font-size: 18px;
  font-weight: 700;
}
.cart-summary__label {
  color: var(--muted);
}
.cart-summary__value {
  font-weight: 600;
  color: var(--text);
}
.cart-summary__value--total {
  font-size: 24px;
  color: var(--primary);
}
.cart-summary__checkout {
  margin-top: 24px;
  margin-bottom: 12px;
}
.cart-summary__clear {
  margin-top: 16px;
  text-align: center;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.cart-summary__note {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 900;
  background: rgba(37, 99, 235, .06);
  border: 1px solid rgba(37, 99, 235, .18);
  color: #1e3a8a;
}
.cart-summary__note--free {
  background: rgba(16, 185, 129, .10);
  border-color: rgba(16, 185, 129, .28);
  color: #065f46;
}

.cart-summary__progress {
  margin-top: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(17, 24, 39, .10);
  overflow: hidden;
}
.cart-summary__progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: rgba(37, 99, 235, .85);
  transition: width 0.25s ease;
}
.cart-summary__progress.is-free .cart-summary__progress-fill {
  background: rgba(16, 185, 129, .90);
}

.empty-state {
  text-align: center;
  padding: 80px 20px;
  max-width: 600px;
  margin: 60px auto;
  background: var(--surface);
  border: 1px dashed rgba(107, 114, 128, .2);
  border-radius: 20px;
}
.empty-state__icon {
  font-size: 72px;
  margin-bottom: 24px;
  opacity: 0.6;
  filter: grayscale(0.3);
}
.empty-state__title {
  font-size: 28px;
  font-weight: 900;
  margin: 0 0 12px;
  color: var(--text);
  letter-spacing: -0.3px;
}
.empty-state__text {
  font-size: 16px;
  color: var(--muted);
  margin: 0 0 32px;
  line-height: 1.6;
}
.empty-state__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.empty {
  background: var(--surface);
  border: 1px dashed rgba(107, 114, 128, .35);
  border-radius: var(--radius);
  padding: 18px;
  color: var(--muted);
  text-align: center;
  grid-column: 1 / -1;
}

/* Layout de categoría con sidebar */
.category-layout {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  margin-top: 24px;
}

.category-sidebar {
  flex: 0 0 280px;
  position: sticky;
  top: calc(var(--site-header-height, 72px) + 12px);
  max-height: calc(100vh - (var(--site-header-height, 72px) + 24px));
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 100;
  background: var(--surface);
  border-radius: 12px;
}

.category-content {
  flex: 1;
  min-width: 0;
  position: relative;
  width: 100%;
}

/* /buscar/: layout tablet/desktop (sidebar + resultados) */
.search-layout {
  display: block;
  margin-top: 18px;
}
.search-layout__filters {
  position: relative;
}
.search-layout__main {
  min-width: 0;
}
@media (min-width: 981px) {
  .search-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
  }
  .search-layout__filters {
    position: sticky;
    top: calc(var(--site-header-height, 72px) + 12px);
    align-self: start;
  }
  /* En sidebar, apilamos los controles (evita wrap raro) */
  .search-layout__filters .filters__top {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .search-layout__filters .filters__controls {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
}

/* Botón fijo para móvil */
.filters-mobile-toggle {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
}
.filters-mobile-toggle:hover {
  background: #1d4ed8;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
  transform: translateY(-2px);
}
.filters-mobile-toggle:active {
  transform: translateY(0);
}
.filters-mobile-toggle.is-hidden {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}
.filters-mobile-toggle svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.filters-mobile-toggle__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: #fff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}
.filters-mobile-toggle__meta {
  font-size: 12px;
  font-weight: 900;
  opacity: 0.9;
}

/* /buscar/ móvil: barra inferior (Filtros + Ordenar) + sheet de ordenar */
.search-mobile-bar {
  display: none;
}
.search-filters-summary {
  position: relative;
}
.search-facets-quick {
  margin-top: 10px;
}
.search-facets-quick__heading {
  font-size: 12px;
  font-weight: 900;
  color: var(--muted);
  margin: 0 0 6px;
  letter-spacing: -0.2px;
}
.search-facets-quick__chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 0 6px;
  -webkit-overflow-scrolling: touch;
}
.search-facets-quick__chips::-webkit-scrollbar {
  display: none;
}
.search-chip.is-active {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.35);
  color: var(--primary);
}
.filters__brand-search {
  margin-bottom: 8px;
}
.filters__brand-chips {
  overflow-x: hidden;
  overflow-y: visible;
  flex-wrap: wrap;
}
.filters__facet-empty {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}
.sort-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.sort-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}
.sort-sheet {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  transform: translateY(110%);
  opacity: 0;
  pointer-events: none;
  background: var(--surface);
  border-radius: 18px 18px 0 0;
  border-top: 1px solid var(--border);
  box-shadow: 0 -14px 30px rgba(0, 0, 0, 0.18);
  z-index: 999;
  transition: transform 0.25s ease, opacity 0.25s ease;
  max-height: 72vh;
  overflow: auto;
  padding: 14px 16px calc(18px + env(safe-area-inset-bottom));
}
.sort-sheet.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.sort-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}
.sort-sheet__title {
  font-size: 16px;
  font-weight: 900;
}
.sort-sheet__close {
  width: 38px;
  height: 38px;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.sort-sheet__options {
  display: grid;
  gap: 10px;
}
.sort-sheet__option {
  width: 100%;
  text-align: left;
  padding: 14px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}
.sort-sheet__option.is-active {
  border-color: rgba(37, 99, 235, 0.45);
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary);
}

/* Overlay para móvil */
.filters-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.filters-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* Botón cerrar en drawer móvil */
.filters__close {
  display: none;
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 50%;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
}
.filters__close:hover {
  background: rgba(0, 0, 0, 0.1);
}
.filters__close svg {
  width: 20px;
  height: 20px;
  color: var(--text);
}
.category-content.is-loading {
  opacity: 0.6;
  pointer-events: none;
}
.category-content.is-loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}
.category-content.is-loading::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  z-index: 11;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.filters {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.filters__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.filters__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.filters__active-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}
.filters__results-count {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 20px;
  padding: 12px;
  background: rgba(37, 99, 235, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(37, 99, 235, 0.1);
}
.filters__results-number {
  font-size: 24px;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}
.filters__results-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}
.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  flex-wrap: wrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.category-header__results {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 200px;
}
.category-header__controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
.filters__saved {
  display: flex;
  align-items: center;
  gap: 8px;
}
.filters__results {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.filters__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.filters__controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.filters__actions-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 0;
  width: 100%;
  justify-content: flex-start;
}
.filters__count {
  font-size: 15px;
  color: var(--text);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}
.filters__count strong {
  font-size: 18px;
  color: var(--primary);
  font-weight: 900;
}
.filters__count::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.filters__range {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.filters__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.filters__quick {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

/* Estilos para botones de filtros rápidos */
.card--filter {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
}
.card--filter:hover {
  border-color: var(--primary);
  background: rgba(37, 99, 235, 0.05);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}
.card--filter.is-active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}
.card--filter.is-active .card__title,
.card--filter.is-active .card__meta {
  color: #fff;
}
.card--filter .card__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
}
.card--filter .card__meta {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  line-height: 1.4;
  opacity: 0.8;
}
.card--filter.is-active .card__meta {
  opacity: 0.9;
}

/* Filtro de precio con slider */
.filters__price {
  margin-bottom: 24px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.filters__price-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.filters__price-range {
  font-weight: 500;
  color: var(--primary);
  font-size: 14px;
}

.filters__price-slider-wrapper {
  position: relative;
  margin-bottom: 16px;
  height: 40px;
  --min-percent: 0%;
  --max-percent: 100%;
}

.filters__price-slider {
  position: absolute;
  width: 100%;
  height: 6px;
  top: 50%;
  transform: translateY(-50%);
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  pointer-events: none;
  z-index: 2;
  margin: 0;
  padding: 0;
}

.filters__price-slider--min {
  z-index: 3;
}

.filters__price-slider--max {
  z-index: 3;
}

.filters__price-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  pointer-events: all;
  border: 2px solid var(--surface);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  position: relative;
  z-index: 4;
}

.filters__price-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.filters__price-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  pointer-events: all;
  border: 2px solid var(--surface);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  position: relative;
  z-index: 4;
}

.filters__price-slider::-moz-range-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.filters__price-slider::-webkit-slider-runnable-track {
  background: transparent;
}

.filters__price-slider::-moz-range-track {
  background: transparent;
}

.filters__price-slider-wrapper::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  transform: translateY(-50%);
  z-index: 1;
}

.filters__price-slider-wrapper::after {
  content: '';
  position: absolute;
  top: 50%;
  left: var(--min-percent, 0%);
  right: calc(100% - var(--max-percent, 100%));
  height: 6px;
  background: var(--primary);
  border-radius: 3px;
  transform: translateY(-50%);
  z-index: 1;
  pointer-events: none;
}

.filters__price-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filters__price-input-number {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  background: var(--surface);
  color: var(--text);
  transition: all 0.2s ease;
}

.filters__price-input-number:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filters__price-separator {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 14px;
  flex-shrink: 0;
}

.filters__quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.filters__quick-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.filters__quick-btn span {
  font-size: 12px;
  opacity: 0.8;
}
.filters__quick-btn:hover {
  border-color: var(--primary);
  background: rgba(37, 99, 235, 0.05);
  color: var(--primary);
}
.filters__quick-btn.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.filters__quick-btn.is-active svg,
.filters__quick-btn.is-active span {
  color: #fff;
  opacity: 1;
}
.filters__clear {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.filters__clear svg {
  width: 16px;
  height: 16px;
}
.filters__clear:hover {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.05);
  color: #dc2626;
}
.filters__attributes {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.filters__clear-section {
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}
.filters__clear-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  width: 100%;
  justify-content: center;
}
.filters__clear-btn:hover {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.05);
  color: #dc2626;
}

/* "Más filtros" (plegable) */
.filters__more {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
  width: 100%;
  margin-top: 8px;
}
.filters__more-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}
.filters__more summary::-webkit-details-marker { display: none; }
.filters__more-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(37, 99, 235, .12);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}
.filters__more-body {
  padding: 16px;
  border-top: 1px solid var(--border);
}
.filters__more-body .filters__attributes {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

/* Grid de "tarjetas" para filtros de atributos */
.grid--filter-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
@media (max-width: 980px) {
  .grid--filter-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.card--filter-cat {
  padding: 16px;
  box-shadow: 0 1px 0 rgba(17, 24, 39, .03);
}
.card--filter-cat:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(17, 24, 39, .10);
}
.card__title--filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 900;
  min-height: auto; /* override de card__title */
  -webkit-line-clamp: unset;
}
.filters__attr-values--card {
  padding-top: 0;
  max-height: 132px; /* evita tarjetas gigantes */
  overflow: auto;
}
.filters__attr-values--card::-webkit-scrollbar { height: 6px; width: 6px; }
.filters__attr-values--card::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }
.filters__attr-values--card::-webkit-scrollbar-track { background: transparent; }

/* Chips de filtros activos */
.filters__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 20px;
  border: 1.5px solid rgba(37, 99, 235, 0.2);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(37, 99, 235, 0.12) 100%);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.08);
  position: relative;
  overflow: hidden;
}

.filter-chip::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.filter-chip:hover::before {
  left: 100%;
}

.filter-chip:hover {
  border-color: rgba(37, 99, 235, 0.4);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12) 0%, rgba(37, 99, 235, 0.16) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.15);
}

.filter-chip:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.1);
}

.filter-chip__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.8;
}

.filter-chip__icon svg {
  width: 14px;
  height: 14px;
}

.filter-chip__label {
  font-weight: 700;
  letter-spacing: -0.2px;
  white-space: nowrap;
}

.filter-chip__remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 2px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.15);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.filter-chip__remove svg {
  width: 10px;
  height: 10px;
  opacity: 0.7;
}

.filter-chip:hover .filter-chip__remove {
  background: rgba(37, 99, 235, 0.25);
  transform: rotate(90deg);
}

.filter-chip:hover .filter-chip__remove svg {
  opacity: 1;
}

.filter-chip--price {
  border-color: rgba(37, 99, 235, 0.25);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(37, 99, 235, 0.14) 100%);
}

.filter-chip--price .filter-chip__icon {
  color: var(--primary);
}
.filters__attr-group {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}
.filters__attr-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
  text-align: left;
}
.filters__attr-toggle:hover {
  background: rgba(37, 99, 235, 0.05);
}
.filters__attr-toggle[aria-expanded="true"] {
  background: rgba(37, 99, 235, 0.08);
}
.filters__attr-group.is-expanded .filters__attr-toggle .filters__attr-icon,
.filters__attr-toggle[aria-expanded="true"] .filters__attr-icon {
  transform: rotate(180deg);
}
.filters__attr-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
}
.filters__attr-icon {
  width: 14px;
  height: 14px;
  color: var(--muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.filters__attr-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: rgba(37, 99, 235, 0.1);
  padding: 2px 6px;
  border-radius: 10px;
}
.filters__attr-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out, border-color 0.2s ease;
  padding: 0 14px;
  border-top: 1px solid transparent;
}
.filters__attr-group.is-expanded .filters__attr-panel {
  max-height: 500px;
  padding: 0 14px 12px;
  border-top-color: var(--border);
  transition: max-height 0.3s ease-in, padding 0.3s ease-in, border-color 0.2s ease;
}
.filters__attr-values {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 10px;
}

.filters__attr-item {
  margin: 0;
  padding: 0;
}

.filters__attr-label-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.filters__attr-label-item:hover {
  background: rgba(37, 99, 235, 0.05);
}

.filters__attr-checkbox {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.filters__attr-checkbox:checked + .filters__attr-value-text {
  color: var(--primary);
  font-weight: 600;
}

.filters__attr-value-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.4;
  flex: 1;
}
.filters__attr-btn {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  line-height: 1.4;
}
.filters__attr-btn:hover {
  border-color: var(--primary);
  background: rgba(37, 99, 235, 0.05);
  color: var(--primary);
}
.filters__attr-btn.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
@media (max-width: 980px) {
  .filters__attributes {
    gap: 6px;
  }
  .filters__attr-toggle {
    padding: 8px 12px;
  }
  .filters__attr-group.is-expanded .filters__attr-panel {
    padding: 0 12px 10px;
  }
}
.filters__sort {
  display: flex;
  align-items: center;
  gap: 12px;
}
.filters__label {
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}
.filters__select {
  padding: 10px 36px 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: all 0.2s ease;
}
.filters__select:hover {
  border-color: rgba(37, 99, 235, .3);
}
.filters__select:focus {
  border-color: rgba(37, 99, 235, .6);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.pagination {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.pagination__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pagination__link {
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.pagination__link:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, .2);
}
.pagination__link--disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
.pagination__link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.pagination__pages {
  display: flex;
  align-items: center;
  gap: 4px;
}
.pagination__load-more {
  display: none;
  flex: 0 0 100%;
  justify-content: center;
  margin-bottom: 6px;
}
.pagination__load-more.is-loading {
  opacity: 0.75;
  pointer-events: none;
}
.pagination__page {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s ease;
}
.pagination__page:hover {
  border-color: var(--primary);
  background: rgba(37, 99, 235, .08);
  color: var(--primary);
  transform: translateY(-1px);
}
.pagination__page--active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  cursor: default;
}
.pagination__page--active:hover {
  transform: none;
  background: var(--primary);
  color: #fff;
}
.pagination__ellipsis {
  padding: 0 8px;
  color: var(--muted);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-footer {
  margin-top: 40px;
  background: #0f172a;
  color: #e5e7eb;
  padding: 28px 0;
}
.footer__cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 18px; }
.footer__title { font-weight: 900; margin-bottom: 10px; }
.footer__link { display: block; color: #e5e7eb; margin: 6px 0; }
.footer__text { color: rgba(229, 231, 235, .85); }
.footer__bottom { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(229, 231, 235, .12); font-size: 12px; color: rgba(229, 231, 235, .85); }

@media (max-width: 980px) {
  .header-main__inner {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    gap: 16px;
    padding: 10px 0;
  }
  .search {
    max-width: 100%;
  }
  .search__input {
    padding: 8px 88px 8px 16px;
    font-size: 14px;
    height: 34px;
  }
  .search__button {
    width: 32px;
    height: 32px;
    right: 8px;
  }
  .search__clear {
    width: 32px;
    height: 32px;
    right: 44px;
  }
  .search__button svg {
    width: 18px;
    height: 18px;
  }
  .header-actions {
    gap: 10px;
  }
  .header-action {
    width: 42px;
    height: 42px;
  }
  .header-action svg {
    width: 22px;
    height: 22px;
  }
  .header-action--guides { display: none; }
  /* Mantener submenús como dropdowns en tablet */
  .nav-cats__submenu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: auto;
    width: auto;
    min-width: 240px;
    max-width: 600px;
    margin: 0;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .nav-cats__dropdown:hover .nav-cats__submenu,
  .nav-cats__dropdown:focus-within .nav-cats__submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }
  
  .nav-cats__dropdown--multi-column .nav-cats__submenu {
    min-width: 500px;
    max-width: 700px;
  }
  .grid--cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product { grid-template-columns: 1fr; }
  .cart { 
    grid-template-columns: 1fr; 
    gap: 24px;
  }
  .cart__summary {
    position: static;
  }
  .cart-item {
    grid-template-columns: 100px 1fr;
    gap: 16px;
  }
  .cart-item__quantity,
  .cart-item__remove {
    grid-column: 1 / -1;
    margin-top: 8px;
  }
  .cart-item__quantity {
    justify-self: start;
  }
  .cart-item__remove {
    justify-self: end;
  }
  .card__body { min-height: auto; }
}

@media (max-width: 980px) {
  /* Tablet: mantenemos sidebar visible (sin drawer). El drawer se reserva para móvil real (<768px). */
  .category-layout { gap: 20px; }
  .category-sidebar { flex: 0 0 260px; }
  .category-content {
    flex: 1;
    width: 100%;
  }
  .category-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .category-header__controls {
    width: 100%;
    justify-content: space-between;
  }
  .hero {
    padding: 32px 24px;
  }
  .hero__title {
    font-size: 32px;
  }
  .hero__subtitle {
    font-size: 16px;
  }
  .hero__features {
    gap: 24px;
  }
  .section__title {
    font-size: 24px;
  }
  .filters__quick {
    gap: 8px;
  }
  .card--filter {
    padding: 10px 12px;
  }
  .card--filter .card__title {
    font-size: 13px;
  }
  .card--filter .card__meta {
    font-size: 11px;
  }
}

/* Header: móvil (limpio, con logo visible + búsqueda desde icono/overlay) */
@media (max-width: 767px) {
  .header-main .container,
  .promo-banner .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .header-main__inner {
    grid-template-columns: auto 1fr auto;
    gap: 10px;
  }

  .header-logo { justify-self: center; }
  .header-logo .logo-img { height: 26px; }
  .header-logo .logo-img--mark { display: block; }
  .header-logo .logo-img--wordmark { display: none; }

  /* En móvil abrimos búsqueda con el overlay (icono), no con la barra completa */
  .site-header .header-main__inner > .search { display: none; }
  .site-header .header-main__inner > .search-overlay__placeholder { display: none; }
  .header-action--search { display: flex; }

}

/* Categoría: modo móvil real (drawer de filtros) */
@media (max-width: 767px) {
  .category-layout {
    flex-direction: column;
    gap: 0;
  }
  .category-sidebar {
    flex: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 400px;
    height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    background: var(--surface);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    transition: right 0.3s ease;
    z-index: 999;
    padding: 0;
  }
  .category-sidebar.is-open {
    right: 0;
  }
  .category-sidebar .filters {
    height: 100%;
    padding: 20px;
    border: none;
    border-radius: 0;
    position: relative;
    overflow-y: auto;
  }
  .category-sidebar .filters__close {
    display: flex;
  }
  body.filters-open {
    overflow: hidden;
  }
  .filters-mobile-toggle {
    display: flex;
  }
  .filters-overlay {
    display: block;
  }
}

/* /buscar/: modo móvil real (drawer + barra inferior) */
@media (max-width: 767px) {
  /* Drawer (Doofinder-like) */
  .search-filters-drawer {
    flex: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 400px;
    height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    background: var(--surface);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    transition: right 0.3s ease;
    z-index: 999;
    padding: 0;
  }
  .search-filters-drawer.is-open {
    right: 0;
  }
  .search-filters-drawer .filters {
    height: 100%;
    padding: 20px;
    border: none;
    border-radius: 0;
    position: relative;
    overflow-y: auto;
  }
  .search-filters-drawer .filters__close {
    display: flex;
  }
  .search-filters-drawer .filters__actions-bar {
    position: sticky;
    bottom: 0;
    z-index: 6;
    margin: 14px -20px -20px;
    padding: 12px 20px 18px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.08);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .search-filters-drawer .filters__actions-bar .btn {
    width: 100%;
    justify-content: center;
  }
  .search-filters-drawer .filters__actions-bar .btn--primary {
    grid-column: 1 / -1;
  }
  /* Si solo hay Aplicar + Limpiar (sin "Recomendados"), que Limpiar ocupe todo el ancho */
  .search-filters-drawer .filters__actions-bar .btn--ghost:last-child {
    grid-column: 1 / -1;
  }

  /* Barra inferior (Filtros + Ordenar) */
  [data-search-filters] .search-mobile-bar {
    display: grid;
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    z-index: 997;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  body.filters-open [data-search-filters] .search-mobile-bar {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
  }

  /* Resumen sticky (debajo del header) */
  [data-search-filters] .search-filters-summary {
    position: sticky;
    top: calc(var(--site-header-height, 72px) + 8px);
    z-index: 996;
    background: var(--surface);
    padding: 12px 0 10px;
    margin: 0;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 18px rgba(17, 24, 39, 0.06);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }

  [data-search-filters] .search-mobile-bar .filters-mobile-toggle {
    position: static;
    bottom: auto;
    right: auto;
    margin: 0;
    width: 100%;
    justify-content: center;
    padding: 12px 14px;
    font-size: 14px;
    border-radius: 14px;
  }
  [data-search-filters] .search-mobile-bar .filters-mobile-toggle--sort {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: 0 6px 18px rgba(17, 24, 39, 0.12);
  }
  [data-search-filters] .search-mobile-bar .filters-mobile-toggle--sort:hover {
    background: rgba(17, 24, 39, 0.02);
    transform: translateY(-2px);
  }

  /* Sheet de ordenar */
  [data-search-filters] .sort-overlay {
    display: block;
  }
  [data-search-filters] .sort-sheet {
    display: block;
  }
  /* En móvil, evitamos duplicidad: el sort va en sheet (no en el drawer). */
  [data-search-filters] [data-search-sort-field] {
    display: none;
  }

  /* Evitar que la barra inferior tape el final de la lista */
  [data-search-pagination] {
    padding-bottom: 90px;
  }
  /* /buscar/ móvil: "Cargar más" en vez de paginador completo */
  [data-search-pagination] .pagination__load-more {
    display: inline-flex;
  }
  [data-search-pagination] .pagination__pages {
    display: none;
  }
  [data-search-pagination] .pagination__link--prev,
  [data-search-pagination] .pagination__link--next {
    display: none;
  }

  /* Categoría móvil: "Cargar más" en vez de paginador completo */
  .category-content .pagination__load-more {
    display: inline-flex;
  }
  .category-content .pagination__pages {
    display: none;
  }
  .category-content .pagination__link--prev,
  .category-content .pagination__link--next {
    display: none;
  }
}

/* Autocompletado de búsqueda (desktop/tablet)
   En móvil ya existe un bloque dentro de @media (max-width: 640px).
   Aquí lo habilitamos en >= 641px para que el overlay se vea correctamente. */
@media (min-width: 641px) {
  .search-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    inset: 0;
    z-index: 3000; /* por encima del header (1000), por debajo de modales (10000) */
    display: none;
  }
  .search-overlay.is-open {
    display: block;
  }
  .search-overlay__backdrop {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    inset: 0;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(8px);
  }
  .search-overlay__panel {
    position: relative;
    width: min(920px, calc(100vw - 32px));
    margin: 64px auto 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
    overflow: hidden;
  }
  .search-overlay__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 14px 12px;
    border-bottom: 1px solid var(--border);
  }
  .search-overlay__title {
    font-weight: 900;
    letter-spacing: -0.2px;
  }
  .search-overlay__close {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
  }
  .search-overlay__close:hover {
    background: rgba(37, 99, 235, 0.08);
    transform: translateY(-1px);
  }
  .search-overlay__slot {
    padding: 14px;
  }
  .search-overlay__hint {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 12px 14px 14px;
    color: var(--muted);
    font-size: 12px;
    border-top: 1px solid var(--border);
  }
  .search-overlay__kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 22px;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.6);
    color: var(--text);
    font-weight: 800;
    font-size: 11px;
    margin: 0 6px 0 0;
  }

  /* Dentro del overlay: input más grande + sugerencias como bloque */
  .search-overlay .search {
    flex-wrap: wrap;
  }
  .search-overlay .search__input {
    height: 48px;
    font-size: 16px;
    border-radius: 12px;
    padding: 12px 92px 12px 14px;
  }
  .search-overlay .search__button {
    width: 36px;
    height: 36px;
    right: 10px;
  }
  .search-overlay .search__clear {
    width: 36px;
    height: 36px;
    right: 50px;
    border-radius: 10px;
  }
  .search-overlay .search-suggestions {
    position: static; /* se vuelve bloque dentro del form */
    flex: 0 0 100%;
    width: 100%;
    margin-top: 10px;
    max-height: min(62vh, 560px);
  }

  .search-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    animation: fadeIn 0.2s ease;
  }

  .search-suggestions.is-visible {
    display: block;
  }

  .search-suggestions__section {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
  }

  .search-suggestions__section:last-child {
    border-bottom: none;
  }

  .search-suggestions__heading {
    padding: 8px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .search-suggestions__heading-meta {
    font-weight: 800;
    color: rgba(100, 116, 139, 0.95);
    letter-spacing: 0.2px;
  }

  .search-suggestions__loading {
    padding: 12px 16px;
    font-size: 13px;
    color: var(--muted);
  }

  .search-suggestions__empty {
    padding: 0 16px 10px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
  }

  .search-suggestions__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 6px 16px 10px;
  }

  .search-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.9);
    color: var(--text);
    font-weight: 800;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  }

  .search-chip:hover,
  .search-chip.is-highlighted {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.25);
    text-decoration: none;
    transform: translateY(-1px);
  }

  .search-chip__label {
    white-space: nowrap;
  }

  .search-chip__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
    color: var(--primary);
    font-weight: 900;
    font-size: 12px;
  }

  .search-suggestions__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    text-decoration: none;
    color: var(--text);
    transition: background 0.15s ease;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    font-size: 14px;
  }

  .search-suggestions__item:hover,
  .search-suggestions__item.is-highlighted {
    background: rgba(37, 99, 235, 0.06);
    text-decoration: none;
  }

  .search-suggestions__item--skeleton {
    pointer-events: none;
  }
  .search-suggestions__item--skeleton:hover {
    background: transparent;
  }

  .search-suggestions__item--category {
    font-weight: 600;
    color: var(--primary);
  }

  .search-suggestions__item--suggestion {
    font-style: italic;
    color: var(--muted);
  }

  .search-suggestions__item--all {
    font-weight: 800;
  }

  /* Overlay (Doofinder-like): resultados como mini-grid */
  .search-overlay .search-suggestions__section--hits {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 10px 12px 14px;
  }
  .search-overlay .search-suggestions__section--hits .search-suggestions__heading {
    grid-column: 1 / -1;
    padding: 8px 4px 2px;
  }
  .search-overlay .search-suggestions__section--hits .search-suggestions__item--hit {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
    padding: 10px 12px;
  }
  .search-overlay .search-suggestions__section--hits .search-suggestions__item--hit:hover,
  .search-overlay .search-suggestions__section--hits .search-suggestions__item--hit.is-highlighted {
    background: rgba(37, 99, 235, 0.06);
  }
  .search-overlay .search-suggestions__section--hits .search-suggestions__img {
    width: 56px;
    height: 56px;
    border-radius: 12px;
  }

  @media (min-width: 720px) {
    .search-overlay .search-suggestions__section--hits {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  /* CTA final: "Ver todos (N)" como botón */
  .search-overlay .search-suggestions__item--all {
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 14px;
    background: rgba(16, 185, 129, 0.12);
  }
  .search-overlay .search-suggestions__item--all:hover,
  .search-overlay .search-suggestions__item--all.is-highlighted {
    background: rgba(16, 185, 129, 0.18);
  }
  .search-overlay .search-suggestions__item--all .search-suggestions__price {
    color: #047857;
  }

  .search-suggestions__img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
  }

  .search-suggestions__content {
    flex: 1;
    min-width: 0;
  }

  .search-suggestions__name {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 2px;
  }

  .search-suggestions__meta {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 2px;
  }

  .search-suggestions__price {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
  }

  .search-suggestions__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 2px;
  }

  .search-suggestions__stock {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    border: 1px solid var(--border);
    color: var(--muted);
    background: rgba(255, 255, 255, 0.65);
    white-space: nowrap;
  }
  .search-suggestions__stock--in {
    color: #047857;
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.28);
  }
  .search-suggestions__stock--out {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.10);
    border-color: rgba(239, 68, 68, 0.25);
  }

  mark.search-highlight {
    background: rgba(37, 99, 235, 0.14);
    color: inherit;
    border-radius: 6px;
    padding: 0 2px;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 24px 16px;
    margin-bottom: 32px;
  }
  .hero__title {
    font-size: 28px;
  }
  .hero__subtitle {
    font-size: 15px;
    margin-bottom: 24px;
  }
  .hero__actions {
    flex-direction: column;
    width: 100%;
  }
  .hero__actions .btn {
    width: 100%;
  }
  .hero__features {
    flex-direction: column;
    gap: 16px;
    padding-top: 24px;
  }
  .section {
    margin-top: 32px;
  }
  .section__title {
    font-size: 22px;
  }
  .topbar {
    padding: 8px 0;
  }
  .topbar .logo {
    font-size: 16px;
  }
  .topbar .logo__mark {
    padding: 4px 6px;
    font-size: 14px;
  }
  .topbar__right {
    font-size: 11px;
  }
  
  .header-main__inner {
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    padding: 8px 0;
  }
  .menu-toggle {
    width: 40px;
    height: 40px;
  }
  .menu-toggle svg {
    width: 20px;
    height: 20px;
  }
  .header-tool {
    width: 40px;
    height: 40px;
  }
  .header-tool svg {
    width: 20px;
    height: 20px;
  }
  .search {
    max-width: 100%;
  }
  .search__input {
    padding: 7px 82px 7px 14px;
    font-size: 13px;
    height: 32px;
  }
  
  .promo-banner__inner {
    padding: 6px 16px;
  }
  
  .promo-banner__text {
    font-size: 12px;
  }
  .search__button {
    width: 30px;
    height: 30px;
    right: 8px;
  }
  .search__clear {
    width: 30px;
    height: 30px;
    right: 40px;
  }
  .search__button svg {
    width: 16px;
    height: 16px;
  }

/* Autocompletado de búsqueda */
.search {
  position: relative;
}

.search-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  z-index: 3000; /* por encima del header (1000), por debajo de modales (10000) */
  display: none;
}
.search-overlay.is-open {
  display: block;
}
.search-overlay__backdrop {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(8px);
}
.search-overlay__panel {
  position: relative;
  width: min(920px, calc(100vw - 32px));
  margin: 64px auto 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.search-overlay__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--border);
}
.search-overlay__title {
  font-weight: 900;
  letter-spacing: -0.2px;
}
.search-overlay__close {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.search-overlay__close:hover {
  background: rgba(37, 99, 235, 0.08);
  transform: translateY(-1px);
}
.search-overlay__slot {
  padding: 14px;
}
.search-overlay__hint {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 14px;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--border);
}
.search-overlay__kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--text);
  font-weight: 800;
  font-size: 11px;
  margin: 0 6px 0 0;
}

/* Dentro del overlay: input más grande + sugerencias como bloque */
.search-overlay .search {
  flex-wrap: wrap;
}
.search-overlay .search__input {
  height: 48px;
  font-size: 16px;
  border-radius: 12px;
  padding: 12px 92px 12px 14px;
}
.search-overlay .search__button {
  width: 36px;
  height: 36px;
  right: 10px;
}
.search-overlay .search__clear {
  width: 36px;
  height: 36px;
  right: 50px;
  border-radius: 10px;
}
.search-overlay .search-suggestions {
  position: static; /* se vuelve bloque dentro del form */
  flex: 0 0 100%;
  width: 100%;
  margin-top: 10px;
  max-height: min(62vh, 560px);
}

@media (max-width: 640px) {
  .search-overlay__panel {
    width: 100vw;
    height: 100vh;
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  .search-overlay__hint {
    justify-content: flex-end;
  }
  .search-overlay__hint span:first-child {
    display: none;
  }
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  animation: fadeIn 0.2s ease;
}

.search-suggestions.is-visible {
  display: block;
}

.search-suggestions__section {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.search-suggestions__section:last-child {
  border-bottom: none;
}

.search-suggestions__heading {
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.search-suggestions__heading-meta {
  font-weight: 800;
  color: rgba(100, 116, 139, 0.95);
  letter-spacing: 0.2px;
}

.search-suggestions__loading {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--muted);
}

.search-suggestions__empty {
  padding: 0 16px 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.search-suggestions__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 16px 10px;
}

.search-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.search-chip:hover,
.search-chip.is-highlighted {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.25);
  text-decoration: none;
  transform: translateY(-1px);
}

.search-chip__label {
  white-space: nowrap;
}

.search-chip__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: var(--primary);
  font-weight: 900;
  font-size: 12px;
}

.search-suggestions__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s ease;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: 14px;
}

.search-suggestions__item:hover,
.search-suggestions__item.is-highlighted {
  background: rgba(37, 99, 235, 0.06);
  text-decoration: none;
}

.search-suggestions__item--skeleton {
  pointer-events: none;
}
.search-suggestions__item--skeleton:hover {
  background: transparent;
}

.search-suggestions__item--category {
  font-weight: 600;
  color: var(--primary);
}

.search-suggestions__item--suggestion {
  font-style: italic;
  color: var(--muted);
}

.search-suggestions__item--all {
  font-weight: 800;
}

/* Overlay (Doofinder-like): resultados como mini-grid */
.search-overlay .search-suggestions__section--hits {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 10px 12px 14px;
}
.search-overlay .search-suggestions__section--hits .search-suggestions__heading {
  grid-column: 1 / -1;
  padding: 8px 4px 2px;
}
.search-overlay .search-suggestions__section--hits .search-suggestions__item--hit {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  padding: 10px 12px;
}
.search-overlay .search-suggestions__section--hits .search-suggestions__item--hit:hover,
.search-overlay .search-suggestions__section--hits .search-suggestions__item--hit.is-highlighted {
  background: rgba(37, 99, 235, 0.06);
}
.search-overlay .search-suggestions__section--hits .search-suggestions__img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
}

@media (min-width: 720px) {
  .search-overlay .search-suggestions__section--hits {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* CTA final: "Ver todos (N)" como botón */
.search-overlay .search-suggestions__item--all {
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 14px;
  background: rgba(16, 185, 129, 0.12);
}
.search-overlay .search-suggestions__item--all:hover,
.search-overlay .search-suggestions__item--all.is-highlighted {
  background: rgba(16, 185, 129, 0.18);
}
.search-overlay .search-suggestions__item--all .search-suggestions__price {
  color: #047857;
}

.search-suggestions__img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.search-suggestions__content {
  flex: 1;
  min-width: 0;
}

.search-suggestions__name {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 2px;
}

.search-suggestions__meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 2px;
}

.search-suggestions__price {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
}

.search-suggestions__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
}

.search-suggestions__stock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  border: 1px solid var(--border);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.65);
  white-space: nowrap;
}
.search-suggestions__stock--in {
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.28);
}
.search-suggestions__stock--out {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.10);
  border-color: rgba(239, 68, 68, 0.25);
}

mark.search-highlight {
  background: rgba(37, 99, 235, 0.14);
  color: inherit;
  border-radius: 6px;
  padding: 0 2px;
}

/* Comparador (barra fija) */
.compare-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 12px;
  z-index: 1200;
  pointer-events: none;
}
.compare-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
  pointer-events: auto;
}
.compare-bar__text {
  font-size: 13px;
  color: var(--text);
}
.compare-bar__text strong {
  color: var(--primary);
}
.compare-bar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Guías: barra fija "Volver a resultados" (mobile) */
.return-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 12px;
  z-index: 1190;
  pointer-events: none;
}
.return-bar--offset { bottom: 72px; } /* deja espacio si aparece la compare-bar */
.return-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
  pointer-events: auto;
  margin: 0 12px;
}
.return-bar__text { font-size: 13px; color: var(--text); }
.return-bar__text strong { color: var(--primary); }
.return-bar__actions { display: flex; align-items: center; gap: 8px; }
@media (min-width: 981px) {
  .return-bar { display: none; }
}

/* Comparador (tabla) */
.compare {
  display: grid;
  gap: 16px;
}
.compare__head {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.compare__product {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}
.compare__product-top {
  display: flex;
  gap: 12px;
  align-items: center;
}
.compare__img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  background: #f3f4f6;
}
.compare__name {
  font-weight: 900;
  display: inline-block;
  line-height: 1.25;
}
.compare__sku { color: var(--muted); font-size: 12px; margin-top: 2px; }
.compare__table {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.compare__row {
  display: grid;
  grid-template-columns: 180px repeat(auto-fit, minmax(220px, 1fr));
  border-top: 1px solid var(--border);
}
.compare__row:first-child { border-top: none; }
.compare__cell {
  padding: 12px 14px;
  border-left: 1px solid var(--border);
  font-size: 13px;
}
.compare__cell--label {
  border-left: none;
  font-weight: 800;
  color: var(--text);
  background: rgba(17, 24, 39, .02);
}
  .header-actions {
    gap: 8px;
  }
  .header-action {
    width: 40px;
    height: 40px;
  }
  .header-action svg {
    width: 20px;
    height: 20px;
  }
  
  .grid--products { 
    grid-template-columns: repeat(2, minmax(0, 1fr)); 
    gap: 12px; 
  }
  .category-header {
    padding: 12px;
    gap: 12px;
  }
  .category-header__controls {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .filters__sort {
    width: 100%;
  }
  .filters__view-toggle {
    width: 100%;
    justify-content: center;
  }
  .grid--cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card__body { padding: 10px; }
  .card__title { font-size: 13px; min-height: 2.6em; }
  .card__price { font-size: 14px; }
  .filters__top {
    flex-direction: column;
    gap: 10px;
  }
  .filters__controls {
    justify-content: space-between;
    width: 100%;
  }
  .filters__sort { flex: 1; justify-content: space-between; }
  .filters__select { flex: 1; max-width: 220px; }
  .filters__row {
    gap: 16px;
    margin-top: 16px;
    padding-top: 16px;
  }
  /* En móvil: filtros rápidos en grid responsive */
  .filters__quick {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .card--filter {
    min-height: 65px;
    padding: 12px 14px;
  }
  .card--filter .card__title {
    font-size: 13px;
  }
  .card--filter .card__meta {
    font-size: 11px;
  }
  .filters__more { width: 100%; }
  .filters__more-body { padding: 12px; }
  .grid--filter-cards { 
    grid-template-columns: 1fr; 
    gap: 10px; 
  }
  .filters__attr-label-item {
    padding: 6px 10px;
  }
  .filters__attr-checkbox {
    width: 16px;
    height: 16px;
  }
  .filters__attr-value-text {
    font-size: 13px;
  }
  .card--filter-cat { padding: 14px; }
  .filters__attr-values--card { max-height: 118px; }
  
  /* Subcategorías más compactas en móvil */
  .subcat-item {
    padding: 8px 12px;
    gap: 8px;
  }
  .subcat-item__icon {
    width: 20px;
    height: 20px;
  }
  .subcat-item__icon svg {
    width: 18px;
    height: 18px;
  }
  .subcat-item__label {
    font-size: 13px;
  }
  .subcats-scroll {
    gap: 10px;
    padding-bottom: 12px;
  }
  .grid--products[data-view="list"] .card--product {
    grid-template-columns: 120px 1fr;
    gap: 16px;
    padding: 16px 0;
  }
  .grid--products[data-view="list"] .card__image {
    width: 120px;
    height: 120px;
  }
  .grid--products[data-view="list"] .card__title {
    font-size: 16px;
  }
  .grid--products[data-view="list"] .card__desc {
    font-size: 13px;
    -webkit-line-clamp: 2;
  }
  .grid--products[data-view="list"] .card__price {
    font-size: 18px;
  }
  .pagination__inner {
    flex-wrap: wrap;
    gap: 8px;
  }
  .pagination__info {
    width: 100%;
    text-align: center;
    order: -1;
  }
}


/* Breadcrumbs */
.breadcrumbs {
  margin: 0 0 24px;
  padding: 0;
}
.breadcrumbs__list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
}
.breadcrumbs__item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.breadcrumbs__item:not(:last-child)::after {
  content: '›';
  color: var(--muted);
  font-size: 16px;
  font-weight: 400;
  opacity: 0.5;
}
.breadcrumbs__link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  padding: 4px 0;
}
.breadcrumbs__link:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}
.breadcrumbs__current {
  color: var(--text);
  font-weight: 600;
  padding: 4px 0;
}
@media (max-width: 640px) {
  .breadcrumbs {
    margin-bottom: 20px;
  }
  .breadcrumbs__list {
    font-size: 13px;
    gap: 6px;
  }
  .breadcrumbs__item:not(:last-child)::after {
    font-size: 14px;
  }
}

/* Alertas de producto (stock/precio) */
.product__alerts {
  margin-top: 24px;
  display: grid;
  gap: 16px;
}

.alert-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.alert-box__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.alert-box__icon {
  width: 20px;
  height: 20px;
  color: var(--primary);
  flex-shrink: 0;
}

.alert-box__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.alert-box__form {
  display: grid;
  gap: 10px;
}

.alert-box__form .field__input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 14px;
}

.alert-box__success {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 8px;
  color: #059669;
  font-size: 14px;
  font-weight: 600;
}

.alert-box__success svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: #059669;
}

@media (max-width: 640px) {
  .product__alerts {
    margin-top: 20px;
    gap: 12px;
  }
  .alert-box {
    padding: 14px;
  }
  .alert-box__title {
    font-size: 14px;
  }
}

/* Información de cumplimiento TPD */
.compliance-info {
  display: grid;
  gap: 20px;
}

.compliance-badge {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 12px;
}

.compliance-badge svg {
  width: 20px;
  height: 20px;
  color: #2563eb;
  flex-shrink: 0;
  margin-top: 2px;
}

.compliance-badge strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #2563eb;
  margin-bottom: 4px;
}

.compliance-badge p {
  margin: 0;
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}

.compliance-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.compliance-item--warning {
  background: rgba(251, 191, 36, 0.06);
  border-color: rgba(251, 191, 36, 0.3);
}

.compliance-item svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}

.compliance-item--warning svg {
  color: #d97706;
}

.compliance-item strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.compliance-item .prose {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}

.compliance-item .prose p {
  margin: 0 0 8px;
}

.compliance-item .prose p:last-child {
  margin-bottom: 0;
}

.compliance-footer {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

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

.compliance-footer .link {
  color: var(--primary);
  text-decoration: underline;
  font-weight: 600;
}

.compliance-footer .link:hover {
  color: var(--primary-hover);
}

@media (max-width: 640px) {
  .compliance-info {
    gap: 16px;
  }
  .compliance-badge,
  .compliance-item {
    padding: 12px;
  }
  .compliance-badge strong,
  .compliance-item strong {
    font-size: 14px;
  }
  .compliance-badge p,
  .compliance-item .prose {
    font-size: 13px;
  }
}

/* Reviews y Q&A */
.reviews-section {
  display: grid;
  gap: 24px;
}

.reviews-header {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.reviews-summary {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

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

.reviews-rating-value {
  font-size: 36px;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}

.reviews-stars {
  display: flex;
  gap: 4px;
  color: #fbbf24;
}

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

.reviews-list {
  display: grid;
  gap: 20px;
}

.review-card {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.review-author {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.review-author strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.review-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.review-badge--verified {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.review-badge svg {
  width: 14px;
  height: 14px;
}

.review-rating {
  display: flex;
  gap: 2px;
  color: #fbbf24;
}

.review-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 8px 0;
}

.review-comment {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  margin: 0 0 12px;
}

.review-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.review-images img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.review-images img:hover {
  transform: scale(1.05);
}

.review-date {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}

.qa-section {
  display: grid;
  gap: 20px;
}

.qa-list {
  display: grid;
  gap: 20px;
}

.qa-item {
  display: grid;
  gap: 12px;
}

.qa-question,
.qa-answer {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.qa-answer {
  margin-left: 32px;
  background: rgba(37, 99, 235, 0.03);
  border-color: rgba(37, 99, 235, 0.15);
}

.qa-answer--vendor {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.2);
}

.qa-question svg,
.qa-answer svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}

.qa-answer--vendor svg {
  color: #059669;
}

.qa-question strong,
.qa-answer strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.qa-vendor-badge {
  display: inline-block;
  padding: 2px 6px;
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 6px;
}

.qa-question p,
.qa-answer p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  margin: 0 0 8px;
}

.qa-date {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  display: block;
}

@media (max-width: 640px) {
  .reviews-section {
    gap: 20px;
  }
  .reviews-rating-value {
    font-size: 28px;
  }
  .reviews-stars svg {
    width: 16px;
    height: 16px;
  }
  .review-card {
    padding: 12px;
  }
  .review-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .review-images {
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  }
  .review-images img {
    height: 60px;
  }
  .qa-answer {
    margin-left: 16px;
  }
  .qa-question,
  .qa-answer {
    padding: 12px;
  }
}

/* Optimizaciones de rendimiento adicionales */
/* Evitar repaint/reflow innecesarios en imágenes */
.product__image,
.card__image img {
  will-change: transform;
  backface-visibility: hidden;
}

/* Optimizar animaciones para mejor INP */
@media (prefers-reduced-motion: no-preference) {
  .product__image,
  .card__image img {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
}
