/* ===== Títulos de sección del módulo ===== */
.product__description-short-title,
.picoya-packaging__title,
.picoya-datasheets__title {
  color: var(--bs-secondary-color);
  font-size: .875em;
  font-weight: 400;
  padding-bottom: .5rem;
  padding-top: .5rem;
  text-align: left;
  text-transform: uppercase;
  margin: 0;
}

/* ===== Envase / Packaging ===== */
.picoya-packaging { margin-top: 12px; }
.picoya-packaging__img { width: 100%; height: auto; display: block; }

/* ===== Pictogramas ===== */
.picoya-pictograms { margin-top: 12px; }
.picoya-pictograms__img { width: 100%; height: auto; display: block; }

/* ===== Vídeos ===== */
.picoya-videos { margin-top: 12px; }
.picoya-videos__embed { width: 100%; }
.picoya-videos__embed iframe { width: 100%; height: 100%; border: 0; }

/* ===== Fichas técnicas ===== */
.picoya-datasheets { margin-top: 12px; }

.picoya-datasheets__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 4px;
  margin-bottom: 4px;
}

.picoya-datasheets__icon {
  font-size: 18px;
  line-height: 1;
  vertical-align: middle;
  color: #c0392b;
}

.picoya-datasheets__size {
  font-size: .75rem;
  color: #6c757d;
}

