/* --- GLOBAL CONFIG --- */
.catalogue-page,
.stock-page {
    background-color: #f9fafb;
    min-height: 100vh;
    font-family: "Roboto Slab", serif;
    overflow: hidden;
}

.catalogue-container,
.stock-container {
    max-width: 1576px;
    margin: 0 auto;
    
}

.catalogue-page {
    background-color: #f9fafb;
    min-height: 100vh;
    
}

.catalogue-container {
    max-width: 1576px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* --- MASONRY COLUMNS --- */
.masonry-grid {
    -moz-column-count: 1;
         column-count: 1;
    -moz-column-gap: 2rem;
         column-gap: 2rem;
}

@media (min-width: 768px) { .masonry-grid { -moz-column-count: 2; column-count: 2; } }
@media (min-width: 1024px) { .masonry-grid { -moz-column-count: 3; column-count: 3; } }
@media (min-width: 1280px) { .masonry-grid { -moz-column-count: 4; column-count: 4; } }

.masonry-item {
    -moz-column-break-inside: avoid;
         break-inside: avoid;
    margin-bottom: 2rem;
}

/* --- CATEGORY HEADER --- */
.category-header-link {
    text-decoration: none;
    display: block;
    margin-bottom: 0.75rem;
}

.category-title {
    font-size: 1rem;
    font-weight: 700;
    color: #302d63;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.2s;
}

.category-header-link:hover .category-title {
    color: #4b5563;
}

.count-badge {
    font-size: 0.875rem;
    color: #6b7280;
    margin-left: 0.5rem;
    text-transform: none;
}

.arrow-icon {
    font-size: 1rem;
    opacity: 100;
    transition: opacity 0.2s;
}

.category-header-link:hover .arrow-icon {
    opacity: 1;
}

/* --- SUBCATEGORIES --- */
.subcategory-list {
    list-style: none;
    padding: 0 0 0 0.5rem;
    margin: 0;
}

.subcategory-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    padding: 0.25rem 0;
    color: #374151;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.subcategory-link:hover {
    color: #4c5ca4;
}

.sub-count {
    font-size: 0.75rem;
    color: #6b7280;
}

.see-all-item {
    padding-top: 0.25rem;
}

.see-all-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    text-decoration: none;
    color: #4c5ca4;
    font-size: 0.875rem;
    font-weight: 600;
}

.see-all-link i {
    font-size: 0.875rem;
    transition: transform 0.2s;
}

.see-all-link:hover i {
    transform: translateX(4px);
}

