:root {
    --biam-primary: #7eb737;
    --biam-primary-dark: #5f8f22;
    --biam-primary-soft: #f2f7e9;
    --biam-slate: #465363;
    --biam-slate-dark: #2b3645;
    --biam-orange: #ff8115;
    --biam-red: #e6001a;
    --biam-ink: #333333;
    --biam-muted: #68727d;
    --biam-line: #d9dee2;
    --biam-surface: #ffffff;
    --biam-canvas: #f5f6f4;
    --biam-radius: 7px;
    --biam-shadow: 0 3px 12px rgba(43, 54, 69, .08);
    --biam-shadow-hover: 0 8px 22px rgba(43, 54, 69, .14);
}

body.biam-theme {
    background: var(--biam-canvas);
    color: var(--biam-ink);
    font-family: Gotham, Montserrat, "Segoe UI", Arial, sans-serif;
}

.biam-theme a {
    color: var(--biam-primary-dark);
}

.biam-theme a:hover,
.biam-theme a:focus {
    color: var(--biam-slate-dark);
}

.biam-theme :focus-visible {
    outline: 3px solid var(--biam-orange);
    outline-offset: 3px;
}

.biam-theme h1,
.biam-theme h2,
.biam-theme h3,
.biam-theme h4,
.biam-theme h5,
.biam-theme h6 {
    color: var(--biam-slate-dark);
    font-family: Gotham, Montserrat, "Segoe UI", Arial, sans-serif;
    font-weight: 800;
    letter-spacing: -.015em;
}

/* En-tête Astra */
.biam-theme .site-header,
.biam-theme .ast-primary-header-bar {
    background: var(--biam-canvas) !important;
}

.biam-theme .ast-primary-header-bar {
    border-top: 0 !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
    border-left: 0 !important;
    box-shadow: none !important;
}

