/* ===================================================================
 * WAREHOUSE CHILD — Capa estructural 2026 (B2B peluquería)
 * -------------------------------------------------------------------
 * Reglas: NO define colores de marca ni tipografías (se heredan del
 * tema padre / Elementor). Solo distribución, jerarquía, ritmo de
 * espaciado, elevación neutra y micro-interacción.
 * Áreas: 1) Listado catálogo  2) Card producto  3) Ficha producto
 *        4) Carrito
 * Tokens neutros editables (no son color de marca, son escala/elevación).
 * =================================================================== */

:root {
  --wch-radius: 6px;
  --wch-radius-sm: 4px;
  --wch-gap: 16px;
  --wch-gap-lg: 24px;
  --wch-hairline: 1px solid rgba(0, 0, 0, 0.08);
  --wch-hairline-soft: 1px solid rgba(0, 0, 0, 0.05);
  --wch-shadow-1: 0 1px 2px rgba(0, 0, 0, 0.04);
  --wch-shadow-2: 0 6px 20px rgba(0, 0, 0, 0.08);
  --wch-shadow-3: 0 12px 34px rgba(0, 0, 0, 0.10);
  --wch-surface: rgba(0, 0, 0, 0.015);
  --wch-ease: cubic-bezier(0.7, 0, 0.3, 1);
  --wch-sticky-top: 90px;
}

/* ===================================================================
 * 1) LISTADO DE CATÁLOGO  (category / product-list)
 * =================================================================== */

/* Barra de herramientas: tira sólida, alineada, jerarquía clara */
#js-product-list-top.products-selection {
  padding: 10px 14px;
  margin-bottom: var(--wch-gap-lg);
  background: #fff;
  border: var(--wch-hairline);
  border-radius: var(--wch-radius);
}

#js-product-list-top.products-selection .showing {
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
  opacity: 0.75;
}

/* Botón de filtro: consistente con el resto de la tira */
#js-product-list-top .filter-button .btn {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.45rem 0.9rem;
}

/* Conmutador grid/lista: pastilla con estado activo sobrio */
#js-product-list-top .view-switcher {
  display: flex;
  gap: 4px;
  align-items: center;
}
#js-product-list-top .view-switcher a {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: var(--wch-hairline);
  border-radius: var(--wch-radius-sm);
  opacity: 0.6;
  transition: all 0.2s var(--wch-ease);
}
#js-product-list-top .view-switcher a:hover { opacity: 1; }
#js-product-list-top .view-switcher a.current {
  opacity: 1;
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.18);
}

/* Selector de orden: aire y alineación */
#js-product-list-top .col-left-sort,
#js-product-list-top .sort-by-row { display: flex; align-items: center; }

/* Facetas / filtros laterales: agrupación legible */
.facets-wrapper .facet,
#search_filters .facet {
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: var(--wch-hairline-soft);
}
#search_filters .facet:last-child { border-bottom: 0; margin-bottom: 0; }
#search_filters .facet .facet-title {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  opacity: 0.85;
}

/* Filtros activos: chips compactos */
.active_filters .active-filter-title { font-weight: 700; }
.active_filters ul li,
.js-active-search-filters li {
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 0.78rem;
}

/* Rejilla de productos: ritmo de gutters consistente */
#js-product-list .products.products-grid {
  --bs-gutter-x: var(--wch-gap);
  row-gap: var(--wch-gap-lg);
}

/* Encabezado / descripción de categoría: aire y jerarquía */
.category-description { line-height: 1.7; }
.category-description.category-description-top { margin-bottom: var(--wch-gap-lg); }
.category-header h1,
#category #left-column ~ #content-wrapper .page-title { letter-spacing: -0.01em; }

/* Paginación inferior: separación clara del grid */
.pagination-wrapper-bottom {
  margin-top: var(--wch-gap-lg);
  padding-top: 14px;
  border-top: var(--wch-hairline);
}

/* ===================================================================
 * 2) CARD DE PRODUCTO  (miniature, grid)
 * =================================================================== */

.product-miniature.product-miniature-grid {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: var(--wch-hairline);
  border-radius: var(--wch-radius);
  overflow: hidden;
  transition: box-shadow 0.25s var(--wch-ease),
              transform 0.25s var(--wch-ease),
              border-color 0.25s var(--wch-ease);
}
.product-miniature.product-miniature-grid:hover {
  box-shadow: var(--wch-shadow-2);
  transform: translateY(-3px);
  border-color: rgba(0, 0, 0, 0.12);
}

/* Imagen: relación de aspecto estable + segunda imagen al hover */
.product-miniature .thumbnail-container {
  position: relative;
  margin: 0;
}
.product-miniature .thumbnail-container .product-thumbnail {
  display: block;
  position: relative;
  aspect-ratio: 1 / 1;
  background: #fff;
}
.product-miniature .thumbnail-container .product-thumbnail img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  transition: opacity 0.35s var(--wch-ease), transform 0.6s var(--wch-ease);
}
.product-miniature .thumbnail-container .product-thumbnail .product-thumbnail-second {
  opacity: 0;
}
.product-miniature:hover .product-thumbnail-second { opacity: 1; }
.product-miniature:hover .product-thumbnail-first { opacity: 0; }

