/* Styles spécifiques GMS : cartes produits + menu catégories */

/* Carousel : même traitement que CHR — règle explicite identique pour les images */
.gms-page .hero .hero-slide img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Sidebar GMS : 2 catégories principales (Fromages, Gastronomie) — rendu agréable et lisible */
.gms-page .categories-sidebar {
    background: linear-gradient(180deg, #fafafa 0%, #f5f5f5 100%);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 1.25rem 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.gms-page .categories-sidebar .sidebar-header {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}
.gms-page .categories-sidebar .sidebar-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--primary-color, #c41e3a);
    width: 100%;
    text-align: center;
    margin: 0;
}
.gms-page .categories-sidebar .sidebar-toggle {
    display: none !important;
}
.gms-page .categories-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.gms-page .category-group {
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}
.gms-page .category-group:last-child {
    margin-bottom: 0;
}
.gms-page .category-group-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 2rem 0.9rem 1rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    text-align: center;
    transition: background 0.2s, color 0.2s;
    position: relative;
}
.gms-page .category-group-header:hover {
    background: rgba(0, 0, 0, 0.04);
}
.gms-page .category-group.expanded .category-group-header {
    color: var(--primary-color, #c41e3a);
}
.gms-page .category-group-header .category-group-title {
    flex: 1;
    text-align: center;
}
.gms-page .category-group-chevron {
    position: absolute;
    right: 1rem;
    flex-shrink: 0;
    font-size: 0.65rem;
    opacity: 0.7;
    transition: transform 0.25s ease;
}
.gms-page .category-group.expanded .category-group-chevron {
    transform: rotate(180deg);
    opacity: 1;
}
.gms-page .category-subcategories {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: rgba(255, 255, 255, 0.4);
}
.gms-page .category-group.expanded .category-subcategories {
    max-height: 600px;
    transition: max-height 0.35s ease-in;
}
.gms-page .category-subcategories .category-card {
    padding: 0.65rem 1rem 0.65rem 1.25rem;
    margin: 0 0.35rem 0.25rem;
    border-radius: 6px;
    border-left: 3px solid transparent;
    transition: background 0.2s, border-color 0.2s;
    text-align: center;
}
.gms-page .category-subcategories .category-card:hover {
    background: rgba(255, 255, 255, 0.9);
    border-left-color: var(--primary-color, #c41e3a);
}
.gms-page .category-subcategories .category-card.active {
    border-left-color: var(--primary-color, #c41e3a);
}
.gms-page .category-subcategories .category-card h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.35;
}
.gms-page .category-subcategories .category-card .count {
    font-size: 0.8rem;
    opacity: 0.85;
    margin-top: 0.15rem;
}

/* Contour fin et élégant pour les cartes produits */
.gms-page .product-card {
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.gms-page .product-card:hover {
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Cartes uniformes : même hauteur dans la grille */
.gms-page .products-grid {
    align-items: stretch;
}

.gms-page .product-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Zone produit : structure homogène */
.gms-page .product-card .product-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-height: 0;
}

/* Nom du produit : centré */
.gms-page .product-card .product-name {
    text-align: center;
    margin-bottom: 0.75rem;
}

/* Zone détails : hauteur minimale pour uniformité, contenu centré */
.gms-page .product-card .product-details {
    flex-grow: 1;
    min-height: 4.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.25rem;
}

.gms-page .product-card .product-details p {
    margin: 0;
}

.gms-page .product-card .product-category {
    margin-top: 0.5rem;
}

/* Badges prix + code : en bas, centrés, toujours au même niveau */
.gms-page .product-card .product-badges {
    margin-top: auto;
    justify-content: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

/* Bouton Ajouter : sous le prix et le code, centré, couleur du thème */
.gms-page .product-card .btn-add-cart {
    display: block;
    margin: 1rem auto 0;
    width: auto;
    min-width: 120px;
    padding: 0.6rem 1.25rem;
    background: var(--secondary-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-body);
    box-shadow: 0 2px 6px rgba(201, 169, 97, 0.3);
}
.gms-page .product-card .btn-add-cart:hover {
    background: var(--accent-color);
    color: #fff;
    box-shadow: 0 3px 10px rgba(139, 111, 71, 0.35);
    transform: translateY(-1px);
}

/* Mobile : même format que Prestige — pleine largeur, padding et taille de police identiques */
@media (max-width: 768px) {
    .gms-page .product-card .btn-add-cart {
        width: 100%;
        min-width: 0;
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }
}