.biam-theme .site-header .ast-builder-grid-row-container,
.biam-theme .site-header .ast-builder-grid-row,
.biam-theme .site-header .site-header-section {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.biam-theme .site-title a,
.biam-theme .site-title a:focus,
.biam-theme .site-title a:hover {
    color: var(--biam-slate-dark);
    font-weight: 800;
}

.biam-theme .main-header-menu > .menu-item > .menu-link {
    color: var(--biam-slate);
    font-weight: 700;
}

.biam-theme .main-header-menu > .menu-item:hover > .menu-link,
.biam-theme .main-header-menu > .current-menu-item > .menu-link,
.biam-theme .main-header-menu > .current-menu-ancestor > .menu-link {
    color: var(--biam-primary-dark);
}

.biam-theme .main-header-menu > .current-menu-item > .menu-link::after,
.biam-theme .main-header-menu > .current-menu-ancestor > .menu-link::after {
    content: "";
    position: absolute;
    right: 1em;
    bottom: 8px;
    left: 1em;
    height: 3px;
    background: var(--biam-orange);
}

.biam-theme .ast-header-break-point .main-header-menu {
    background: var(--biam-surface);
}

.biam-theme .ast-mobile-menu-trigger-minimal,
.biam-theme [data-section="section-header-mobile-trigger"] .ast-button-wrap .mobile-menu-toggle-icon .ast-mobile-svg {
    color: var(--biam-primary-dark);
    fill: var(--biam-primary-dark);
}

/* Zone de contenu */
.biam-theme .site-content {
    min-height: 55vh;
}

.biam-theme .site-main > .ast-article-single,
.biam-theme .site-main > .ast-article-post {
    border: 1px solid var(--biam-line);
    border-radius: var(--biam-radius);
    box-shadow: var(--biam-shadow);
}

.biam-theme .entry-title,
.biam-theme .page-title,
.biam-theme .woocommerce-products-header__title.page-title {
    color: var(--biam-slate-dark);
}

.biam-theme .entry-header .entry-title::after,
.biam-theme .woocommerce-products-header__title.page-title::after {
    content: "";
    display: block;
    width: 72px;
    height: 4px;
    margin-top: 12px;
    background: var(--biam-primary);
}

/* Boutons et champs communs */
.biam-theme button,
.biam-theme input[type="button"],
.biam-theme input[type="reset"],
.biam-theme input[type="submit"],
.biam-theme .button,
.biam-theme .wp-element-button,
.biam-theme .ast-button {
    min-height: 42px;
    border: 1px solid var(--biam-primary);
    border-radius: var(--biam-radius);
    background: var(--biam-primary);
    color: #fff;
    font-weight: 800;
    line-height: 1.2;
    transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.biam-theme button:hover,
.biam-theme input[type="button"]:hover,
.biam-theme input[type="reset"]:hover,
.biam-theme input[type="submit"]:hover,
.biam-theme .button:hover,
.biam-theme .wp-element-button:hover,
.biam-theme .ast-button:hover {
    border-color: var(--biam-primary-dark);
    background: var(--biam-primary-dark);
    color: #fff;
    box-shadow: 0 5px 14px rgba(95, 143, 34, .2);
    transform: translateY(-1px);
}

.biam-theme input[type="text"],
.biam-theme input[type="email"],
.biam-theme input[type="url"],
.biam-theme input[type="password"],
.biam-theme input[type="search"],
.biam-theme input[type="number"],
.biam-theme input[type="tel"],
.biam-theme input[type="date"],
.biam-theme select,
.biam-theme textarea {
    min-height: 44px;
    border: 1px solid #b9c6d3;
    border-radius: var(--biam-radius);
    background: #fff;
    color: var(--biam-ink);
    box-shadow: none;
}

.biam-theme textarea {
    min-height: 120px;
}

.biam-theme input:focus,
.biam-theme select:focus,
.biam-theme textarea:focus {
    border-color: var(--biam-primary);
    box-shadow: 0 0 0 3px rgba(126, 183, 55, .15);
}

/* Ambiance visuelle sur les pages WooCommerce */
.biam-theme.woocommerce-page .site-content > .ast-container,
.biam-theme.woocommerce .site-content > .ast-container {
    position: relative;
}

.biam-theme.woocommerce-page .site-content > .ast-container::before,
.biam-theme.woocommerce .site-content > .ast-container::before {
    content: "";
    position: absolute;
    top: 10px;
    right: 0;
    z-index: 0;
    width: 210px;
    height: 132px;
    background: url("../images/biam-microalgae.svg") center / contain no-repeat;
    opacity: .08;
    pointer-events: none;
}

.biam-theme.woocommerce-page .site-content > .ast-container > *,
.biam-theme.woocommerce .site-content > .ast-container > * {
    position: relative;
    z-index: 1;
}

/* Fil d'Ariane, tri et pagination */
.biam-theme .woocommerce-breadcrumb {
    color: var(--biam-muted);
    font-size: .9rem;
}

/* Le bloc de catégorie contient déjà son propre titre : aucun fil d'Ariane au-dessus. */
.biam-theme.tax-product_cat .woocommerce-breadcrumb,
.biam-theme.tax-product_cat .ast-breadcrumbs-wrapper,
.biam-theme.tax-product_cat .ast-breadcrumbs,
.biam-theme.post-type-archive-product .woocommerce-breadcrumb,
.biam-theme.post-type-archive-product .ast-breadcrumbs-wrapper,
.biam-theme.post-type-archive-product .ast-breadcrumbs,
.biam-theme.woocommerce-shop .woocommerce-breadcrumb,
.biam-theme.woocommerce-shop .ast-breadcrumbs-wrapper,
.biam-theme.woocommerce-shop .ast-breadcrumbs,
.biam-theme.single-product .woocommerce-breadcrumb,
.biam-theme.single-product .ast-breadcrumbs-wrapper,
.biam-theme.single-product .ast-breadcrumbs {
    display: none !important;
}

/* Couvre également les nouveaux blocs de fil d'Ariane WooCommerce. */
.biam-theme.woocommerce .wp-block-woocommerce-breadcrumbs,
.biam-theme.woocommerce-page .wp-block-woocommerce-breadcrumbs,
.biam-theme.woocommerce .wc-block-breadcrumbs,
.biam-theme.woocommerce-page .wc-block-breadcrumbs,
.biam-theme.woocommerce .woocommerce-breadcrumb,
.biam-theme.woocommerce-page .woocommerce-breadcrumb,
.biam-theme.woocommerce .ast-breadcrumbs-wrapper,
.biam-theme.woocommerce-page .ast-breadcrumbs-wrapper,
.biam-theme.woocommerce nav[aria-label="Fil d’Ariane"],
.biam-theme.woocommerce-page nav[aria-label="Fil d’Ariane"],
.biam-theme.woocommerce nav[aria-label*="Ariane"],
.biam-theme.woocommerce-page nav[aria-label*="Ariane"],
.biam-theme.woocommerce nav[aria-label="Breadcrumb"],
.biam-theme.woocommerce-page nav[aria-label="Breadcrumb"],
.biam-theme.woocommerce [class*="breadcrumb"],
.biam-theme.woocommerce-page [class*="breadcrumb"] {
    display: none !important;
}

.biam-theme .woocommerce-breadcrumb a {
    color: var(--biam-primary-dark);
    font-weight: 700;
}

.biam-theme .woocommerce-result-count {
    color: var(--biam-muted);
}

.biam-theme .woocommerce-ordering select {
    min-width: 220px;
}

.biam-theme .woocommerce nav.woocommerce-pagination ul {
    display: flex;
    gap: 7px;
    border: 0;
}

.biam-theme .woocommerce nav.woocommerce-pagination ul li {
    border: 0;
}

.biam-theme .woocommerce nav.woocommerce-pagination ul li a,
.biam-theme .woocommerce nav.woocommerce-pagination ul li span {
    display: grid;
    min-width: 40px;
    min-height: 40px;
    place-items: center;
    border: 1px solid var(--biam-line);
    border-radius: var(--biam-radius);
    background: #fff;
    color: var(--biam-slate-dark);
}

.biam-theme .woocommerce nav.woocommerce-pagination ul li span.current,
.biam-theme .woocommerce nav.woocommerce-pagination ul li a:hover {
    border-color: var(--biam-primary);
    background: var(--biam-primary);
    color: #fff;
}

/* Catalogue et cartes produit */
.biam-theme .woocommerce ul.products {
    gap: 22px 0;
}

/* Les catégories occupent cinq colonnes, indépendamment du réglage produit. */
.biam-theme .woocommerce ul.products:has(> li.product-category),
.biam-theme.woocommerce ul.products:has(> li.product-category) {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
}

.biam-theme .woocommerce ul.products:has(> li.product-category) > li.product-category,
.biam-theme.woocommerce ul.products:has(> li.product-category) > li.product-category {
    float: none !important;
    width: auto !important;
    min-width: 0;
    margin: 0 !important;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--biam-line);
    border-top: 4px solid var(--biam-primary);
    border-radius: var(--biam-radius);
    background: #fff;
    box-shadow: var(--biam-shadow);
    text-align: center;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.biam-theme .woocommerce li.product-category > a.woocommerce-loop-category__link,
.biam-theme.woocommerce li.product-category > a.woocommerce-loop-category__link {
    position: relative !important;
    display: grid !important;
    height: 100%;
    grid-template-rows: 220px;
    grid-template-areas: "visual";
    overflow: hidden !important;
    color: var(--biam-slate-dark);
    text-decoration: none;
}

.biam-theme .woocommerce ul.products > li.product-category:hover,
.biam-theme.woocommerce ul.products > li.product-category:hover {
    border-color: var(--biam-primary);
    box-shadow: var(--biam-shadow-hover);
    transform: translateY(-3px);
}

.biam-theme .woocommerce li.product-category .biam-category-visual {
    position: relative !important;
    z-index: 1;
    grid-area: visual;
    display: grid;
    width: 100%;
    height: 220px;
    padding: 0;
    place-items: center;
    background: linear-gradient(145deg, var(--biam-primary-soft), #fff);
}

.biam-theme .woocommerce li.product-category .biam-category-composite {
    display: block;
    width: 100%;
    height: 220px;
    overflow: visible;
}

.biam-theme .woocommerce li.product-category .woocommerce-loop-category__title,
.biam-theme.woocommerce li.product-category .woocommerce-loop-category__title {
    display: none !important;
}

.biam-theme .woocommerce li.product-category .biam-category-icon {
    display: block;
    width: 100%;
    height: 124px;
    margin: 0;
    object-fit: contain;
}

.biam-theme .woocommerce ul.products li.product,
.biam-theme .woocommerce-page ul.products li.product {
    position: relative;
    overflow: hidden;
    padding: 0 0 20px;
    border: 1px solid var(--biam-line);
    border-top: 4px solid var(--biam-primary);
    border-radius: var(--biam-radius);
    background: var(--biam-surface);
    box-shadow: var(--biam-shadow);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.biam-theme .woocommerce ul.products li.product:not(.product-category),
.biam-theme .woocommerce-page ul.products li.product:not(.product-category) {
    display: flex;
    height: 420px;
    min-height: 420px;
    max-height: 420px;
    flex-direction: column;
}

.biam-theme .woocommerce ul.products li.product:hover,
.biam-theme .woocommerce-page ul.products li.product:hover {
    border-color: var(--biam-primary);
    box-shadow: var(--biam-shadow-hover);
    transform: translateY(-3px);
}

.biam-theme .woocommerce ul.products li.product .astra-shop-thumbnail-wrap,
.biam-theme .woocommerce ul.products li.product .woocommerce-loop-product__link,
.biam-theme .woocommerce-page ul.products li.product .woocommerce-loop-product__link {
    display: block;
}

.biam-theme .woocommerce ul.products li.product img {
    margin-bottom: 0;
    background: #fff;
}

.biam-theme .woocommerce ul.products li.product:not(.product-category) .astra-shop-thumbnail-wrap,
.biam-theme .woocommerce-page ul.products li.product:not(.product-category) .astra-shop-thumbnail-wrap {
    display: grid;
    height: 214px !important;
    min-height: 214px;
    max-height: 214px;
    flex: 0 0 214px;
    place-items: center;
    overflow: hidden;
    border-bottom: 1px solid var(--biam-line);
    background: #fff;
}

.biam-theme .woocommerce ul.products li.product:not(.product-category) .astra-shop-thumbnail-wrap > a,
.biam-theme .woocommerce-page ul.products li.product:not(.product-category) .astra-shop-thumbnail-wrap > a {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
}

.biam-theme .woocommerce ul.products li.product:not(.product-category) .astra-shop-thumbnail-wrap img,
.biam-theme .woocommerce-page ul.products li.product:not(.product-category) .astra-shop-thumbnail-wrap img {
    width: 100%;
    height: 100%;
    padding: 14px;
    object-fit: contain;
}

/* Cible directe WooCommerce : elle couvre également les boucles sans wrapper Astra. */
.biam-theme .woocommerce ul.products li.product:not(.product-category) img.attachment-woocommerce_thumbnail,
.biam-theme .woocommerce ul.products li.product:not(.product-category) img.wp-post-image,
.biam-theme.woocommerce ul.products li.product:not(.product-category) img.attachment-woocommerce_thumbnail,
.biam-theme.woocommerce ul.products li.product:not(.product-category) img.wp-post-image {
    display: block !important;
    width: 100% !important;
    height: 214px !important;
    min-height: 214px !important;
    max-height: 214px !important;
    margin: 0 !important;
    padding: 12px !important;
    border: 0;
    background: #fff;
    object-fit: contain !important;
    object-position: center !important;
}

.biam-theme .woocommerce ul.products li.product .astra-shop-summary-wrap,
.biam-theme .woocommerce-page ul.products li.product .astra-shop-summary-wrap {
    padding: 18px 18px 0;
}

.biam-theme .woocommerce ul.products li.product:not(.product-category) .astra-shop-summary-wrap,
.biam-theme .woocommerce-page ul.products li.product:not(.product-category) .astra-shop-summary-wrap {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
}

.biam-theme .woocommerce ul.products li.product .woocommerce-loop-product__title {
    display: -webkit-box;
    min-height: 2.6em;
    max-height: 2.6em;
    overflow: hidden;
    color: var(--biam-slate-dark);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.3;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.biam-theme .woocommerce ul.products li.product .price,
.biam-theme .woocommerce div.product p.price,
.biam-theme .woocommerce div.product span.price {
    color: var(--biam-primary-dark);
    font-weight: 800;
}

.biam-theme .woocommerce ul.products li.product .button {
    margin: 14px 18px 0;
}

.biam-theme .woocommerce ul.products li.product:not(.product-category) .astra-shop-summary-wrap .button {
    margin-top: auto;
}

/* Retour au catalogue des catégories */
.biam-theme.tax-product_cat .woocommerce-products-header,
.biam-theme.tax-product_cat .ast-archive-description {
    min-height: 0 !important;
}

.biam-theme.tax-product_cat .woocommerce-products-header {
    display: flex;
    min-height: 76px !important;
    margin: 0 0 18px !important;
    padding: 11px 16px !important;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-left: 5px solid var(--biam-primary);
    border-radius: var(--biam-radius);
    background: #fff;
    box-shadow: var(--biam-shadow);
}

.biam-theme.tax-product_cat .woocommerce-products-header .woocommerce-products-header__title,
.biam-theme.tax-product_cat .woocommerce-products-header .page-title,
.biam-theme.tax-product_cat .woocommerce-products-header .biam-category-header-title {
    order: -1;
    flex: 0 1 auto;
    margin: 0 !important;
    color: var(--biam-slate-dark) !important;
    font-size: clamp(1.25rem, 2.2vw, 1.65rem);
    font-weight: 800;
    line-height: 1.15;
}

/* Le titre fourni par le thème peut être vide ou masqué : le titre BIAM le remplace. */
.biam-theme.tax-product_cat .woocommerce-products-header > .woocommerce-products-header__title:not(.biam-category-header-title),
.biam-theme.tax-product_cat .woocommerce-products-header > .page-title:not(.biam-category-header-title) {
    display: none !important;
}

.biam-theme.tax-product_cat .woocommerce-products-header .biam-category-header-icon {
    order: -2;
    display: grid;
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    place-items: center;
    overflow: hidden;
    border-radius: var(--biam-radius);
    background: var(--biam-primary-soft);
}

.biam-theme.tax-product_cat .woocommerce-products-header .biam-category-header-icon img {
    display: block;
    width: 50px;
    height: 50px;
    margin: 0;
    padding: 3px;
    object-fit: contain;
}

.biam-theme.tax-product_cat .woocommerce-products-header .woocommerce-products-header__title::after,
.biam-theme.tax-product_cat .woocommerce-products-header .page-title::after {
    display: none !important;
}

.biam-theme.tax-product_cat .woocommerce-products-header .term-description {
    display: none;
}

.biam-theme .woocommerce-products-header .biam-category-back {
    order: 1;
    flex: 0 0 auto;
    margin-left: auto;
}

.biam-theme .biam-category-back {
    clear: both;
    width: auto;
    margin: 0;
}

.biam-theme .biam-category-back__link.button {
    display: inline-flex;
    min-height: 40px;
    padding: 9px 14px;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--biam-line);
    background: #fff;
    color: var(--biam-primary-dark);
    box-shadow: var(--biam-shadow);
    white-space: nowrap;
}

.biam-theme .biam-category-back__link.button:hover,
.biam-theme .biam-category-back__link.button:focus {
    border-color: var(--biam-primary);
    background: var(--biam-primary-soft);
    color: var(--biam-primary-dark);
}

.biam-theme .woocommerce span.onsale {
    min-width: 52px;
    min-height: 52px;
    padding: 8px;
    background: var(--biam-orange);
    color: #fff;
    font-weight: 800;
}

.biam-theme .star-rating,
.biam-theme .woocommerce .star-rating::before,
.biam-theme .woocommerce .star-rating span::before {
    color: var(--biam-orange);
}

/* Fiche produit */
.biam-theme .woocommerce div.product {
    position: relative;
}

.biam-theme .biam-product-category-return {
    clear: both;
    width: 100%;
    margin: 0 0 16px;
}

.biam-theme .biam-product-category-return__link {
    display: inline-flex;
    min-height: 40px;
    padding: 9px 14px;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--biam-line);
    border-radius: var(--biam-radius);
    background: #fff;
    color: var(--biam-primary-dark);
    box-shadow: var(--biam-shadow);
    font-weight: 800;
    text-decoration: none;
}

.biam-theme .biam-product-category-return__link:hover,
.biam-theme .biam-product-category-return__link:focus {
    border-color: var(--biam-primary);
    background: var(--biam-primary-soft);
    color: var(--biam-primary-dark);
}

.biam-theme .woocommerce div.product div.images img {
    border: 1px solid var(--biam-line);
    border-radius: var(--biam-radius);
    background: #fff;
}

.biam-theme .woocommerce div.product .product_title {
    color: var(--biam-slate-dark);
}

.biam-theme .woocommerce div.product .product_meta {
    margin-top: 20px;
    padding: 14px;
    border-left: 4px solid var(--biam-primary);
    background: var(--biam-primary-soft);
    color: var(--biam-muted);
}

.biam-theme .woocommerce div.product form.cart .quantity .qty {
    min-height: 44px;
}

.biam-theme .woocommerce div.product .woocommerce-tabs ul.tabs {
    padding: 0;
    border-bottom: 1px solid var(--biam-line);
}

.biam-theme .woocommerce div.product .woocommerce-tabs ul.tabs::before,
.biam-theme .woocommerce div.product .woocommerce-tabs ul.tabs li::before,
.biam-theme .woocommerce div.product .woocommerce-tabs ul.tabs li::after {
    display: none;
}

.biam-theme .woocommerce div.product .woocommerce-tabs ul.tabs li {
    margin: 0 7px 0 0;
    border: 1px solid var(--biam-line);
    border-radius: var(--biam-radius) var(--biam-radius) 0 0;
    background: var(--biam-canvas);
}

.biam-theme .woocommerce div.product .woocommerce-tabs ul.tabs li.active {
    border-bottom-color: #fff;
    background: #fff;
}

.biam-theme .woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
    color: var(--biam-primary-dark);
}

.biam-theme .woocommerce-Tabs-panel {
    padding: 22px;
    border: 1px solid var(--biam-line);
    border-top: 0;
    border-radius: 0 0 var(--biam-radius) var(--biam-radius);
    background: #fff;
}

/* Messages WooCommerce */
.biam-theme .woocommerce-message,
.biam-theme .woocommerce-info,
.biam-theme .woocommerce-error {
    padding: 16px 18px 16px 48px;
    border: 1px solid var(--biam-line);
    border-top: 0;
    border-left: 5px solid var(--biam-primary);
    border-radius: var(--biam-radius);
    background: #fff;
    box-shadow: var(--biam-shadow);
    color: var(--biam-ink);
}

.biam-theme .woocommerce-info {
    border-left-color: var(--biam-orange);
}

.biam-theme .woocommerce-error {
    border-left-color: var(--biam-red);
}

.biam-theme .woocommerce-message::before {
    color: var(--biam-primary-dark);
}

.biam-theme .woocommerce-info::before {
    color: var(--biam-orange);
}

.biam-theme .woocommerce-error::before {
    color: var(--biam-red);
}

/* Panier et tableaux */
.biam-theme .woocommerce table.shop_table {
    overflow: hidden;
    border: 1px solid var(--biam-line);
    border-collapse: separate;
    border-radius: var(--biam-radius);
    background: #fff;
    box-shadow: var(--biam-shadow);
}

.biam-theme .woocommerce table.shop_table th {
    padding: 14px 12px;
    background: var(--biam-slate);
    color: #fff;
    font-size: .78rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.biam-theme .woocommerce table.shop_table td {
    padding: 14px 12px;
    border-color: #e9edf0;
}

.biam-theme .woocommerce-cart table.cart img {
    border: 1px solid var(--biam-line);
    border-radius: 5px;
}

.biam-theme .woocommerce a.remove {
    color: var(--biam-red) !important;
}

.biam-theme .woocommerce a.remove:hover {
    background: var(--biam-red);
    color: #fff !important;
}

.biam-theme .cart-collaterals .cart_totals,
.biam-theme .woocommerce-checkout-review-order,
.biam-theme .woocommerce-order-details,
.biam-theme .woocommerce-customer-details {
    padding: 22px;
    border: 1px solid var(--biam-line);
    border-radius: var(--biam-radius);
    background: #fff;
    box-shadow: var(--biam-shadow);
}

/* Commande */
.biam-theme .woocommerce form.checkout_coupon,
.biam-theme .woocommerce form.login,
.biam-theme .woocommerce form.register {
    border: 1px solid var(--biam-line);
    border-radius: var(--biam-radius);
    background: #fff;
    box-shadow: var(--biam-shadow);
}

.biam-theme .woocommerce-checkout .col2-set .col-1,
.biam-theme .woocommerce-checkout .col2-set .col-2 {
    padding: 22px;
    border: 1px solid var(--biam-line);
    border-radius: var(--biam-radius);
    background: #fff;
}

.biam-theme .woocommerce-checkout #payment {
    border: 1px solid var(--biam-line);
    border-radius: var(--biam-radius);
    background: var(--biam-primary-soft);
}

.biam-theme .woocommerce-checkout #payment div.payment_box {
    background: #fff;
}

.biam-theme .woocommerce-checkout #payment div.payment_box::before {
    border-bottom-color: #fff;
}

