/**
 * Single Product CSS
 * Estilos para la página de producto individual
 * 
 * @package ClimaZona
 * @version 2.6.0
 */

/* ========================================
   LAYOUT PRINCIPAL: Galería + Summary (sp-product-top)
   ======================================== */

.sp-product-top {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 900px) {
    .sp-product-top {
        grid-template-columns: 5fr 7fr;
        gap: 2rem;
    }
}

/* .sp-product-gallery: estilos principales al final del archivo */

.sp-product-summary {
    background: #fff;
    width: 100%;
}

@media (min-width: 900px) {
    .sp-product-summary {
        position: sticky;
        top: calc(70px + 1rem);
        align-self: start;
    }
}

/* ========================================
   PIL: Product Info List
   Componente genérico de lista de información del producto.
   Usado para stock/delivery (lazy-hydrated) y envío (SSR).
   ======================================== */

.pil {
    border: 1px solid var(--border-color, #e4e4e7);
    border-radius: 0.5rem;
    /* Sin overflow:hidden para que los popovers escapen el contenedor */
    margin-bottom: 0.875rem;
}

.pil__item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--theme-secondary, #334155);
    border-bottom: 1px solid var(--border-color, #e4e4e7);
    position: relative; /* ancla para .pil-popover */
}

.pil__item:last-child {
    border-bottom: none;
}

/* Border-radius interior para compensar la eliminación de overflow:hidden */
.pil__item:first-child {
    border-radius: 0.4375rem 0.4375rem 0 0;
}

.pil__item:last-child {
    border-radius: 0 0 0.4375rem 0.4375rem;
}

.pil__item:only-child {
    border-radius: 0.4375rem;
}

.pil__item i {
    flex-shrink: 0;
    margin-top: 2px;
}

/* El item de stock ocupa el ancho completo del PIL */
.pil__item.sd-component {
    align-items: center;
}

.pil__item--success {
    background-color: var(--color-success-light, #dcfce7);
}

.pil__item--success i {
    color: var(--color-success, #22c55e);
}

.pil__item--info i {
    color: var(--color-info, #3b82f6);
}

.pil__item--muted {
    color: var(--theme-text-light, #666);
}

/* Items con botón de info a la derecha */
.pil__item--delivery,
.pil__item--shipping-free {
    justify-content: space-between;
    align-items: center;
}

.pil__item--shipping-free {
    background-color: var(--color-success-light, #dcfce7);
}

.pil__item--shipping-free i {
    color: var(--color-success, #22c55e);
}

/* ========================================
   CARD: DISPONIBILIDAD
   ======================================== */

.availability-status {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm, 0.5rem);
}

.availability-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.availability-dot--in-stock {
    background-color: var(--color-success, #22c55e);
    animation: pulse-success 2s infinite;
}

.availability-dot--low-stock {
    background-color: var(--color-warning, #f59e0b);
    animation: pulse-warning 2s infinite;
}

.availability-dot--out-of-stock {
    background-color: var(--color-error, #ef4444);
}

@keyframes pulse-success {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

@keyframes pulse-warning {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
}

.availability-text {
    font-size: var(--font-size-sm, 0.875rem);
}

/* ========================================
   ZONA DE COMPRA INTEGRADA (sp-atc-zone)
   ======================================== */

.sp-atc-zone {
    padding-top: 0.875rem;
    border-top: 1px solid var(--border-color, #e4e4e7);
    margin-bottom: var(--spacing-md, 1rem);
}

.sp-stock-indicator {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--theme-secondary, #334155);
}

.sp-stock-text {
    font-weight: 500;
}


/* Fila del indicador de stock (con botón opcional a la derecha) */
.sp-stock-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 0.5rem;
}

/* Botón de consulta (reposición / bajo pedido) */
.pil__consult-btn {
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--theme-primary, #2563eb);
    text-decoration: none;
    white-space: nowrap;
    padding: 0.125rem 0.5rem;
    border: 1px solid var(--theme-primary, #2563eb);
    border-radius: 0.25rem;
    line-height: 1.5;
    transition: background-color 0.15s ease;
}

.pil__consult-btn:hover {
    background-color: var(--theme-primary-light, #eff6ff);
    color: var(--theme-primary, #2563eb);
    text-decoration: none;
}

/* Texto expandible en items con info-btn a la derecha */
.pil-item__label {
    flex: 1;
    min-width: 0;
    line-height: 1.4;
}

.pil-item__label strong {
    color: var(--theme-primary, #2563eb);
    font-weight: 600;
}

/* ----------------------------------------
   Botón de info centralizado (.pil-info-btn)
   Usado en delivery, envío gratuito, etc.
   ---------------------------------------- */
.pil-info-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    padding: 0;
    border: none;
    background: none;
    color: var(--theme-text-light, #94a3b8);
    cursor: pointer;
    border-radius: 50%;
    transition: color 0.15s ease;
}

.pil-info-btn:hover,
.pil-info-btn:focus-visible {
    color: var(--theme-secondary, #475569);
}

.pil-info-btn:focus-visible {
    outline: 2px solid var(--theme-primary, #2563eb);
    outline-offset: 2px;
}

/* ----------------------------------------
   Popover centralizado (.pil-popover)
   Posicionado respecto al .pil__item padre
   (position: relative ya en .pil__item base).
   El z-index > .pil overflow ya no aplica
   porque se eliminó overflow:hidden del PIL.
   ---------------------------------------- */
.pil-popover {
    position: absolute;
    bottom: calc(100% + 0.5rem);
    right: 0;
    width: 15rem;
    padding: 0.625rem 0.75rem;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--theme-secondary, #334155);
    background: #fff;
    border: 1px solid var(--border-color, #e4e4e7);
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    z-index: 20;
}

.pil-popover::after {
    content: '';
    position: absolute;
    bottom: -0.375rem;
    right: 0.4375rem;
    width: 0.625rem;
    height: 0.625rem;
    background: #fff;
    border-right: 1px solid var(--border-color, #e4e4e7);
    border-bottom: 1px solid var(--border-color, #e4e4e7);
    transform: rotate(45deg);
}

/* ----------------------------------------
   Stock & Delivery — Skeleton loader
   ---------------------------------------- */

.sd-skeleton {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.125rem 0;
}

.sd-skeleton__row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sd-skeleton__dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    flex-shrink: 0;
    background: linear-gradient(90deg, #e4e4e7 25%, #f4f4f5 50%, #e4e4e7 75%);
    background-size: 200% 100%;
    animation: sd-shimmer 1.4s infinite;
}

.sd-skeleton__line {
    height: 0.75rem;
    border-radius: 0.25rem;
    background: linear-gradient(90deg, #e4e4e7 25%, #f4f4f5 50%, #e4e4e7 75%);
    background-size: 200% 100%;
    animation: sd-shimmer 1.4s infinite;
}

.sd-skeleton__line--short { width: 5.5rem; }
.sd-skeleton__line--long  { width: 13rem; }

@keyframes sd-shimmer {
    0%   { background-position:  200% 0; }
    100% { background-position: -200% 0; }
}

/* ----------------------------------------
   ATC form — layout
   Mobile: columna / Desktop: fila (stepper izq + botón derecha)
   ---------------------------------------- */

.sp-atc-zone .cart {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    margin: 0 0 0.75rem;
}

/* Ocultar el label visible "Cantidad:" dentro de la zona ATC
   (la accesibilidad la cubre el screen-reader-text y el aria-label del stepper) */
.sp-atc-zone .quantity > .qty-label {
    display: none;
}

.sp-atc-zone .single_add_to_cart_button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.5rem;
    letter-spacing: 0.01em;
}

.sp-atc-zone .single_add_to_cart_button svg {
    width: 1.125rem;
    height: 1.125rem;
    margin-right: 0.25rem;
    flex-shrink: 0;
    pointer-events: none;
}

@media (min-width: 400px) {
    .sp-atc-zone .cart {
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
    }

    .sp-atc-zone .cart .quantity {
        flex: 0 0 auto;
    }

    .sp-atc-zone .single_add_to_cart_button {
        flex: 1 1 auto;
        width: auto;
        height: 2.875rem;
        padding-top: 0;
        padding-bottom: 0;
    }
}

/* ----------------------------------------
   Quantity Stepper — componente custom
   Inicializado por initQuantityStepper() en single-product.js
   ---------------------------------------- */

.qty-stepper {
    display: inline-flex;
    align-items: stretch;
    height: 2.875rem;
    border: 1.5px solid var(--border-color, #e4e4e7);
    border-radius: 0.5rem;
    overflow: hidden;
    background: #fff;
}

.qty-stepper__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.875rem;
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--theme-secondary, #334155);
    transition: background-color 0.15s ease, color 0.15s ease;
    -webkit-user-select: none;
    user-select: none;
}

.qty-stepper__btn:hover:not(:disabled) {
    background-color: var(--theme-secondary-light, #f4f4f5);
}

.qty-stepper__btn:active:not(:disabled) {
    background-color: #e5e9ed;
}

.qty-stepper__btn:focus-visible {
    outline: 2px solid var(--theme-primary, #2563eb);
    outline-offset: -2px;
    z-index: 1;
}

.qty-stepper__btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.qty-stepper__btn svg {
    width: 1rem;
    height: 1rem;
    pointer-events: none;
    flex-shrink: 0;
}

/* Mayor especificidad que estilos globales de WooCommerce (.input-text.qty)
   para garantizar que no se genere border doble en top/bottom */
.sp-atc-zone .qty-stepper .qty-stepper__input {
    width: 3.25rem;
    height: 100%;
    border-top: none;
    border-bottom: none;
    border-left: 1.5px solid var(--border-color, #e4e4e7);
    border-right: 1.5px solid var(--border-color, #e4e4e7);
    border-radius: 0;
    text-align: center;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--theme-text, #222);
    background: #fff;
    box-shadow: none;
    padding: 0;
    outline: none;
    -moz-appearance: textfield;
    appearance: textfield;
}

.sp-atc-zone .qty-stepper .qty-stepper__input::-webkit-inner-spin-button,
.sp-atc-zone .qty-stepper .qty-stepper__input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.sp-atc-zone .qty-stepper .qty-stepper__input:focus {
    background-color: #fafbfc;
}


/* ========================================
   ETIQUETA DE PRODUCTO (energética, etc.)
   ======================================== */

.product-label {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm, 0.5rem);
    margin-bottom: var(--spacing-md, 1rem);
}

.product-label__image {
    height: 35px;
    width: auto;
}

/* ========================================
   COMPARTIR EN REDES (.social-share-component / .ss-btn)
   ======================================== */

.social-share-component {
    display: flex;
    align-items: center;
    gap: 0.3125rem;
    padding: 0.875rem 0;
    flex-wrap: wrap;
}

.social-share__label {
    font-size: 0.8125rem;
    color: var(--theme-text-light, #666);
    margin-right: 0.1875rem;
    white-space: nowrap;
}

.ss-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    font-family: inherit;
    color: var(--theme-text-light, #64748b);
    background-color: var(--theme-secondary-light, #f4f4f5);
    border: 1px solid var(--border-color, #e4e4e7);
    border-radius: 0.375rem;
    cursor: pointer;
    text-decoration: none;
    flex-shrink: 0;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.ss-btn:hover { text-decoration: none; }
.ss-btn--facebook:hover { color: #fff; background-color: #1877f2; border-color: #1877f2; }
.ss-btn--x:hover        { color: #fff; background-color: #000;    border-color: #000;    }
.ss-btn--whatsapp:hover { color: #fff; background-color: #25d366; border-color: #25d366; }
.ss-btn--copy:hover     { color: var(--theme-primary, #2563eb); border-color: var(--theme-primary, #2563eb); }

/* ========================================
   STORE NOTICE
   ======================================== */

.store-notice {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm, 0.5rem);
    padding: var(--spacing-md, 1rem);
    background-color: var(--color-info-light, #dbeafe);
    border: 1px solid var(--color-info, #3b82f6);
    border-radius: var(--border-radius-md, 0.5rem);
    font-size: var(--font-size-sm, 0.875rem);
}

.store-notice i {
    color: var(--color-info, #3b82f6);
    flex-shrink: 0;
    margin-top: 2px;
}

.store-notice a {
    color: var(--color-info, #3b82f6);
    font-weight: var(--font-weight-medium, 500);
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

/* product-info: sin padding lateral extra (lo provee sp-container) */

@media (max-width: 575px) {
    .pil__item {
        padding: var(--spacing-sm, 0.5rem);
    }
}

/* ========================================
   DESCRIPCIÓN CORTA DEL PRODUCTO
   Lista de características estilizada
   ======================================== */

.woocommerce-product-details__short-description {
    margin-bottom: var(--spacing-lg, 1.5rem);
}

.woocommerce-product-details__short-description ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.woocommerce-product-details__short-description ul li {
    padding: 0.375rem 0;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--theme-secondary, #334155);
    border-bottom: 1px solid var(--border-color-light, #f1f3f5);
}

.woocommerce-product-details__short-description ul li:last-child {
    border-bottom: none;
}

/* Enlace "Más información" — scroll al tab de descripción */
.sp-more-info-link {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: var(--theme-primary, #2563eb);
    text-decoration: none;
}

.sp-more-info-link:hover {
    text-decoration: underline;
}

/* Nested lists (sublistas) */
.woocommerce-product-details__short-description ul ul {
    margin-top: var(--spacing-xs, 0.25rem);
    padding-left: var(--spacing-md, 1rem);
}

.woocommerce-product-details__short-description ul ul li {
    padding: var(--spacing-xs, 0.25rem) 0;
    color: var(--theme-text-light, #666);
    border-bottom: none;
}

/* Strong dentro de la lista */
.woocommerce-product-details__short-description ul li strong {
    color: var(--theme-secondary, #334155);
    font-weight: var(--font-weight-semibold, 600);
}

/* ========================================
   GALERÍA DE PRODUCTO (base)
   ======================================== */

.woocommerce-product-gallery {
    border: none;
    border-radius: 0;
    overflow: hidden;
}

.woocommerce-product-gallery .woocommerce-product-gallery__wrapper {
    margin-bottom: 0;
}

.woocommerce-product-gallery img {
    width: 100%;
    height: auto;
}

/* Botón de zoom/lightbox */
.woocommerce-product-gallery .woocommerce-product-gallery__trigger {
    position: absolute;
    top: var(--spacing-md, 1rem);
    right: var(--spacing-md, 1rem);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    z-index: 90;
    transition: all 0.2s ease;
}

.woocommerce-product-gallery .woocommerce-product-gallery__trigger:hover {
    background-color: var(--theme-primary, #2563eb);
    color: #fff;
}

.woocommerce-product-gallery .woocommerce-product-gallery__trigger img {
    display: none !important;
}

.woocommerce-product-gallery .woocommerce-product-gallery__trigger::before {
    content: "";
    display: block;
    width: 1.125rem;
    height: 1.125rem;
    background-color: var(--theme-secondary, #334155);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3Cline x1='11' y1='8' x2='11' y2='14'/%3E%3Cline x1='8' y1='11' x2='14' y2='11'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3Cline x1='11' y1='8' x2='11' y2='14'/%3E%3Cline x1='8' y1='11' x2='14' y2='11'/%3E%3C/svg%3E") no-repeat center / contain;
    transition: background-color 0.2s ease;
}

.woocommerce-product-gallery .woocommerce-product-gallery__trigger:hover::before {
    background-color: #fff;
}

/* Miniaturas de galería (Flexslider) - base */
ol.flex-control-nav.flex-control-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem;
    margin: 0;
    list-style: none;
}

ol.flex-control-nav.flex-control-thumbs li {
    flex: 0 0 auto;
    width: calc(20% - 0.4rem);
}

ol.flex-control-nav.flex-control-thumbs li img {
    width: 100%;
    height: auto;
    border: 2px solid var(--border-color, #e4e4e7);
    border-radius: 0.375rem;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

ol.flex-control-nav.flex-control-thumbs li img:hover,
ol.flex-control-nav.flex-control-thumbs li img.flex-active {
    border-color: var(--theme-primary, #2563eb);
    box-shadow: 0 0 0 1px var(--theme-primary, #2563eb);
}

/* ========================================
   PRECIOS
   ======================================== */

.price {
    color: var(--theme-text, #222);
    font-size: var(--font-size-xl, 1.5rem);
    font-weight: var(--font-weight-bold, 700);
    line-height: 1;
    display: block;
    margin-bottom: var(--spacing-md, 1rem);
}

/* Precio tachado (antes) */
.price del {
    color: var(--theme-text-light, #666);
    font-size: var(--font-size-base, 1rem);
    font-weight: var(--font-weight-normal, 400);
    margin-bottom: var(--spacing-sm, 0.5rem);
    display: block;
    opacity: 0.8;
}

/* Precio actual (después del descuento) */
.price ins {
    text-decoration: none;
}

/* Contexto específico: #puntada (sección de precio principal) */
#puntada p.price {
    color: var(--theme-text, #222);
    margin-top: 2rem;
}

#puntada span.woocommerce-Price-amount.amount {
    font-size: 1.75em;
    font-weight: 800;
    line-height: 1;
}

#puntada small.woocommerce-price-suffix {
    display: block;
    font-size: var(--font-size-sm, 0.875rem);
    font-weight: var(--font-weight-normal, 400);
    color: var(--theme-text-light, #666);
    line-height: 1.5;
    margin-top: var(--spacing-xs, 0.25rem);
}

/* Precio sin IVA */
.sp-price-tax {
    font-size: 0.8125rem;
    font-weight: var(--font-weight-normal, 400);
    color: var(--theme-text-light, #666);
    margin-top: 0.25rem;
}

.sp-price-tax b {
    font-weight: inherit;
}

/* Precio en single-prod-lb */
#single-prod-lb .price {
    border-bottom: 1px solid var(--border-color, #e4e4e7);
    padding-bottom: var(--spacing-md, 1rem);
}

/* Precio en loop de productos */
#loop-prod-lb .price span.woocommerce-Price-amount.amount {
    font-size: var(--font-size-2xl, 2rem);
    font-weight: var(--font-weight-bold, 700);
    color: var(--color-success, #22c55e);
    line-height: 1.2;
}

#loop-prod-lb .price small.woocommerce-price-suffix {
    display: block;
    color: var(--color-success, #22c55e);
    font-size: var(--font-size-sm, 0.875rem);
}

/* ========================================
   ETIQUETA DE OFERTA
   ======================================== */

.onsale {
    position: absolute;
    top: var(--spacing-md, 1rem);
    left: var(--spacing-md, 1rem);
    z-index: 10;
    display: inline-block;
    padding: var(--spacing-xs, 0.25rem) var(--spacing-sm, 0.5rem);
    font-size: var(--font-size-sm, 0.875rem);
    font-weight: var(--font-weight-semibold, 600);
    color: var(--color-error, #e11212);
    background-color: #fff;
    border: 1px solid var(--border-color, #e4e4e7);
    border-radius: var(--border-radius-md, 0.5rem);
    box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.05));
}

/* ========================================
   DISPONIBILIDAD
   ======================================== */

/* Ocultar texto por defecto de stock */
.in-stock {
    display: none;
}

/* Sin stock */
.out-of-stock,
#puntada .out-of-stock {
    font-size: var(--font-size-lg, 1.25rem);
    font-weight: var(--font-weight-semibold, 600);
    color: var(--color-error, #ef4444);
    text-transform: uppercase;
}

/* SKU */
.sku_wrapper {
    display: none;
}

/* ========================================
   TÍTULO DEL PRODUCTO
   ======================================== */

h1.product_title.entry-title,
.product-h1 {
    font-size: 1.25rem;
    font-weight: var(--font-weight-normal, 400);
    color: var(--theme-text, #222);
    margin: 0 0 0.5rem;
    line-height: var(--line-height-tight, 1.25);
}

@media (min-width: 900px) {
    h1.product_title.entry-title {
        font-size: 1.375rem;
    }
}

/* ========================================
   WIDGETS Y PLUGINS
   ======================================== */

/* seQura (financiación) */
.sequra-promotion-widget {
    margin-top: var(--spacing-md, 1rem);
}

/* NetReviews (valoraciones) */
.netreviews-product-rating {
    margin-bottom: var(--spacing-md, 1rem) !important;
}

/* Etiqueta energética */
.etiqueta-energetica {
    height: 35px;
    width: auto;
}

/* ========================================
   REVIEWS DEL PRODUCTO
   ======================================== */

#puntada .woocommerce-product-rating {
    margin-bottom: 0.625rem;
}

/* ========================================
   CONTENEDOR PRINCIPAL (sp-container)
   ======================================== */

.sp-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ========================================
   CONTENT AREA: Main + Sidebar (sp-content-area)
   ======================================== */

.sp-content-area {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

@media (min-width: 992px) {
    .sp-content-area {
        grid-template-columns: 1fr 280px;
    }
}

@media (min-width: 1400px) {
    .sp-content-area {
        grid-template-columns: 1fr 320px;
    }
}

.sp-main-content {
    min-width: 0;
}

/* Section heading */
.sp-section-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--theme-text, #222);
    margin: 0 0 0.75rem;
}

.sp-divider {
    height: 1px;
    background: var(--border-color, #e4e4e7);
    border: none;
    margin: 0 0 1rem;
}

/* ========================================
   BADGES (sp-badge)
   ======================================== */

.sp-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.sp-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--theme-secondary, #334155);
    background-color: var(--theme-secondary-light, #f4f4f5);
    border: 1px solid var(--border-color, #e4e4e7);
    border-radius: 9999px;
    white-space: nowrap;
}

.sp-badge i {
    font-size: 0.75rem;
    color: var(--theme-text-light, #666);
}

/* ========================================
   TABS COMPONENT (sp-tabs)
   ======================================== */

.sp-tabs__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border: 1px solid var(--border-color, #e4e4e7);
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
    background-color: var(--theme-secondary-light, #f4f4f5);
}

.sp-tabs__trigger {
    flex: 1 1 auto;
    padding: 0.625rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    font-family: inherit;
    color: var(--theme-text-light, #666);
    background: transparent;
    border: none;
    border-right: 1px solid var(--border-color, #e4e4e7);
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease;
    white-space: nowrap;
    text-align: center;
}

.sp-tabs__trigger:last-child {
    border-right: none;
}

.sp-tabs__trigger:hover {
    color: var(--theme-text, #333);
    background-color: rgba(0, 0, 0, 0.03);
}

.sp-tabs__trigger--active {
    color: var(--theme-primary, #2563eb);
    background-color: #fff;
    font-weight: 600;
}

.sp-tabs__trigger i {
    margin-right: 0.25rem;
}

.sp-tabs__panel {
    display: none;
}

.sp-tabs__panel--active {
    display: block;
}

/* Imágenes dentro del contenido de tabs */
.sp-tabs__panel img {
    max-width: 100%;
    height: auto;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-color, #e4e4e7);
    border-radius: 0.375rem;
}

@media (max-width: 575px) {
    .sp-tabs__list {
        flex-direction: column;
    }

    .sp-tabs__trigger {
        border-right: none;
        border-bottom: 1px solid var(--border-color, #e4e4e7);
        text-align: left;
    }

    .sp-tabs__trigger:last-child {
        border-bottom: none;
    }
}

/* ========================================
   READ MORE / DESCRIPTION (sp-description)
   ======================================== */

.sp-description {
    position: relative;
}

.sp-description__content {
    font-size: 0.9375rem;
    line-height: 1.75;
    color: var(--theme-text, #333);
    transition: max-height 0.4s ease;
}

.sp-description--collapsed .sp-description__content {
    max-height: 300px;
    overflow: hidden;
}

.sp-description__fade {
    display: none;
    position: absolute;
    bottom: 2.75rem;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, transparent, #fff);
    pointer-events: none;
}

.sp-description--collapsed .sp-description__fade {
    display: block;
}

.sp-description__toggle {
    display: none;
    width: 100%;
    padding: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    color: var(--theme-primary, #2563eb);
    background: transparent;
    border: 1px solid var(--border-color, #e4e4e7);
    border-radius: 0.375rem;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.sp-description__toggle:hover {
    background-color: var(--theme-primary-light, #dbeafe);
    border-color: var(--theme-primary, #2563eb);
}

.sp-description--has-toggle .sp-description__toggle {
    display: block;
}

/* ========================================
   ACCORDION COMPONENT (sp-accordion)
   ======================================== */

.sp-accordion {
    border: 1px solid var(--border-color, #e4e4e7);
    border-radius: 0.5rem;
    overflow: hidden;
}

.sp-accordion__item {
    border-bottom: 1px solid var(--border-color, #e4e4e7);
}

.sp-accordion__item:last-child {
    border-bottom: none;
}

.sp-accordion__trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--theme-text, #333);
    background: var(--theme-secondary-light, #f8f9fa);
    border: none;
    cursor: pointer;
    text-align: left;
    gap: 0.75rem;
    transition: background-color 0.15s ease;
}

.sp-accordion__trigger:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.sp-accordion__icon {
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    transition: transform 0.2s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.sp-accordion__item--open .sp-accordion__icon {
    transform: rotate(180deg);
}

.sp-accordion__content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.sp-accordion__body {
    padding: 1rem;
    font-size: 0.875rem;
    line-height: 1.75;
    color: var(--theme-text-light, #666);
}

.sp-accordion__body p {
    margin: 0 0 0.75rem;
}

.sp-accordion__body p:last-child {
    margin-bottom: 0;
}

.sp-accordion__body ul {
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
}

.sp-accordion__body ul li {
    margin-bottom: 0.375rem;
}

/* ========================================
   WARRANTY CARD (sp-warranty)
   ======================================== */

.sp-warranty {
    background: #fff;
    border: 1px solid var(--border-color, #e4e4e7);
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.sp-warranty__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--theme-text, #333);
    margin: 0 0 0.75rem;
}

.sp-warranty__divider {
    height: 1px;
    background: var(--border-color, #e4e4e7);
    margin-bottom: 0.75rem;
}

.sp-warranty__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sp-warranty__item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--theme-secondary, #334155);
    line-height: 1.5;
}

.sp-warranty__item i {
    color: var(--color-success, #22c55e);
    flex-shrink: 0;
    margin-top: 2px;
}

/* ========================================
   PDF CARD (sp-pdf-card)
   ======================================== */

.sp-pdf-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    max-width: 320px;
    padding: 2rem 1.5rem;
    margin: 1rem 0;
    background: #fff;
    border: 2px solid var(--theme-primary, #2563eb);
    border-radius: 0.5rem;
    text-align: center;
    transition: box-shadow 0.15s ease;
}

.sp-pdf-card:hover {
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.sp-pdf-card__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--theme-primary, #2563eb);
    text-decoration: none;
}

.sp-pdf-card__link:hover {
    text-decoration: underline;
}

.sp-pdf-card__link i {
    font-size: 1.25rem;
}

.sp-pdf-card__size {
    font-size: 0.8125rem;
    font-family: monospace;
    color: var(--theme-text-light, #666);
}

.sp-pdf-open {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    color: var(--theme-primary, #2563eb);
    text-decoration: none;
}

.sp-pdf-open:hover {
    text-decoration: underline;
}

/* ========================================
   ALERTS (sp-alert)
   ======================================== */

.sp-alert {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    border: 1px solid;
}

.sp-alert--danger {
    color: var(--color-error, #ef4444);
    background-color: #fef2f2;
    border-color: #fecaca;
}

.sp-alert--danger i {
    flex-shrink: 0;
}

/* ========================================
   SIDEBAR: Card de ayuda (sp-help-card)
   ======================================== */

.sp-help-card {
    background: #fff;
    border: 1px solid var(--border-color, #e4e4e7);
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
}

@media (min-width: 992px) {
    .sp-help-card {
        position: sticky;
        top: calc(70px + 1rem);
    }
}

.sp-help-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    margin-bottom: 0.75rem;
    background-color: var(--theme-primary-light, #dbeafe);
    color: var(--theme-primary, #2563eb);
    border-radius: 50%;
}

.sp-help-card__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--theme-text, #222);
    margin: 0 0 0.375rem;
}

.sp-help-card__text {
    font-size: 0.8125rem;
    color: var(--theme-text-light, #666);
    margin: 0 0 1rem;
    line-height: 1.5;
}

.sp-help-card__methods {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    text-align: left;
}

.sp-help-card__methods li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.sp-help-card__methods li i,
.sp-help-card__methods li svg {
    color: var(--theme-primary, #2563eb);
    flex-shrink: 0;
    width: 1.25rem;
}

.sp-help-card__methods li a {
    color: var(--theme-text, #333);
    text-decoration: none;
    font-weight: 500;
}

.sp-help-card__methods li a:hover {
    color: var(--theme-primary, #2563eb);
    text-decoration: underline;
}

/* Grupos de contacto con horario diferenciado */
.sp-help-card__group {
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color, #e4e4e7);
    margin-top: 0.75rem;
    text-align: left;
}

.sp-help-card__group-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--theme-text-light, #64748b);
    background: var(--theme-secondary-light, #f4f4f5);
    border: 1px solid var(--border-color, #e4e4e7);
    border-radius: 0.25rem;
    padding: 0.1875rem 0.4375rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.01em;
}

.sp-help-card__group-badge svg {
    color: var(--theme-text-light, #94a3b8);
    flex-shrink: 0;
}

.sp-help-card__group .sp-help-card__methods {
    margin-bottom: 0;
}

/* FAQ link inside warranty section */
.sp-faq-link {
    font-size: 0.875rem;
    color: var(--theme-text-light, #666);
    margin-bottom: 1rem;
}

.sp-faq-link a {
    color: var(--theme-primary, #2563eb);
}

/* ========================================
   TABS Y CONTENIDO ADICIONAL (legacy compat)
   ======================================== */

/* Descripción corta - tabla */
.descripcion-corta tr:last-child th,
.descripcion-corta tr:last-child td {
    border: 0 !important;
}

/* Imagen destacada */
img.wp-post-image {
    width: 100%;
    border-radius: var(--border-radius-md, 0.375rem);
}

/* ========================================
   GALERÍA DE PRODUCTO: Mejoras estéticas
   ======================================== */

.sp-product-gallery {
    position: relative;
    background: #fff;
    border: 1px solid var(--border-color, #e4e4e7);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

@media (min-width: 900px) {
    .sp-product-gallery {
        position: sticky;
        top: calc(70px + 1rem);
        align-self: start;
    }
}

.sp-product-gallery .woocommerce-product-gallery {
    border: none;
    border-radius: 0;
}

.sp-product-gallery .woocommerce-product-gallery__image {
    border-radius: 0;
}

.sp-product-gallery .woocommerce-product-gallery img {
    border-radius: 0;
}

/* Imagen principal con fondo limpio */
.sp-product-gallery .woocommerce-product-gallery .flex-viewport {
    background: #fafafa;
}

/* Miniaturas mejoradas */
.sp-product-gallery ol.flex-control-nav.flex-control-thumbs {
    padding: 0.75rem;
    gap: 0.5rem;
    background: var(--theme-secondary-light, #f8f9fa);
    border-top: 1px solid var(--border-color, #e4e4e7);
}

.sp-product-gallery ol.flex-control-nav.flex-control-thumbs li {
    width: calc(20% - 0.4rem);
}

.sp-product-gallery ol.flex-control-nav.flex-control-thumbs li img {
    border-radius: 0.375rem;
    border: 2px solid var(--border-color, #e4e4e7);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sp-product-gallery ol.flex-control-nav.flex-control-thumbs li img:hover {
    border-color: var(--theme-primary, #2563eb);
    box-shadow: 0 0 0 1px var(--theme-primary, #2563eb);
}

.sp-product-gallery ol.flex-control-nav.flex-control-thumbs li img.flex-active {
    border-color: var(--theme-primary, #2563eb);
    box-shadow: 0 0 0 1px var(--theme-primary, #2563eb);
}

/* Botón zoom mejorado */
.sp-product-gallery .woocommerce-product-gallery__trigger {
    border-radius: 0.5rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Etiqueta de oferta dentro de la galería */
.sp-product-gallery .onsale {
    top: 0.75rem;
    left: 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    padding: 0.3rem 0.625rem;
}

/* ========================================
   WOOCOMMERCE TABS WRAPPER
   ======================================== */

#single-prod-lb .woocommerce-tabs {
    max-width: 1320px;
    margin: 2rem auto 0;
    padding: 0 1rem;
    overflow: hidden;
}

/* Ocultar reviews vacías de WooCommerce */
#reviews.woocommerce-Reviews:empty,
.woocommerce-Reviews .woocommerce-noreviews {
    display: none;
}

#reviews.woocommerce-Reviews {
    margin: 0;
    padding: 0;
}

/* ========================================
   WOOCOMMERCE REVIEWS TAB - Estilo completo
   ======================================== */

/* Franja de pestañas */
.woocommerce-tabs .wc-tabs {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    border-bottom: 2px solid var(--border-color);
    gap: 0;
}

.woocommerce-tabs .wc-tabs li {
    margin: 0;
}

.woocommerce-tabs .wc-tabs li a {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--theme-text-light, #666);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
}

.woocommerce-tabs .wc-tabs li a:hover {
    color: var(--theme-text, #333);
    border-bottom-color: var(--border-color);
}

.woocommerce-tabs .wc-tabs li.active a {
    color: var(--theme-text, #333);
    font-weight: var(--font-weight-semibold);
    border-bottom-color: var(--theme-primary, #2563eb);
}

/* Panel de contenido */
.woocommerce-Tabs-panel {
    padding: 0;
}

/* ---- Reviews container ---- */
.woocommerce-Reviews {
    max-width: 720px;
}

.woocommerce-Reviews-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--theme-text, #333);
    margin: 0 0 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color-light);
}

/* Lista de reseñas */
.woocommerce-Reviews .commentlist {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

/* Tarjeta de reseña individual */
.woocommerce-Reviews .commentlist .review {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-color-light);
}

.woocommerce-Reviews .commentlist .review:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Avatar oculto (mantener) */
.commentlist .avatar {
    display: none;
}

/* Contenedor de texto del comentario */
.commentlist .comment_container .comment-text {
    margin: 0;
}

/* Línea de metadatos: autor, verificado, fecha */
.commentlist .comment-text .meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.5rem;
    margin: 0.5rem 0 0.75rem;
    font-size: var(--font-size-sm);
}

.commentlist .woocommerce-review__author {
    font-weight: var(--font-weight-semibold);
    color: var(--theme-text, #333);
}

.commentlist .woocommerce-review__verified {
    font-size: var(--font-size-xs);
    color: var(--color-success, #22c55e);
    font-style: normal;
}

.commentlist .woocommerce-review__dash {
    color: var(--border-color);
}

.commentlist .woocommerce-review__published-date {
    color: var(--theme-text-light, #666);
    font-size: var(--font-size-xs);
}

/* Cuerpo de la reseña */
.commentlist .comment-text .description {
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
    color: var(--theme-text, #333);
    margin: 0;
}

.commentlist .comment-text .description p {
    margin: 0 0 0.5rem;
}

.commentlist .comment-text .description p:last-child {
    margin-bottom: 0;
}

/* Aviso de verificación requerida */
.woocommerce-verification-required {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    background-color: var(--color-info-light, #dbeafe);
    border: 1px solid #bfdbfe;
    border-radius: var(--border-radius-md);
    font-size: var(--font-size-sm);
    color: #1e40af;
    margin-top: 1rem;
}

.woocommerce-verification-required::before {
    content: '';
    display: inline-block;
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
    background-color: currentColor;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm8.706-1.442c1.146-.573 2.437.463 2.126 1.706l-.709 2.836.042-.02a.75.75 0 01.67 1.34l-.04.022c-1.147.573-2.438-.463-2.127-1.706l.71-2.836-.042.02a.75.75 0 11-.671-1.34l.041-.022zM12 9a.75.75 0 100-1.5.75.75 0 000 1.5z' clip-rule='evenodd'/%3E%3C/svg%3E");
    mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm8.706-1.442c1.146-.573 2.437.463 2.126 1.706l-.709 2.836.042-.02a.75.75 0 01.67 1.34l-.04.022c-1.147.573-2.438-.463-2.127-1.706l.71-2.836-.042.02a.75.75 0 11-.671-1.34l.041-.022zM12 9a.75.75 0 100-1.5.75.75 0 000 1.5z' clip-rule='evenodd'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
}

/* ========================================
   FLUORINATED GASES — info panel (pestaña)
   ======================================== */

.sp-fg-info__title {
    margin: 0 0 var(--spacing-md);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--foreground);
    letter-spacing: var(--tracking-tight);
}

.sp-fg-info__notice {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    margin: var(--spacing-md) 0;
    border: 1px solid transparent;
    border-radius: var(--border-radius-md);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-snug);
}

.sp-fg-info__notice p {
    margin: 0;
}

.sp-fg-info__notice p + p {
    margin-top: var(--spacing-sm);
}

.sp-fg-info__notice--success {
    background: var(--color-success-light);
    color: var(--color-success-foreground);
    border-color: var(--color-success);
}

.sp-fg-info__notice--info {
    background: var(--color-info-light);
    color: var(--foreground);
    border-color: var(--color-info);
}

.sp-fg-info__notice-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.sp-fg-info__notice-body {
    flex: 1;
    min-width: 0;
}

.sp-fg-info__notice-foot {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding-top: var(--spacing-sm);
    margin-top: var(--spacing-sm);
    border-top: 1px solid var(--border-color-light);
    font-size: var(--font-size-xs);
}

.sp-fg-info__notice-icon-inline {
    display: inline-flex;
    align-items: center;
}

.sp-fg-info__link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: var(--font-weight-medium);
}

.sp-fg-info__link:hover {
    text-decoration-thickness: 2px;
}