/* Flags / etiquetas: esquina superior, compactas */
.product-miniature .product-flags {
  position: absolute;
  top: 8px;
  left: 8px;
  margin: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.product-miniature .product-flags .product-flag {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: var(--wch-radius-sm);
  line-height: 1.2;
}

/* Acciones flotantes (quick view): mobile-first → siempre visibles en móvil,
   reveal al hover desde tablet/desktop */
.product-miniature .product-functional-buttons {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  opacity: 1;
  transform: none;
  transition: all 0.25s var(--wch-ease);
}
@media (min-width: 768px) {
  .product-miniature .product-functional-buttons {
    opacity: 0;
    transform: translateY(-4px);
  }
  .product-miniature:hover .product-functional-buttons {
    opacity: 1;
    transform: translateY(0);
  }
}
.product-miniature .product-functional-buttons-links a {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: var(--wch-hairline);
  border-radius: 50%;
  box-shadow: var(--wch-shadow-1);
}

/* Cuerpo de la card: estructura vertical con jerarquía B2B */
.product-miniature .product-description {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 14px;
  gap: 4px;
}

/* Meta superior (categoría / marca / referencia): discreta */
.product-miniature .product-category-name,
.product-miniature .product-brand,
.product-miniature .product-reference {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.3;
  opacity: 0.7;
}
.product-miniature .product-reference { opacity: 0.55; }

/* Título: 2 líneas máximo. Mobile-first: sin altura forzada en móvil,
   altura estable desde tablet para alinear la rejilla */
.product-miniature .product-title {
  margin: 2px 0 4px;
  font-size: 0.92rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (min-width: 768px) {
  .product-miniature .product-title { min-height: 2.5em; }
}
.product-miniature .product-title a { text-decoration: none; }

/* Precio: ancla visual de la card */
.product-miniature .product-price-and-shipping {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}
.product-miniature .product-price-and-shipping .product-price {
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.1;
}
.product-miniature .product-price-and-shipping .regular-price {
  font-size: 0.85rem;
  text-decoration: line-through;
  opacity: 0.6;
}

/* Descripción corta: oculta en grid para mantener sobriedad */
.product-miniature.product-miniature-grid .product-description-short { display: none; }

/* Disponibilidad: badge fino bajo la imagen */
.product-miniature .product-availability { margin-top: 6px; }
.product-miniature .product-availability .badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
}

/* Add to cart de la card — RESPONSIVE AL ANCHO DE LA CARD (container query).
   La card es el contenedor; el layout del input+botón depende de SU ancho,
   no del viewport. Así no se rompe en carruseles/sidebars angostos.
   El .input-qty recibe bootstrap-touchspin (flechas verticales): estilamos
   el wrapper, no el input crudo. */
.product-miniature-sublime { container-type: inline-size; container-name: pmcard; }

.product-miniature-sublime .product-add-cart { margin-top: 12px; }

/* --- Base (card ANGOSTA): cantidad y botón APILADOS, ambos full-width
   (criterio UX: input = ancho del botón, número centrado) --- */
.product-miniature-sublime .input-group-add-cart {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.product-miniature-sublime .input-group-add-cart .bootstrap-touchspin {
  flex: 0 0 auto;
  width: 100%;
  max-width: none;   /* el tema padre lo topa en 75px; lo liberamos */
  margin: 0;         /* el padre lo centra con margin auto */
  min-height: 42px;
  background: #fff;
}
.product-miniature-sublime .input-group-add-cart .bootstrap-touchspin .input-qty {
  width: 100%;
  min-height: 42px;
  text-align: center;
  padding-left: 0;
}
.product-miniature-sublime .input-group-add-cart > .input-qty {
  flex: 0 0 auto;
  width: 100%;
  min-height: 42px;
  text-align: center;
  border: var(--wch-hairline);
  border-radius: var(--wch-radius-sm);
  padding: 0 4px;
  background: #fff;
}
.product-miniature-sublime .input-group-add-cart .btn-product-list {
  width: 100%;
  min-height: 42px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: var(--wch-radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 10px;
}

/* --- Card ANCHA (>=210px): cantidad + botón en una sola fila --- */
@container pmcard (min-width: 210px) {
  .product-miniature-sublime .input-group-add-cart {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
  }
  .product-miniature-sublime .input-group-add-cart .btn-product-list { width: auto; flex: 1 1 auto; }
  .product-miniature-sublime .input-group-add-cart .bootstrap-touchspin,
  .product-miniature-sublime .input-group-add-cart > .input-qty { flex: 0 0 76px; width: 76px; max-width: none; margin: 0; }
}

/* En cards muy chicas, achicamos un poco el texto del botón */
@container pmcard (max-width: 170px) {
  .product-miniature-sublime .input-group-add-cart .btn-product-list {
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    gap: 5px;
  }
}

/* Fallback navegadores sin container queries: fila con wrap (no se rompe) */
@supports not (container-type: inline-size) {
  .product-miniature-sublime .input-group-add-cart { flex-direction: row; flex-wrap: wrap; }
  .product-miniature-sublime .input-group-add-cart .btn-product-list { width: auto; flex: 1 1 130px; }
}

/* Card sublime: cuerpo alineado a la izquierda, coherente con la ficha */
.product-miniature-sublime .wch-card-body { text-align: left; }
.product-miniature-sublime .product-reference {
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

/* ===================================================================
 * 3) FICHA DE PRODUCTO  (catalog/product) — variante child
 * Mobile-first: galería en carrusel con scroll-snap (swipe).
 * Desktop (lg+): stack vertical de imágenes + columna de compra sticky.
 * =================================================================== */

.product-info-row { --bs-gutter-x: var(--wch-gap-lg); }

/* ===================================================================
 * 3.0) LAYOUT B2B — grid de 2 columnas
 *  Izquierda (apilado): galería → cabecera → tabs/cross-sell/reseñas
 *  Derecha: caja de compra STICKY que baja hasta el final
 *  Mobile-first: una sola columna en orden DOM (galería, cabecera,
 *  compra, tabs). Desde lg, grid-template-areas arma las 2 columnas.
 * =================================================================== */
.wch-product-grid { display: block; }
.wch-area { margin-bottom: var(--wch-gap-lg); }

@media (min-width: 992px) {
  .wch-product-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 440px;
    grid-template-areas:
      "gallery buy"
      "header  buy"
      "tabs    buy";
    grid-template-rows: auto auto 1fr;
    column-gap: 32px;
    align-items: start;
    /* Acotamos el ancho total y centramos: bloques juntos, sin vacío */
    max-width: 1160px;
    margin-inline: auto;
  }
  .wch-area-gallery { grid-area: gallery; }
  .wch-area-header  { grid-area: header; }
  .wch-area-buy     { grid-area: buy; }
  .wch-area-tabs    { grid-area: tabs; }
  .wch-area { margin-bottom: 0; }
  .wch-area-gallery { margin-bottom: var(--wch-gap-lg); }
  .wch-area-header { margin-bottom: var(--wch-gap); }

  /* La celda de compra se estira a las 3 filas (galería+cabecera+tabs);
     dentro, la caja es sticky y acompaña el scroll hasta el final. */
  .wch-area-buy {
    align-self: stretch;
    grid-row: 1 / 4;
  }
  .wch-area-buy .wch-buybox {
    position: sticky;
    top: var(--wch-sticky-top);
  }
}

@media (min-width: 1200px) {
  .wch-product-grid { grid-template-columns: minmax(0, 1fr) 480px; column-gap: 44px; max-width: 1240px; }
}

/* --- Caja de precio profesional (único bloque con fondo: gris leve) --- */
.wch-buybox {
  border: var(--wch-hairline);
  border-radius: var(--wch-radius);
  background: #f4f4f5;
  padding: 20px;
  text-align: left;
}
.wch-header-rating { margin: 4px 0 10px; }
.wch-header-rating:empty { display: none; }

/* Bloque de precio: eyebrow + precio profesional grande + PVP tachado */
.wch-price-block { margin-bottom: 16px; }
.wch-price-eyebrow {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.6;
  margin-bottom: 2px;
}
.wch-price-block .product-prices { margin-bottom: 0; }
.wch-price-block .current-price .price,
.wch-price-block .current-price-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.05;
}
.wch-price-block .regular-price {
  font-size: 1rem;
  text-decoration: line-through;
  opacity: 0.55;
  margin-left: 8px;
}
.wch-price-block .badge-discount { vertical-align: middle; }
.wch-savings {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0.9;
}

/* Descuento por volumen: caja destacada */
.wch-volume {
  margin: 0 0 16px;
  border: var(--wch-hairline);
  border-radius: var(--wch-radius-sm);
  background: #fff;
  overflow: hidden;
}
.wch-volume-title {
  display: block;
  padding: 9px 12px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(0, 0, 0, 0.03);
  border-bottom: var(--wch-hairline);
}
.wch-volume .product-discounts { margin: 0; }
.wch-volume .table-product-discounts {
  width: 100%;
  margin: 0;
  font-size: 0.82rem;
  border: 0;
}
.wch-volume .table-product-discounts th,
.wch-volume .table-product-discounts td {
  padding: 7px 12px;
  border: 0;
  border-bottom: var(--wch-hairline-soft);
  text-align: left;
}
.wch-volume .table-product-discounts thead th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  opacity: 0.65;
  font-weight: 600;
}
.wch-volume .table-product-discounts tbody tr:last-child td { border-bottom: 0; }
.wch-volume .table-product-discounts td:last-child,
.wch-volume .table-product-discounts th:last-child { text-align: right; font-weight: 700; }

/* Acciones secundarias: comparar / lista */
.wch-secondary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.wch-secondary-actions:empty { display: none; }
.wch-secondary-actions a,
.wch-secondary-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  opacity: 0.85;
}

