/*
Theme Name: Blocksy Child Freeperie
Theme URI: https://freeperie.local/
Description: Un thème enfant pour Blocksy, personnalisé pour Freeperie.
Author: Sebastien
Author URI: https://creativethemes.com
Template: blocksy
Version: 1.0.8
Text Domain: blocksy-child-freeperie
*/

/* ==========================================================================
   TABLE OF CONTENTS
   ==========================================================================
   1.  Design Tokens (CSS Custom Properties)
   2.  Base / Body Styles
   3.  Product Card Styles (Catalog Grid)
   4.  Product Card Elements (Brand, Size, Price)
   5.  Sell Button (Header CTA)
   6.  Product Labels & Badges
   7.  Catalog Overlay Actions (Hover Buttons)
   8.  Spinner & Loading States
   9.  Lightbox – Layout & Info Bar
   10. Lightbox – Photo Counter
   11. Lightbox – Meta, Details, Tags
   12. Lightbox – Action Buttons & Navigation
   13. Lightbox – Desktop Layout (min-width: 769px)
   14. Lightbox – Narrow Desktop (769px–1024px)
   15. Lightbox – Desktop Sizing Corrections (min-width: 769px)
   16. Lightbox – Fullscreen Zoom Overrides
   17. Lightbox – Overlay
   18. Back Breadcrumb
   19. Single Product – Vinted-Style Attributes
   20. Single Product – Add to Cart & Price
   21. Single Product – Desktop (Sticky Summary & Gallery)
   22. Catalog Filter Plus Buttons
   23. Lightbox Onboarding
   24. Catalog Bar – Profiles
   25. Catalog Bar – Filter Row
   26. Catalog Bar – Mobile FAB
   27. Catalog Bar – Filter Wrapper
   28. Catalog Bar – Filter Inner
   29. Catalog Bar – Active Chips
   30. Desktop Filters – Horizontal Pills (min-width: 1000px)
   31. Mobile Filters – Off-Canvas Panel (max-width: 999px)
   32. Animations (@keyframes)
   33. AJAX Loading States
   34. Global Loader
   35. Footer Enhancements
   36. Filter Cursor & Interaction Overrides
   37. Search Field in Popup Header
   38. Zero-Count Term Hiding
   ========================================================================== */

/* ==========================================================================
   1. DESIGN TOKENS (CSS Custom Properties)
   ========================================================================== */
:root {
    /* Design Tokens - Mapped to Blocksy Palette */
    --fp-primary-color: #38B449;
    /* Blocksy Green */
    --fp-primary-color-rgb: 56, 180, 73;
    --fp-secondary-color: #2D8F3A;
    /* Darker Green */
    --fp-accent-color: #38B449;
    --fp-text-color: var(--theme-palette-color-3);
    --fp-headings-color: var(--theme-palette-color-4);
    --fp-bg-color: var(--theme-palette-color-5);
    --fp-card-bg: var(--theme-palette-color-8);
    --fp-border-color: rgba(var(--fp-primary-color-rgb), 0.4);
    /* Greenized border instead of brownish-red */
    --fp-font-main: 'Inter', sans-serif;

    /* Additional tokens */
    --fp-cart-added-color: #e67e22;
    --fp-cart-added-hover: #d35400;
    --fp-success-color: #2ecc71;
    --fp-text-muted: #9ca3af;
    --fp-bg-subtle: #f4f4f4;
    --fp-border-light: #e5e7eb;
}

/* ==========================================================================
   2. BASE / BODY STYLES
   ========================================================================== */
body {
    background-color: var(--fp-bg-color);
    color: var(--fp-text-color);
}

/* ==========================================================================
   3. PRODUCT CARD STYLES (Catalog Grid)
   ========================================================================== */
.products .product,
.products>.product,
.woocommerce ul.products li.product {
    background: var(--fp-card-bg) !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 0 !important;
    overflow: hidden !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: none !important;
}

.products .product:hover,
.woocommerce ul.products li.product:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
}

.products .product .woocommerce-loop-product__link,
.woocommerce ul.products li.product .woocommerce-LoopProduct-link {
    display: block !important;
    padding: 12px !important;
}

/* ==========================================================================
   4. PRODUCT CARD ELEMENTS (Brand, Size, Price)
   ========================================================================== */
.fp-product-meta-wrap {
    margin-top: 8px !important;
    margin-left: 5px !important;
    margin-bottom: 4px !important;
}

.fp-product-brand {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: var(--fp-headings-color) !important;
    margin-bottom: 0px !important;
    line-height: 1.2 !important;
}

.fp-product-size {
    font-size: 12px !important;
    color: var(--fp-text-color) !important;
    opacity: 0.8;
    margin-bottom: 4px !important;
}

.woocommerce-loop-product__title {
    display: none !important;
}

.price {
    margin-left: 5px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: var(--fp-headings-color) !important;
}

/* ==========================================================================
   5. SELL BUTTON (Header CTA)
   ========================================================================== */
.fp-sell-button {
    background-color: var(--fp-primary-color);
    color: white !important;
    padding: 8px 20px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: none;
    transition: background-color 0.2s ease;
}

.fp-sell-button:hover {
    background-color: var(--fp-secondary-color);
}

.menu-item.sell-button-item {
    display: flex;
    align-items: center;
    margin-left: 15px;
}

/* ==========================================================================
   6. PRODUCT LABELS & BADGES
   ========================================================================== */
/* Positioning labels on top of the product image */
.products .product,
.woocommerce div.product .ct-media-container {
    position: relative !important;
}

.custom-all-tags {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    z-index: 20;
    /* Ensure visibility over image and overlays */
}

.custom-tag-label {
    background-color: var(--fp-primary-color);
    color: white !important;
    margin-bottom: 5px;
    padding: 4px 10px;
    border-radius: 8px;
    /* Slightly softer than 10px to match card radius */
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Discount badge positioned to the right to avoid overlap with left-side tags */
.onsale, 
.ct-onsale,
.ct-sale-badge {
    left: auto !important;
    right: 10px !important;
    top: 10px !important;
    z-index: 25 !important;
}

/* ==========================================================================
   7. CATALOG OVERLAY ACTIONS (Hover Buttons)
   ========================================================================== */
.products .product figure {
    position: relative;
    overflow: hidden;
}

.fp-overlay-actions {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding-bottom: 20px;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    /* Let clicks fall through to image */
    z-index: 10;
}

/* Hover: Show overlay and add a subtle gradient at the bottom */
.products .product:hover .fp-overlay-actions {
    opacity: 1;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0) 60%);
}

