/**
 * XC Product Filter Pro — Frontend Styles
 * Mode: Inherit Theme (default) — all colors cascade from the active theme.
 * Fully responsive: 320px → 2560px+
 */

/* ══ CSS Custom Properties — inherit from theme ══ */
:root {
    --xc-text: inherit;
    --xc-text-muted: currentColor;
    --xc-bg: transparent;
    --xc-bg-hover: rgba(128,128,128,0.08);
    --xc-border: rgba(128,128,128,0.2);
    --xc-accent: var(--theme-primary, var(--wp--preset--color--primary, var(--ast-global-color-0, var(--global-palette1, #2271b1))));
    --xc-accent-hover: color-mix(in srgb, var(--xc-accent) 80%, black);
    --xc-radius: var(--wp--custom--border-radius, 4px);
    --xc-transition: 180ms ease;
    --xc-shadow: none;
    --xc-font: inherit;
    --xc-font-size: 14px;
    --xc-sidebar-width: 260px;
    --xc-gap: 28px;
}

/* ══ Shop Layout: Sidebar + Content ══ */
.xcfp-shop-layout {
    display: flex;
    gap: var(--xc-gap);
    align-items: flex-start;
    width: 100%;
}

.xcfp-filters-sidebar {
    width: var(--xc-sidebar-width);
    min-width: 200px;
    max-width: 300px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--xc-border) transparent;
}
.xcfp-filters-sidebar::-webkit-scrollbar { width: 3px; }
.xcfp-filters-sidebar::-webkit-scrollbar-thumb { background: var(--xc-border); border-radius: 2px; }

.xcfp-shop-content {
    flex: 1;
    min-width: 0;
}

/* ══ Filter Container ══ */
.xcfp-filters-wrap {
    font-family: var(--xc-font);
    font-size: var(--xc-font-size);
    color: var(--xc-text);
    line-height: 1.5;
}

/* ══ Filter Group ══ */
.xcfp-filter-group {
    margin-bottom: 4px;
    border-bottom: 1px solid var(--xc-border);
    padding-bottom: 12px;
}
.xcfp-filter-group:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

/* ══ Filter Header (collapsible) ══ */
.xcfp-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    cursor: pointer;
    user-select: none;
    gap: 8px;
}
.xcfp-filter-title {
    font-weight: 600;
    font-size: 0.95em;
    flex: 1;
}
.xcfp-toggle-icon {
    width: 18px;
    height: 18px;
    position: relative;
    flex-shrink: 0;
}
.xcfp-toggle-icon::before,
.xcfp-toggle-icon::after {
    content: '';
    position: absolute;
    background: currentColor;
    border-radius: 1px;
    transition: transform var(--xc-transition);
}
.xcfp-toggle-icon::before {
    width: 10px; height: 2px;
    top: 8px; left: 4px;
}
.xcfp-toggle-icon::after {
    width: 2px; height: 10px;
    top: 4px; left: 8px;
}
.xcfp-collapsed .xcfp-toggle-icon::after {
    transform: rotate(0deg);
}
.xcfp-filter-group:not(.xcfp-collapsed) .xcfp-toggle-icon::after {
    transform: rotate(90deg);
}

.xcfp-tooltip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px; height: 16px;
    border-radius: 50%;
    border: 1px solid var(--xc-border);
    font-size: 10px;
    cursor: help;
    flex-shrink: 0;
}

/* ══ Filter Body ══ */
.xcfp-filter-body {
    padding: 0 0 4px;
}

/* ══ Options List (checkbox / radio) ══ */
.xcfp-options-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.xcfp-options-list.xcfp-scrollable {
    max-height: 240px;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
}
.xcfp-options-list.xcfp-scrollable::-webkit-scrollbar { width: 3px; }
.xcfp-options-list.xcfp-scrollable::-webkit-scrollbar-thumb { background: var(--xc-border); border-radius: 2px; }

.xcfp-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 6px;
    border-radius: var(--xc-radius);
    cursor: pointer;
    transition: background var(--xc-transition);
    line-height: 1.4;
}
.xcfp-option:hover {
    background: var(--xc-bg-hover);
}
.xcfp-option input[type="checkbox"],
.xcfp-option input[type="radio"] {
    margin: 0;
    flex-shrink: 0;
    accent-color: var(--xc-accent);
}
.xcfp-option-label {
    flex: 1;
    min-width: 0;
    word-break: break-word;
}
.xcfp-option-count {
    opacity: 0.55;
    font-size: 0.85em;
    flex-shrink: 0;
}