/* ===== Referencia en miniatura de listado ===== */
.product-miniature__reference {
  color: #000;
  text-decoration: none;
}
.product-miniature__reference:hover,
.product-miniature__reference:focus {
  color: #009589;
}
/* Posiciones de escobilla del vehículo buscado (filtro de escobillas), bajo la Ref. */
.product-miniature__esc-positions {
  margin-top: 0.25rem;
  padding: 0.2rem 0.5rem;
  border: 1px dashed #009589;
  border-radius: 0.25rem;
  color: #000;
  font-size: 0.8125rem;
  line-height: 1.3;
}
.product-miniature__esc-positions-title {
  display: block;
  font-weight: 700;
}
.product-miniature__esc-positions-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ===== Soluciones ===== */
.picoya-sol-header { background: #009589; padding: 32px 0; }
.picoya-sol-header__title { color: #fff; font-size: 1.5rem; font-weight: 700; margin-bottom: .5rem; }
.picoya-sol-header__sub { color: rgba(255,255,255,.85); margin-bottom: 0; }

.picoya-sol-filter { background: rgba(0,0,0,.15); border-radius: 8px; padding: 20px; }

.picoya-sol-tabs { margin-bottom: 0; }
.picoya-sol-vehicle { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 12px 0 0; font-size: 1rem; font-weight: 600; color: #1d2b28; }
.picoya-sol-vehicle .material-icons { font-size: 22px; color: #009589; }
.picoya-sol-vehicle__sep { color: #adb5bd; font-weight: 400; }

.picoya-sol { border: 1px solid #dee2e6; border-radius: 8px; overflow: hidden; }

/* Foto de la solución: mismo tamaño y proporción que la miniatura de los listados
   (cuadrada, ~300px en escritorio, foto entera con object-fit contain; ver
   _product-miniature.scss del tema). Los selectores llevan .carousel-item delante para
   ganar a las reglas globales de .carousel de _slider.scss (pensadas para el slider de
   la home: object-fit cover, alto fijo, flechas a 3rem dentro de la foto). */
.picoya-sol__carousel-wrap { width: 324px; min-width: 324px; flex-shrink: 0; padding: 12px; align-self: flex-start; }
.picoya-sol__carousel,
.picoya-sol__single-img { position: relative; width: 100%; aspect-ratio: 1 / 1; border-radius: 8px; overflow: hidden; }
.picoya-sol__carousel .carousel-inner,
.picoya-sol__carousel .carousel-item { height: 100%; }
.picoya-sol__zoom { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.picoya-sol__carousel .carousel-item .picoya-sol__img,
.picoya-sol__single-img .picoya-sol__img { display: block; width: 100%; height: 100%; object-fit: contain; }

/* Flechas redondas, las mismas que el visor ampliado de la ficha (_product.scss). */
.picoya-sol__carousel .carousel-control-prev,
.picoya-sol__carousel .carousel-control-next { top: 50%; width: auto; height: auto; padding: 0 .5rem; background: none; border-radius: 0; opacity: 1; transform: translateY(-50%); }
.picoya-sol__carousel .carousel-control-prev { left: 0; }
.picoya-sol__carousel .carousel-control-next { right: 0; }
.picoya-sol__carousel .carousel-control-prev:hover,
.picoya-sol__carousel .carousel-control-next:hover { opacity: .75; }
.picoya-sol__carousel .carousel-control-prev-icon,
.picoya-sol__carousel .carousel-control-next-icon {
  width: 2.5rem; height: 2.5rem;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg fill='%2392bcb5' width='800px' height='800px' viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M218.82812,130.82812l-72,72a3.99957,3.99957,0,0,1-5.65625-5.65625L206.34326,132H40a4,4,0,0,1,0-8H206.34326L141.17187,58.82812a3.99957,3.99957,0,0,1,5.65625-5.65625l72,72A3.99854,3.99854,0,0,1,218.82812,130.82812Z'/%3E%3C/svg%3E");
  border-radius: 50%;
  box-shadow: 0 0 .25rem rgb(0 0 0 / 20%);
}
.picoya-sol__carousel .carousel-control-prev-icon { transform: rotate(180deg); }

/* overflow-x: red de seguridad; si la tabla aún no cabe, que haga scroll en vez de que
   .picoya-sol (overflow: hidden) recorte la columna de los botones de carrito. */
.picoya-sol__content { min-width: 0; overflow-x: auto; }
.picoya-sol__label { font-size: 1rem; font-weight: 700; color: #009589; text-transform: uppercase; letter-spacing: .06em; padding: 16px 16px 10px; border-bottom: 2px solid #e6f4f3; }

.picoya-sol__table { width: 100%; border-collapse: collapse; }
.picoya-sol__table thead th { background: #009589; color: #fff; padding: 8px 12px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.picoya-sol__table thead th:nth-child(3),
.picoya-sol__table thead th:nth-child(4),
.picoya-sol__table thead th:nth-child(5) { text-align: right; }
.picoya-sol__table tbody td { padding: 8px 12px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; font-size: .875rem; }
.picoya-sol__table tfoot td { padding: 10px 12px; background: #f8f9fa; font-size: .875rem; }
.picoya-sol__total-price { color: #009589; font-size: 1rem; }
.picoya-sol__pvp { color: var(--bs-gray-600, #6c757d); }
.picoya-sol__optional { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; margin-top: 10px; padding-bottom: 2px; }
.picoya-sol__optional-badge { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; color: #6c757d; }
.picoya-sol__optional-badge .material-icons { font-size: 18px; color: #009589; }
.picoya-sol__optional-switch { display: flex; align-items: center; gap: 8px; margin: 0; min-height: 0; font-size: .8rem; }
.picoya-sol__optional-switch .form-check-input { margin-top: 0; cursor: pointer; }
.picoya-sol__optional-switch .form-check-input:checked { background-color: #009589; border-color: #009589; }
.picoya-sol__optional-switch .form-check-label { cursor: pointer; }
.picoya-sol__row--optional:not(.picoya-sol__row--included) > td { background: #fbfbfb; }

/* Por debajo de lg la foto (324px) al lado deja a la tabla sin sitio para sus 5 columnas:
   se coloca encima. */
@media (max-width: 991px) {
  .picoya-sol { flex-direction: column; }
  .picoya-sol__carousel-wrap { width: 100%; min-width: 0; }
  .picoya-sol__carousel,
  .picoya-sol__single-img { max-width: 320px; margin: 0 auto; }
}

/* En móvil la tabla no cabe ni a ancho completo: cada fila se apila como una tarjeta.
   Sin <thead>; cada celda lleva su cabecera en data-label (soluciones_list.tpl) y la pinta
   a la izquierda con el valor a la derecha. */
@media (max-width: 767px) {
  .picoya-sol__table thead { display: none; }
  .picoya-sol__table tr { display: block; padding: 10px 12px; border-bottom: 1px solid #f0f0f0; }
  .picoya-sol__table tfoot tr { background: #f8f9fa; border-bottom: 0; }
  .picoya-sol__table tbody td,
  .picoya-sol__table tfoot td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 2px 0; border: 0; background: none; }
  .picoya-sol__table td[data-label]::before { content: attr(data-label); font-size: .8rem; font-weight: 600; color: #6c757d; white-space: nowrap; }
  .picoya-sol__table tbody td:first-child,
  .picoya-sol__table tfoot td:first-child { display: block; padding-bottom: 6px; }
  .picoya-sol__table td.picoya-sol__actions { justify-content: flex-end; padding-top: 6px; }
  .picoya-sol__table tfoot .picoya-sol__actions .btn { width: 100%; }
  .picoya-sol__table tfoot .picoya-sol__total-label { font-weight: 700; }
  .picoya-sol__row--optional:not(.picoya-sol__row--included) { background: #fbfbfb; }
}

/* ===== Etiquetas "Tu precio"/"PVP" ===== */
.picoya-price-label {
  font-size: .75rem;
  font-weight: 400;
  color: var(--bs-gray-600, #6c757d);
  text-decoration: none;
}
.picoya-price-label--inline {
  font-size: 1rem;
  margin-right: .35rem;
}

/* ===== Precio tachado (tarifa base para registrados) ===== */
.product__price-regular {
  font-size: .875rem;
  color: var(--bs-gray-600, #6c757d);
}
.product-miniature__regular-price {
  font-size: .8125rem;
}
/* Listado: el precio "Tu precio" a 20px, por encima del texto base */
.product-miniature .product-miniature__price {
  font-size: 1.25rem;
}

/* ===== Capa de filtros en home ===== */
.picoya-home-filters { background: #000; width: 100%; padding: 32px 16px; }
.picoya-home-filters__inner { display: flex; flex-wrap: wrap; gap: 24px; max-width: 1200px; margin: 0 auto; }
.picoya-home-filters__col { flex: 1 1 0; min-width: 280px; display: flex; justify-content: center; }
.picoya-home-filters__col .card { width: 100%; max-width: 420px; }
@media (max-width: 767px) { .picoya-home-filters__col { flex-basis: 100%; } }

/* ===== Página Buscadores — bandas con foto de fondo ===== */
.picoya-bus-hero { background: transparent; margin-bottom: 8px; }
.picoya-bus-hero .picoya-sol-header__title { color: #1d2b28; }
.picoya-bus-hero .picoya-sol-header__sub { color: #495057; }

.picoya-bus-band { padding: 56px 0; }
/* Hueco blanco entre bandas para que cada buscador se lea como un bloque propio */
.picoya-bus-band + .picoya-bus-band { margin-top: 32px; }

/* Foto a sangre con un velo oscuro encima para que el texto blanco se lea
   también sobre las zonas claras (lluvia del limpiaparabrisas, nieve).
   La cabecera de Soluciones (soluciones.tpl) reutiliza --photo --barras. */
.picoya-bus-band--photo {
  position: relative;
  background-color: #1d2b28;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.picoya-bus-band--photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.78);
}
.picoya-bus-band--photo > .container { position: relative; }
.picoya-bus-band--photo .picoya-bus-band__text { text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.picoya-bus-band--barras { background-image: url(../views/img/buscadores/barras.jpg); }
.picoya-bus-band--cadenas { background-image: url(../views/img/buscadores/cadenas.jpg?v=2); }
.picoya-bus-band--fundas { background-image: url(../views/img/buscadores/fundas.jpg?v=2); }
.picoya-bus-band--escobillas { background-image: url(../views/img/buscadores/escobillas.jpg); }

/* El nombre del buscador (kicker) es el texto dominante; el titular queda como secundario */
.picoya-bus-band__kicker {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: .02em;
  text-transform: uppercase;
  margin-bottom: .75rem;
}
.picoya-bus-band--photo .picoya-bus-band__kicker { color: #fff; }

.picoya-bus-band__title { font-size: 1.125rem; font-weight: 600; margin-bottom: .5rem; }
.picoya-bus-band--photo .picoya-bus-band__title { color: rgba(255,255,255,.9); }

.picoya-bus-band__sub { font-size: 1rem; max-width: 480px; margin-bottom: 0; }
.picoya-bus-band--photo .picoya-bus-band__sub { color: rgba(255,255,255,.9); }

/* Caja del texto de reclamo. En las bandas con el texto en la columna izquierda
   la caja se pega a la derecha, a la misma altura que el borde derecho de la caja
   del formulario de las otras bandas; el texto sigue alineado a la izquierda. */
.picoya-bus-band__text-box { max-width: 480px; }
@media (min-width: 992px) {
  .picoya-bus-band__text--end .picoya-bus-band__text-box { margin-left: auto; }
}

.picoya-bus-band__form { width: 100%; max-width: 420px; }
/* Las cajas de escobillas/fundas/cadenas son .card blancas (partials compartidos con la
   columna izquierda y la home); aquí se igualan a la caja translúcida de barras
   (.picoya-sol-filter): fondo negro al 15 %, sin borde y con texto blanco. */
.picoya-bus-band__form .card {
  background: rgba(0,0,0,.15);
  border: none;
  border-radius: 8px;
  box-shadow: none;
}
.picoya-bus-band__form .card-body { padding: 20px; }
.picoya-bus-band__form .card-title,
.picoya-bus-band__form .form-label { color: #fff; }
.picoya-bus-band__form .btn-outline-secondary { color: #fff; border-color: #fff; }
.picoya-bus-band__form .btn-outline-secondary:hover { color: #1d2b28; background: #fff; }

@media (max-width: 991px) {
  .picoya-bus-band { padding: 40px 0; }
  .picoya-bus-band + .picoya-bus-band { margin-top: 20px; }
  .picoya-bus-band__kicker { font-size: 1.875rem; }
  /* Con las columnas apiladas, el texto va centrado y separado de los bordes */
  .picoya-bus-band__text { text-align: center; padding-left: 1.5rem; padding-right: 1.5rem; }
  .picoya-bus-band__text-box { margin-left: auto; margin-right: auto; }
}

/* ===== Icono de disponibilidad — listado de productos =====
   Mismo lado que el botón de wishlist (.wishlist-button-add, top:0.635rem;
   right:0.635rem; 2.5rem de diámetro) pero debajo, para no solaparse. */
.picoya-stock-semaphore {
  position: absolute;
  top: 3.635rem;
  right: 0.635rem;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  min-width: 2.5rem;
  background-color: #fff;
  border-radius: 50%;
  box-shadow: 0.125rem -0.125rem 0.25rem 0 rgba(0, 0, 0, 0.2);
}
.picoya-stock-semaphore .material-icons {
  font-size: 1.25rem;
}
.picoya-stock-semaphore--available .material-icons { color: #2e7d32; }
.picoya-stock-semaphore--unavailable .material-icons { color: #e8730f; }

/* ===== Caja de disponibilidad — ficha de producto ===== */
.picoya-stock-box {
  display: flex;
  align-items: center;
  margin-top: 0.75rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid #e3e3e3;
  border-radius: 0.5rem;
}
.picoya-stock-box__text { font-size: 0.9rem; }
.picoya-stock-box__semaphore {
  width: 1rem;
  height: 1rem;
  min-width: 1rem;
  border-radius: 50%;
  margin-right: 0.6rem;
}
.picoya-stock-box--available .picoya-stock-box__semaphore { background-color: #2e7d32; }
.picoya-stock-box--unavailable .picoya-stock-box__semaphore { background-color: #e8730f; }
.picoya-stock-box--available .picoya-stock-box__text { color: #1b5e20; }
.picoya-stock-box--unavailable .picoya-stock-box__text { color: #a34e00; }

/* Fila de cajas de la ficha: stock + peso por unidad + unidades por caja, las tres en una sola
   línea (texto pequeño y sin saltos). Solo en móvil estrecho se permite pasar a la línea siguiente.
   El margen inferior que el tema pone a .picoya-stock-box (_product.scss) pasa a la fila. */
.picoya-product-boxes {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.375rem;
  margin-top: 0.75rem;
  margin-bottom: 2.1875rem;
}
@media (max-width: 575.98px) {
  .picoya-product-boxes { flex-wrap: wrap; }
}
.page-product .product .picoya-product-boxes .picoya-stock-box,
.picoya-product-boxes .picoya-stock-box {
  margin-top: 0;
  margin-bottom: 0;
}
.picoya-product-boxes .picoya-stock-box,
.picoya-info-box {
  padding: 0.35rem 0.6rem;
  white-space: nowrap;
}
.picoya-product-boxes .picoya-stock-box__text,
.picoya-info-box__text {
  font-size: 0.75rem;
  line-height: 1.2;
}
.picoya-product-boxes .picoya-stock-box__semaphore {
  width: 0.75rem;
  height: 0.75rem;
  min-width: 0.75rem;
  margin-right: 0.4rem;
}
.picoya-info-box {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid #e3e3e3;
  border-radius: 0.5rem;
  color: #333;
}
.picoya-info-box__icon {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  color: var(--bs-primary, #333);
}

/* ===== Modo debug de tarifas (PicoyaHelper::isPriceDebugActive) ===== */
.picoya-price-debug {
  position: relative;
  display: inline-block;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  line-height: 1.2;
  text-align: right;
  cursor: help;
}
.picoya-price-debug__label {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border: 1px dashed #6f42c1;
  border-radius: 0.25rem;
  color: #6f42c1;
  background: #f5f0ff;
}
.picoya-price-debug--warn .picoya-price-debug__label,
.picoya-price-debug--error .picoya-price-debug__label {
  border-color: #c0392b;
  color: #c0392b;
  background: #fdecea;
}
.picoya-price-debug__layer {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1080;
  width: max-content;
  max-width: min(34rem, 92vw);
  padding: 0.6rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 0.4rem;
  background: #fff;
  color: #222;
  box-shadow: 0 0.4rem 1.2rem rgba(0, 0, 0, 0.18);
  text-align: left;
  white-space: normal;
  cursor: auto;
}
.align-items-start > .picoya-price-debug .picoya-price-debug__layer {
  right: auto;
  left: 0;
}
.picoya-price-debug:hover .picoya-price-debug__layer,
.picoya-price-debug:focus-within .picoya-price-debug__layer {
  display: block;
}
/* El `filter: drop-shadow` de `.card:hover` del tema crea un contexto de apilamiento: el
   z-index de la capa solo cuenta dentro de su tarjeta y las siguientes se pintan encima.
   Mientras la capa está abierta se eleva la miniatura entera sobre sus hermanas. */
.product-miniature:has(.picoya-price-debug:hover),
.product-miniature:has(.picoya-price-debug:focus-within) {
  position: relative;
  z-index: 1080;
}
.picoya-price-debug__title,
.picoya-price-debug__subtitle,
.picoya-price-debug__note,
.picoya-price-debug__warning {
  display: block;
}
.picoya-price-debug__title { font-weight: 700; margin-bottom: 0.3rem; }
.picoya-price-debug__subtitle { font-weight: 600; margin: 0.5rem 0 0.15rem; }
.picoya-price-debug__note { color: #555; font-style: italic; margin-top: 0.2rem; }
.picoya-price-debug__warning {
  margin-top: 0.35rem;
  padding: 0.25rem 0.4rem;
  border-left: 3px solid #c0392b;
  background: #fdecea;
  color: #8e2a1f;
}
.picoya-price-debug__layer table {
  width: 100%;
  border-collapse: collapse;
}
.picoya-price-debug__layer th,
.picoya-price-debug__layer td {
  padding: 0.1rem 0.35rem;
  border-bottom: 1px solid #eee;
  vertical-align: top;
  white-space: nowrap;
}
.picoya-price-debug__layer th { font-weight: 600; color: #555; }
.picoya-price-debug__layer tbody td:first-child { white-space: normal; }
.picoya-price-debug__layer .num { text-align: right; font-variant-numeric: tabular-nums; }
.picoya-price-debug__layer tr.is-winner td { background: #e8f5e9; font-weight: 600; }

/* ===== Desplegables de los buscadores (Tom Select, js/select-search.js) =====
   En modo single Tom Select deja su <input> de búsqueda (min-width 7rem) detrás del valor
   elegido en un contenedor con flex-wrap: si valor + 7rem no caben, el input salta a una
   segunda línea y el desplegable crece aunque sobre sitio. Todo en una línea; un valor muy
   largo se corta con puntos suspensivos. */
.ts-wrapper.single .ts-control {
  flex-wrap: nowrap;
  overflow: hidden;
}
.ts-wrapper.single .ts-control > .item {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* El input ocupa lo que quede a la derecha del valor (base 0: no le quita sitio al valor) */
.ts-wrapper.single .ts-control > input {
  flex: 1 1 0 !important;
  min-width: 1rem;
}

/* Selector de vehículo de la ficha de una escobilla (escobillas_product.tpl): mismo margen
   inferior que los demás bloques de la ficha (_product.scss, rem(35)). */
.picoya-escobillas-product {
  margin-bottom: 2.1875rem;
}

/* Total del carrito/pedido: aviso "IVA no incluido" bajo el precio */
.picoya-vat-note {
  font-size: 0.7rem;
}

/* Carrito: subtotal de línea centrado bajo el selector de cantidad (2 botones 2.375rem + input 4.5rem),
   más el padding lateral de la columna Bootstrap (gutter), que también se resta del ancho útil */
.picoya-cart-line-total {
  width: calc(9.25rem + var(--bs-gutter-x, 1.5rem));
  text-align: center;
}