/* Confianza B2B: filas con icono */
.wch-trust {
  margin-top: 16px;
  padding-top: 14px;
  border-top: var(--wch-hairline);
}
.wch-trust ul { list-style: none; margin: 0; padding: 0; }
.wch-trust li,
.wch-trust .block-reassurance-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 0.82rem;
  border: 0;
  margin: 0;
}
.wch-trust li i,
.wch-trust .block-reassurance-item i,
.wch-trust img { width: 20px; flex: 0 0 20px; opacity: 0.7; }

/* --- Fila 2: marca, H1, subtítulo, datos --- */
.wch-brand-eyebrow {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.65;
  margin-bottom: 6px;
}
.wch-brand-eyebrow a { text-decoration: none; }
.wch-product-title {
  font-size: 1.9rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.wch-product-subtitle {
  font-size: 1rem;
  line-height: 1.6;
  opacity: 0.85;
  margin-bottom: 16px;
  max-width: 70ch;
}

/* Datos clave: tira de items con separadores */
.wch-data-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  padding: 14px 0;
  margin-bottom: var(--wch-gap-lg);
  border-top: var(--wch-hairline);
  border-bottom: var(--wch-hairline);
}
.wch-data-item { display: flex; flex-direction: column; gap: 1px; }
.wch-data-label {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.55;
}
.wch-data-value { font-size: 0.9rem; font-weight: 600; }

/* Stock semáforo */
.wch-stock { display: inline-flex; align-items: center; gap: 7px; }
.wch-stock-dot {
  width: 9px; height: 9px; border-radius: 50%;
  flex: 0 0 9px; display: inline-block;
}
.wch-stock.is-available .wch-stock-dot { background: #3fae6a; }
.wch-stock.is-last .wch-stock-dot { background: #e0a534; }
.wch-stock.is-out .wch-stock-dot { background: #cf4b4b; }

/* Tabs principales en fila 2 */
.wch-product-tabs { margin-top: 6px; }

/* Ocultar SOLO las reseñas (módulo productcomments) — el hook
   displayFooterProduct se mantiene para otros módulos. */
#product-comments-list-footer,
#product-comments-block-extra,
.product-comments-additional-info,
.comments-note,
.product-comments {
  display: none !important;
}

/* --- Galería: imagen principal + miniaturas a la izquierda --- */
.wch-gallery-left { position: relative; }
.wch-gallery-grid {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
/* Desktop: la galería llena su columna (sin espacio muerto a la derecha) */
@media (min-width: 992px) {
  .wch-gallery-grid { max-width: 100%; }
}

/* Miniaturas verticales (izquierda) */
.wch-thumbs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 0 0 60px;
  max-height: 340px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.wch-thumb {
  flex: 0 0 auto;
  width: 60px;
  height: 60px;
  padding: 4px;
  background: #fff;
  border: var(--wch-hairline);
  border-radius: var(--wch-radius-sm);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s var(--wch-ease), box-shadow 0.2s var(--wch-ease);
}
.wch-thumb img { width: 100%; height: 100%; object-fit: contain; }
.wch-thumb:hover { border-color: rgba(0, 0, 0, 0.3); }
.wch-thumb.is-active {
  border-color: rgba(0, 0, 0, 0.7);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.7) inset;
}

/* Imagen principal */
.wch-main {
  position: relative;
  flex: 1 1 auto;
  margin: 0;
  background: #fff;
  background-repeat: no-repeat;
  background-position: center;
  border: var(--wch-hairline-soft);
  border-radius: var(--wch-radius);
  overflow: hidden;
}
.wch-main-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  padding: 12px;
  transition: opacity 0.15s var(--wch-ease);
}
/* Magnifier nítido: al hacer zoom se oculta la img y se ve el background (alta res) */
.wch-main.wch-zoomable { cursor: zoom-in; }
.wch-main.is-zooming .wch-main-img { opacity: 0; }
.wch-main .product-flags {
  position: absolute;
  top: 12px;
  left: 12px;
  margin: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.wch-main-zoom {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: var(--wch-hairline);
  border-radius: 50%;
  box-shadow: var(--wch-shadow-1);
  cursor: pointer;
  z-index: 2;
  transition: transform 0.2s var(--wch-ease), box-shadow 0.2s var(--wch-ease);
}
.wch-main-zoom:hover { transform: scale(1.08); box-shadow: var(--wch-shadow-2); }

/* Móvil: miniaturas en fila horizontal debajo de la principal */
@media (max-width: 991.98px) {
  .wch-gallery-grid { flex-direction: column-reverse; }
  .wch-thumbs {
    flex-direction: row;
    flex: 0 0 auto;
    max-height: none;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .wch-thumb { width: 64px; height: 64px; }
}

/* --- Toggle desplegable (descripción corta / secciones) --- */
.wch-toggle {
  margin-top: 16px;
  border: var(--wch-hairline);
  border-radius: var(--wch-radius);
  overflow: hidden;
}
.wch-toggle-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  user-select: none;
}
.wch-toggle-summary::-webkit-details-marker { display: none; }
.wch-toggle-icon { transition: transform 0.2s var(--wch-ease); opacity: 0.6; }
.wch-toggle[open] .wch-toggle-icon { transform: rotate(180deg); }
.wch-toggle-body {
  padding: 0 14px 14px;
  line-height: 1.7;
}

/* Cabecera: marca discreta, título protagonista */
.product_header_container .page-title {
  font-size: 1.6rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.product_header_container .product-manufacturer img.manufacturer-logo { max-height: 38px; width: auto; }
.product_header_container .product-reference,
.product-information .product-reference {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* Columna de compra: todos los textos alineados a la izquierda */
.wch-col-buy,
.wch-buybox,
.wch-buybox .product_header_container,
.wch-buybox .product-information,
.wch-buybox .product-actions,
.wch-buybox .product-prices,
.wch-buybox .product_p_price_container { text-align: left; }

/* Acciones dentro de la caja de compra: planas (la caja ya es el panel) */
.wch-buybox .product-information .product-actions {
  margin-top: 16px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

/* Precio en ficha: ancla, tamaño y peso destacados */
.product_p_price_container,
.product-prices { margin-bottom: 14px; }
.product-prices .current-price .price,
.product-prices .product-price .price,
.current-price .price {
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.1;
}
.product-prices .regular-price {
  font-size: 1rem;
  text-decoration: line-through;
  opacity: 0.6;
  margin-left: 8px;
}
.product-prices .tax-shipping-delivery-label { font-size: 0.75rem; opacity: 0.7; }

/* Variantes: etiquetas y selección legibles */
.product-variants .product-variants-item { margin-bottom: 14px; }
.product-variants .product-variants-item .control-label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  opacity: 0.85;
}
.product-variants .input-color,
.product-variants .input-container .color {
  border-radius: var(--wch-radius-sm);
}

/* Cantidad + Add to cart.
   El padre usa bootstrap-touchspin: la librería posiciona las flechas
   ↑↓ de forma ABSOLUTA a la derecha. NO usamos flex/overflow en el
   wrapper (taparía las flechas). Solo fijamos ancho y alto del input;
   la librería + el SCSS del padre maquetan los botones. */
.product-add-to-cart .product-quantity {
  align-items: flex-start;
  gap: 10px;
}
.product-add-to-cart .product-quantity .col-add-qty .qty,
.product-add-to-cart .bootstrap-touchspin {
  width: 110px;
}
.product-add-to-cart .bootstrap-touchspin > input,
.product-add-to-cart #quantity_wanted {
  min-height: 46px;
  text-align: left;
  padding-left: 12px;
  font-size: 1rem;
  background: #fff;
}
/* Fallback: si touchspin no se aplica, reactivamos las flechas nativas
   del navegador para que el stepper sea visible igualmente. */
.product-add-to-cart .qty > #quantity_wanted:only-child {
  -moz-appearance: auto;
  width: 90px;
  min-height: 46px;
  border: var(--wch-hairline);
  border-radius: var(--wch-radius-sm);
  background: #fff;
}
.product-add-to-cart .qty > #quantity_wanted:only-child::-webkit-inner-spin-button,
.product-add-to-cart .qty > #quantity_wanted:only-child::-webkit-outer-spin-button {
  -webkit-appearance: inner-spin-button !important;
  opacity: 1;
}

/* Botón añadir: más compacto, ancho automático, alineado a la izquierda */
.product-add-to-cart .col-add-btn { flex: 0 0 auto; }
.product-add-to-cart .add { height: auto; }
.product-add-to-cart .btn.add-to-cart {
  width: auto;
  min-height: 46px;
  padding: 0 22px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--wch-radius-sm);
}
.product-minimal-quantity {
  font-size: 0.78rem;
  opacity: 0.75;
  margin-top: 10px;
}

/* Reassurance: rejilla de iconos, no lista plana */
.product-actions .reassurance-block ul,
.product-actions .block-reassurance ul,
#product .block-reassurance ul {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin: 14px 0 0;
  padding: 14px 0 0;
  border-top: var(--wch-hairline);
  list-style: none;
}
.product-actions .block-reassurance li,
#product .block-reassurance li { padding: 4px 0; border: 0; margin: 0; }
.product-actions .block-reassurance li .block-reassurance-item { font-size: 0.82rem; }

