/* ==========================================================================
   style-article.css
   Chemins du Bois - Version Snipcart 2026
   ========================================================================== */

/* 1. STRUCTURE GLOBALE */
body {
    background-color: #3A3D41;
    margin: 0;
    padding: 0;
    color: #E9ECEF;
    font-family: 'Montserrat', sans-serif;
    transition: background-color 0.8s ease;
}

.content-wrapper {
    padding-top: 130px;
    padding-bottom: 100px;
    min-height: 80vh;
}

.boutique-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    flex-direction: column;
}

/* 2. NAVIGATION */
.back-link {
    align-self: flex-start;
    display: inline-block;
    margin-bottom: 40px;
    color: #D4A373; 
    text-decoration: none;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.back-link:hover {
    transform: translateX(-5px);
    color: #E9ECEF;
}

/* 3. GALERIE PHOTOS & SUPERPOSITION */
.product-gallery-side {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
}

.main-image-container {
    position: relative; /* Important pour les enfants absolus */
    margin-bottom: 15px;
    background-color: rgba(255,255,255,0.03);
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

/* Style commun aux deux images superposées */
.main-image-container img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.8s ease-in-out;
}

/* L'image ON est invisible par défaut */
.img-on-overlay {
    z-index: 2;
    opacity: 0;
    pointer-events: none; /* Ne gêne pas le clic sur le switch */
}

/* Quand le body a la classe lights-on, l'overlay devient visible */
body.lights-on .img-on-overlay {
    opacity: 1;
}

/* Positionnement du switch sur l'image */
.product-switch-box {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 10;
    transform: scale(0.8); /* Un peu plus petit pour l'image */
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}

#p-thumbnails {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.thumb-img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 4px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    opacity: 0.6;
}

.thumb-img:hover, .thumb-img.active {
    opacity: 1;
    border-color: #D4A373;
}

/* 4. INFORMATIONS PRODUIT */
.product-info-side {
    flex: 1;
    min-width: 300px;
}

#p-nom {
    font-family: 'Montserrat';
    font-weight: 700;
    margin-top: 0;
    color: #E9ECEF;
    font-size: 2.2rem;
}

#p-desc-court {
    margin: 10px 0 20px 0;
    color: #D4A373;
    font-size: 1.1rem;
    font-style: italic;
}

#p-prix {
    font-size: 1.8rem;
    color: #E9ECEF;
    font-weight: 700;
    margin-bottom: 30px;
}

#p-argumentaire {
    margin-top: 35px;
    line-height: 1.7;
    color: #E9ECEF;
    font-size: 1.05rem;
    font-weight: 300;
}

/* 5. FICHE TECHNIQUE */
.tech-specs-wrapper {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.tech-title {
    color: #D4A373;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
    font-weight: 700;
}

#p-technique {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
    color: #adb5bd;
    line-height: 1.6;
}

#p-technique li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 6px;
}

#p-technique li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #D4A373;
}

/* 6. BOUTON D'ACHAT */
.boutique-btn {
    background: #D4A373;
    color: white;
    border: none;
    padding: 16px 45px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.boutique-btn:hover {
    background: #E9ECEF;
    color: #2D3034;
}

/* 7. LOADER & RESPONSIVE */
.ecwid-loader { text-align: center; padding: 100px 0; color: #D4A373; }
.spinner {
    width: 40px; height: 40px; margin: 20px auto;
    border: 3px solid rgba(212, 163, 115, 0.1);
    border-top: 3px solid #D4A373;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

@media (max-width: 768px) {
    .product-info-side, .product-gallery-side { min-width: 100%; }
    #p-nom { font-size: 1.8rem; }
    .main-image-container { aspect-ratio: 1 / 1; }
}