.fp-overlay-actions .button,
.fp-overlay-actions .add_to_cart_button,
.fp-overlay-actions .fp-overlay-cart-btn {
    pointer-events: auto;
    /* Buttons are clickable */
    transform: translateY(20px);
    transition: background-color 0.25s ease, transform 0.3s ease, box-shadow 0.25s ease;
    margin: 0 !important;
    width: 80%;
    /* Consistent width */
    text-align: center;
    background-color: var(--fp-primary-color) !important;
    color: #fff !important;
    border: none;
    border-radius: 4px;
    padding: 8px 15px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.fp-overlay-actions .fp-details-button {
    background-color: #fff !important;
    color: var(--fp-text-color) !important;
}

.fp-overlay-actions .fp-details-button:hover {
    background-color: #f5f5f5 !important;
}

.products .product:hover .fp-overlay-actions .button,
.products .product:hover .fp-overlay-actions .add_to_cart_button,
.products .product:hover .fp-overlay-actions .fp-overlay-cart-btn {
    transform: translateY(0);
}

/* Overlay cart button: loading state */
.fp-overlay-actions .fp-overlay-cart-btn.fp-cart-loading,
.fp-overlay-actions .fp-overlay-cart-btn.fp-cart-removing {
    opacity: 0.75;
    cursor: wait;
    pointer-events: none !important;
}

/* Overlay cart button: item already in cart */
.fp-overlay-actions .fp-overlay-cart-btn.fp-cart-added,
.fp-overlay-actions .fp-overlay-cart-btn.lb-remove-from-cart {
    background-color: var(--fp-cart-added-color) !important;
    box-shadow: 0 4px 10px rgba(230, 126, 34, 0.35);
}

.fp-overlay-actions .fp-overlay-cart-btn.fp-cart-added:hover,
.fp-overlay-actions .fp-overlay-cart-btn.lb-remove-from-cart:hover {
    background-color: var(--fp-cart-added-hover) !important;
}

/* ==========================================================================
   8. SPINNER & LOADING STATES
   ========================================================================== */
.fp-btn-spinner {
    display: inline-block;
    width: 13px;
    height: 13px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: fp-spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes fp-spin {
    to { transform: rotate(360deg); }
}

/* Hide native add to cart */
.ct-woo-card-actions {
    display: none !important;
}

/* ==========================================================================
   9. LIGHTBOX – Layout & Info Bar
   ========================================================================== */
.gslide-description {
    background: transparent !important;
    max-width: 100% !important;
    padding: 0 !important;
}

/* Global static info bar container */
.fp-lb-info-bar-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 99999;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Hide the info bar immediately when the lightbox is closing */
.glightbox-container.glightbox-closing .fp-lb-info-bar-container {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: none !important;
}

/* Prevent image from overlapping the fixed bottom bar */
.glightbox-container .gslider {
    padding-top: 15vh;
    padding-bottom: 32vh;
    /* Adjusted for better centering on Mobile */
}

/* Ensure the image doesn't stretch down behind the info bar */
.gslide-media {
    position: relative !important;
}

.gslide-media img {
    max-height: 53vh !important;
    /* Adjusted to fit new paddings */
    object-fit: contain !important;
    cursor: zoom-in !important;
}

.fp-lb-info-bar {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    gap: 12px;
    color: var(--fp-text-color);
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
    max-height: 45vh;
    overflow-y: auto;
    position: relative;
}

/* ==========================================================================
   10. LIGHTBOX – Photo Counter
   ========================================================================== */
.fp-lb-photo-counter-overlay {
    position: absolute !important;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.75) !important;
    color: #ffffff !important;
    padding: 6px 14px !important;
    border-radius: 20px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    z-index: 9999999 !important;
    pointer-events: none !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5) !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

@media (max-width: 768px) {
    .fp-lb-photo-counter-overlay {
        bottom: auto !important;
        top: 15px !important;
        transform: translateX(-50%) !important;
    }
}

/* Dark mode support */
[data-theme="dark"] .fp-lb-info-bar {
    background: rgba(30, 30, 30, 0.95);
    color: #fff;
}

/* ==========================================================================
   11. LIGHTBOX – Meta, Details, Tags
   ========================================================================== */
.fp-lb-meta {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.fp-lb-brand {
    font-weight: 700;
    font-size: 1.1em;
    color: var(--fp-headings-color);
}

.fp-lb-size {
    background-color: var(--fp-primary-color);
    color: #ffffff !important;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
}

.fp-lb-price {
    font-weight: 700;
    font-size: 1.1em;
    width: 100%;
}

.fp-lb-details {
    flex: 1 1 auto;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 10px;
}

.fp-lb-desc {
    font-size: 0.85em;
    line-height: 1.4;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fp-lb-tags {
    font-size: 0.75em;
}

.fp-lb-tags span.fp-lightbox-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.fp-lb-tags a {
    background: var(--fp-primary-color);
    color: #fff;
    padding: 1px 6px;
    border-radius: 3px;
    text-decoration: none;
}

/* ==========================================================================
   12. LIGHTBOX – Action Buttons & Navigation
   ========================================================================== */
.fp-lb-actions {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 10px;
}

.fp-lb-primary-actions,
.fp-lb-article-nav {
    display: flex;
    gap: 8px;
}

.fp-lb-actions .button {
    flex: 1;
    padding: 10px 5px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-align: center;
    border-radius: 4px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
}

.lb-add-to-cart {
    background-color: var(--fp-primary-color) !important;
    color: #fff !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
}

.lb-add-to-cart.loading {
    opacity: 0.75;
    cursor: wait;
    pointer-events: none !important;
}

.lb-add-to-cart.added {
    background-color: var(--fp-success-color) !important;
    /* Success green */
    pointer-events: none;
}

/* Ensure the "Retirer du panier" button is orange all the time */
.lb-add-to-cart.lb-remove-from-cart,
.lb-remove-from-cart,
.lb-add-to-cart.fp-cart-added {
    background-color: var(--fp-cart-added-color) !important;
    color: #ffffff !important;
    pointer-events: auto !important;
}

.lb-add-to-cart.lb-remove-from-cart:hover,
.lb-remove-from-cart:hover,
.lb-add-to-cart.fp-cart-added:hover {
    background-color: var(--fp-cart-added-hover) !important;
    color: #ffffff !important;
}

/* Hide WooCommerce standard "View Cart" buttons globally to prevent navigation breaks */
.added_to_cart,
.woocommerce-message a.button.wc-forward {
    display: none !important;
}

.lb-view-details {
    background-color: #f0f0f0 !important;
    color: var(--fp-text-color) !important;
}

.fp-lb-article-nav .button {
    background-color: transparent !important;
    color: var(--fp-primary-color) !important;
    border: 1px solid var(--fp-primary-color) !important;
    font-size: 10px !important;
    text-transform: uppercase;
}

/* ==========================================================================
   13. LIGHTBOX – Desktop Layout (min-width: 769px)
   Merged from two separate @media blocks for consistency.
   ========================================================================== */
@media (min-width: 769px) {
    .fp-lb-info-bar {
        flex-direction: row;
        align-items: center;
        padding: 20px 40px;
        gap: 20px;
        max-height: 40vh;
        overflow-y: auto;
    }

    .glightbox-container .gslider {
        padding-top: 40px !important;
        padding-bottom: 220px !important;
        /* Fixed space for the info bar at the bottom */
        height: 100vh !important;
    }

    .gslide-media img {
        max-height: calc(100vh - 220px - 40px) !important;
    }

    .fp-mobile-article-nav {
        display: none !important;
    }

    .fp-lb-meta {
        min-width: 150px;
        flex: 0 0 auto;
        align-content: flex-start;
    }

    .fp-lb-price {
        width: 100%;
        margin-top: 0;
        text-align: left;
    }

    .fp-lb-details {
        flex: 1 1 auto;
        border-top: none;
        border-left: 1px solid rgba(0, 0, 0, 0.1);
        border-right: 1px solid rgba(0, 0, 0, 0.1);
        padding: 0 20px;
        max-width: none;
    }

    .fp-lb-desc {
        -webkit-line-clamp: unset;
        line-clamp: unset;
        display: block;
    }

    .fp-lb-actions {
        flex: 0 0 auto;
        flex-direction: row;
        flex-wrap: wrap;
        border-top: none;
        padding-top: 0;
        align-items: center;
        width: auto;
        max-width: 300px;
        justify-content: center;
    }

    .fp-lb-primary-actions {
        width: 100%;
        display: flex;
        gap: 8px;
    }

    .fp-lb-article-nav {
        width: 100%;
        justify-content: center;
    }

    .fp-lb-actions .button {
        padding: 10px 10px !important;
        font-size: 11px !important;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }

    .fp-lb-actions .button svg.fp-btn-icon {
        flex-shrink: 0;
    }
}

/* ==========================================================================
   14. LIGHTBOX – Narrow Desktop (769px–1024px)
   ========================================================================== */
@media (min-width: 769px) and (max-width: 1024px) {
    .fp-lb-info-bar {
        padding: 15px 20px;
        gap: 15px;
    }

    .fp-lb-meta {
        min-width: unset;
        flex: 0 0 110px;
        /* Constrain width of brand/price */
    }

    .fp-lb-brand {
        font-size: 14px;
    }

    .fp-lb-actions {
        max-width: 150px;
        /* Constrain buttons width */
    }

    /* Hide text on narrow desktop, rely on the SVG icons */
    .fp-lb-actions .button .fp-btn-text {
        display: none;
    }

    .fp-lb-actions .button {
        padding: 10px !important;
        gap: 0;
    }
}

/* ==========================================================================
   15. LIGHTBOX – Fullscreen Zoom Overrides
   ========================================================================== */
/* When an image is zoomed, remove constraints and hide the info bar */
.glightbox-container:has(.zoomed) .gslider,
.glightbox-container.fp-zoomed .gslider {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.glightbox-container:has(.zoomed) .gslide-media,
.glightbox-container.fp-zoomed .gslide-media {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.glightbox-container:has(.zoomed) .gslide-media img,
.glightbox-container.fp-zoomed .gslide-media img {
    max-height: 100vh !important;
    max-width: 100vw !important;
    object-fit: contain !important;
    margin: auto !important;
    cursor: zoom-out !important;
}

.glightbox-container:has(.zoomed) .fp-lb-info-bar,
.glightbox-container.fp-zoomed .fp-lb-info-bar {
    opacity: 0 !important;
    visibility: hidden;
    pointer-events: none;
}

/* HIDE native arrows when zoomed AND there is only a single photo */
.glightbox-container.has-single-photo:has(.zoomed) .gnext,
.glightbox-container.has-single-photo.fp-zoomed .gnext,
.glightbox-container.has-single-photo:has(.zoomed) .gprev,
.glightbox-container.has-single-photo.fp-zoomed .gprev {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* FORCE native arrows to be visible when zoomed AND there are multiple photos */
.glightbox-container.has-multiple-photos:has(.zoomed) .gnext,
.glightbox-container.has-multiple-photos.fp-zoomed .gnext,
.glightbox-container.has-multiple-photos:has(.zoomed) .gprev,
.glightbox-container.has-multiple-photos.fp-zoomed .gprev {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* ==========================================================================
   16. LIGHTBOX – Overlay
   ========================================================================== */
.goverlay {
    background: rgba(0, 0, 0, 0.9) !important;
}

/* ==========================================================================
   17. BACK BREADCRUMB
   ========================================================================== */
.ct-breadcrumbs a .fp-back-breadcrumb {
    background-color: var(--fp-primary-color);
    color: #ffffff !important;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    margin-right: 8px;
    display: inline-flex;
    align-items: center;
    transition: background-color 0.2s ease;
}

.ct-breadcrumbs a:hover .fp-back-breadcrumb {
    background-color: var(--fp-secondary-color);
}

/* ==========================================================================
   18. SINGLE PRODUCT – Vinted-Style Attributes
   ========================================================================== */
.fp-vinted-attributes {
    margin: 20px 0 30px;
    padding: 0;
    border-top: 2px solid var(--fp-primary-color);
    border-bottom: 2px solid var(--fp-primary-color);
    font-size: 14px;
}

.fp-vinted-attributes .fp-attr-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.fp-vinted-attributes .fp-attr-row:last-child {
    border-bottom: none;
}

.fp-vinted-attributes .fp-attr-name {
    color: var(--fp-text-color);
    opacity: 0.7;
    /* Grey text for keys */
    flex: 0 0 40%;
}

.fp-vinted-attributes .fp-attr-value {
    color: var(--fp-headings-color);
    font-weight: 500;
    flex: 1;
    text-align: right;
}

.fp-vinted-attributes .fp-attr-brand {
    color: var(--fp-primary-color);
    font-weight: 700;
}

/* ==========================================================================
   19. SINGLE PRODUCT – Add to Cart & Price
   ========================================================================== */
.woocommerce div.product form.cart .button {
    width: 100% !important;
    padding: 18px 20px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    background-color: var(--fp-primary-color) !important;
    color: #fff !important;
    text-transform: none !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
    margin-bottom: 20px !important;
}

.woocommerce div.product form.cart .button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) !important;
    background-color: var(--fp-secondary-color) !important;
}

/* Price Emphasis */
.woocommerce div.product p.price,
.woocommerce div.product span.price {
    font-size: 24px !important;
    font-weight: 800 !important;
    color: var(--fp-headings-color) !important;
    margin-bottom: 15px !important;
}

/* ==========================================================================
   20. SINGLE PRODUCT – Desktop (Sticky Summary & Gallery)
   ========================================================================== */
@media (min-width: 769px) {

    /* Make Summary Sticky */
    .woocommerce div.product .summary.entry-summary {
        position: sticky !important;
        top: 40px !important;
        align-self: flex-start !important;
        padding-left: 5% !important;
    }

    /* Stacked Gallery Fallback */
    .woocommerce div.product div.images .flex-control-nav {
        display: none !important;
        /* Hide thumbnails to force stacking */
    }

    .woocommerce div.product div.images .woocommerce-product-gallery__wrapper,
    .ct-product-gallery[data-layout="thumbnail-left"] .woocommerce-product-gallery__wrapper,
    .ct-product-gallery .woocommerce-product-gallery__wrapper,
    .ct-product-gallery figure {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
    }

    /* Merged duplicate .woocommerce-product-gallery__image rules */
    .woocommerce div.product div.images .woocommerce-product-gallery__image {
        margin: 0 !important;
        width: 100% !important;
        position: static !important;
    }

    .ct-product-gallery .woocommerce-product-gallery__image a {
        pointer-events: none;
        /* Disable native lightbox so they act as simple stack */
    }

    .ct-product-gallery [data-thumb] {
        display: none !important;
        /* Hide native arrows/dots if any */
    }
}

/* ==========================================================================
   21. CATALOG FILTER PLUS BUTTONS
   ========================================================================== */
.fp-product-meta-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Ensures left alignment */
}

.fp-product-meta-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

.fp-product-meta-actions {
    display: none !important; /* Hidden on desktop */
}

.fp-product-brand,
.fp-product-size {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.fp-add-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: transparent;
    color: var(--fp-primary-color) !important;
    border: 1px solid var(--fp-primary-color);
    transition: all 0.2s ease;
    text-decoration: none !important;
    opacity: 0;
    /* Hidden by default */
    transform: scale(0.9);
}

.fp-product-meta-wrap:hover .fp-add-filter-btn,
.products .product:hover .fp-add-filter-btn {
    opacity: 0.6;
    transform: scale(1);
}

.fp-add-filter-btn:hover {
    background-color: var(--fp-primary-color);
    color: #fff !important;
    opacity: 1 !important;
    transform: scale(1.1);
}

/* ==========================================================================
   22. LIGHTBOX ONBOARDING
   ========================================================================== */
.fp-lightbox-onboarding {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: var(--fp-font-main);
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    cursor: pointer;
}

.fp-lightbox-onboarding.fp-show {
    opacity: 1;
    visibility: visible;
}

.fp-lb-onboarding-content {
    max-width: 90%;
    width: 400px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.fp-lb-onboarding-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.fp-lb-onboarding-icon {
    font-size: 40px;
    animation: fpOnboardPulse 2s infinite;
}

.fp-lb-onboarding-text {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
}

.fp-lb-onboarding-btn {
    margin-top: 20px;
    background: var(--fp-primary-color);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, background 0.2s ease;
}

.fp-lb-onboarding-btn:hover {
    background: var(--fp-secondary-color);
    transform: scale(1.05);
}

@media (min-width: 769px) {
    .fp-lb-onboarding-desktop {
        display: flex;
    }

    .fp-lb-onboarding-mobile {
        display: none;
    }
}

/* ==========================================================================
   23. CATALOG BAR – Profiles + Filters + Chips
   ========================================================================== */

/* Hide WooCommerce page title on catalog */
.woocommerce-products-header,
.woocommerce-products-header__title,
.page-title.woocommerce-products-header__title {
    display: none !important;
}

/* Remove hero/header padding on catalog */
.woocommerce-archive .entry-header,
.woocommerce-archive .page-header,
.woocommerce-archive .ct-page-header {
    display: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* The outer catalog bar container */
.fp-catalog-bar {
    width: 100%;
    margin: 0 0 20px 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* -------- Row 1: Search Profiles -------- */
.fp-profiles-row {
    width: 100%;
    padding: 10px 0 8px;
    border-bottom: 1px solid var(--fp-border-color);
    margin-bottom: 12px;
}

.fp-shortcode-profiles .fp-bubbles {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 2px 6px;
    scrollbar-width: none;
}

.fp-shortcode-profiles .fp-bubbles::-webkit-scrollbar {
    display: none;
}

.fp-shortcode-profiles .fp-bubble {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    min-width: 60px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
    gap: 5px;
}

.fp-shortcode-profiles .fp-bubble:hover {
    transform: translateY(-2px);
}

.fp-shortcode-profiles .fp-bubble-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--fp-card-bg, #fff);
    border: 2px solid var(--fp-primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: var(--fp-primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: background 0.2s ease, color 0.2s ease;
}

.fp-shortcode-profiles .fp-bubble:hover .fp-bubble-icon,
.fp-shortcode-profiles .fp-bubble.fp-bubble-active .fp-bubble-icon {
    background: var(--fp-primary-color);
    color: #fff;
}

.fp-shortcode-profiles .fp-bubble-manage .fp-bubble-icon {
    border-color: var(--fp-border-color, #ccc);
    color: var(--fp-text-color, #888);
    border-style: dashed;
    background: var(--fp-bg-color, #fafafa);
}

.fp-shortcode-profiles .fp-bubble-name {
    font-size: 10px;
    color: var(--fp-text-color, #555);
    font-weight: 600;
    max-width: 64px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

/* -------- Row 2: Filter Bar -------- */
.fp-filter-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    position: relative;
    z-index: 100;
}

/* Ensure container stays on top when a popup is active */
body.fp-popup-active .fp-filter-row {
    z-index: 2147483647 !important;
}

/* -------- Mobile FAB: fixed bottom-right, follows scroll -------- */
.fp-mobile-filter-btn {
    display: none;
    /* shown only on mobile via media query */
    position: fixed;
    bottom: 24px;
    right: 20px;
    z-index: 10001;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 22px;
    background: var(--fp-primary-color);
    color: #fff !important;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
    font-family: inherit;
}

.fp-mobile-filter-btn:hover,
.fp-mobile-filter-btn:focus {
    background: var(--fp-secondary-color);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
    transform: translateY(-2px);
    outline: none;
}

/* -------- Filter Wrapper Forced Visibility -------- */
#fp-vinted-filters-wrapper {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 50px !important;
    margin: 30px 0 !important;
    width: 100% !important;
    clear: both !important;
    overflow: visible !important;
}

/* Mobile override: flex layout for off-canvas panel */
@media (max-width: 999px) {
    body #fp-vinted-filters-wrapper {
        display: flex !important;
        flex-direction: column !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 100dvh !important;
        min-height: 100dvh !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }
}

#fp-vinted-filters-inner {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex-wrap: wrap !important;
    gap: 12px;
    justify-content: center;
}

@media (max-width: 999px) {
    body #fp-vinted-filters-inner {
        display: block !important;
        flex: 1 1 0% !important;
        height: auto !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        flex-wrap: unset !important;
        gap: unset !important;
        justify-content: unset !important;
    }
}

/* Force each individual filter button and its container to be visible */
#fp-vinted-filters-inner .wpc-filters-section {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#fp-vinted-filters-inner .wpc-filters-widget-content.wpc-closed,
#fp-vinted-filters-inner .wpc-filters-widget-content {
    display: block !important;
    height: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: visible !important;
}

#fp-vinted-filters-inner .wpc-filters-widget-wrapper {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 8px !important;
}

#fp-vinted-filters-inner .wpc-filters-main-wrapper {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
}


/* -------- Row 3: Active Chips -------- */
.fp-active-chips-container {
    width: 100%;
    margin-top: 10px;
    min-height: 0;
}

.fp-active-chips-container:empty {
    display: none;
    margin: 0;
}

.fp-active-chips-container .fp-active-chips-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Base Chip Style */
.fp-active-chip {
    display: inline-flex;
    align-items: center;
    background: var(--fp-primary-color) !important;
    color: #ffffff !important;
    border-radius: 100px;
    padding: 5px 14px;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: default;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.fp-active-chip:hover {
    background: var(--fp-secondary-color) !important;
}

/* Label within the chip */
.fp-chip-label {
    white-space: nowrap;
    display: flex;
    gap: 4px;
}

.fp-chip-label strong {
    font-weight: 700;
    color: #ffffff !important;
    opacity: 0.9;
}

/* Remove button (X) */
.fp-chip-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    font-size: 16px;
    line-height: 1;
    text-decoration: none !important;
    transition: all 0.2s ease;
    cursor: pointer;
    margin-right: -4px;
}

.fp-chip-remove:hover {
    background: #ffffff !important;
    color: var(--fp-primary-color) !important;
}

/* ==========================================================================
   24. DESKTOP: HORIZONTAL FILTER PILLS WITH POPUPS (min-width: 1000px)
   ========================================================================== */
@media (min-width: 1000px) {

    /* Hide inline selected chips in the main filter bar buttons as requested */
    .fp-inline-chips {
        display: none !important;
    }

    /* FAB hidden on desktop */
    .fp-mobile-filter-btn {
        display: none !important;
    }

    /* Hide plugin's native submit/reset buttons on desktop */
    .fp-vinted-filters-inner .wpc-filters-widget-controls-container,
    .fp-vinted-filters-inner .wpc-filter-layout-submit-button,
    .fp-vinted-filters-inner .wpc-filters-widget-controls-wrapper,
    .fp-vinted-filters-inner .wpc-filters-apply-button,
    .fp-vinted-filters-inner .wpc-filter-id-apply-button {
        display: none !important;
    }

    /* Hide profiles row when no profiles exist */
    .fp-profiles-row:not(:has(.fp-bubble)) {
        display: none !important;
    }

    /* The filter wrapper - full width inline */
    #fp-vinted-filters-wrapper {
        position: static !important;
        visibility: visible !important;
        left: auto !important;
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        background: transparent !important;
        box-shadow: none !important;
        overflow: visible !important;
        padding: 0 !important;
        display: block !important;
        flex: 1;
    }

    /* Hide plugin's own open/close toggle button */
    .fp-vinted-filters-inner .wpc-filters-open-button-container,
    .fp-vinted-filters-inner .wpc-spinner,
    .fp-vinted-filters-inner .wpc-widget-close-container,
    .fp-vinted-filters-inner .wpc-open-icon {
        display: none !important;
    }

    /* Wrapper stack */
    .fp-vinted-filters-inner,
    .fp-vinted-filters-inner>.widget,
    .fp-vinted-filters-inner>.widget>.wpc-filters-main-wrap {
        display: block !important;
        width: 100% !important;
    }

    /* Override plugin's body.wpc_show_open_close_button hide rule */
    body.wpc_show_open_close_button .fp-vinted-filters-inner .wpc-filters-widget-content,
    body.wpc_show_open_close_button .fp-vinted-filters-inner .wpc-filters-widget-content.wpc-closed,
    body.wpc_show_open_close_button .fp-vinted-filters-inner .wpc-filters-widget-content:not(.wpc-opened),
    body .fp-vinted-filters-inner .wpc-filters-widget-content {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        opacity: 1 !important;
        visibility: visible !important;
        position: static !important;
        background: transparent !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
    }

    /* Hide chips inside widget (shown externally in fp-active-chips-container) */
    .fp-vinted-filters-inner .wpc-filters-widget-top-container,
    .fp-vinted-filters-inner .wpc-widget-top-inside,
    .fp-vinted-filters-inner .wpc-inner-widget-chips-wrapper,
    .fp-vinted-filters-inner .wpc-instead-of-posts-found {
        display: none !important;
    }

    /* Scroll containers: block */
    .fp-vinted-filters-inner .wpc-filters-scroll-container,
    .fp-vinted-filters-inner .wpc-filters-widget-containers-wrapper {
        display: block !important;
        width: 100% !important;
    }

    /* Sections wrapper: flex row of pills */
    body .fp-vinted-filters-inner .wpc-filters-widget-wrapper {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 8px !important;
        width: 100% !important;
    }

    /* Each filter section = a pill */
    body .fp-vinted-filters-inner .wpc-filters-section,
    body .fp-vinted-filters-inner .wpc-filters-section.wpc-closed,
    body .fp-vinted-filters-inner .wpc-filters-section.wpc-filter-collapsible,
    body .fp-vinted-filters-inner .wpc-filters-section.wpc-filter-collapsible.wpc-closed {
        position: relative !important;
        display: inline-flex !important;
        align-items: center !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 1.5px solid var(--fp-border-color, #ddd) !important;
        border-radius: 50px !important;
        background: var(--fp-card-bg, #fff) !important;
        transition: border-color 0.18s ease, box-shadow 0.18s ease;
        float: none !important;
        width: auto !important;
        max-width: none !important;
        flex-shrink: 0;
        z-index: 10;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .fp-vinted-filters-inner .wpc-filters-section:hover {
        border-color: var(--fp-primary-color) !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    }

    /* Active/open pill - BRING TO FRONT */
    body #fp-vinted-filters-inner .wpc-filters-section.fp-dropdown-open,
    body #fp-vinted-filters-inner .wpc-filters-section.fp-has-selections {
        border-color: var(--fp-primary-color) !important;
        background-color: var(--fp-primary-color) !important;
        background: var(--fp-primary-color) !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
    }

    body #fp-vinted-filters-inner .wpc-filters-section.fp-dropdown-open {
        z-index: 10001 !important;
        /* Above backdrop (9999) */
    }

    body #fp-vinted-filters-inner .wpc-filters-section.fp-dropdown-open .wpc-filter-title button,
    body #fp-vinted-filters-inner .wpc-filters-section.fp-has-selections .wpc-filter-title button {
        color: #ffffff !important;
    }

    body #fp-vinted-filters-inner .wpc-filters-section.fp-dropdown-open .wpc-filter-title button::after,
    body #fp-vinted-filters-inner .wpc-filters-section.fp-has-selections .wpc-filter-title button::after {
        border-color: #ffffff !important;
    }

    /* Filter header */
    .fp-vinted-filters-inner .wpc-filter-header {
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Pill label = filter title */
    .fp-vinted-filters-inner .wpc-filter-title {
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
    }

    .fp-vinted-filters-inner .wpc-filter-title-button {
        margin: 0 !important;
        user-select: none;
        background: transparent !important;
        border: none !important;
        border-radius: 99px !important;
        padding: 6px 14px !important;
        white-space: nowrap;
        font-family: inherit !important;
        font-size: 13px !important;
        font-weight: 500 !important;
        color: #4b5563 !important;
        transition: all 0.2s ease !important;
        cursor: pointer !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
        outline: none !important;
        box-shadow: none !important;
    }

    /* Only apply light green hover state if the filter has no selections and is not open */
    .fp-vinted-filters-inner .wpc-filters-section:not(.fp-has-selections):not(.fp-dropdown-open) .wpc-filter-title-button:hover {
        color: var(--fp-primary-color) !important;
        background-color: #f0fdf4 !important;
    }

    /* Keep green background and white text when hovering active/open filters */
    body #fp-vinted-filters-inner .wpc-filters-section.fp-dropdown-open:hover,
    body #fp-vinted-filters-inner .wpc-filters-section.fp-has-selections:hover {
        background-color: #2fa33f !important; /* Slightly darker green */
        border-color: #2fa33f !important;
    }

    body #fp-vinted-filters-inner .wpc-filters-section.fp-dropdown-open:hover .wpc-filter-title button,
    body #fp-vinted-filters-inner .wpc-filters-section.fp-has-selections:hover .wpc-filter-title button {
        color: #ffffff !important;
        background-color: transparent !important;
    }

    /* Selected state: Subtle primary green */
    .fp-vinted-filters-inner .wpc-filter-title-button.fp-has-selections {
        background-color: var(--fp-primary-color) !important;
        border-color: var(--fp-primary-color) !important;
        color: #ffffff !important;
    }

    .fp-vinted-filters-inner .wpc-filter-title-button.fp-has-selections::after {
        border-color: #ffffff !important;
    }

    /* Hide the plugin's native open/close icon to avoid double arrows */
    /* Hover animation on filter row */
    .fp-vinted-filters-inner li.wpc-term-item:hover {
        background-color: #f9fafb !important;
    }

    /* Term count style – Vinted Style */
    .fp-vinted-filters-inner .wpc-term-count {
        font-size: 13px !important;
        color: var(--fp-text-muted) !important;
        margin-left: 6px !important;
        font-weight: 400 !important;
        opacity: 1 !important;
        display: inline-block !important;
        visibility: visible !important;
    }

    /* Hide brackets for cleaner look */
    .fp-vinted-filters-inner .wpc-term-count-brackets-open,
    .fp-vinted-filters-inner .wpc-term-count-brackets-close {
        display: none !important;
    }

    /* Prevent disappearing on hover */
    .fp-vinted-filters-inner li.wpc-term-item:hover .wpc-term-count,
    .fp-vinted-filters-inner li.wpc-term-item:hover .wpc-term-name,
    .fp-vinted-filters-inner li.wpc-term-item:hover .wpc-filter-link,
    .fp-vinted-filters-inner li.wpc-term-item:hover label {
        opacity: 1 !important;
        color: inherit !important;
        visibility: visible !important;
    }
    .fp-vinted-filters-inner .wpc-filter-title .wpc-open-icon,
    .fp-vinted-filters-inner .wpc-filter-title button .wpc-open-icon {
        display: none !important;
    }

    /* Style the native title element before JS loads to match the button */
    .fp-vinted-filters-inner .wpc-filter-title > *:not(.wpc-filter-title-button) {
        padding: 6px 14px !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
        white-space: nowrap !important;
        font-family: inherit !important;
        font-size: 13px !important;
        font-weight: 500 !important;
        color: #4b5563 !important;
        cursor: pointer !important;
    }

    .fp-vinted-filters-inner .wpc-filter-title > *:not(.wpc-filter-title-button)::after {
        content: '';
        display: inline-block;
        width: 6px;
        height: 6px;
        border-right: 1.5px solid currentColor;
        border-bottom: 1.5px solid currentColor;
        transform: rotate(45deg) translateY(-2px);
        opacity: 0.7;
        flex-shrink: 0;
    }

    /* --- Vinted Style List Layout (Clean & Balanced) --- */
    .fp-vinted-filters-inner ul.wpc-filters-list {
        padding: 0 !important;
        margin: 0 !important;
        list-style: none !important;
        display: flex !important;
        flex-direction: column !important;
        background: #fff !important;
    }

    .fp-vinted-filters-inner li.wpc-term-item {
        border-bottom: 1px solid #f0f2f5 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        width: 100% !important;
        display: block !important;
    }

    .fp-vinted-filters-inner li.wpc-term-item:last-child {
        border-bottom: none !important;
    }

    /* Remove ALL native plugin box/border styles */
    .fp-vinted-filters-inner .wpc-filter-content label,
    .fp-vinted-filters-inner .wpc-filter-content a,
    .fp-vinted-filters-inner .wpc-filter-content span,
    .fp-vinted-filters-inner .wpc-filter-content .wpc-filter-label-wrapper {
        border: none !important;
        background: transparent !important;
        background-color: transparent !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .fp-vinted-filters-inner .wpc-filter-label-wrapper {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        padding: 14px 20px !important;
        cursor: pointer !important;
        min-height: 54px;
        box-sizing: border-box !important;
    }

    /* Term name on the left */
    .fp-vinted-filters-inner .wpc-term-name,
    .fp-vinted-filters-inner .wpc-filter-link {
        font-size: 15px !important;
        color: #374151 !important;
        font-weight: 400 !important;
        text-decoration: none !important;
        flex-grow: 1;
        display: flex !important;
        align-items: center;
        background: transparent !important;
        padding: 0 !important;
        margin: 0 !important;
        text-align: left !important;
    }

    /* Checkbox (Vinted style) on the right */
    .fp-vinted-filters-inner input[type="checkbox"],
    .fp-vinted-filters-inner input[type="radio"] {
        display: block !important;
        appearance: none !important;
        -webkit-appearance: none !important;
        width: 24px !important;
        height: 24px !important;
        border: 2px solid #d1d5db !important;
        border-radius: 50% !important;
        outline: none !important;
        cursor: pointer !important;
        position: relative !important;
        margin: 0 0 0 auto !important;
        order: 2;
        flex-shrink: 0;
        background: #fff !important;
        transition: all 0.2s ease;
    }

    .fp-vinted-filters-inner input[type="checkbox"]:checked,
    .fp-vinted-filters-inner input[type="radio"]:checked {
        border-color: var(--fp-primary-color) !important;
        background: var(--fp-primary-color) !important;
    }

    .fp-vinted-filters-inner input[type="checkbox"]:checked::after,
    .fp-vinted-filters-inner input[type="radio"]:checked::after {
        content: '✓' !important;
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        color: #fff !important;
        font-size: 14px !important;
        font-weight: bold !important;
    }

    /* Selected row state */
    .fp-vinted-filters-inner li.wpc-term-item.wpc-term-selected,
    .fp-vinted-filters-inner li.wpc-term-item.fp-item-checked {
        background-color: #f3f4f6 !important;
    }

    .fp-vinted-filters-inner li.wpc-term-item.wpc-term-selected .wpc-term-name,
    .fp-vinted-filters-inner li.wpc-term-item.fp-item-checked .wpc-term-name,
    .fp-vinted-filters-inner li.wpc-term-item.wpc-term-selected .wpc-filter-link,
    .fp-vinted-filters-inner li.wpc-term-item.fp-item-checked .wpc-filter-link {
        color: #111827 !important;
        font-weight: 600 !important;
    }

    /* Custom chevron on the button element */
    .fp-vinted-filters-inner .wpc-filter-title button::after {
        content: '';
        display: inline-block;
        width: 6px;
        height: 6px;
        border-right: 1.5px solid currentColor;
        border-bottom: 1.5px solid currentColor;
        transform: rotate(45deg) translateY(-2px);
        transition: transform 0.2s ease;
        opacity: 0.7;
        flex-shrink: 0;
    }

    .fp-vinted-filters-inner .wpc-filters-section.fp-dropdown-open .wpc-filter-title button::after {
        transform: rotate(-135deg) translateY(2px);
        opacity: 1;
    }

    /* Merged .wpc-filter-content in .fp-dropdown-open context */
    .fp-vinted-filters-inner .wpc-filter-content {
        display: none !important;
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 90% !important;
        max-width: 400px !important;
        height: auto !important;
        min-height: 200px !important;
        max-height: 80vh !important;
        background: #ffffff !important;
        border: 1px solid var(--fp-border-light) !important;
        border-radius: 12px !important;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15) !important;
        z-index: 2147483647 !important;
        padding: 0 !important;
        overflow: hidden !important;
        flex-direction: column !important;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }

    .fp-vinted-filters-inner .wpc-filters-section.fp-dropdown-open .wpc-filter-content {
        display: flex !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        transform: translate(-50%, -50%) scale(1) !important;
    }

    /* Search bar inside the popup */
    .fp-vinted-filters-inner .wpc-filter-content .wpc-search-wrap {
        padding: 15px !important;
        border-bottom: 1px solid #f3f4f6 !important;
        background: #fff;
        position: relative !important;
        margin: 0 !important;
        flex-shrink: 0 !important;
    }

    .fp-vinted-filters-inner .wpc-filter-content .wpc-search-field {
        width: 100% !important;
        height: 40px !important;
        padding: 0 40px !important;
        border-radius: 8px !important;
        border: 1px solid var(--fp-border-light) !important;
        font-size: 14px !important;
        box-sizing: border-box !important;
    }

    /* Hide floating search icons in filter popup */
    .wpc-search-wrap .wpc-search-icon,
    .wpc-search-wrap .wpc-search-clear,
    .wpc-search-wrap .wpc-search-clear-icon,
    .fp-vinted-filters-inner .wpc-search-icon,
    .fp-vinted-filters-inner .wpc-search-clear {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    /* The list of items must be scrollable */
    .fp-vinted-filters-inner .wpc-filter-content ul {
        padding: 10px 0 !important;
        margin: 0 !important;
        overflow-y: auto !important;
        flex-grow: 1 !important;
        list-style: none !important;
    }

    /* OK button inside dropdown (merged from two definitions) */
    .fp-dropdown-ok-btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: calc(100% - 48px) !important;
        height: 50px !important;
        margin: 20px 24px !important;
        background: var(--fp-primary-color) !important;
        color: #ffffff !important;
        border: none !important;
        border-radius: 8px !important;
        font-weight: 700 !important;
        font-size: 16px !important;
        cursor: pointer !important;
        flex-shrink: 0 !important;
        transition: background 0.2s;
        font-family: inherit;
    }

    .fp-dropdown-ok-btn:hover {
        background: var(--fp-secondary-color);
    }

    /* Desktop backdrop (merged from three definitions — final: transparent, click-through) */
    .fp-desktop-backdrop {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        background: transparent !important;
        z-index: 99999 !important;
        cursor: pointer;
    }

    body.fp-popup-active {
        overflow: hidden !important;
        padding-right: var(--fp-scrollbar-width, 0px) !important;
    }
    body.fp-popup-active header#masthead,
    body.fp-popup-active .ct-header {
        padding-right: var(--fp-scrollbar-width, 0px) !important;
    }

    /* Fixed popup layout elements using sticky for safety */
    .fp-popup-header {
        position: sticky !important;
        top: 0 !important;
        z-index: 10 !important;
        padding: 24px 24px 15px !important;
        background: #fff !important;
        border-bottom: 1px solid #eee !important;
        flex-shrink: 0;
    }

    .fp-popup-body {
        padding: 15px 24px !important;
        flex-grow: 1;
        overflow-y: auto !important;
        scrollbar-width: thin;
        scrollbar-color: var(--fp-primary-color) #f0f0f0;
    }

    .fp-popup-footer {
        position: sticky !important;
        bottom: 0 !important;
        z-index: 10 !important;
        padding: 15px 24px 24px !important;
        background: #fff !important;
        border-top: 1px solid #eee !important;
        flex-shrink: 0;
        display: flex;
        justify-content: center;
    }

    .wpc-filter-search-field {
        width: 100% !important;
        border-radius: 10px !important;
        border: 1px solid #ddd !important;
        padding: 12px 16px !important;
        margin: 0 !important;
        font-size: 14px;
    }

    /* Hide selection summary in main bubbles as requested */
    .fp-vinted-filters-inner .wpc-filter-chip,
    .fp-vinted-filters-inner .wpc-filter-visible-term-names:not(.wpc-filters-section),
    .fp-inline-chips {
        display: none !important;
    }

    /* Fix double chip issue: hide native chips inside filter list */
    .wpc-filter-content .wpc-filter-chip {
        display: none !important;
    }

    /* Hide mobile-only elements */
    .fp-drilldown-back-btn,
    #fp-vinted-filters-wrapper .fp-filter-close-btn,
    #fp-vinted-filters-wrapper .fp-filter-mobile-title {
        display: none !important;
    }

    /* Chips area — exclude sections themselves which also carry this class */
    #fp-vinted-filters-wrapper .wpc-filter-chips-list,
    #fp-vinted-filters-wrapper .wpc-filter-visible-term-names:not(.wpc-filters-section) {
        display: none !important;
    }

    .fp-active-chips-container {
        margin-top: 10px;
    }

    .fp-mobile-ok-bar,
    .fp-mobile-drilldown-ok-btn {
        display: none !important;
    }
}

