/* =========================================
   1. FOND ANIMÉ (BEAMS)
   ========================================= */
   .shop-hero-wrapper {
    position: relative;
    min-height: 100vh;
    width: 100%;
    padding: 140px 0 80px;
    /* Fond noir pur pour laisser briller les rayons or */
    background: #000; 
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

/* Halo de lumière doré très subtil au centre pour le prestige */
.shop-hero-wrapper::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(201, 164, 115, 0.05) 0%, transparent 70%);
    z-index: 1;
    pointer-events: none;
}

/* On utilise l'ID pour être sûr que le JS le trouve et la classe pour le style */
#beams-container, .galaxy-container {
    position: absolute;
    top: 0; 
    left: 0; 
    width: 100% !important; 
    height: 100% !important;
    z-index: 0;
    pointer-events: none;
    display: block !important; /* Force l'affichage */
}

/* On s'assure que le canvas généré par Three.js prend bien toute la place */
#beams-container canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* Halo de lumière pour adoucir le haut */
.shop-hero-wrapper::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 50% -10%, rgba(58, 58, 58, 0.4) 0%, transparent 70%);
    z-index: 1;
    pointer-events: none;
}

.shop-container {
    position: relative;
    z-index: 2;
    width: 95%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center; /* CENTRE LE TITRE ET LA GRILLE */
}

.shop-header-text {
    text-align: center; /* CENTRE LE TEXTE */
    margin-bottom: 60px;
}

.shop-header-text h1 {
    font-size: 2.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    color: #fff;
}

/* =========================================
   2. GRILLE PRODUITS (CENTRÉE & TAILLE FIXE)
   ========================================= */

   .products-grid {
    display: grid;
    /* Desktop : 340px par carte. Mobile : Prend la place dispo jusqu'à 340px */
    grid-template-columns: repeat(auto-fit, minmax(280px, 340px));
    
    /* CENTRE LA GRILLE (Si 1 ou 2 cartes) */
    justify-content: center; 
    
    /* CENTRE LE CONTENU DANS LES COLONNES (Indispensable pour Mobile) */
    justify-items: center; 
    
    gap: 40px;
    width: 100%;
}

.product-card {
    width: 340px; /* Largeur verrouillée */
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    transition: transform 0.3s ease, border-color 0.3s;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-10px);
    border-color: #c9a473;
    background: rgba(255, 255, 255, 0.08);
}

/* IMAGE ET BADGES */
.card-image { height: 320px; width: 100%; overflow: hidden; position: relative; }
.card-image img { width: 100%; height: 100%; object-fit: cover; }

.badge-tag {
    position: absolute; top: 15px; left: 15px;
    padding: 6px 12px; background: #fff; color: #000;
    font-size: 0.7rem; font-weight: 800; text-transform: uppercase;
    border-radius: 4px; z-index: 5;
}
.badge-tag.gold { background: #c9a473; }

/* ALIGNEMENT TEXTE & PRIX */
.card-info { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; text-align: center; }
.card-info h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 10px; color: #fff; }

.card-bottom {
    margin-top: auto; /* Aligne tout en bas */
    padding: 20px 25px; border-top: 1px solid rgba(255,255,255,0.1);
    display: flex; justify-content: space-between; align-items: center;
}

.price-text { font-weight: 700; color: #fff; }
.btn-discover { color: #c9a473; font-weight: 800; font-size: 0.75rem; text-transform: uppercase; }

/* RESPONSIVE */
@media (max-width: 768px) {
    .products-grid {
        /* On s'assure qu'il n'y a qu'une colonne centrée sur mobile */
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .product-card {
        /* La carte reste centrée même si l'écran est plus large qu'elle */
        width: 100%;
        max-width: 340px;
    }
}

.shop-loader { width: 100%; padding: 80px; text-align: center; color: #c9a473; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }