/* CSS dédié à la page d'accueil de BoulderGain */

/* Styles pour la section "Join The Movement" */
#bgn-join-movement {
    position: relative;
    overflow: hidden;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

#bgn-days, #bgn-hours, #bgn-minutes, #bgn-seconds {
    position: relative;
    display: inline-block;
}

#bgn-seconds {
    animation: pulse 1s infinite;
}

#bgn-newsletter-form {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

#bgn-newsletter-form input {
    letter-spacing: 0.01em;
    font-weight: 400;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-radius: 0.375rem !important;
    border: none !important;
}

#bgn-newsletter-form input::placeholder {
    color: rgba(0, 0, 0, 0.4);
    font-weight: 300;
}

#bgn-newsletter-form input:focus {
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

#bgn-newsletter-form button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#bgn-newsletter-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

#bgn-newsletter-form button:active {
    transform: translateY(1px);
}

@media (max-width: 767px) {
    #bgn-join-movement {
        min-height: 480px;
    }
}

@media (min-width: 768px) {
    #bgn-join-movement .absolute img {
        transform: scale(1.05);
        transition: transform 0.5s ease-out;
    }
    
    #bgn-join-movement:hover .absolute img {
        transform: scale(1);
    }
}

/* Styles pour la section "Brand Parallax" */
.bgn-brand-parallax-section {
    position: relative;
    overflow: hidden;
}