/* ==========================================================================
   25. MOBILE: OFF-CANVAS PANEL (max-width: 999px)
   ========================================================================== */


/* ==========================================================================
   26. ANIMATIONS (@keyframes)
   ========================================================================== */
@keyframes fpOnboardPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes fpFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ==========================================================================
   27. AJAX LOADING STATES
   ========================================================================== */
body.fp-filters-loading .products,
body.fp-filters-loading #main .products,
body.fp-filters-loading .ct-products {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* ==========================================================================
   28. GLOBAL LOADER
   ========================================================================== */
.fp-global-loader {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #111;
    color: #fff;
    padding: 12px 24px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2000000005;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
}

body.fp-filters-loading .fp-global-loader {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.fp-loader-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: fp-spin 0.8s linear infinite;
}

/* ==========================================================================
   29. FOOTER ENHANCEMENTS
   ========================================================================== */
.ct-footer {
    --footer-bg: #f8f9f8;
    background-color: var(--footer-bg) !important;
    border-top: 1px solid rgba(var(--fp-primary-color-rgb), 0.1);
    padding-top: 60px !important;
    padding-bottom: 40px !important;
}

/* Header styling in footer */
.ct-footer .widget-title,
.ct-footer .wp-block-heading,
.ct-footer .wpforms-title {
    font-family: var(--fp-font-main);
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 14px !important;
    color: var(--fp-primary-color) !important;
    margin-bottom: 25px !important;
    border-bottom: 2px solid rgba(var(--fp-primary-color-rgb), 0.2);
    display: inline-block;
    padding-bottom: 5px;
}

/* Redundant Title Cleanup in Widget Area 1 */
.ct-footer [data-column="widget-area-1"] .wp-widget-group__inner-blocks>.wp-block-heading:first-of-type {
    display: none !important;
    /* Hide the internal title if widget title is present */
}

/* "Suivez-nous" heading specifically */
.ct-footer h2.wp-block-heading,
.ct-footer h4.wp-block-heading {
    margin-top: 30px !important;
    border-bottom: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    font-size: 16px !important;
    color: var(--fp-headings-color) !important;
}

/* Navigation Lists */
.ct-footer ul.widget-menu,
.ct-footer ul.wp-block-navigation__container,
.ct-footer .wp-widget-group__inner-blocks ul,
.ct-footer .widget_nav_menu ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.ct-footer ul li {
    margin-bottom: 10px !important;
    padding-left: 0 !important;
}

.ct-footer ul li a {
    color: var(--fp-text-color) !important;
    text-decoration: none !important;
    transition: all 0.2s ease;
    font-size: 15px;
    opacity: 0.8;
}

.ct-footer ul li a:hover {
    color: var(--fp-primary-color) !important;
    opacity: 1;
    padding-left: 5px;
}

/* WPForms Newsletter Styling */
.ct-footer .wpforms-container {
    max-width: 400px !important;
    margin-bottom: 30px !important;
}

.ct-footer .wpforms-field-label {
    display: none !important;
    /* Hide labels for cleaner look */
}

.ct-footer input[type="email"] {
    border-radius: 4px !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    background: #fff !important;
    padding: 12px 15px !important;
}

.ct-footer .wpforms-submit {
    background-color: var(--fp-primary-color) !important;
    border-radius: 4px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 6px rgba(var(--fp-primary-color-rgb), 0.2);
}

.ct-footer .wpforms-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(var(--fp-primary-color-rgb), 0.3);
}