/* Tabs / secciones de info: separación y títulos sobrios */
.product-tabs,
.tabs.product-tabs,
.product-tabs-sections { margin-top: var(--wch-gap-lg); }
.product-tabs .nav-tabs { border-bottom: var(--wch-hairline); gap: 4px; }
.product-tabs .nav-tabs .nav-link {
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  border: 0;
  border-bottom: 2px solid transparent;
}
.product-tabs .nav-tabs .nav-link.active {
  border-bottom-color: rgba(0, 0, 0, 0.7);
  background: transparent;
}
.product-tab-content,
.tab-pane.rte-content { line-height: 1.75; }

/* Contenido de tabs Sublime */
.wch-tabs .tab-content { padding-top: 18px; line-height: 1.75; }
.wch-tabs .tab-pane { line-height: 1.75; }

/* Ficha técnica como tabla de filas (features de PrestaShop) */
.wch-tabs .data-sheet,
.product-features .data-sheet {
  display: grid;
  grid-template-columns: minmax(140px, 30%) 1fr;
  gap: 0;
  margin: 0 0 16px;
  border: var(--wch-hairline);
  border-radius: var(--wch-radius-sm);
  overflow: hidden;
}
.wch-tabs .data-sheet .name,
.wch-tabs .data-sheet .value,
.product-features .data-sheet .name,
.product-features .data-sheet .value {
  margin: 0;
  padding: 10px 14px;
  border-bottom: var(--wch-hairline-soft);
  font-size: 0.88rem;
}
.wch-tabs .data-sheet .name,
.product-features .data-sheet .name {
  font-weight: 600;
  background: #fff;
}
.wch-tabs .data-sheet > .name:nth-last-child(2),
.wch-tabs .data-sheet > .value:last-child { border-bottom: 0; }

/* Referencias específicas / condición / stock en ficha técnica */
.wch-tabs #product-details .product-reference,
.wch-tabs #product-details .product-quantities,
.wch-tabs #product-details .product-condition,
.wch-tabs #product-details .specific-references > div {
  padding: 6px 0;
  font-size: 0.88rem;
}
.wch-tabs #product-details .label { font-weight: 600; opacity: 0.75; }

/* Bloque "También te puede interesar": respiración */
.product-accessories.block-section { margin-top: calc(var(--wch-gap-lg) * 1.5); padding-top: var(--wch-gap-lg); border-top: var(--wch-hairline); }
.product-accessories .section-title {
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--wch-gap);
}

/* ===================================================================
 * 4) CARRITO  (checkout/cart)
 * =================================================================== */

.cart-grid { --bs-gutter-x: var(--wch-gap-lg); }

/* Contenedor de líneas: tarjeta contenedora */
.cart-container {
  background: #fff;
  border: var(--wch-hairline);
  border-radius: var(--wch-radius);
  overflow: hidden;
}
.cart-overview .cart-items { padding: 0; }

/* Línea de producto: separadores finos, alineación vertical */
.cart-item { padding: 16px; }
.cart-item + .cart-item,
.cart-overview .cart-item:not(:first-child) { border-top: var(--wch-hairline-soft); }

.product-line-grid .product-image img {
  border: var(--wch-hairline-soft);
  border-radius: var(--wch-radius-sm);
  background: #fff;
}
.product-line-info .label {
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
}
.product-line-info-secondary {
  font-size: 0.78rem;
  opacity: 0.75;
}

/* Stepper de cantidad en carrito (también bootstrap-touchspin).
   No tocamos el display del wrapper: la librería ubica las flechas
   absolutas a la derecha. Solo fijamos ancho y fondo. */
.product-line-grid .bootstrap-touchspin {
  width: 90px;
  margin: 0 0 0 auto;
  background: #fff;
}
.product-line-grid .bootstrap-touchspin input,
.product-line-grid .js-cart-line-product-quantity {
  min-height: 42px;
  text-align: center;
  background: #fff;
}
/* Fallback sin touchspin: reactivar flechas nativas */
.product-line-grid .qty > input:only-child {
  -moz-appearance: auto;
  width: 72px;
  min-height: 42px;
  text-align: center;
  border: var(--wch-hairline);
  border-radius: var(--wch-radius-sm);
  background: #fff;
}
.product-line-grid .qty > input:only-child::-webkit-inner-spin-button,
.product-line-grid .qty > input:only-child::-webkit-outer-spin-button {
  -webkit-appearance: inner-spin-button !important;
  opacity: 1;
}
.product-line-actions .unit-price { font-size: 0.85rem; opacity: 0.85; }
.product-line-actions .price .product-price strong { font-size: 1.02rem; }

/* --- Alineación de importes: texto a la izquierda, importes a la derecha.
   Anula el text-align:center que el tema padre aplica a la mitad derecha. --- */
