/* ==========================================================================
   PAGE CATALOGUE (boutique WooCommerce) — UX premium
   Hero en bandeau dégradé, uniformisé avec les pages catégories.
   ========================================================================== */

/* --- Réduire l'espace vide en haut (au-dessus du fil d'Ariane / hero) --- */
body.post-type-archive-product main,
body.post-type-archive-product .site-main,
body.woocommerce-shop main,
body.woocommerce-shop .site-main {
    padding-top: 1.25rem !important;
}
body.post-type-archive-product .woocommerce-breadcrumb,
body.woocommerce-shop .woocommerce-breadcrumb {
    margin-top: 0 !important;
    margin-bottom: 1rem !important;
}

/* --- HERO (bandeau dégradé, comme .category-hero) --- */
.woocommerce-products-header {
    background: linear-gradient(135deg, #5C7048 0%, #7A9B3F 55%, #95A84B 100%);
    padding: 4.5rem 1.5rem !important;
    margin: 0 0 0 0 !important;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.woocommerce-products-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -8%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.woocommerce-products-header__title.page-title,
.woocommerce-products-header .page-title {
    position: relative;
    z-index: 1;
    color: #fff !important;
    font-size: clamp(2.2rem, 5vw, 3.5rem) !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em !important;
    line-height: 1.1 !important;
    margin: 0 0 1rem !important;
    text-align: center !important;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.catalogue-subtitle {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto !important;
    color: rgba(255, 255, 255, 0.95);
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    line-height: 1.6;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

/* --- Barre de recherche produits (dans le hero) --- */
.catalogue-search {
    position: relative;
    z-index: 1;
    max-width: 540px;
    margin: 1.75rem auto 0;
}

.catalogue-search .woocommerce-product-search {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: #fff;
    border-radius: 50px;
    padding: 0.35rem 0.35rem 0.35rem 1.35rem;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.catalogue-search .woocommerce-product-search label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.catalogue-search .woocommerce-product-search input[type="search"] {
    flex: 1;
    min-width: 0;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    font-size: 1rem;
    color: #2a2a1f;
    padding: 0.5rem 0;
    box-shadow: none !important;
}

.catalogue-search .woocommerce-product-search button {
    flex-shrink: 0;
    background: #7a9b3f !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 0.7rem 1.6rem !important;
    font-weight: 700 !important;
    cursor: pointer;
    transition: background 0.2s ease;
}

.catalogue-search .woocommerce-product-search button:hover {
    background: #6a8736 !important;
}

/* --- Zone de contenu (fond clair, comme .category-content-wrapper) --- */
.woocommerce.archive .site-main,
.post-type-archive-product .site-main,
.woocommerce-page.archive .site-main {
    background: #f9f6f1;
}

/* --- Section UNIVERS (carte blanche, comme .category-intro) --- */
.catalogue-universes {
    background: #fff;
    border-radius: 16px;
    padding: 2.25rem 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin: 2.5rem 0 3rem;
}

.catalogue-universes-title {
    margin: 0 0 1.5rem !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #2a2a1f !important;
    text-align: center;
}

.catalogue-universes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.catalogue-universe-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1.25rem;
    background: #fdfbf7;
    border: 1px solid #ece7dc;
    border-radius: 14px;
    text-decoration: none;
    color: #2a2a1f;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.catalogue-universe-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(42, 42, 31, 0.12);
    border-color: #7a9b3f;
    background: #fff;
}

.catalogue-universe-card .cu-icon {
    flex-shrink: 0;
    width: 2.6rem;
    height: 2.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    background: #f3efe6;
    border-radius: 50%;
}

.catalogue-universe-card .cu-label {
    flex: 1;
    min-width: 0;
    font-weight: 700;
    font-size: 1.02rem;
}

.catalogue-universe-card .cu-arrow {
    color: #c2875a;
    opacity: 0;
    transform: translateX(-5px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.catalogue-universe-card:hover .cu-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* --- Barre résultats / tri --- */
.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering {
    margin-bottom: 1.5rem;
}

/* --- Responsive --- */
@media (min-width: 601px) and (max-width: 900px) {
    .catalogue-universes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Sous 600px : 1 colonne (sinon les libellés type « Équipements » débordent) */
@media (max-width: 600px) {
    .catalogue-universes-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    .woocommerce-products-header {
        padding: 3rem 1.25rem !important;
    }
    .catalogue-universes-grid {
        grid-template-columns: 1fr;
    }
    .catalogue-universes {
        padding: 1.5rem 1.25rem;
    }
    .catalogue-search .woocommerce-product-search {
        padding-left: 1rem;
    }
    .catalogue-search .woocommerce-product-search input[type="search"] {
        font-size: 0.95rem;
    }
    .catalogue-search .woocommerce-product-search button {
        padding: 0.65rem 1rem !important;
        font-size: 0.9rem;
    }
}