/* Secondary Menu (Legal) - Horizontal layout on right */
#menu-secondaire {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px !important;
    justify-content: flex-start;
}

#menu-secondaire li {
    margin: 0 !important;
}

#menu-secondaire li a {
    font-size: 12px !important;
    opacity: 0.6;
}

#menu-secondaire li a:hover {
    padding-left: 0 !important;
    opacity: 1;
}

/* Copyright Section */
.ct-footer-copyright {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: 40px;
    padding-top: 20px;
}

.ct-footer-copyright p {
    font-size: 13px;
    opacity: 0.7;
    margin: 0 !important;
}

/* Specific fix for column 3 alignment */
[data-column="widget-area-3"] .ct-widget {
    margin-bottom: 30px !important;
}

[data-column="widget-area-3"] .widget_text p {
    font-size: 14px;
    font-style: italic;
    opacity: 0.8;
    color: var(--fp-primary-color);
}

/* ==========================================================================
   30. FILTER CURSOR & INTERACTION OVERRIDES
   ========================================================================== */

/* Force pointer cursor on all filter option rows */
#fp-vinted-filters-inner li.wpc-term-item,
#fp-vinted-filters-inner li.wpc-term-item *,
#fp-vinted-filters-inner li.wpc-term-item.wpc-term-selected,
#fp-vinted-filters-inner li.wpc-term-item.wpc-term-selected *,
#fp-vinted-filters-inner li.wpc-term-item.fp-item-checked,
#fp-vinted-filters-inner li.wpc-term-item.fp-item-checked *,
.fp-vinted-filters-inner li.wpc-term-item,
.fp-vinted-filters-inner li.wpc-term-item * {
    cursor: pointer !important;
}

