/* ==========================================================================
   Estilos de la Ficha de Producto Individual (Mobile-First)
   ========================================================================== */

/* Enlace de retroceso */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 20px;
    margin-bottom: 20px;
    font-weight: 600;
}

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

/* Contenedor Principal */
.product-detail-main {
    padding-bottom: 60px;
    background-color: var(--bg-white);
}

/* Layout en rejilla básica (Columna en móviles) */
.product-detail-grid {
    display: flex;
    flex-direction: column;
    gap: 35px;
}

/* Galería / Contenedor de Imagen */
.product-detail-gallery {
    position: relative;
    width: 100%;
}

.main-image-wrapper {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    width: 100%;
}

.main-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Badge de Oferta en la Ficha */
.detail-badge {
    /*
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--accent-badge);
    color: var(--bg-white);
    padding: 5px 12px;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 4px;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    */
    position: relative;
    background-color: var(--accent-badge);
    color: var(--bg-white);
    padding: 5px 12px;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 4px;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    width: max-content;
    margin-bottom: 12px;
}

/* Información del Producto */
.product-detail-info {
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--bg-dark);
    line-height: 1.2;
    margin-bottom: 15px;
    letter-spacing: -0.025em;
}

/* Bloque de Precios */
.product-price-block {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.price-actual {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--bg-dark);
}

.price-regular-slashed {
    font-size: 1.1rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

/* Caja de Descripción */
.product-description p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 15px;
    text-align: justify;
}

/* Caja de Especificaciones */
.product-specs {
    margin-top: 15px;
    margin-bottom: 30px;
    background-color: var(--bg-light);
    padding: 20px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.product-specs h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--bg-dark);
    margin-bottom: 12px;
}

.product-specs ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-specs li {
    font-size: 0.9rem;
    color: var(--text-muted);
    position: relative;
    padding-left: 15px;
}

.product-specs li::before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0;
}

/* Botón de Compra WhatsApp Detallado */
.product-cta-wrapper {
    width: 100%;
}

.btn-whatsapp-detail {
    background-color: var(--whatsapp-color);
    color: var(--bg-white);
    width: 100%;
    padding: 15px;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2);
}

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

/* ==========================================================================
   Media Queries para Interfaces de Escritorio
   ========================================================================== */
@media (min-width: 768px) {
    .product-detail-grid {
        flex-direction: row;
        align-items: flex-start;
    }

    .product-detail-gallery {
        width: 45%;
        position: sticky;
        top: 100px; /* Se congela al hacer scroll si la descripción es muy larga */
    }

    .product-detail-info {
        width: 55%;
    }
    
    .product-title {
        font-size: 2.3rem;
    }
    
    .btn-whatsapp-detail {
        width: auto;
        padding-left: 40px;
        padding-right: 40px;
    }
}







.--stock-texto {
    font-size: 0.95rem;line-height: 1.6;margin-bottom: 15px;text-align: justify;
    color: var(--text-muted);
}

.--div-visor-e-imagenes .--visor {
    img {
        border-radius: 4px;
        border: 2px solid transparent;
        border: 1px solid #ebedf2;
    }
}
.--div-visor-e-imagenes .--imagenes-para-visor {
    display: flex;margin-top: 8px;overflow-x: auto;scrollbar-width: none;border-radius: 4px;
}
.--div-visor-e-imagenes .--imagenes-para-visor .--div-img {
    min-width: 132px;max-width: 132px;border-radius: 4px;overflow: hidden;cursor: pointer;transition: all 0.3s ease;
    border: 2px solid transparent;
    border: 1px solid #ebedf2;

    min-width: calc(100% / 4.5);
    max-width: calc(100% / 4.5);
    margin-right: 4px;
}
.--div-visor-e-imagenes .--imagenes-para-visor .--div-img img {
    transition: all 0.3s ease;
}
.--div-visor-e-imagenes .--imagenes-para-visor .--div-img img:hover {
    transform: scale(1.2);
}

@media (min-width: 992px) {
    .--div-visor-e-imagenes .--imagenes-para-visor {
        flex-wrap: wrap;
    }
    .--div-visor-e-imagenes .--imagenes-para-visor .--div-img {
        min-width: calc((100% / 5) - 4px);
        max-width: calc((100% / 5) - 4px);
        margin-bottom: 5px;
    }
}