/* ══ Dropdown ══ */
.xcfp-filter-select {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid var(--xc-border);
    border-radius: var(--xc-radius);
    background: var(--xc-bg);
    color: inherit;
    font: inherit;
    font-size: 0.9em;
}

/* ══ Label Buttons ══ */
.xcfp-labels-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.xcfp-label-btn {
    padding: 5px 12px;
    border: 1px solid var(--xc-border);
    border-radius: var(--xc-radius);
    background: var(--xc-bg);
    color: inherit;
    font: inherit;
    font-size: 0.85em;
    cursor: pointer;
    transition: all var(--xc-transition);
}
.xcfp-label-btn:hover {
    border-color: var(--xc-accent);
}
.xcfp-label-btn.xcfp-active {
    background: var(--xc-accent);
    color: #fff;
    border-color: var(--xc-accent);
}

/* ══ Color Swatches ══ */
.xcfp-swatches-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.xcfp-swatch-btn {
    width: 32px; height: 32px;
    border: 2px solid var(--xc-border);
    border-radius: 50%;
    padding: 3px;
    cursor: pointer;
    transition: all var(--xc-transition);
    background: none;
}
.xcfp-swatch-btn:hover,
.xcfp-swatch-btn.xcfp-active {
    border-color: var(--xc-accent);
    box-shadow: 0 0 0 2px var(--xc-accent);
}
.xcfp-color-dot {
    display: block;
    width: 100%; height: 100%;
    border-radius: 50%;
}

/* ══ Range Slider (Price) ══ */
.xcfp-range-wrap {
    padding: 8px 0;
}
.xcfp-range-slider {
    position: relative;
    height: 24px;
    margin-bottom: 8px;
}
.xcfp-range-track {
    position: absolute;
    top: 10px;
    left: 0; right: 0;
    height: 4px;
    background: var(--xc-border);
    border-radius: 2px;
}
.xcfp-range-selected {
    position: absolute;
    height: 100%;
    background: var(--xc-accent);
    border-radius: 2px;
}
.xcfp-range-slider input[type="range"] {
    position: absolute;
    width: 100%;
    top: 2px;
    margin: 0;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    pointer-events: none;
}
.xcfp-range-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--xc-accent);
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    pointer-events: auto;
    cursor: grab;
}
.xcfp-range-slider input[type="range"]::-moz-range-thumb {
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--xc-accent);
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    pointer-events: auto;
    cursor: grab;
}
.xcfp-range-values {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9em;
}
.xcfp-range-currency {
    font-weight: 600;
    font-size: 0.85em;
}
.xcfp-range-sep {
    opacity: 0.5;
}
.xcfp-input-min,
.xcfp-input-max {
    width: 70px;
    padding: 4px 6px;
    border: 1px solid var(--xc-border);
    border-radius: var(--xc-radius);
    text-align: center;
    font: inherit;
    font-size: 0.9em;
    background: var(--xc-bg);
    color: inherit;
}

/* ══ Rating Stars ══ */
.xcfp-rating-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.xcfp-rating-option {
    display: flex;
    align-items: center;
    gap: 8px;
}
.xcfp-stars {
    display: inline-flex;
    gap: 1px;
}
.xcfp-star {
    font-size: 16px;
    line-height: 1;
}
.xcfp-star-filled { color: #f59e0b; }
.xcfp-star-empty { color: var(--xc-border); }

/* ══ Search Input ══ */
.xcfp-search-wrap {
    padding: 4px 0;
}
.xcfp-search-input {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid var(--xc-border);
    border-radius: var(--xc-radius);
    font: inherit;
    font-size: 0.9em;
    background: var(--xc-bg);
    color: inherit;
}

/* ══ Apply Button ══ */
.xcfp-apply-btn-wrap {
    padding: 12px 0 4px;
}
.xcfp-apply-btn {
    width: 100%;
    padding: 10px 16px;
    background: var(--xc-accent);
    color: #fff;
    border: none;
    border-radius: var(--xc-radius);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--xc-transition);
}
.xcfp-apply-btn:hover {
    background: var(--xc-accent-hover);
}