/* Hover override for readability */
#fp-vinted-filters-inner li.wpc-term-item {
    transition: background-color 0.2s ease, opacity 0.2s ease;
}

#fp-vinted-filters-inner li.wpc-term-item:hover {
    background-color: rgba(var(--fp-primary-color-rgb), 0.05) !important;
    opacity: 1 !important;
}

#fp-vinted-filters-inner li.wpc-term-item:hover .wpc-filter-link {
    color: var(--fp-primary-color) !important;
}

/* Aesthetic style for occurrence count */
#fp-vinted-filters-inner .wpc-term-count {
    margin-left: 6px !important;
    font-size: 0.8em;
    opacity: 0.45;
    transition: all 0.2s ease;
    font-weight: 400;
    color: inherit;
}

/* Hide brackets for a cleaner look */
#fp-vinted-filters-inner .wpc-term-count-brackets-open,
#fp-vinted-filters-inner .wpc-term-count-brackets-close {
    display: none !important;
}

#fp-vinted-filters-inner li.wpc-term-item:hover .wpc-term-count {
    opacity: 0.8 !important;
    color: var(--fp-primary-color) !important;
}

/* Ensure pointer-events is active on the entire row */
#fp-vinted-filters-inner li.wpc-term-item .wpc-filter-link,
#fp-vinted-filters-inner li.wpc-term-item label {
    pointer-events: auto !important;
    cursor: pointer !important;
}