/* --- CTA BANNER --- */
.cta-banner {
    margin-top: 4rem;
    border-radius: 1rem;
    padding: 3rem;
    text-align: center;
    color: white;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    background: linear-gradient(180deg, #302D63 0%, #201E47 100%);
}

.cta-title {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-text {
    font-size: 1.125rem;
    color: #dbeafe;
    max-width: 42rem;
    margin: 0 auto 1.5rem auto;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: #1f2937;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.cta-button:hover {
    background: #eff6ff;
    transform: translateY(-2px);
}

/* --- GRID PRODUITS (STOCK) --- */
.stock-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}
@media (min-width: 1024px) {
    .stock-layout {
        grid-template-columns: 320px 1fr;
    }
}

/* ==========================================================================
   Filtres mobile/tablette : bouton + overlay plein ecran
   (<1024px la sidebar est empilee au-dessus des produits et cache la grille ;
    on la masque derriere un bouton "Filtrer" qui l'ouvre en plein ecran.)
   ========================================================================== */
.filter-mobile-trigger { display: none; }
.filter-overlay-header { display: none; }

@media (max-width: 1023px) {
    /* Bouton d'ouverture, pleine largeur, en tete de la colonne (avant la grille) */
    .filter-mobile-trigger {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        width: 100%;
        padding: 0.85rem 1rem;
        /* Meme jaune que le bouton "Vendre" (.btn-yellow) */
        background: #fde663;
        border: 0;
        border-radius: 0.9rem;
        font-weight: 700;
        font-size: 0.95rem;
        color: #000;
        cursor: pointer;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    }
    .filter-mobile-trigger__icon { font-size: 1rem; }

    /* Sidebar masquee par defaut : elle ne s'affiche qu'en overlay */
    .stock-sidebar .bolt-sidebar-widget { display: none; }

    .stock-sidebar .bolt-sidebar-widget.is-open {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1100;
        margin: 0;
        border: 0;
        border-radius: 0;
        padding: 0 1rem 2rem;
        background: #fff;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* En-tete colle en haut de l'overlay avec le bouton de fermeture */
    .filter-overlay-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: sticky;
        top: 0;
        z-index: 1;
        padding: 1rem 0 0.75rem;
        margin-bottom: 0.75rem;
        background: #fff;
        border-bottom: 1px solid #e5e7eb;
    }
    .filter-overlay-title { font-weight: 800; font-size: 1.05rem; color: #302d63; }
    .filter-overlay-close {
        border: 0;
        background: #f3f4f6;
        color: #302d63;
        width: 2.25rem;
        height: 2.25rem;
        border-radius: 0.6rem;
        font-size: 1.6rem;
        line-height: 1;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Bloque le scroll de la page derriere l'overlay */
    body.filter-overlay-open { overflow: hidden; }
}

.product-grid-bolt {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(284px, 1fr));
    gap: 1.5rem;
}

/* --- PRODUCT CARD (REWORK BOLT STYLE) --- */
.product-card-bolt {
    background: white;
    border-radius: 1.25rem;
    border: 2px solid #e5e7eb;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card-bolt:hover {
    transform: translateY(-8px);
    border-color: #4c5ca4;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.card-inner-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-img-container {
    position: relative;
    aspect-ratio: 4/3;
    aspect-ratio: 1;
    overflow: hidden;
    background: linear-gradient(to bottom right, #f3f4f6, #e5e7eb);
}

.product-main-img {
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
       object-fit: cover;
    transition: transform 0.6s ease;
}
.product-card-bolt:hover .product-main-img {
    transform: scale(1.1);
}

/* Badges */
.badge-bolt {
    position: absolute;
    top: 1rem;
    z-index: 10;
    padding: 0.35rem 0.85rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 800;
    color: white;
}
.badge-sold {
    left: 1rem;
    background: #ef4444;
}
.badge-options {
    right: 1rem;
    background: #302d63;
    background: #ef4444;
}

/* View Details Pill */
.img-overlay-gradient {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 50%);
}
.product-card-bolt:hover .img-overlay-gradient {
    opacity: 1;
}

.floating-view-details {
    position: absolute;
    bottom: 1.25rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    opacity: 0;
    transform: translateY(1rem);
    transition: all 0.3s ease;
}
.product-card-bolt:hover .floating-view-details {
    opacity: 1;
    transform: translateY(0);
}

.details-pill {
    background: rgba(255, 255, 255, 0.95);
    padding: 0.6rem 1.25rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #343434;
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

/* Card Content */
.product-content-bolt {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.content-header-bolt {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.ref-badge-bolt {
    background: #eff6ff;
    color: #4c5ca4;
    padding: 0.25rem 0.6rem;
    border-radius: 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
}

.manufacturer-text-bolt {
    font-size: 0.7rem;
    color: #9ca3af;
    text-transform: uppercase;
    font-weight: 600;
}

.product-title-bolt {
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.3;
    /* margin-bottom: 1.25rem; */
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 62px;
}
.product-card-bolt:hover .product-title-bolt {
    color: #4c5ca4;
}

.content-footer-bolt {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
    margin-top: auto;
}

.stock-info-bolt {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #4b5563;
}

.footer-arrow-bolt {
    transition: transform 0.3s ease;
    color: #4c5ca4;
}
.product-card-bolt:hover .footer-arrow-bolt {
    transform: translateX(5px);
}

/* Cart Button */
.cart-action-bolt {
    padding: 0 1.5rem 1.5rem 1.5rem;
}
.btn-cart-bolt {
    width: 100%;
    padding: 0.75rem;
    background: #4c5ca4;
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: background 0.3s ease;
}
.btn-cart-bolt:hover {
    background: #302d63;
}

/* --- PAGINATION --- */
.pagination-wrapper {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

/* --- SIDEBAR & FILTERS --- */
.sidebar-content {
    background: white;
    border-radius: 1.25rem;
    border: 1px solid #e5e7eb;
    padding: 1.5rem;
    position: sticky;
    top: 1rem;
}

.elm-filter {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f3f4f6;
}

.logo-filter img {
    width: 20px;
    height: auto;
}
.elm-filter h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ========================================
   RESPONSIVE — Mobile (max-width: 768px)
   ======================================== */
@media (max-width: 768px) {
    .details-pill{
        font-size:10px;
    }
    .catalogue-container,
    .stock-container {
        padding: 1rem 10px;
      
    }
    .product-grid-bolt {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    .product-img-container {
        aspect-ratio: 1/1;
    }
    .product-content-bolt {
        padding: 0.65rem;
    }
    .product-title-bolt {
        font-size: 0.8rem;
        min-height: auto;
        min-height: 50px;
        font-size: 12px;
    }
    .ref-badge-bolt {
        font-size: 0.6rem;
        padding: 0.2rem 0.45rem;
    }
    .stock-info-bolt {
        font-size: 0.75rem;
    }
    .content-footer-bolt {
        padding-top: 0.65rem;
    }
    .cart-action-bolt {
        padding: 0 0.75rem 0.75rem 0.75rem;
    }
    .btn-cart-bolt {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    .product-card-bolt:hover {
        transform: none;
    }
    .cta-banner {
        padding: 2rem 1rem;
        margin-top: 2rem;
    }
    .cta-title {
        font-size: 1.25rem;
    }
    .cta-text {
        font-size: 1rem;
    }
}

/* --- CARDS CATÉGORIES (page famille) --- */
.category-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}
.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 28px 20px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.category-card:hover {
    box-shadow: 0 12px 28px rgba(48, 45, 99, .12);
    transform: translateY(-3px);
    border-color: #c9cdec;
}
.category-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(180deg, #4c5ca4 0%, #302d63 100%);
    color: #fff;
}
.category-card__title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #302d63;
}
.category-card__count {
    font-size: 13px;
    color: #6b7280;
}

/* === Hiérarchie sidebar : famille > catégorie > sous-catégorie === */

/* Niveau 1 — FAMILLE : titre de section (MAJ, gras, indigo, séparateur) */
.bolt-fam + .bolt-fam {
    margin-top: 6px;
}
.bolt-fam > .bolt-filter-row {
    border-bottom: 1px solid #e7e9f3;
    margin-bottom: 4px;
}
.bolt-fam > .bolt-filter-row .bolt-filter-link {
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    color: #302d63;
}

/* Niveau 2 — CATÉGORIE : texte courant (préserve l'état actif) */
.bolt-cat > .bolt-filter-row .bolt-filter-link {
    font-size: 0.9rem;
}
.bolt-cat:not(.bolt-active) > .bolt-filter-row .bolt-filter-link {
    font-weight: 600;
    color: #374151;
}

/* Niveau 3 — SOUS-CATÉGORIE : plus petit, gris (préserve l'état actif) */
.bolt-subcat > .bolt-filter-row .bolt-filter-link {
    font-size: 0.82rem;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
}
.bolt-subcat:not(.bolt-active) > .bolt-filter-row .bolt-filter-link {
    font-weight: 500;
    color: #6b7280;
}

/* Connecteurs renforcés : ancre la relation famille -> catégories */
.bolt-fam > .bolt-sub-list {
    border-left: 2px solid #bcc2e8;
    padding-left: 1.15rem;
    margin-left: 0.9rem;
}
.bolt-cat > .bolt-sub-list {
    border-left: 2px solid #dadef0;
    padding-left: 1rem;
    margin-left: 0.85rem;
}
/* Petit tiret horizontal reliant chaque ligne au connecteur vertical (effet arbre) */
.bolt-fam > .bolt-sub-list > .bolt-filter-item > .bolt-filter-row,
.bolt-cat > .bolt-sub-list > .bolt-filter-item > .bolt-filter-row {
    position: relative;
}
.bolt-fam > .bolt-sub-list > .bolt-filter-item > .bolt-filter-row::before,
.bolt-cat > .bolt-sub-list > .bolt-filter-item > .bolt-filter-row::before {
    content: "";
    position: absolute;
    left: -1.15rem;
    top: 50%;
    width: 0.7rem;
    height: 2px;
    background: #cdd2ee;
}