/* ══ Clear All ══ */
.xcfp-clear-wrap {
    padding: 8px 0 0;
    text-align: center;
}
.xcfp-clear-all {
    font-size: 0.85em;
    color: var(--xc-accent);
    text-decoration: none;
}
.xcfp-clear-all:hover {
    text-decoration: underline;
}

/* ══ Chips Bar ══ */
.xcfp-chips-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}
.xcfp-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid var(--xc-border);
    border-radius: 20px;
    font-size: 0.82em;
    background: var(--xc-bg);
    white-space: nowrap;
}
.xcfp-chip-remove {
    background: none;
    border: none;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    padding: 0;
    font-size: 1.1em;
    line-height: 1;
}
.xcfp-chip-remove:hover { opacity: 1; }
.xcfp-chip-clear {
    text-decoration: none;
    color: var(--xc-accent);
    border-color: var(--xc-accent);
}

/* ══ Sorting ══ */
.xcfp-sorting-wrap {
    margin-bottom: 16px;
}
.xcfp-sorting-select {
    padding: 6px 10px;
    border: 1px solid var(--xc-border);
    border-radius: var(--xc-radius);
    font: inherit;
    font-size: 0.875em;
    background: var(--xc-bg);
    color: inherit;
}

/* ══ SEO Description ══ */
.xcfp-seo-description {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--xc-border);
    font-size: 0.875em;
    opacity: 0.75;
    line-height: 1.7;
}

/* ══ Loading Overlay ══ */
.xcfp-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.5;
    transition: opacity 200ms;
}
.xcfp-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.4);
    z-index: 10;
}
.xcfp-loading::before {
    content: '';
    position: absolute;
    top: 40px; left: 50%;
    width: 28px; height: 28px;
    margin-left: -14px;
    border: 3px solid var(--xc-border);
    border-top-color: var(--xc-accent);
    border-radius: 50%;
    z-index: 11;
    animation: xcfp-spin 0.6s linear infinite;
}
@keyframes xcfp-spin { to { transform: rotate(360deg); } }

/* ══ Mobile Drawer ══ */
.xcfp-mobile-toggle {
    display: none;
    width: 100%;
    padding: 11px 20px;
    border: 1px solid var(--xc-border);
    border-radius: var(--xc-radius);
    background: var(--xc-bg);
    color: inherit;
    font: inherit;
    font-weight: 600;
    font-size: 0.95em;
    cursor: pointer;
    margin-bottom: 16px;
    text-align: center;
}
.xcfp-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99999;
}
.xcfp-drawer {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 85%; max-width: 360px;
    background: #fff;
    z-index: 100000;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 280ms ease;
    padding: 16px;
}
.xcfp-drawer.xcfp-drawer-open {
    transform: translateX(0);
}
.xcfp-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--xc-border);
    margin-bottom: 12px;
}
.xcfp-drawer-title { font-weight: 700; font-size: 1.1em; }
.xcfp-drawer-close {
    border: none; background: none;
    font-size: 24px; cursor: pointer;
    padding: 4px; color: inherit;
}
.xcfp-drawer-footer {
    position: sticky;
    bottom: 0;
    background: inherit;
    padding: 12px 0;
    border-top: 1px solid var(--xc-border);
}