.cart-item .product-line-grid-right { text-align: right; }
.product-line-actions .unit-price,
.product-line-actions .price,
.product-line-actions .price .product-price {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.product-line-info .label { text-align: left; }

/* Móvil: la mitad derecha se apila → cantidad a la izquierda, importes a la
   derecha, en una sola fila clara y separada de la info del producto. */
@media (max-width: 767.98px) {
  .product-line-grid-right {
    margin-top: 12px;
    padding-top: 12px;
    border-top: var(--wch-hairline-soft);
  }
  .product-line-grid-right > .row {
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
  }
  .product-line-actions .qty {
    order: -1;            /* cantidad primero (izquierda) */
    margin-right: auto;   /* empuja los importes a la derecha */
  }
  .product-line-grid .bootstrap-touchspin { margin: 0; }
}

/* Botón eliminar: discreto, foco al hover */
.cart-line-product-actions .remove-from-cart {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  opacity: 0.55;
  transition: all 0.2s var(--wch-ease);
}
.cart-line-product-actions .remove-from-cart:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.05);
}

/* Descuento por línea: chip */
.product-line-actions .discount {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--wch-radius-sm);
}

/* Resumen: tarjeta sticky en desktop (patrón Shopify/BigCommerce) */
.cart-summary.card {
  border: var(--wch-hairline);
  border-radius: var(--wch-radius);
  box-shadow: var(--wch-shadow-1);
}
@media (min-width: 992px) {
  .cart-grid-right .cart-summary {
    position: sticky;
    top: var(--wch-sticky-top);
  }
}
.cart-summary .cart-summary-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 2px 12px;
  padding: 7px 0;
}
/* Texto a la izquierda, importe a la derecha (anula el float:right del padre) */
.cart-summary .cart-summary-line .label {
  text-align: left;
  margin: 0;
}
.cart-summary .cart-summary-line .value {
  float: none;
  margin-left: auto;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
/* Detalles secundarios (p. ej. desglose de envío): a línea completa */
.cart-summary .cart-summary-line > div {
  flex-basis: 100%;
  margin: 0;
  text-align: right;
}
.cart-summary .cart-total,
.cart-summary .cart-summary-totals .cart-total {
  border-top: var(--wch-hairline);
  margin-top: 6px;
  padding-top: 12px;
}
.cart-summary .cart-total .label,
.cart-summary .cart-total .value { font-size: 1.1rem; font-weight: 700; }

/* Voucher: campo + botón alineados */
.cart-summary .cart-voucher .promo-input,
.cart-summary .input-group { border-radius: var(--wch-radius-sm); }

/* CTA de checkout: protagonista, ancho completo */
.cart-detailed-actions .checkout a.btn,
.checkout.cart-detailed-actions .btn {
  width: 100%;
  min-height: 50px;
  font-size: 0.98rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: var(--wch-radius-sm);
}

/* Continuar comprando: secundario, discreto */
.cart-grid-body > a.btn-secondary {
  text-transform: none;
  letter-spacing: 0;
}

/* Reassurance bajo el resumen */
.cart-grid-right .block-reassurance {
  margin-top: var(--wch-gap);
  border: var(--wch-hairline);
  border-radius: var(--wch-radius);
  padding: 6px 14px;
}
.cart-grid-right .block-reassurance ul { margin: 0; }
.cart-grid-right .block-reassurance li { font-size: 0.8rem; padding: 8px 0; }

/* Carrito vacío: centrado y respirado */
.cart-empty .page-content,
#cart .cart-empty {
  text-align: center;
  padding: 48px 16px;
}
.cart-empty .no-items { font-size: 1.05rem; opacity: 0.8; margin-bottom: 18px; }

/* Cross-selling al pie del carrito */
.crossselling-product .products-section-title,
.cart-grid ~ * .section-title { margin-top: var(--wch-gap-lg); }

/* ===================================================================
 * Mobile-first global de stepper / acciones
 * Base = móvil (cantidad y CTA apilados a ancho completo);
 * desde sm el bloque cantidad+botón se pone en línea.
 * =================================================================== */
.product-line-actions .row { row-gap: 10px; }
/* En móvil: cantidad arriba, botón abajo. El wrapper touchspin mantiene
   su ancho propio (no estiramos el input para no romper las flechas). */
.product-add-to-cart .product-quantity { flex-direction: column; }

@media (min-width: 576px) {
  .product-add-to-cart .product-quantity { flex-direction: row; }
}

/* CTA de compra a ancho completo y dominante en móvil (B2B, pulgar) */
@media (max-width: 575.98px) {
  .product-add-to-cart .btn.add-to-cart { width: 100%; }
}

/* ===================================================================
 * 5) MOVIMIENTO — transiciones amenas y suaves
 * Curva del tema ($smooth-transition-timing). Sobrias, sin rebotes.
 * Guard de accesibilidad al final (prefers-reduced-motion).
 * =================================================================== */

@keyframes wch-fade-up {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes wch-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* --- Botones: lift al hover, presión al click --- */
.btn,
.product-miniature .btn-product-list,
.product-add-to-cart .btn.add-to-cart,
.cart-detailed-actions .btn,
#js-product-list-top .view-switcher a {
  transition: background-color 0.25s var(--wch-ease),
              border-color 0.25s var(--wch-ease),
              color 0.25s var(--wch-ease),
              box-shadow 0.25s var(--wch-ease),
              transform 0.15s var(--wch-ease);
}
.product-miniature .btn-product-list:hover,
.product-add-to-cart .btn.add-to-cart:hover,
.cart-detailed-actions .btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--wch-shadow-2);
}
.btn:active,
.product-miniature .btn-product-list:active,
.product-add-to-cart .btn.add-to-cart:active,
.cart-detailed-actions .btn:active {
  transform: translateY(0);
  box-shadow: var(--wch-shadow-1);
}

/* Icono de la bolsa que avanza un pelín al hover (sutil, B2B) */
.product-miniature .btn-product-list .bag-icon,
.product-add-to-cart .btn.add-to-cart .bag-icon {
  transition: transform 0.25s var(--wch-ease);
}
.product-miniature .btn-product-list:hover .bag-icon,
.product-add-to-cart .btn.add-to-cart:hover .bag-icon {
  transform: translateX(2px);
}

/* --- Card: imagen con zoom muy leve al hover --- */
.product-miniature .thumbnail-container .product-thumbnail .product-thumbnail-first {
  transition: opacity 0.35s var(--wch-ease), transform 0.6s var(--wch-ease);
}
.product-miniature:hover .product-thumbnail-first { transform: scale(1.03); }

/* Flags: entrada suave */
.product-miniature .product-flags .product-flag { animation: wch-fade-in 0.4s var(--wch-ease) both; }

/* Links de título/precio: color suave al hover */
.product-miniature .product-title a,
.product-miniature .product-price-and-shipping a {
  transition: color 0.2s var(--wch-ease), opacity 0.2s var(--wch-ease);
}

/* --- Galería: zoom de imagen e icono expandir --- */
.wch-gallery-img { transition: transform 0.5s var(--wch-ease); }
@media (min-width: 992px) {
  .wch-gallery-item:hover .wch-gallery-img { transform: scale(1.02); }
}
.wch-gallery-expand { transition: opacity 0.25s var(--wch-ease), transform 0.25s var(--wch-ease); }
.wch-gallery-zoom:hover .wch-gallery-expand { transform: scale(1.08); }
.wch-gallery-dot { transition: background-color 0.25s var(--wch-ease), transform 0.25s var(--wch-ease); }
.wch-gallery-dot.is-active { transform: scale(1.25); }

/* --- Toggle desplegable: el cuerpo entra con fade-up al abrir --- */
.wch-toggle-summary { transition: background-color 0.2s var(--wch-ease); }
.wch-toggle-summary:hover { background-color: rgba(0, 0, 0, 0.03); }
.wch-toggle[open] .wch-toggle-body { animation: wch-fade-up 0.3s var(--wch-ease) both; }