#fp-vinted-filters-inner li.wpc-term-item input[type="checkbox"],
#fp-vinted-filters-inner li.wpc-term-item input[type="radio"] {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* EXCEPTION: disabled inputs must pass through clicks for deselection */
#fp-vinted-filters-inner li.wpc-term-item input:disabled,
#fp-vinted-filters-inner li.wpc-term-item input[disabled] {
    pointer-events: none !important;
}

/* ==========================================================================
   31. SEARCH FIELD IN POPUP HEADER
   ========================================================================== */
.fp-popup-header .wpc-filter-search-wrapper,
.fp-popup-header .wpc-filter-search-form {
    margin: 12px 20px !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    background: #f3f4f6 !important;
    border-radius: 8px !important;
    padding: 2px 14px !important;
    border: 1px solid var(--fp-border-light) !important;
    box-sizing: border-box !important;
    width: auto !important; /* Let margins define width */
}

.fp-popup-header .wpc-filter-search-field,
.fp-popup-header .wpc-search-field {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 10px 0 !important;
    font-size: 15px !important;
    width: 100% !important;
    height: auto !important;
    color: #111827 !important;
    outline: none !important;
    flex: 1 1 auto !important;
}

.fp-popup-header .wpc-search-icon {
    margin-right: 10px !important;
    opacity: 0.5 !important;
    flex-shrink: 0 !important;
    display: block !important;
    visibility: visible !important; /* Force visible */
}