.biam-theme .select2-container--default .select2-selection--single {
    min-height: 44px;
    border: 1px solid #b9c6d3;
    border-radius: var(--biam-radius);
}

.biam-theme .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 42px;
}

.biam-theme .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 42px;
}

/* Compte client */
.biam-theme .woocommerce-MyAccount-navigation {
    overflow: hidden;
    border: 1px solid var(--biam-line);
    border-radius: var(--biam-radius);
    background: #fff;
    box-shadow: var(--biam-shadow);
}

.biam-theme .woocommerce-MyAccount-navigation ul {
    margin: 0;
    list-style: none;
}

.biam-theme .woocommerce-MyAccount-navigation li {
    border-bottom: 1px solid var(--biam-line);
}

.biam-theme .woocommerce-MyAccount-navigation li:last-child {
    border-bottom: 0;
}

.biam-theme .woocommerce-MyAccount-navigation a {
    display: block;
    padding: 13px 16px;
    color: var(--biam-slate);
    font-weight: 700;
    text-decoration: none;
}

.biam-theme .woocommerce-MyAccount-navigation li.is-active a,
.biam-theme .woocommerce-MyAccount-navigation a:hover {
    border-left: 5px solid var(--biam-primary);
    background: var(--biam-primary-soft);
    color: var(--biam-primary-dark);
}