/* ══ Focus States (a11y) ══ */
.xcfp-filter-header:focus-visible,
.xcfp-label-btn:focus-visible,
.xcfp-swatch-btn:focus-visible {
    outline: 2px solid var(--xc-accent);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ══════════════════════════════════════════════════════ */

/* ── Large Desktop (1440px+) ── */
@media (min-width: 1440px) {
    :root {
        --xc-sidebar-width: 280px;
        --xc-gap: 36px;
    }
}

/* ── Standard Desktop (1025px – 1439px) ── default values apply */

/* ── Small Desktop / Tablet Landscape (769px – 1024px) ── */
@media (max-width: 1024px) {
    :root {
        --xc-sidebar-width: 220px;
        --xc-gap: 20px;
        --xc-font-size: 13px;
    }
}

/* ── Tablet Portrait & Mobile (≤ 768px) ── */
@media (max-width: 768px) {
    .xcfp-mobile-toggle {
        display: block;
    }

    .xcfp-shop-layout {
        display: block; /* stack vertically */
    }

    .xcfp-filters-sidebar {
        display: none; /* hidden — use mobile drawer */
    }

    .xcfp-shop-content {
        width: 100%;
    }

    .xcfp-chips-bar {
        gap: 4px;
    }
    .xcfp-chip {
        font-size: 0.78em;
        padding: 3px 8px;
    }
}

/* ── Small Mobile (≤ 480px) ── */
@media (max-width: 480px) {
    .xcfp-range-values {
        flex-wrap: wrap;
        gap: 4px;
    }
    .xcfp-input-min,
    .xcfp-input-max {
        width: 60px;
        font-size: 0.85em;
    }
    .xcfp-labels-wrap {
        gap: 4px;
    }
    .xcfp-label-btn {
        padding: 4px 8px;
        font-size: 0.8em;
    }
    .xcfp-drawer {
        width: 92%;
        max-width: none;
    }
}

/* ── Tiny Mobile (≤ 360px) ── */
@media (max-width: 360px) {
    .xcfp-option {
        padding: 4px;
        gap: 6px;
        font-size: 0.9em;
    }
    .xcfp-filter-title {
        font-size: 0.9em;
    }
    .xcfp-swatch-btn {
        width: 28px; height: 28px;
    }
}

/* ── Date Filter ── */
.xcfp-date-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.xcfp-date-field {
    display: flex;
    align-items: center;
    gap: 8px;
}
.xcfp-date-field label {
    font-size: 0.85em;
    font-weight: 500;
    min-width: 40px;
    color: var(--xc-filter-text, inherit);
}
.xcfp-date-field input[type="date"] {
    flex: 1;
    padding: 5px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9em;
}

/* ── Image Swatches ── */
.xcfp-image-swatches-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.xcfp-image-swatch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 2px solid transparent;
    border-radius: 6px;
    padding: 2px;
    cursor: pointer;
    background: none;
    transition: border-color 0.2s;
}
.xcfp-image-swatch-btn:hover,
.xcfp-image-swatch-btn:focus {
    border-color: var(--xc-filter-accent, #2271b1);
}
.xcfp-image-swatch-btn.xcfp-active {
    border-color: var(--xc-filter-accent, #2271b1);
    box-shadow: 0 0 0 1px var(--xc-filter-accent, #2271b1);
}
.xcfp-image-swatch {
    max-width: 100%;
    max-height: 100%;
    border-radius: 4px;
    object-fit: contain;
}

/* ── Stable Products Region (AJAX container) ── */
.xcfp-products-region {
    position: relative;
    min-height: 100px;
}
.xcfp-products-region.xcfp-loading {
    opacity: 0.5;
    pointer-events: none;
}

/* ═══════════════════════════════════════════════
   PREMIUM ENHANCEMENTS — Accessibility, Loading, Touch Targets
   ═══════════════════════════════════════════════ */

/* ── Screen Reader Only ── */
.xcfp-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ── Focus Visible (WCAG 2.4.7 compliant) ── */
.xcfp-filter-input:focus-visible,
.xcfp-filter-header:focus-visible,
.xcfp-label-btn:focus-visible,
.xcfp-swatch-btn:focus-visible,
.xcfp-image-swatch-btn:focus-visible,
.xcfp-chip-remove:focus-visible,
.xcfp-mobile-toggle:focus-visible,
.xcfp-drawer-close:focus-visible,
.xcfp-apply-btn:focus-visible {
    outline: 2px solid var(--xc-filter-accent, #6366f1);
    outline-offset: 2px;
}

/* ── Loading Spinner Overlay ── */
.xcfp-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: none;
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
}

.xcfp-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top-color: var(--xc-filter-accent, #6366f1);
    border-radius: 50%;
    animation: xcfp-spin 0.8s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
    .xcfp-spinner { animation: none; }
    .xcfp-drawer { transition: none !important; }
}

/* ── Touch Targets (WCAG 2.5.5: 44x44px minimum) ── */
@media (pointer: coarse), (max-width: 768px) {
    .xcfp-swatch-btn,
    .xcfp-image-swatch-btn,
    .xcfp-chip-remove {
        min-width: 44px;
        min-height: 44px;
    }
    .xcfp-label-btn,
    .xcfp-apply-btn,
    .xcfp-mobile-toggle,
    .xcfp-drawer-close {
        min-height: 44px;
        padding: 10px 16px;
    }
    .xcfp-option {
        min-height: 44px;
        align-items: center;
    }
    .xcfp-filter-header {
        min-height: 48px;
    }
}

/* ── Tablet Landscape (1024-1280px) ── */
@media (min-width: 1024px) and (max-width: 1280px) {
    .xcfp-shop-layout {
        gap: 16px;
    }
    .xcfp-filters-sidebar {
        width: 230px;
        min-width: 210px;
    }
}

/* ── Mobile Landscape ── */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
    .xcfp-drawer {
        width: 60%;
        max-width: 400px;
    }
    .xcfp-drawer-header {
        padding: 8px 16px;
    }
    .xcfp-drawer-content {
        max-height: calc(100vh - 100px);
        overflow-y: auto;
    }
}

/* ── Date Input Cross-Browser Styling ── */
.xcfp-date-field input[type="date"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: #fff;
    min-height: 40px;
    color: var(--xc-filter-text, inherit);
}

.xcfp-date-field input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: opacity(0.6);
    transition: filter 0.2s;
}

.xcfp-date-field input[type="date"]::-webkit-calendar-picker-indicator:hover {
    filter: opacity(1);
}

/* ── Enhanced Range Slider (cross-browser handles) ── */
.xcfp-range-min::-webkit-slider-thumb,
.xcfp-range-max::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--xc-filter-accent, #6366f1);
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    pointer-events: auto;
    margin-top: -8px;
}

