/* =========================================================
   THÈME TAYRANZA JEWELS - PAGE COLLECTIONS (MODERNE)
   ========================================================= */

.collections-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.collections-header {
    text-align: center;
    margin-bottom: 4rem;
}

.collections-header h1 {
    text-transform: uppercase;
    font-size: 3.5rem;
    color: var(--primary-dark-green);
    margin-bottom: 1rem;
}
.collections-header p {
    font-size: 1.1rem;
    color: #555;
    max-width: 600px;
    margin: 0 auto;
}

/* --- La Grille Moderne --- */
.collection-grid {
    display: grid;
    /* Crée des colonnes responsives qui s'ajustent automatiquement */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.0rem;
}

/* --- Le Design des Cartes --- */
.collection-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 4 / 5;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.collection-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.collection-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.collection-card:hover img {
    transform: scale(1.08);
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.6) 50%, transparent 100%);
    padding: 4rem 1.5rem 2rem;
    text-align: center;
    transition: background 0.4s ease;
}

.card-overlay h3 {
    
    color: white;
    font-size: 2rem;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
    transform: translateY(10px);
    opacity: 0.9;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.collection-card:hover .card-overlay h3 {
    transform: translateY(0);
    opacity: 1;
}


/* --- SKELETON LOADER (PLACEHOLDERS) --- */
.collection-card-placeholder {
    background-color: #fff;
    border-radius: 12px;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    padding: 1.5rem;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.placeholder-image {
    width: 100%;
    height: 80%;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.placeholder-text {
    width: 70%;
    height: 2rem;
    margin: 0 auto;
    border-radius: 4px;
}

.skeleton {
    background-color: #e2e2e2;
    background-image: linear-gradient(90deg, #e2e2e2, #f5f5f5, #e2e2e2);
    background-size: 200px 100%;
    background-repeat: no-repeat;
    animation: shimmer 1.5s linear infinite;
}

.fixed {
    position: relative;
    background: #0a3833 !important;
    box-shadow: 0 0 10px #ddd;
    border-bottom: 5px solid var(--primary-gold);
}
/* --- GRILLE DES PRODUITS --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}
/*  */
/* =========================================================
   NOUVEAU: Slider de Sous-Collections (Style Maison'ama)
   ========================================================= */

/* 1. Le conteneur principal (le fond vert) */
.sub-collections-slider {
    padding: 1rem 0;
    /* margin-bottom: 4rem; */
    /* (Vous pouvez enlever le style="margin-bottom: 4rem;" du PHP si vous préférez) */
}

/* 2. Le titre à l'intérieur de la section verte */
.sub-collections-slider .section-title {
    color: var(--text-light); /* Titre en blanc */
    margin-bottom: 2.5rem;
}
.sub-collections-slider .section-title::after {
     background-color: var(--primary-gold); /* Ligne dorée */
}

/* 3. La piste qui contient les cercles */
.slider-track {
    display: flex; /* Aligne les éléments horizontalement */
    overflow-x: auto; /* Permet de scroller horizontalement */
    overflow-y: hidden;
    gap: 1.5rem;
    justify-content: center;
    padding: 0.5rem 2rem; /* Espace sur les côtés */
    max-width: 1300px; /* Correspond à votre .collections-container */
    margin: 0 auto;
}

/* 4. L'item (le cercle + le texte) */
.sub-collection-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0; /* Empêche les items de rétrécir */
}

/* 5. Le cercle (le plus important) */
.sub-collection-image {
    width: 140px;  /* Taille du cercle (vous pouvez ajuster) */
    height: 140px; /* Taille du cercle (vous pouvez ajuster) */
    border-radius: 50%; /* Fait le cercle */
    overflow: hidden;
    border: 3px solid rgba(212, 175, 55, 0.5); /* Bordure dorée (optionnel) */
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.sub-collection-item:hover .sub-collection-image {
    transform: scale(1.05);
    border-color: var(--primary-gold); /* Bordure dorée pleine au survol */
}

/* 6. L'image dans le cercle */
.sub-collection-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* S'assure que l'image remplit le cercle */
}

/* 7. Le titre sous le cercle */
.sub-collection-title {
    margin-top: 1rem;
    color: var(--text-light);
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    text-align: center;
}

/* 8. Cacher les barres de scroll (esthétique) */
.slider-track::-webkit-scrollbar {
    display: none;
}
.slider-track {
    -ms-overflow-style: none;  /* IE et Edge */
    scrollbar-width: none;  /* Firefox */
}
.skeleton {
    background-color: #e2e2e2;
    background-image: linear-gradient(90deg, #e2e2e2, #f5f5f5, #e2e2e2);
    background-size: 200px 100%;
    background-repeat: no-repeat;
    animation: shimmer 1.5s linear infinite;
}
@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}


/* --- MESSAGES D'ERREUR/VIDE --- */
.no-products-found, .error-message {
    grid-column: 1 / -1; /* Prend toute la largeur de la grille */
    text-align: center;
    padding: 3rem 0;
    color: #666;
}
@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

/* =========================================================
   CORRIGÉ: Slider de Sous-Collections (Fond Blanc)
   ========================================================= */

/* 1. Le conteneur principal (FOND BLANC) */
.sub-collections-slider {
    /* background-color: var(--primary-dark-green); SUPPRIMÉ */
    padding: 3rem 0;
    margin-bottom: 4rem;
    overflow: hidden; 
}

/* 2. Le titre (Couleur corrigée) */
.sub-collections-slider .section-title {
    color: var(--primary-dark-green); /* COULEUR CORRIGÉE (Texte foncé) */
    margin-bottom: 2.5rem;
}
.sub-collections-slider .section-title::after {
     background-color: var(--primary-gold); /* Ligne dorée */
}

/* 3. La piste qui contient les cercles */
.slider-track {
    display: flex; 
    overflow-x: auto; 
    overflow-y: hidden;
    gap: 1.5rem;
    padding: 0.5rem 2rem; 
    max-width: 1300px; 
    margin: 0 auto;
}

/* 4. L'item (le cercle + le texte) */
.sub-collection-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0; 
}

/* 5. Le cercle (Bordure corrigée) */
.sub-collection-image {
    width: 140px;  
    height: 140px; 
    border-radius: 50%; 
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, border-color 0.3s ease;
    
    /* BORDURE PAR DÉFAUT (pour les enfants) */
    border: 3px solid rgba(212, 175, 55, 0.4); /* Doré semi-transparent */
}

/* 6. L'image dans le cercle */
.sub-collection-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
}

/* 7. Le titre sous le cercle - COULEUR CORRIGÉE */
.sub-collection-title {
    margin-top: 1rem;
    color: var(--primary-dark-green); /* COULEUR CORRIGÉE (Texte foncé) */
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    text-align: center;
}

/* 8. SURVOL (Amélioré) */
.sub-collection-item:hover .sub-collection-image {
    transform: scale(1.05);
}

/* 9. BORDURE PARENT (LA DIFFÉRENCE) */
.is-parent-collection .sub-collection-image {
    border: 3px solid var(--primary-dark-green); /* Doré solide */
}

/* Effets de survol "Premium" */
.is-parent-collection:hover .sub-collection-image {
     border-color: var(--primary-dark-green); /* Bordure foncée au survol */
}
.is-child-collection:hover .sub-collection-image {
     border-color: var(--primary-gold); /* Bordure dorée pleine au survol */
}

/* 10. Cacher les barres de scroll (esthétique) */
.slider-track::-webkit-scrollbar { display: none; }
.slider-track { -ms-overflow-style: none; scrollbar-width: none; }
/* =========================================================
   CORRIGÉ: Slider de Sous-Collections (avec Slick.js)
   ========================================================= */

/* 1. Conteneur (Fond blanc) */
.sub-collections-slider {
    padding: 3rem 0;
    margin-bottom: 1rem;
    overflow: hidden; 
    /* Ajoute de l'espace pour les flèches */
    padding-left: 30px;
    padding-right: 30px;
}

/* 2. Titre (Inchangé) */
.sub-collections-slider .section-title {
    color: var(--primary-dark-green);
    margin-bottom: 2.5rem;
}
.sub-collections-slider .section-title::after {
     background-color: var(--primary-gold);
}

/* 3. La piste (Slick va la modifier) */
.slider-track .slick-slide {
    /* Ajoute un espacement entre les slides */
    margin: 0 10px;
}

/* 4. L'item (Inchangé) */
.sub-collection-item {
    display: flex !important; /* Force le display, Slick le change parfois */
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0; 
}

/* 5. Le cercle (Taille par défaut 140px) */
.sub-collection-image {
    width: 140px;  
    height: 140px; 
    border-radius: 50%; 
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, border-color 0.3s ease;
}
.sub-collection-image img {
    width: 100%; height: 100%; object-fit: cover; 
}

/* 6. Le titre (Inchangé) */
.sub-collection-title {
    margin-top: 1rem;
    color: var(--primary-dark-green); 
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    text-align: center;
}

/* 7. Bordures (Inchangé) */
.is-parent-collection .sub-collection-image {
    border: 3px solid var(--primary-dark-green); 
}
.is-child-collection .sub-collection-image {
    border: 3px solid rgba(212, 175, 55, 0.4); 
}
.sub-collection-item:hover .sub-collection-image {
    transform: scale(1.05);
}
.is-parent-collection:hover .sub-collection-image {
     border-color: var(--primary-dark-green); 
}
.is-child-collection:hover .sub-collection-image {
     border-color: var(--primary-gold); 
}

/* 8. NOUVEAU: Style des flèches Slick */
.slick-arrow {
    font-size: 2rem;
    color: var(--primary-dark-green);
    z-index: 10;
}
.slick-prev, .slick-next {
    width: 40px;
    height: 40px;
}
/* Positionne les flèches */
.slick-prev { left: -25px; }
.slick-next { right: -25px; }

.slick-arrow:before {
    color: var(--primary-dark-green); /* Couleur de la flèche */
    opacity: 0.75;
    transition: opacity 0.3s;
}
.slick-arrow:hover:before {
    color: var(--primary-gold); /* Couleur au survol */
    opacity: 1;
}
.slick-disabled:before {
    opacity: 0.25; /* Flèche désactivée */
}

/* 9. NOUVEAU: RESPONSIVE MOBILE (VOTRE DEMANDE) */
@media (max-width: 768px) {
    .sub-collections-slider {
        padding: 1rem 0; 
    }

    /* Rendre les images plus petites */
    .sub-collection-image {
        width: 60px; /* Plus petit (au lieu de 140px) */
        height: 60px; /* Plus petit (au lieu de 140px) */
        border-width: 2px;
    }

    /* Rendre le texte plus petit */
    .sub-collection-title {
        font-size: 0.6rem; 
        margin-top: 0.75rem;
    }
    .slider-track.slick-initialized.slick-slider {
        padding: 0 !important;
    }

    /* Ajuste l'espacement des slides sur mobile */
    .slider-track .slick-slide {
        margin: 0 5px;
    }
}