/* =========================================
   FRONT PAGE STYLES (Sport Theme)
   ========================================= */

/* --- Variables Locales --- */
:root {
    --hero-bg: #1a1a1a;
    --hero-text: #ffffff;
}

/* Utilitaires Section */
.section-padding {
    padding: 60px 0;
}
.bg-light {
    background-color: #f9f9f9;
}
.text-center {
    text-align: center;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Titres de Section */
.section-title {
    font-size: 2rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 40px;
    position: relative;
    color: #333;
}
.section-title .highlight {
    color: var(--accent-color, #e74c3c);
}

/* --- 1. Hero Section --- */
.hero-section {
    background-color: var(--hero-bg);
    color: var(--hero-text);
    padding: 80px 0;
    overflow: hidden;
    position: relative;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-content {
    max-width: 50%;
    z-index: 2;
}

.hero-subtitle {
    display: inline-block;
    background: var(--accent-color, #e74c3c);
    color: white;
    padding: 5px 10px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 15px;
    border-radius: 2px;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
    font-weight: 900;
    margin-bottom: 20px;
    text-transform: uppercase;
    color: white;
}

.hero-title .highlight {
    -webkit-text-stroke: 2px var(--accent-color, #e74c3c);
    color: transparent; /* Effet contour moderne */
}

.hero-text {
    font-size: 1.1rem;
    color: #ccc;
    margin-bottom: 30px;
    max-width: 450px;
}

/* Bouton */
.btn {
    display: inline-block;
    padding: 12px 30px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 4px;
    cursor: pointer;
}
.btn-primary {
    background-color: var(--accent-color, #e74c3c);
    color: white;
    border: 2px solid var(--accent-color, #e74c3c);
}
.btn-primary:hover {
    background-color: transparent;
    color: var(--accent-color, #e74c3c);
}

/* Hero Visual (SVG) */
.hero-visual {
    flex-grow: 1;
    display: flex;
    justify-content: flex-end;
}
.hero-visual svg {
    max-width: 400px;
    height: auto;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
}

/* --- 2. Categories Grid --- */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.cat-card {
    position: relative;
    height: 300px;
    display: flex;
    align-items: flex-end;
    padding: 30px;
    text-decoration: none;
    border-radius: 8px;
    overflow: hidden;
    background: #eee;
    transition: transform 0.3s ease;
}

.cat-card:hover {
    transform: translateY(-5px);
}

.cat-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
    /* Ici on pourrait mettre une background-image */
    background: linear-gradient(45deg, #333, #666); 
}

.cat-content {
    position: relative;
    z-index: 2;
    color: white;
}

.cat-content h3 {
    font-size: 1.8rem;
    margin: 0 0 10px;
    text-transform: uppercase;
    font-weight: 800;
}

.cat-content .btn-link {
    color: var(--accent-color, #e74c3c);
    font-weight: bold;
    text-transform: uppercase;
}

/* =========================================
   3. BEST SELLERS (Style "Carte" Moderne)
   ========================================= */

/* --- Conteneur de la grille --- */
.featured-products ul.products {
    display: grid;
    /* Crée 4 colonnes avec une largeur minimum */
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px; /* Espace entre les cartes */
    padding: 0;
    margin: 0;
    list-style: none !important; /* Retire les puces de liste */
}

/* --- Style de la Carte Produit (li) --- */
.featured-products ul.products li.product {
    background: #ffffff; /* Fond blanc */
    border-radius: 12px; /* Coins arrondis */
    padding: 20px;
    text-align: center;
    /* Ombre douce pour l'effet "carte" */
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    /* Flex pour bien aligner le contenu verticalement */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #f0f0f0; /* Légère bordure optionnelle */
}

/* Effet au survol de la carte */
.featured-products ul.products li.product:hover {
    transform: translateY(-5px); /* Remonte légèrement */
    box-shadow: 0 15px 30px rgba(0,0,0,0.1); /* Ombre plus marquée */
}

/* --- GESTION DES IMAGES (Taille Propre et Uniforme) --- */
.featured-products ul.products li.product a img {
    width: 100%;
    height: 200px; /* Hauteur FIXE pour toutes les images */
    /* 'contain' affiche toute l'image sans couper. Utilise 'cover' pour remplir le cadre. */
    object-fit: contain;
    object-position: center;
    margin-bottom: 20px;
    border-radius: 8px;
    /* Fond gris clair optionnel derrière l'image */
    /* background-color: #f9f9f9; */
}

/* --- Titre du produit --- */
.featured-products ul.products li.product h2.woocommerce-loop-product__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 10px;
    line-height: 1.4;
    /* Hauteur minimale pour aligner les cartes même si un titre est plus long */
    min-height: 2.8em;
}

/* --- Prix --- */
.featured-products ul.products li.product .price {
    display: block;
    color: var(--accent-color, #e74c3c); /* Utilise ta couleur d'accent */
    font-weight: 800;
    font-size: 1.25rem;
    margin-bottom: 20px;
}

/* --- Bouton "Ajouter au panier" --- */
.featured-products ul.products li.product .button {
    display: inline-block;
    background-color: #333; /* Fond sombre par défaut */
    color: #fff !important; /* Texte blanc */
    padding: 12px 25px;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 30px; /* Bouton arrondi */
    transition: background 0.3s ease;
    margin-top: auto; /* Pousse le bouton vers le bas */
    border: none;
    cursor: pointer;
}

/* Le conteneur principal */
.features-grid {
    display: flex;
    justify-content: space-around; /* C'est la clé : répartit l'espace autour des éléments */
    align-items: center; /* Aligne verticalement au centre */
    gap: 20px; /* Ajoute un espace minimum de sécurité entre les blocs */
    padding: 20px 0; /* Un peu d'air en haut et en bas */
}

/* Chaque bloc individuel (livraison, paiement, etc.) */
.feature-item {
    text-align: center; /* Centre le texte et l'icône horizontalement */
    flex: 1; /* Force chaque élément à prendre une largeur égale */
}

/* Optionnel : pour rendre les icônes plus jolies */
.feature-item .icon {
    font-size: 2rem; /* Agrandit l'emoji */
    display: block; /* Force l'icône à être sur sa propre ligne */
    margin-bottom: 10px; /* Espace entre l'icône et le titre */
}

.feature-item h4 {
    margin: 5px 0;
    font-weight: bold;
}

/* Survol du bouton */
.featured-products ul.products li.product .button:hover {
    background-color: var(--accent-color, #e74c3c); /* Change en couleur d'accent */
}

/* --- Responsive (Tablette et Mobile) --- */

/* Tablette : Passer à 2 colonnes */
@media (max-width: 992px) {
    .featured-products ul.products {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile : Passer à 1 colonne */
@media (max-width: 576px) {
    .featured-products ul.products {
        grid-template-columns: 1fr;
    }
}