.featured-products-section {
    padding-top: var(--fp-padding-v, 60px);
    padding-bottom: var(--fp-padding-v, 60px);
    width: 100%;
}

.featured-products-section.has-category-filter {
    padding-top: 0;
}

::selection {
    background-color: var(--opsim-brand);
    color: #fff;
}

.section-header {
    text-align: center;
    margin-bottom: 15px;
    position: relative;
}

.opsim-category-filter-wrapper {
    margin-bottom: 25px;
    padding: 10px 0;
    border-bottom: 2px solid var(--opsim-border, rgba(0, 0, 0, 0.1));
    background: #fff;
    position: sticky;
    top: calc(65px + var(--opsim-admin-bar, 0px)); 
    z-index: 100;
}

@media (max-width: 1023px) {
.opsim-category-filter-wrapper {
        top: calc(50px + var(--opsim-admin-bar, 0px)); 
    }
}

.opsim-category-filter {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 15px;
    scrollbar-width: none; 
    -ms-overflow-style: none; 
    justify-content: center;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.opsim-category-filter::-webkit-scrollbar {
    display: none; 
}

@media (max-width: 767px) {
.opsim-category-filter {
        justify-content: flex-start;
    }

    .filter-item {
        scroll-snap-align: center;
    }
}

.filter-item {
    padding: 6px 16px;
    border: 1px solid var(--opsim-border, rgba(0, 0, 0, 0.1));
    border-radius: var(--opsim-radius);
    background: transparent;
    color: #555;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-item:hover {
    border-color: var(--opsim-brand);
    color: var(--opsim-brand);
}

.filter-item.active {
    background: var(--opsim-brand);
    border-color: var(--opsim-brand);
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

#opsim-products-container {
    position: relative;
}

.section-header .section-title {
    font-family: var(--opsim-font-secondary);
    font-size: 22px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 10px;
    display: inline-block;
    position: relative;
    padding: 0;
}

.section-header .section-subtitle {
    display: block;
    font-size: 13px;
    color: var(--fp-accent, var(--opsim-brand));
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
}

.section-header .section-desc {
    max-width: 650px;
    margin: 8px auto 0;
    font-size: 14px;
    line-height: 1.6;
    color: #64748b;
    font-weight: 400;
}

@media (max-width: 767px) {
.section-header {
        margin-bottom: 12px;
    }
    .section-header .section-title {
        font-size: 15px;
        font-weight: 500;
        padding: 0;
        margin: 0 0 4px;
        letter-spacing: 0.5px;
    }
    .section-header .section-subtitle {
        font-size: 11px;
        letter-spacing: 1px;
        font-weight: 500;
        margin-bottom: 4px;
    }
    .section-header .section-desc {
        font-size: 12px;
        line-height: 1.45;
        padding: 0 10px;
        margin-top: 4px;
    }
    .featured-products-section {
        padding-top: 20px;
        padding-bottom: 25px;
    }
}

.products-grid-wrapper {
    width: 100%;
    padding: 0 10px; 
}

@media (max-width: 767px) {
.products-grid-wrapper {
        padding: 0 5px; 
    }
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(var(--fp-columns-desktop, 4), 1fr);
    gap: 12px;
}

.products-grid.cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.products-grid.cols-5 {
    grid-template-columns: repeat(5, 1fr);
}

.products-grid.cols-6 {
    grid-template-columns: repeat(6, 1fr);
}

@media (max-width: 1200px) {
.products-grid.cols-6 {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1023px) {
.products-grid,
    .products-grid.cols-4,
    .products-grid.cols-5,
    .products-grid.cols-6 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
.products-grid,
    .products-grid.cols-4,
    .products-grid.cols-5,
    .products-grid.cols-6 {
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
    }
}

.section-footer {
    text-align: center;
    margin-top: 30px;
}

/* Base style lives in assets/css/base.css (button contract) */
.btn-voir-tout {

    --ostore-button-bg: var(--fp-accent, var(--opsim-brand));
    text-transform: uppercase;
    min-width: 100px;
}

.btn-voir-tout.is-loading {
    color: transparent !important;
    pointer-events: none;
}

.btn-voir-tout.is-loading::after {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    top: calc(50% - 7px);
    left: calc(50% - 7px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: button-spin 0.6s linear infinite;
}

.opsim-pagination {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.opsim-pagination ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 8px;
}

.opsim-pagination li a, 
.opsim-pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--opsim-border, #e5e7eb);
    border-radius: var(--opsim-radius);
    text-decoration: none;
    color: #333;
    font-size: 12px;
    font-weight: 600;
}

.opsim-pagination li span.current {
    background: var(--opsim-brand);
    color: #fff;
    border-color: var(--opsim-brand);
}

.opsim-pagination li a:hover {
    /* No zoom or color change as requested, maybe just a very subtle border? */

    border-color: var(--opsim-brand);
}

/* ══════════════════════════════════════════════════════════════════════
 * Minimalist bijoux styling — storefront Featured Products only
 *
 * Scoped to .fp-style-minimal, which featured-products.php emits on the
 * storefront but not on the shop archive. The archive builds its own grid in
 * woocommerce/archive-product.php while reusing .fp-product-card, so these
 * rules must not be allowed to reach it.
 *
 * Intent: let the jewellery photography carry the section. Boxes, fills and
 * heavy weights are stripped back to hairlines, wide letter-spacing and a
 * warm ivory ground; brand colour is kept as a rare accent (sale price,
 * discount, hover) rather than a background.
 * ══════════════════════════════════════════════════════════════════════ */

.featured-products-section.fp-style-minimal {
    --fpm-ink: #1a1a1a;
    --fpm-muted: #776f67; /* 4.9:1 on white, 4.5:1 on #f5f5f5 (WCAG AA); was #8a8279, 3.8:1. */
    --fpm-hairline: rgba(26, 26, 26, 0.12);
    --fpm-ground: #f6f3f0; 
    /* 32px through 1280, 36px from ~1440 up. Mobile override below. */
    --fpm-atc-size: clamp(32px, 2.5vw, 36px);
    --fpm-img-border: rgba(26, 26, 26, 0.09);
    padding-top: calc(var(--fp-padding-v, 60px) * 1.35);
    padding-bottom: calc(var(--fp-padding-v, 60px) * 1.35);
}

.fp-style-minimal .section-header {
    margin-bottom: 42px;
}

.fp-style-minimal .section-header .section-subtitle {
    color: var(--fpm-muted);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.28em;
    margin-bottom: 14px;
}

.fp-style-minimal .section-header .section-title {
    color: var(--fpm-ink);
    font-size: 30px;
    font-weight: 300;
    letter-spacing: 0.16em;
    margin: 0;
    padding-bottom: 18px;
}

.fp-style-minimal .section-header .section-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 34px;
    height: 1px;
    background: var(--fp-accent, var(--opsim-brand));
    opacity: 0.5;
}

.fp-style-minimal .section-header .section-desc {
    max-width: 460px;
    margin-top: 18px;
    font-size: 13px;
    line-height: 1.75;
    color: var(--fpm-muted);
}

.fp-style-minimal .section-footer {
    margin-top: clamp(26px, 3vw, 40px);
}

/* Only size is set here. background / border / border-radius / box-shadow are
 * declared !important by the button contract in base.css, so the pill keeps its
 * existing look (that is the reference) — previous attempts to restyle those
 * from here were dead declarations and have been removed. */
.fp-style-minimal .btn-voir-tout {
    min-width: clamp(110px, 11vw, 140px);
    min-height: clamp(30px, 2.4vw, 34px);
    padding: 0 clamp(14px, 1.4vw, 20px);
    font-size: clamp(9px, 0.7vw, 10px);
    font-weight: 500;
    letter-spacing: 0.16em;
}

@media (max-width: 767px) {
    .featured-products-section.fp-style-minimal {
        padding-top: 34px;
        padding-bottom: 40px;
    }

    .fp-style-minimal .section-header {
        margin-bottom: 26px;
    }

    .fp-style-minimal .section-header .section-title {
        font-size: 19px;
        font-weight: 300;
        letter-spacing: 0.12em;
        padding-bottom: 14px;
    }

    .fp-style-minimal .section-header .section-subtitle {
        font-size: 9px;
        letter-spacing: 0.24em;
        margin-bottom: 10px;
    }

    .fp-style-minimal .btn-voir-tout {
        letter-spacing: 0.14em;
    }
}