.xcfp-range-min::-moz-range-thumb,
.xcfp-range-max::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--xc-filter-accent, #6366f1);
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    pointer-events: auto;
}

/* ── Font inheritance fix ── */
.xcfp-filters-wrap,
.xcfp-filters-wrap * {
    font-family: inherit;
    font-size: inherit;
}
.xcfp-filter-input,
.xcfp-filter-select,
.xcfp-search-input {
    font-family: inherit;
    font-size: 14px;
}

/* ── Mobile Toggle Button (premium styling) ── */
.xcfp-mobile-toggle {
    display: none;
    background: var(--xc-filter-accent, #6366f1);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin: 12px 0;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}
.xcfp-mobile-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}
.xcfp-mobile-toggle:active {
    transform: translateY(0);
}

/* ── Drawer animation polish ── */
.xcfp-drawer {
    box-shadow: 2px 0 24px rgba(0,0,0,0.2);
    will-change: transform;
}
.xcfp-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99999;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.xcfp-drawer-footer {
    border-top: 1px solid #e5e7eb;
    padding: 16px;
    position: sticky;
    bottom: 0;
    background: #fff;
}
.xcfp-drawer-footer .xcfp-apply-btn {
    width: 100%;
    background: var(--xc-filter-accent, #6366f1);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

/* ── Chip improvements ── */
.xcfp-chip {
    transition: all 0.15s;
}
.xcfp-chip:hover {
    transform: translateY(-1px);
}
.xcfp-chip-remove {
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.15s;
}
.xcfp-chip-remove:hover {
    background: rgba(0,0,0,0.1);
}

/* ── High contrast mode ── */
@media (prefers-contrast: more) {
    .xcfp-filter-group {
        border: 2px solid;
    }
    .xcfp-option {
        border: 1px solid;
    }
}

/* ── Print styles ── */
@media print {
    .xcfp-filters-wrap,
    .xcfp-mobile-toggle,
    .xcfp-drawer,
    .xcfp-drawer-overlay {
        display: none !important;
    }
    .xcfp-shop-content {
        width: 100% !important;
    }
}