.biam-theme .woocommerce-MyAccount-content {
    position: relative;
    min-height: 280px;
    padding: 24px;
    overflow: hidden;
    border: 1px solid var(--biam-line);
    border-radius: var(--biam-radius);
    background: #fff;
    box-shadow: var(--biam-shadow);
}

.biam-theme .woocommerce-MyAccount-content::after {
    content: "";
    position: absolute;
    right: -20px;
    bottom: -22px;
    width: 190px;
    height: 120px;
    background: url("../images/biam-plant.svg") center / contain no-repeat;
    opacity: .06;
    pointer-events: none;
}

/* Widgets WooCommerce */
.biam-theme .widget {
    border-color: var(--biam-line);
}

.biam-theme .widget-title {
    padding-bottom: 9px;
    border-bottom: 3px solid var(--biam-primary);
    color: var(--biam-slate-dark);
}

.biam-theme .widget_product_categories li,
.biam-theme .woocommerce-widget-layered-nav-list li {
    padding: 7px 0;
    border-bottom: 1px solid #edf0f2;
}

.biam-theme .widget_price_filter .ui-slider .ui-slider-range,
.biam-theme .widget_price_filter .ui-slider .ui-slider-handle {
    background: var(--biam-primary);
}

.biam-theme .widget_price_filter .price_slider_wrapper .ui-widget-content {
    background: #dce4d1;
}