.bgn-parallax-container {
    clip: rect(0, auto, auto, 0);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.bgn-parallax-container img {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    object-fit: cover;
    transform: translateZ(0);
    pointer-events: none;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bgn-brand-parallax-section h2 {
    animation: fadeInUp 1.2s ease-out forwards;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.bgn-brand-parallax-section p {
    animation: fadeInUp 1.2s ease-out 0.3s forwards;
    opacity: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Styles pour la section "Shop by Category" */
.bgn-category-card {
    animation: fadeInUp 0.8s ease-out forwards;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.5s ease;
}

.bgn-category-card:nth-child(1) { animation-delay: 0.1s; }
.bgn-category-card:nth-child(2) { animation-delay: 0.3s; }
.bgn-category-card:nth-child(3) { animation-delay: 0.5s; }

.bgn-category-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.bgn-category-card img {
    transition: all 0.7s ease;
}

.bgn-category-women:hover img { filter: contrast(1.1); }
.bgn-category-men:hover img { filter: contrast(1.25) brightness(1.05); }
.bgn-category-accessories:hover img { filter: brightness(1.1) contrast(1.15); }

.bgn-category-card .absolute .h-\[1px\] { 
    transition: width 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.bgn-category-card .absolute h3 {
    transition: transform 0.5s ease;
}

.bgn-category-card:hover .absolute h3 {
    transform: translateY(-4px);
}

.bgn-carousel-container::-webkit-scrollbar { display: none; }
.bgn-carousel-container { -ms-overflow-style: none; scrollbar-width: none; }

/* Product Carousels (New Releases, Best Sellers) */
[data-bgn-component="new-products"] .bgn-carousel-container,
[data-bgn-component="bestseller-products"] .bgn-carousel-container {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

[data-bgn-component="new-products"] .bgn-carousel-track,
[data-bgn-component="bestseller-products"] .bgn-carousel-track {
    display: flex;
    width: max-content;
}

[data-bgn-component="new-products"] .bgn-carousel-slide,
[data-bgn-component="bestseller-products"] .bgn-carousel-slide {
    scroll-snap-align: start;
    flex-shrink: 0;
}

/* Mobile Product Card Styles for Carousels */
@media (max-width: 639px) { /* Apply only on mobile, below sm breakpoint */
    [data-bgn-component="new-products"] .bgn-carousel-slide,
    [data-bgn-component="bestseller-products"] .bgn-carousel-slide {
        flex: 0 0 179px !important; /* Set the width of the slide */
        min-width: 179px !important;
    }

    [data-bgn-component="new-products"] .bgn-product-card img,
    [data-bgn-component="bestseller-products"] .bgn-product-card img {
        height: 223.75px !important;
    }

    .bgn-product-info-wrapper {
        padding-left: 10px;
        padding-right: 10px;
    }

    .bgn-product-card .bgn-product-info-wrapper h3 {
        font-size: 14px !important;
        font-weight: 600 !important;
        line-height: 1.1 !important;
        flex-grow: 1; /* Permet au titre de grandir, poussant le contenu vers le bas */
        min-height: 31px; /* Réserve l'espace pour au moins deux lignes pour éviter les sauts */
    }

    [data-bgn-component="new-products"] .bgn-product-card .text-gray-600,
    [data-bgn-component="bestseller-products"] .bgn-product-card .text-gray-600 {
        color: #8d8d8d !important;
        font-size: 13px !important;
    }

    [data-bgn-component="new-products"] .bgn-product-card p.font-bold,
    [data-bgn-component="bestseller-products"] .bgn-product-card p.font-bold {
        color: #8d8d8d !important;
        font-size: 12px !important;
    }

    [data-bgn-component="new-products"] .bgn-product-info-wrapper .flex.mt-1.mb-2,
    [data-bgn-component="bestseller-products"] .bgn-product-info-wrapper .flex.mt-1.mb-2 {
        margin-bottom: 2px !important; /* Réduit l'espace sous la couleur */
    }
}

    /* --- Correction d'alignement pour les cartes produits --- */
    [data-bgn-component="new-products"] .bgn-carousel-slide,
    [data-bgn-component="bestseller-products"] .bgn-carousel-slide {
        height: auto; /* Laisse flexbox déterminer la hauteur en fonction de l'élément le plus haut */
    }
    [data-bgn-component="new-products"] .bgn-carousel-slide .bgn-product-card,
    [data-bgn-component="bestseller-products"] .bgn-carousel-slide .bgn-product-card {
        display: flex;
        flex-direction: column;
        height: 100%; /* Fait en sorte que la carte remplisse la hauteur du slide */
    }
    [data-bgn-component="new-products"] .bgn-carousel-slide .bgn-product-card > a,
    [data-bgn-component="bestseller-products"] .bgn-carousel-slide .bgn-product-card > a {
        display: flex;
        flex-direction: column;
        flex-grow: 1; /* Fait grandir le conteneur du lien */
    }
    [data-bgn-component="new-products"] .bgn-carousel-slide .bgn-product-info-wrapper,
    [data-bgn-component="bestseller-products"] .bgn-carousel-slide .bgn-product-info-wrapper {
        display: flex;
        flex-direction: column;
        flex-grow: 1; /* Fait grandir le conteneur des informations */
    }
    /* --- Fin de la correction d'alignement --- */

@media (min-width: 640px) { /* sm breakpoint */
    [data-bgn-component="new-products"] .bgn-carousel-container,
    [data-bgn-component="bestseller-products"] .bgn-carousel-container {
        overflow: hidden; /* Hide scrollbar on desktop */
    }
    [data-bgn-component="new-products"] .bgn-carousel-track,
    [data-bgn-component="bestseller-products"] .bgn-carousel-track {
        display: flex;
        flex-wrap: nowrap; /* This is the key change */
        width: auto;
    }
    [data-bgn-component="new-products"] .bgn-carousel-slide,
    [data-bgn-component="bestseller-products"] .bgn-carousel-slide {
        width: 25%; /* 4 items per view */
        flex-shrink: 0;
    }
}

@media (max-width: 767px) {
    .bgn-carousel-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
    }
    [data-bgn-component="shop-categories"] [data-bgn-element="mobile-category-carousel"] .bgn-carousel-slide {
        scroll-snap-align: start;
    }
    [data-bgn-element="mobile-category-carousel"] .bgn-category-card img { filter: grayscale(0); }
    [data-bgn-element="mobile-category-carousel"] .bgn-category-card.bgn-category-men img { filter: grayscale(0) contrast(1.25); }
    [data-bgn-element="mobile-category-carousel"] .bgn-category-card.bgn-category-accessories img { filter: grayscale(0) brightness(1.1); }
}

/* Styles pour la section "Our Boulders" */
.bgn-boulder-card {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.5s ease;
    animation: fadeInUp 0.8s ease-out forwards;
}

.bgn-boulder-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.bgn-boulder-card:nth-child(4) { animation-delay: 0.4s; }
.bgn-boulder-card:nth-child(5) { animation-delay: 0.5s; }
.bgn-boulder-card:nth-child(6) { animation-delay: 0.6s; }

.bg-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.2'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.bgn-join-card {
    position: relative;
    overflow: hidden;
}

.bgn-join-card::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    transform: rotate(45deg);
    z-index: 1;
    transition: all 0.8s ease;
}

.bgn-join-card:hover::before {
    transform: rotate(45deg) translateY(-100%);
}

@media (min-width: 768px) {
    .bgn-boulder-card img { transition: transform 0.7s ease; }
    .bgn-boulder-card:hover img { transform: scale(1.05); }
    .bgn-boulder-card .absolute.inset-0.bg-gradient-to-t { transition: opacity 0.5s ease; }
    .bgn-boulder-card:hover .absolute.inset-0.bg-gradient-to-t { opacity: 0.7; }
    .bgn-boulder-card a.border { transition: background-color 0.3s ease, color 0.3s ease; }
    .bgn-boulder-card a.border:hover { background-color: white; color: black; }
}

@media (max-width: 767px) {
    .boulders-slider { -ms-overflow-style: none; scrollbar-width: none; }
    .boulders-slider::-webkit-scrollbar { display: none; }
    .dot.active { background-color: #000; width: 8px; }
    .bgn-boulders-section-mobile .bgn-join-card { width: 100%; max-width: none; margin-left: auto; margin-right: auto; display: block; box-sizing: border-box; padding: 0; }
}

/* Assurez-vous que le nom du Boulder est toujours visible */
.boulder-name {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
}