/* --- Buy-box e info: entrada amena al cargar la ficha --- */
.wch-buybox .product-actions { animation: wch-fade-up 0.45s var(--wch-ease) both; }

/* --- Acciones flotantes y disponibilidad de la card --- */
.product-miniature .product-functional-buttons-links a {
  transition: transform 0.2s var(--wch-ease), box-shadow 0.2s var(--wch-ease), background-color 0.2s var(--wch-ease);
}
.product-miniature .product-functional-buttons-links a:hover {
  transform: scale(1.08);
  box-shadow: var(--wch-shadow-2);
}

/* --- Carrito: línea con resalte suave al hover, quita con transición --- */
.product-line-grid { transition: background-color 0.2s var(--wch-ease); }
.cart-item:hover { background-color: rgba(0, 0, 0, 0.015); }
.cart-line-product-actions .remove-from-cart {
  transition: opacity 0.2s var(--wch-ease), background-color 0.2s var(--wch-ease), transform 0.2s var(--wch-ease);
}
.cart-line-product-actions .remove-from-cart:hover { transform: rotate(-8deg); }

/* --- Inputs de cantidad / steppers: borde fino visible + efecto ---
   El touchspin coloca las flechas ↑↓ absolutas a la derecha y el campo
   quedaba sin borde, perdiéndose sobre el fondo blanco. Damos contorno al
   WRAPPER con realce al hover/foco y un separador fino para las flechas. */
.bootstrap-touchspin {
  border: var(--wch-hairline);
  border-radius: var(--wch-radius-sm);
  background: #fff;
  transition: border-color 0.2s var(--wch-ease), box-shadow 0.2s var(--wch-ease);
}
.bootstrap-touchspin:hover { border-color: rgba(0, 0, 0, 0.3); }
.bootstrap-touchspin:focus-within {
  border-color: rgba(0, 0, 0, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.07);
}
/* Input interno: sin doble borde, hereda el contorno del wrapper */
.bootstrap-touchspin > input {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent;
}
/* Flechas del spinner: separador fino + realce al hover */
.bootstrap-touchspin .btn-touchspin {
  border-left: var(--wch-hairline);
  background: rgba(0, 0, 0, 0.02);
  color: inherit;
  transition: background-color 0.18s var(--wch-ease);
}
.bootstrap-touchspin .btn-touchspin:hover { background: rgba(0, 0, 0, 0.08); }

/* Campos de cantidad sin wrapper touchspin (fallback nativo): mismo borde */
.input-qty,
#quantity_wanted,
.js-cart-line-product-quantity,
.product-line-grid .qty input {
  border: var(--wch-hairline);
  border-radius: var(--wch-radius-sm);
  background: #fff;
  transition: border-color 0.2s var(--wch-ease), box-shadow 0.2s var(--wch-ease);
}
.input-qty:hover,
#quantity_wanted:hover,
.js-cart-line-product-quantity:hover,
.product-line-grid .qty input:hover { border-color: rgba(0, 0, 0, 0.3); }
.input-qty:focus,
#quantity_wanted:focus,
.js-cart-line-product-quantity:focus,
.product-line-grid .qty input:focus {
  border-color: rgba(0, 0, 0, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.07);
  outline: none;
}

/* --- Tabs de la ficha: subrayado animado --- */
.product-tabs .nav-tabs .nav-link {
  transition: border-color 0.25s var(--wch-ease), color 0.25s var(--wch-ease), opacity 0.25s var(--wch-ease);
}

/* ===================================================================
 * 5) BÚSQUEDA POR FACETAS (ps_facetedsearch) — UX 2026
 * -------------------------------------------------------------------
 * Hereda color de marca y tipografía del padre (no se redefinen).
 * Solo: jerarquía, ritmo, micro-interacción, buscador interno y
 * un drawer móvil deslizante con backdrop. Rubro con muchas
 * categorías → foco en encontrar rápido y filtrar sin fricción.
 * =================================================================== */

/* --- Sección de faceta: cabecera clicable + colapso animado --- */
#search_filters .facet > .facet-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  margin-bottom: 0;
  padding: 10px 0;
  transition: opacity 0.2s var(--wch-ease);
}
#search_filters .facet > .facet-title:hover { opacity: 1; }
#search_filters .facet > .facet-title .wch-facet-caret {
  flex: 0 0 auto;
  font-size: 0.7rem;
  line-height: 1;
  opacity: 0.55;
  transition: transform 0.28s var(--wch-ease);
}
#search_filters .facet.wch-facet--collapsed > .facet-title .wch-facet-caret {
  transform: rotate(-90deg);
}

/* Cuerpo colapsable: animación por max-height + opacidad */
#search_filters .facet > ul,
#search_filters .facet > .faceted-slider {
  max-height: 420px;
  overflow-y: auto;
  overflow-x: hidden;
  opacity: 1;
  transition: max-height 0.32s var(--wch-ease),
              opacity 0.22s var(--wch-ease),
              margin 0.28s var(--wch-ease),
              padding 0.28s var(--wch-ease);
}
#search_filters .facet.wch-facet--collapsed > ul,
#search_filters .facet.wch-facet--collapsed > .faceted-slider {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
}

/* Scrollbar discreta y consistente en las listas */
#search_filters .facet > ul::-webkit-scrollbar { width: 6px; }
#search_filters .facet > ul::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.18);
  border-radius: 999px;
}
#search_filters .facet > ul::-webkit-scrollbar-track { background: transparent; }
#search_filters .facet > ul { scrollbar-width: thin; }

/* --- Buscador interno de faceta (inyectado por JS) --- */
.wch-facet-search-li {
  position: sticky;
  top: 0;
  z-index: 2;
  list-style: none;
  margin: 0 0 6px;
  padding: 0 0 6px;
  background: #fff;
}
.wch-facet-search {
  position: relative;
  display: flex;
  align-items: center;
}
.wch-facet-search input {
  width: 100%;
  border: var(--wch-hairline);
  border-radius: 999px;
  padding: 7px 30px 7px 32px;
  font-size: 0.82rem;
  line-height: 1.2;
  background: var(--wch-surface);
  transition: border-color 0.2s var(--wch-ease), box-shadow 0.2s var(--wch-ease), background-color 0.2s var(--wch-ease);
}
.wch-facet-search input:focus {
  outline: none;
  background: #fff;
  border-color: rgba(0, 0, 0, 0.35);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}
.wch-facet-search .wch-facet-search-ico {
  position: absolute;
  left: 11px;
  font-size: 0.78rem;
  opacity: 0.45;
  pointer-events: none;
}
.wch-facet-search .wch-facet-search-clear {
  position: absolute;
  right: 8px;
  width: 18px;
  height: 18px;
  display: none;
  align-items: center;
  justify-content: center;
  border: 0;
  background: rgba(0, 0, 0, 0.08);
  color: inherit;
  border-radius: 999px;
  font-size: 0.62rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s var(--wch-ease), background-color 0.2s var(--wch-ease);
}
.wch-facet-search.is-filled .wch-facet-search-clear { display: inline-flex; }
.wch-facet-search .wch-facet-search-clear:hover { opacity: 1; background: rgba(0, 0, 0, 0.14); }
.wch-facet-search-empty {
  list-style: none;
  font-size: 0.8rem;
  opacity: 0.6;
  padding: 6px 2px;
  display: none;
}
.wch-facet--no-match .wch-facet-search-empty { display: block; }
li.wch-hidden { display: none !important; }