/* Ensure the icon is visible (it's often a background image or empty span) */
.fp-popup-header .wpc-search-icon::before {
    content: '🔍' !important;
    font-size: 14px !important;
    display: inline-block !important;
    visibility: visible !important;
}

.fp-popup-header .wpc-search-clear,
.fp-popup-header .wpc-search-clear-icon-wrapper {
    background: #d1d5db !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 0 0 10px !important;
    cursor: pointer !important;
    display: none; /* Controlled by JS and active class */
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    color: #111827 !important;
    flex-shrink: 0 !important;
    border-radius: 50% !important;
    font-size: 14px !important;
    position: static !important;
    visibility: visible !important; /* Force visible */
}

/* If it's the specific clear button in checkboxes.php */
.fp-popup-header .wpc-search-clear .wpc-search-clear-icon {
    font-size: 16px !important;
    line-height: 1 !important;
    margin: 0 !important;
    display: inline-block !important;
    visibility: visible !important;
}

.wpc-filters-section.wpc-search-active .wpc-search-clear,
.wpc-filters-section.wpc-search-active .wpc-search-clear-icon-wrapper {
    display: flex !important;
}

/* Reset button default styles */
.fp-popup-header button.wpc-search-clear {
    line-height: 1 !important;
    min-height: 0 !important;
    box-shadow: none !important;
}

/* ==========================================================================
   32. ZERO-COUNT TERM HIDING
   ========================================================================== */
.wpc-term-count-0,
body #fp-vinted-filters-inner .wpc-term-count-0,
#fp-vinted-filters-inner .fp-mobile-detail-panel li.wpc-term-item.wpc-term-count-0 {
    display: none !important;
}
