/* ===== ARCHIVE BOUTIQUE ===== */
.eco-shop-header { margin: 18px 0 24px; }
.eco-shop .woocommerce-breadcrumb { font-size: 13px; color: #6b7177; margin-bottom: 14px; }
.eco-shop .woocommerce-breadcrumb a { color: #6b7177; text-decoration: none; }
.eco-shop .woocommerce-breadcrumb a:hover { color: var(--eco-accent, #2b6cb0); }

.eco-shop-banner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 24px; background: #f7f8fa; border-radius: 14px; padding: 26px 30px;
}
.eco-shop-title { margin: 0; font-size: 30px; font-weight: 800; color: var(--eco-text, #1d2327); }
.eco-shop-count { margin: 6px 0 0; font-size: 13.5px; color: #6b7177; }
.eco-shop .term-description { margin-top: 8px; color: #4b5563; font-size: 14.5px; line-height: 1.6; max-width: 70ch; }
.eco-shop .term-description p { margin: 0; }
.eco-shop-banner-img img {
    width: 104px; height: 104px; object-fit: cover;
    border-radius: 12px; box-shadow: 0 4px 14px rgba(0,0,0,.10);
}

/* Layout */
.eco-shop-layout {
    display: grid; grid-template-columns: 255px minmax(0, 1fr);
    gap: 28px; align-items: start;
}
.eco-shop-aside { position: sticky; top: 88px; }
.eco-shop-filters { max-height: calc(100vh - 130px); overflow-y: auto; padding-right: 4px; }

.eco-filter-widget { background: #fff; border-radius: 12px; padding: 18px; margin-bottom: 14px; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.eco-filter-title {
    font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
    color: var(--eco-text, #1d2327); margin: 0 0 12px;
    padding-bottom: 8px; border-bottom: 1px solid var(--eco-border, #e6e6e6);
}
.eco-filter-widget ul { list-style: none; margin: 0; padding: 0; }
.eco-filter-widget li { padding: 5px 0; font-size: 14px; }
.eco-filter-widget a { color: #4b5563; text-decoration: none; }
.eco-filter-widget a:hover { color: var(--eco-accent, #2b6cb0); }
.eco-filter-widget .count { color: #9ca3af; font-size: 12px; }
.eco-filters-help { font-size: 13px; color: #6b7177; background: #fff8e6; border-radius: 8px; padding: 12px; }

/* Toolbar */
.eco-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.eco-toolbar .woocommerce-result-count { margin: 0; font-size: 13.5px; color: #6b7177; }
.eco-toolbar .woocommerce-ordering { margin: 0; }
.eco-toolbar .woocommerce-ordering select {
    appearance: none; -webkit-appearance: none;
    border: 1px solid var(--eco-border, #e6e6e6); border-radius: 8px;
    background: #fff url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7177' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>") no-repeat right 10px center / 14px;
    padding: 9px 34px 9px 12px; font-size: 13.5px; font-weight: 600; color: var(--eco-text, #1d2327); cursor: pointer;
}

.eco-filters-toggle {
    display: none; align-items: center; gap: 7px;
    padding: 9px 16px; border-radius: 8px; cursor: pointer;
    border: 1px solid var(--eco-border, #e6e6e6); background: #fff;
    font-size: 13.5px; font-weight: 700; color: var(--eco-text, #1d2327);
}
.eco-filters-toggle svg { width: 16px; height: 16px; }

/* ===== GRILLE PRODUITS ===== */

/* FIX : neutralise le clearfix WooCommerce (le ::before occupait la 1re cellule) */
.woocommerce ul.products::before,
.woocommerce ul.products::after,
.woocommerce-page ul.products::before,
.woocommerce-page ul.products::after { display: none !important; content: none; }

ul.products {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
    margin: 0; padding: 0; list-style: none;
}

/* FIX : la largeur est contrôlée par la grille, pas par WooCommerce (22.05%) */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    clear: none !important;
}

ul.products li.product {
    position: relative;
    background: #fff; border-radius: 12px; overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    transition: transform .35s cubic-bezier(.2,.6,.2,1), box-shadow .35s ease;
    display: flex; flex-direction: column;
}
ul.products li.product:hover { transform: translateY(-5px); box-shadow: 0 14px 30px rgba(0,0,0,.13); }

/* Image + swap */
ul.products li.product .eco-loop-imgs { position: relative; display: block; aspect-ratio: 1/1; background: #f0f2f5; overflow: hidden; }
ul.products li.product .eco-loop-imgs img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform .7s cubic-bezier(.2,.6,.2,1), opacity .5s ease;
}
ul.products li.product .eco-loop-imgs img.eco-loop-img2 { position: absolute; inset: 0; opacity: 0; }
ul.products li.product:hover .eco-loop-imgs img:first-child { transform: scale(1.06); }
ul.products li.product:hover .eco-loop-imgs img.eco-loop-img2 { opacity: 1; transform: scale(1.06); }

/* Badge promo */
ul.products li.product span.onsale.eco-onsale {
    position: absolute; top: 10px; left: 10px; z-index: 3;
    min-width: 0; min-height: 0; line-height: 1.4;
    background: #e53e3e; color: #fff; font-weight: 700; font-size: 11px;
    padding: 4px 9px; border-radius: 4px; margin: 0;
}

/* Textes */
ul.products li.product a.woocommerce-LoopProduct-link { display: flex; flex-direction: column; flex: 1; padding-bottom: 14px; }
ul.products li.product h2.woocommerce-loop-product__title {
    font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--eco-text, #1d2327);
    padding: 12px 16px 0; margin: 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em;
}
ul.products li.product:hover h2.woocommerce-loop-product__title { color: var(--eco-accent, #2b6cb0); }
ul.products li.product .price {
    font-size: 17px; font-weight: 800; color: var(--eco-text, #1d2327);
    padding: 6px 16px 0; margin: 0;
}
ul.products li.product .price del { color: #9ca3af; font-weight: 400; font-size: 13.5px; margin-right: 6px; }
ul.products li.product .price ins { text-decoration: none; color: #e53e3e; }

/* Bouton achat */
ul.products li.product .button {
    margin: auto 16px 16px !important;
    background: transparent !important; color: var(--eco-accent, #2b6cb0) !important;
    border: 2px solid var(--eco-accent, #2b6cb0) !important; border-radius: 8px !important;
    padding: 9px 12px !important; font-size: 13.5px !important; font-weight: 700 !important;
    line-height: 1.4 !important; text-align: center; transition: all .25s ease;
}
ul.products li.product .button:hover { background: var(--eco-accent, #2b6cb0) !important; color: #fff !important; }
ul.products li.product .button.loading { opacity: .6; pointer-events: none; }

/* Vide */
.eco-shop .woocommerce-info {
    background: #fff; border: 1px dashed var(--eco-border, #e6e6e6); border-radius: 12px;
    padding: 26px; text-align: center; color: #6b7177; font-size: 14.5px;
}

/* Pagination */
nav.woocommerce-pagination { margin: 34px 0 10px; }
nav.woocommerce-pagination ul {
    display: flex; justify-content: center; gap: 6px;
    border: 0 !important; margin: 0; padding: 0;
}
nav.woocommerce-pagination ul li { border: 0 !important; float: none; overflow: visible; }
nav.woocommerce-pagination ul li a, nav.woocommerce-pagination ul li span {
    min-width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    border-radius: 10px !important; background: #fff; color: var(--eco-text, #1d2327) !important;
    font-weight: 600; text-decoration: none; box-shadow: 0 2px 8px rgba(0,0,0,.06);
    transition: all .2s ease;
}
nav.woocommerce-pagination ul li span.current { background: var(--eco-accent, #2b6cb0); color: #fff !important; }
nav.woocommerce-pagination ul li a:hover { background: #eef4fb; }

/* Notices */
.eco-shop .woocommerce-message, .eco-shop .woocommerce-error, .eco-shop .woocommerce-info {
    border-radius: 10px; border-top-width: 3px; font-size: 14px; list-style: none;
}
.eco-shop .woocommerce-message { border-top-color: #38a169; }

/* Responsive */
@media (max-width: 1024px) {
    ul.products { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 992px) {
    .eco-shop-layout { display: block; }
    .eco-filters-toggle { display: inline-flex; }
    .eco-toolbar { flex-wrap: wrap; }
    .eco-toolbar .woocommerce-result-count { display: none; }

    .eco-shop-aside { position: fixed; inset: 0; z-index: 10000; visibility: hidden; pointer-events: none; }
    .eco-shop-filters {
        position: absolute; top: 0; bottom: 0; left: 0;
        width: min(320px, 86vw); max-height: none;
        background: #fff; padding: 66px 18px 24px;
        overflow-y: auto; z-index: 2;
        transform: translateX(-100%);
        transition: transform .35s cubic-bezier(.2,.6,.2,1);
        box-shadow: 8px 0 30px rgba(0,0,0,.15);
    }
    .eco-filters-head {
        display: flex; align-items: center; justify-content: space-between;
        position: absolute; top: 0; left: 0; right: 0; z-index: 3;
        background: #fff; border-bottom: 1px solid var(--eco-border, #e6e6e6);
        padding: 16px 18px; font-weight: 800; font-size: 16px; color: var(--eco-text, #1d2327);
    }
    .eco-filters-close { background: none; border: 0; cursor: pointer; padding: 4px; color: var(--eco-text, #1d2327); display: flex; }
    .eco-filters-close svg { width: 20px; height: 20px; }
    .eco-filters-backdrop { position: absolute; inset: 0; background: rgba(15,18,21,.5); opacity: 0; transition: opacity .3s ease; }
    body.eco-filters-open .eco-shop-aside { visibility: visible; pointer-events: auto; }
    body.eco-filters-open .eco-shop-filters { transform: none; }
    body.eco-filters-open .eco-filters-backdrop { opacity: 1; }
    body.eco-filters-open { overflow: hidden; }
}
@media (max-width: 782px) {
    .eco-shop-banner { flex-direction: column; align-items: flex-start; padding: 20px; }
    .eco-shop-banner-img img { width: 72px; height: 72px; }
    .eco-shop-title { font-size: 22px; }
    ul.products { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    ul.products li.product h2.woocommerce-loop-product__title { font-size: 13.5px; padding: 10px 12px 0; }
    ul.products li.product .price { font-size: 15px; padding: 5px 12px 0; }
    ul.products li.product .button { margin-left: 12px !important; margin-right: 12px !important; font-size: 12.5px !important; padding: 8px 8px !important; }
}