/* --- Opciones: área táctil amplia, alineación robusta con nombres largos --- */
#search_filters .facet .facet-label {
  display: flex;
  align-items: center;              /* casilla centrada respecto al texto */
  gap: 8px;
  margin: 0;
  padding: 5px 6px;
  border-radius: var(--wch-radius-sm);
  transition: background-color 0.18s var(--wch-ease);
}
#search_filters .facet-type-checkbox > li,
#search_filters .facet-type-radio > li { margin-bottom: 1px; }
#search_filters .facet .facet-label:hover { background-color: rgba(0, 0, 0, 0.04); }

/* La casilla nunca se comprime (evita el descuadre con nombres largos) */
#search_filters .facet .facet-label .custom-checkbox,
#search_filters .facet .facet-label .custom-radio {
  flex: 0 0 auto;
  margin-top: 0;
}
/* El texto ocupa el resto y PUEDE partirse (clave: min-width:0 en flex) */
#search_filters .facet .facet-label .search-link {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.3;
  overflow-wrap: anywhere;
  word-break: break-word;
}
#search_filters .facet .facet-label .magnitude {
  opacity: 0.5;
  font-size: 0.78rem;
  white-space: nowrap;              /* el contador no se parte */
  font-variant-numeric: tabular-nums;
}
#search_filters .facet-label.active { font-weight: 600; }

/* --- Micro-animación de checkbox/radio: la casilla "se llena" (ligera) --- */
#search_filters .custom-checkbox input[type="checkbox"] + span:not(.color),
#search_filters .custom-radio {
  transition: border-color 0.18s var(--wch-ease),
              box-shadow 0.18s var(--wch-ease),
              background-color 0.18s var(--wch-ease);
}
#search_filters .facet-label:hover .custom-checkbox input[type="checkbox"] + span:not(.color),
#search_filters .facet-label:hover .custom-radio {
  border-color: rgba(0, 0, 0, 0.4);
}
/* Marcado: hereda el color de texto (currentColor), no redefine la marca */
#search_filters .custom-checkbox input[type="checkbox"]:checked + span:not(.color) {
  background-color: currentColor;
  border-color: currentColor;
}
#search_filters .custom-checkbox input[type="checkbox"]:checked + span:not(.color) .checkbox-checked {
  color: #fff;
}
#search_filters .custom-radio input[type="radio"]:checked + span {
  background-color: currentColor;
}

/* Swatches de color: tamaño táctil + anillo de selección heredando color */
#search_filters .facet_color .facet-label { padding: 3px; }
#search_filters .facet_color .color {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  transition: transform 0.18s var(--wch-ease), box-shadow 0.18s var(--wch-ease);
}
#search_filters .facet_color .facet-label:hover .color { transform: scale(1.1); }
#search_filters .facet_color .facet-label.active .color {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px currentColor;
}

/* --- Slider de precio: barra fina + handle con micro-interacción amable.
   Sin transición en left/width para que el arrastre no tenga lag. --- */
#search_filters .faceted-slider p[id^="facet_label"] {
  margin: 0 0 4px;
  font-size: 0.82rem;
  opacity: 0.8;
  font-variant-numeric: tabular-nums;
}
#search_filters .ui-slider {
  position: relative;
  height: 4px;
  margin: 14px 9px 20px;
  background: rgba(0, 0, 0, 0.1);
  border: 0;
  border-radius: 999px;
}
#search_filters .ui-slider .ui-slider-range {
  position: absolute;
  height: 100%;
  background: currentColor;            /* hereda el color de texto del tema */
  border-radius: 999px;
  transition: background-color 0.2s var(--wch-ease);
}
#search_filters .ui-slider .ui-slider-handle {
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  margin-top: -9px;
  background: #fff;
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow: var(--wch-shadow-1);
  cursor: grab;
  outline: none;
  transition: transform 0.16s var(--wch-ease), box-shadow 0.16s var(--wch-ease);
}
#search_filters .ui-slider .ui-slider-handle:hover { transform: scale(1.12); }
#search_filters .ui-slider .ui-slider-handle:focus,
#search_filters .ui-slider .ui-slider-handle.ui-state-active,
#search_filters .ui-slider .ui-slider-handle:active {
  transform: scale(1.18);
  box-shadow: 0 0 0 6px rgba(0, 0, 0, 0.06), var(--wch-shadow-2);
  cursor: grabbing;
}

/* --- Chips de filtros activos: pastilla con micro-interacción --- */
#js-active-search-filters .filter-block .btn,
.active_filters .filter-block .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.78rem;
  transition: transform 0.18s var(--wch-ease), box-shadow 0.18s var(--wch-ease), background-color 0.18s var(--wch-ease);
}
#js-active-search-filters .filter-block .btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--wch-shadow-1);
}

/* ===================================================================
 * 5a) ÁRBOL DE CATEGORÍAS  (ps_categorytree)
 * -------------------------------------------------------------------
 * Fix: el chevron va en position:absolute right:0 y el enlace no
 * reservaba hueco → los nombres largos quedaban debajo del icono.
 * Se reserva espacio a la derecha y se anima el desplegado.
 * =================================================================== */
.block-categories .category-sub-menu li > a,
.block-categories .category-sub-menu li > .category-sub-link {
  display: block;
  padding: 6px 28px 6px 0;          /* hueco a la derecha para el chevron */
  line-height: 1.35;
  overflow-wrap: anywhere;          /* nombres largos parten sin desbordar */
  word-break: break-word;
}
.block-categories .collapse-icons {
  width: 26px;
  height: 32px;                     /* alto ≈ 1ª línea: centra el chevron */
  display: flex;
  align-items: center;
  justify-content: center;
  top: 0;
  right: 0;
  border-radius: var(--wch-radius-sm);
  transition: background-color 0.18s var(--wch-ease);
}
.block-categories .collapse-icons:hover { background: rgba(0, 0, 0, 0.06); }
/* Un solo icono que rota: desplegado = animación amable (sin parpadeo) */
.block-categories .collapse-icons .remove { display: none !important; }
.block-categories .collapse-icons .add {
  display: inline-block !important;
  transition: transform 0.25s var(--wch-ease);
}
.block-categories .collapse-icons[aria-expanded="true"] .add { transform: rotate(180deg); }
/* Sangría de subniveles con guía sutil */
.block-categories .category-sub-menu .category-sub-menu {
  margin-left: 10px;
  padding-left: 8px;
  border-left: var(--wch-hairline-soft);
}

/* Buscador en vivo del árbol (inyectado por JS): reutiliza .wch-facet-search */
.block-categories .wch-cat-search { margin: 6px 0 12px; }
.block-categories .wch-cat-empty {
  display: none;
  font-size: 0.8rem;
  opacity: 0.6;
  padding: 4px 2px;
}
.block-categories.wch-cat-no-match .wch-cat-empty { display: block; }
.block-categories li.wch-cat-hidden { display: none !important; }
/* Al filtrar: revelar todos los niveles para ver coincidencias anidadas */
.block-categories.wch-cat-filtering .category-top-menu .collapse {
  display: block !important;
  height: auto !important;
}
/* Resaltado leve del término encontrado */
.block-categories .wch-cat-mark {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
  padding: 0 1px;
}