/* Pied de page */
.biam-theme .site-footer,
.biam-theme .site-primary-footer-wrap,
.biam-theme .site-below-footer-wrap {
    background: var(--biam-slate-dark);
    color: #eef1f3;
}

.biam-theme .site-footer a {
    color: #d6eab9;
}

.biam-theme .site-footer a:hover {
    color: #fff;
}

/* Blocs WooCommerce récents */
.biam-theme .wc-block-components-button:not(.is-link),
.biam-theme .wp-block-woocommerce-cart .wc-block-cart__submit-button,
.biam-theme .wp-block-woocommerce-checkout .wc-block-components-checkout-place-order-button {
    border-radius: var(--biam-radius);
    background: var(--biam-primary);
    color: #fff;
    font-weight: 800;
}

.biam-theme .wc-block-components-button:not(.is-link):hover {
    background: var(--biam-primary-dark);
    color: #fff;
}

.biam-theme .wc-block-cart-items,
.biam-theme .wc-block-components-sidebar-layout .wc-block-components-totals-wrapper,
.biam-theme .wc-block-checkout__form,
.biam-theme .wc-block-components-order-summary {
    border-color: var(--biam-line);
}

.biam-theme .wc-block-components-text-input input,
.biam-theme .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input {
    border-color: #b9c6d3;
    border-radius: var(--biam-radius);
}