/* ===================================================================
 * 5b) DRAWER MÓVIL DE FILTROS  (< md)
 * =================================================================== */
.wch-filters-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1090;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.32s var(--wch-ease), visibility 0.32s var(--wch-ease);
}
body.wch-filters-open .wch-filters-backdrop { opacity: 1; visibility: visible; }
body.wch-no-scroll { overflow: hidden; }

/* Cabecera y pie inyectados del drawer: sólo visibles en móvil */
.wch-filters-head { display: none; }

@media (max-width: 767.98px) {
  /* El wrapper pasa a panel deslizante fijo (sobrescribe el display del padre) */
  #left-column #facets_search_wrapper,
  #right-column #facets_search_wrapper,
  #facets_search_wrapper {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(88vw, 360px);
    max-width: 100%;
    margin: 0;
    z-index: 1095;
    background: #fff;
    box-shadow: var(--wch-shadow-3);
    transform: translateX(-100%);
    transition: transform 0.34s var(--wch-ease);
    -webkit-overflow-scrolling: touch;
  }
  #left-column.-only-facet-search #facets_search_wrapper,
  #right-column.-only-facet-search #facets_search_wrapper,
  body.wch-filters-open #facets_search_wrapper {
    transform: translateX(0);
  }

  #facets_search_wrapper #search_filters_wrapper {
    display: flex !important;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    padding: 0;
    margin: 0;
    background: #fff;
    box-shadow: none;
  }

  /* Cabecera sticky: título + cerrar */
  .wch-filters-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 0 0 auto;
    padding: 14px 16px;
    border-bottom: var(--wch-hairline);
  }
  .wch-filters-head .wch-filters-title {
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    margin: 0;
  }
  .wch-filters-head .wch-filters-close {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    font-size: 1rem;
    line-height: 1;
    color: inherit;
    cursor: pointer;
    transition: background-color 0.2s var(--wch-ease), transform 0.2s var(--wch-ease);
  }
  .wch-filters-head .wch-filters-close:hover { background: rgba(0, 0, 0, 0.1); transform: rotate(90deg); }

  /* Cuerpo de facetas: zona central con scroll propio */
  #facets_search_wrapper .block-facets {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 16px 16px;
  }
  #facets_search_wrapper #search_filters { padding: 0; }
  #search_filters .facet > ul { max-height: none; }

  /* Pie sticky: acciones (Ver resultados / limpiar) */
  #search_filter_controls {
    display: flex !important;
    flex-direction: row-reverse;
    gap: 10px;
    flex: 0 0 auto;
    margin: 0;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    border-top: var(--wch-hairline);
    background: #fff;
  }
  #search_filter_controls .ok {
    flex: 1 1 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }
  #search_filter_controls .js-search-filters-clear-all { flex: 0 0 auto; }

  /* Orden visual del drawer: cabecera arriba, contenido, acciones al fondo
     (en el DOM #search_filter_controls va antes de las facetas) */
  #facets_search_wrapper .wch-filters-head { order: 0; }
  #facets_search_wrapper .block-facets { order: 1; }
  #facets_search_wrapper #search_filter_controls { order: 2; }

  /* Árbol de categorías movido al drawer (JS): visible y como 1ª sección */
  #facets_search_wrapper .block-categories.wch-cat-in-drawer {
    margin: 0 0 14px;
    padding: 0 0 14px;
    border-bottom: var(--wch-hairline);
  }
  /* Anular el acordeón móvil del padre dentro del drawer: siempre visible */
  #facets_search_wrapper .block-categories .block-content,
  #facets_search_wrapper .block-categories .category-top-menu {
    display: block !important;
    height: auto !important;
  }
  #facets_search_wrapper .block-categories .block-title {
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    opacity: 0.85;
  }
}

/* ===================================================================
 * 6) MEGAMENÚ (iqitmegamenu) — capa minimalista
 * -------------------------------------------------------------------
 * Realce estético SOBRE el módulo: no toca grid/posición/aparición,
 * solo tipografía, hairlines, sombra del panel y micro-interacción.
 * Hereda colores y tipografía del tema (acentos vía currentColor).
 * Clases del módulo: #iqitmegamenu-horizontal, .cbp-hrmenu, .cbp-hrsub.
 * =================================================================== */

/* Barra: tira limpia con hairline inferior */
#iqitmegamenu-horizontal { border-bottom: var(--wch-hairline); }

/* Pestañas de primer nivel: tipografía sobria + subrayado animado */
#iqitmegamenu-horizontal .cbp-hrmenu > ul > li > a {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  position: relative;
  transition: color 0.2s var(--wch-ease), opacity 0.2s var(--wch-ease);
}
#iqitmegamenu-horizontal .cbp-hrmenu > ul > li > a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 6px;
  height: 2px;
  background: currentColor;
  opacity: 0.6;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.28s var(--wch-ease);
}
#iqitmegamenu-horizontal .cbp-hrmenu > ul > li:hover > a::after,
#iqitmegamenu-horizontal .cbp-hrmenu > ul > li.cbp-hropen > a::after {
  transform: scaleX(1);
}

/* Etiqueta/badge de pestaña (Nuevo, Sale…): pastilla discreta */
#iqitmegamenu-horizontal .cbp-legend-main,
#iqitmegamenu-horizontal .cbp-category-legend {
  border-radius: 999px;
  font-size: 0.62rem;
  letter-spacing: 0.03em;
  padding: 1px 7px;
}

/* Panel desplegable: tarjeta minimalista (borde fino + sombra + radius) */
#iqitmegamenu-horizontal .cbp-hrsub,
.cbp-hrmenu .cbp-hrsub {
  border: var(--wch-hairline);
  border-top: 0;
  border-radius: 0 0 var(--wch-radius) var(--wch-radius);
  box-shadow: var(--wch-shadow-2);
  background: #fff;
}
.cbp-hrmenu .cbp-hrsub-inner,
.cbp-hrsub .cbp-hrsub-inner { padding: 22px 24px; }

/* Títulos de columna: uppercase fino con hairline inferior */
.cbp-hrsub .menu-title,
.cbp-hrsub .cbp-column-title,
.cbp-hrsub .title_block,
.cbp-hrsub h4 {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  opacity: 0.85;
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: var(--wch-hairline-soft);
}

/* Enlaces de subcategoría: aire + hover con desplazamiento sutil */
.cbp-hrsub a {
  border-radius: var(--wch-radius-sm);
  transition: color 0.18s var(--wch-ease),
              background-color 0.18s var(--wch-ease),
              padding-left 0.18s var(--wch-ease);
}
.cbp-hrsub li > a:hover {
  background: rgba(0, 0, 0, 0.04);
  padding-left: 10px;
}

/* Versión móvil (panel push/dropdown): separadores finos y aire */
#iqitmegamenu-mobile li > a,
#_mobile_iqitmegamenu-mobile li > a {
  border-bottom: var(--wch-hairline-soft);
  transition: background-color 0.18s var(--wch-ease);
}
#iqitmegamenu-mobile li > a:hover,
#_mobile_iqitmegamenu-mobile li > a:hover { background: rgba(0, 0, 0, 0.04); }

/* ===================================================================
 * Accesibilidad: respetar usuarios que reducen el movimiento
 * =================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .product-miniature:hover,
  .product-miniature:hover .product-thumbnail-first,
  .wch-gallery-item:hover .wch-gallery-img { transform: none !important; }
}