/* Panier vide : état BIAM simplifié */
.biam-theme .wp-block-woocommerce-empty-cart-block {
    position: relative;
    min-height: 390px;
    padding: 26px 20px 34px;
    overflow: hidden;
    border: 1px solid var(--biam-line);
    border-radius: var(--biam-radius);
    background: linear-gradient(145deg, #fff, var(--biam-primary-soft));
    box-shadow: var(--biam-shadow);
    text-align: center;
}

/* L'ancien pictogramme triste peut être un bloc Image selon la version de WooCommerce. */
.biam-theme .wp-block-woocommerce-empty-cart-block > .wp-block-image:first-child,
.biam-theme .wp-block-woocommerce-empty-cart-block > figure.wp-block-image:first-child {
    display: none !important;
}

.biam-theme .wp-block-woocommerce-empty-cart-block .wc-block-cart__empty-cart__title {
    margin: 0;
    overflow: visible !important;
    color: var(--biam-slate-dark);
    font-size: clamp(1.35rem, 2.4vw, 1.8rem);
}

/* Le nouveau visuel remplace aussi le pseudo-élément des versions récentes. */
.biam-theme .wp-block-woocommerce-empty-cart-block .wc-block-cart__empty-cart__title::before,
.biam-theme .wp-block-woocommerce-empty-cart-block .wc-block-cart__empty-cart__title.with-empty-cart-icon::before {
    content: "" !important;
    display: block !important;
    width: min(290px, 82vw) !important;
    height: 210px !important;
    margin: 0 auto 12px !important;
    background: url("../images/biam-surprised-money-plant.svg") center / contain no-repeat !important;
    opacity: 1 !important;
    transform: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    clip-path: none !important;
    mask: none !important;
    -webkit-mask: none !important;
    box-shadow: none !important;
    overflow: visible !important;
}

/* Supprime la rubrique de recommandations de l'état panier vide. */
.biam-theme .wp-block-woocommerce-empty-cart-block h2:not(.wc-block-cart__empty-cart__title),
.biam-theme .wp-block-woocommerce-empty-cart-block .wp-block-heading:not(.wc-block-cart__empty-cart__title),
.biam-theme .wp-block-woocommerce-empty-cart-block .wp-block-separator,
.biam-theme .wp-block-woocommerce-empty-cart-block .wp-block-woocommerce-product-new,
.biam-theme .wp-block-woocommerce-empty-cart-block .wp-block-woocommerce-product-collection,
.biam-theme .wp-block-woocommerce-empty-cart-block .wc-block-grid,
.biam-theme .wp-block-woocommerce-empty-cart-block [class*="product-new"] {
    display: none !important;
}

.biam-theme .biam-empty-cart-return {
    margin: 18px 0 0;
    text-align: center;
}

.biam-theme .biam-empty-cart-return__link.button {
    display: inline-flex;
    min-height: 44px;
    padding: 10px 17px;
    align-items: center;
    gap: 8px;
    border-color: var(--biam-primary);
    background: var(--biam-primary);
    color: #fff;
    text-decoration: none;
}

.biam-theme .biam-empty-cart-return__link.button:hover,
.biam-theme .biam-empty-cart-return__link.button:focus {
    border-color: var(--biam-primary-dark);
    background: var(--biam-primary-dark);
    color: #fff;
}

@media (max-width: 921px) {
    .biam-theme .main-header-menu > .current-menu-item > .menu-link::after,
    .biam-theme .main-header-menu > .current-menu-ancestor > .menu-link::after {
        display: none;
    }

    .biam-theme.woocommerce-page .site-content > .ast-container::before,
    .biam-theme.woocommerce .site-content > .ast-container::before {
        width: 150px;
        height: 95px;
    }

    .biam-theme .woocommerce-checkout .col2-set .col-1,
    .biam-theme .woocommerce-checkout .col2-set .col-2 {
        padding: 18px;
    }

    .biam-theme .woocommerce ul.products:has(> li.product-category),
    .biam-theme.woocommerce ul.products:has(> li.product-category) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .biam-theme.tax-product_cat .woocommerce-products-header {
        display: grid;
        min-height: 0 !important;
        padding: 10px 12px !important;
        grid-template-columns: 46px minmax(0, 1fr);
        align-items: center;
        gap: 8px;
    }

    .biam-theme.tax-product_cat .woocommerce-products-header .biam-category-header-icon {
        width: 44px;
        height: 44px;
        grid-column: 1;
        grid-row: 1;
    }

    .biam-theme.tax-product_cat .woocommerce-products-header .biam-category-header-icon img {
        width: 42px;
        height: 42px;
    }

    .biam-theme.tax-product_cat .woocommerce-products-header .woocommerce-products-header__title,
    .biam-theme.tax-product_cat .woocommerce-products-header .page-title,
    .biam-theme.tax-product_cat .woocommerce-products-header .biam-category-header-title {
        grid-column: 2;
        grid-row: 1;
    }

    .biam-theme .woocommerce-products-header .biam-category-back {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-self: end;
        margin-left: 0;
    }

    .biam-theme .wp-block-woocommerce-empty-cart-block {
        min-height: 340px;
        padding: 20px 14px 28px;
    }

    .biam-theme .wp-block-woocommerce-empty-cart-block .wc-block-cart__empty-cart__title::before,
    .biam-theme .wp-block-woocommerce-empty-cart-block .wc-block-cart__empty-cart__title.with-empty-cart-icon::before {
        height: 175px !important;
    }

    .biam-theme .woocommerce ul.products:has(> li.product-category),
    .biam-theme.woocommerce ul.products:has(> li.product-category) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .biam-theme .woocommerce li.product-category .biam-category-visual {
        height: 190px;
    }

    .biam-theme .woocommerce li.product-category > a.woocommerce-loop-category__link,
    .biam-theme.woocommerce li.product-category > a.woocommerce-loop-category__link {
        grid-template-rows: 190px;
    }

    .biam-theme .woocommerce li.product-category .biam-category-composite {
        height: 190px;
    }

    .biam-theme .woocommerce-ordering,
    .biam-theme .woocommerce-result-count {
        float: none;
        width: 100%;
    }

    .biam-theme .woocommerce-ordering select {
        width: 100%;
    }

    .biam-theme .woocommerce table.shop_table_responsive tr,
    .biam-theme .woocommerce-page table.shop_table_responsive tr {
        margin-bottom: 16px;
        border: 1px solid var(--biam-line);
        border-radius: var(--biam-radius);
        background: #fff;
    }

    .biam-theme .cart-collaterals .cart_totals,
    .biam-theme .woocommerce-checkout-review-order,
    .biam-theme .woocommerce-order-details,
    .biam-theme .woocommerce-customer-details,
    .biam-theme .woocommerce-MyAccount-content {
        padding: 17px;
    }

    .biam-theme .woocommerce-MyAccount-navigation {
        margin-bottom: 20px;
    }
}

@media (max-width: 380px) {
    .biam-theme .woocommerce ul.products:has(> li.product-category),
    .biam-theme.woocommerce ul.products:has(> li.product-category) {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .biam-theme *,
    .biam-theme *::before,
    .biam-theme *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
