/* FilterFlow for WooCommerce — Public CSS
   Design: modern, clean, minimal. No neobrutalism.
   Palette: neutrals + accent #2563EB
   ─────────────────────────────────────────────── */

:root {
    --ffwc-accent:     #2563EB;
    --ffwc-accent-lt:  #EFF6FF;
    --ffwc-accent-mid: #BFDBFE;
    --ffwc-text:       #111827;
    --ffwc-text-2:     #6B7280;
    --ffwc-text-3:     #9CA3AF;
    --ffwc-border:     #E5E7EB;
    --ffwc-border-2:   #D1D5DB;
    --ffwc-bg:         #F9FAFB;
    --ffwc-white:      #FFFFFF;
    --ffwc-radius:     10px;
    --ffwc-radius-sm:  6px;
    --ffwc-shadow:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
    --ffwc-shadow-md:  0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.04);
    --ffwc-sidebar-w:  240px;
    --ffwc-transition: 200ms ease;
}

/* ── Reset ─────────────────────────────────────────────────────────────── */

.ffwc-wrap *,
.ffwc-wrap *::before,
.ffwc-wrap *::after { box-sizing: border-box; }

.ffwc-wrap { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: var(--ffwc-text); }

/* ── Mobile bar ─────────────────────────────────────────────────────────── */

.ffwc-mobile-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--ffwc-border);
    margin-bottom: 16px;
}

.ffwc-mobile-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--ffwc-white);
    border: 1px solid var(--ffwc-border-2);
    border-radius: var(--ffwc-radius-sm);
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ffwc-text);
    cursor: pointer;
    transition: border-color var(--ffwc-transition), box-shadow var(--ffwc-transition);
}
.ffwc-mobile-toggle:hover { border-color: var(--ffwc-accent); box-shadow: 0 0 0 3px var(--ffwc-accent-lt); }

.ffwc-mobile-badge {
    background: var(--ffwc-accent);
    color: #fff;
    border-radius: 20px;
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 700;
}

.ffwc-results-count { font-size: 13px; color: var(--ffwc-text-2); font-weight: 500; }

/* ── Layout ─────────────────────────────────────────────────────────────── */

.ffwc-layout {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */

.ffwc-sidebar {
    width: var(--ffwc-sidebar-w);
    flex-shrink: 0;
    position: sticky;
    top: 24px;
}

.ffwc-sidebar-backdrop { display: none; }

.ffwc-sidebar-panel {
    background: var(--ffwc-white);
    border: 1px solid var(--ffwc-border);
    border-radius: var(--ffwc-radius);
    box-shadow: var(--ffwc-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ffwc-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--ffwc-border);
    background: var(--ffwc-bg);
}
.ffwc-sidebar-head__title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 700;
    color: var(--ffwc-text);
    letter-spacing: .3px;
}
.ffwc-sidebar-close {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ffwc-text-2);
    padding: 4px;
    border-radius: 4px;
    line-height: 1;
}
.ffwc-sidebar-close:hover { color: var(--ffwc-text); background: var(--ffwc-border); }

.ffwc-sidebar-body { padding: 4px 0; flex: 1; overflow-y: auto; }

.ffwc-sidebar-foot {
    padding: 12px 18px;
    border-top: 1px solid var(--ffwc-border);
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ── Filter groups ─────────────────────────────────────────────────────── */

.ffwc-filter-group { border-bottom: 1px solid var(--ffwc-border); }
.ffwc-filter-group:last-child { border-bottom: none; }

.ffwc-filter-head {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    color: var(--ffwc-text);
    text-transform: uppercase;
    letter-spacing: .6px;
    text-align: left;
    transition: background var(--ffwc-transition);
}
.ffwc-filter-head:hover { background: var(--ffwc-bg); }

.ffwc-chevron { transition: transform var(--ffwc-transition); flex-shrink: 0; color: var(--ffwc-text-3); }
.ffwc-collapsible.ffwc-open .ffwc-chevron { transform: rotate(180deg); }

.ffwc-filter-body {
    padding: 0 18px 12px;
    max-height: 600px;
    overflow: hidden;
    transition: max-height .25s ease;
}

/* ── Search ─────────────────────────────────────────────────────────────── */

.ffwc-filter-group:first-child .ffwc-filter-body,
.ffwc-filter-group:first-child { border-bottom: 1px solid var(--ffwc-border); }

.ffwc-filter-group:has(#ffwc-search) { padding: 10px 18px 12px; }
.ffwc-filter-group:has(#ffwc-search) .ffwc-filter-head { display: none; }
.ffwc-filter-group:has(#ffwc-search) .ffwc-filter-body { padding: 0; max-height: none; }

.ffwc-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.ffwc-search-icon {
    position: absolute;
    left: 10px;
    color: var(--ffwc-text-3);
    pointer-events: none;
}
.ffwc-search-input {
    width: 100%;
    padding: 8px 32px 8px 32px;
    border: 1px solid var(--ffwc-border-2);
    border-radius: var(--ffwc-radius-sm);
    font-size: 13px;
    color: var(--ffwc-text);
    background: var(--ffwc-bg);
    outline: none;
    transition: border-color var(--ffwc-transition), box-shadow var(--ffwc-transition);
}
.ffwc-search-input:focus { border-color: var(--ffwc-accent); box-shadow: 0 0 0 3px var(--ffwc-accent-lt); background: var(--ffwc-white); }
.ffwc-search-clear {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ffwc-text-3);
    padding: 2px;
    line-height: 1;
}
.ffwc-search-clear:hover { color: var(--ffwc-text); }

/* ── Checkboxes ─────────────────────────────────────────────────────────── */

.ffwc-check-row {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 5px 0;
    cursor: pointer;
    font-size: 13px;
    color: var(--ffwc-text);
    user-select: none;
}
.ffwc-check-row:hover .ffwc-check-label { color: var(--ffwc-accent); }

.ffwc-check-row input[type="checkbox"] { display: none; }

.ffwc-check-box {
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--ffwc-border-2);
    border-radius: 4px;
    flex-shrink: 0;
    transition: border-color var(--ffwc-transition), background var(--ffwc-transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.ffwc-check-row input:checked ~ .ffwc-check-box {
    background: var(--ffwc-accent);
    border-color: var(--ffwc-accent);
}
.ffwc-check-row input:checked ~ .ffwc-check-box::after {
    content: '';
    display: block;
    width: 9px;
    height: 6px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg) translate(1px, -1px);
}

.ffwc-check-label { flex: 1; font-size: 13px; color: var(--ffwc-text); }
.ffwc-check-count { font-size: 11px; color: var(--ffwc-text-3); font-weight: 500; }

/* ── Price slider ─────────────────────────────────────────────────────── */

.ffwc-price-slider-wrap { padding: 4px 0 8px; }

.ffwc-price-track {
    position: relative;
    height: 4px;
    background: var(--ffwc-border);
    border-radius: 4px;
    margin: 20px 0 10px;
}

.ffwc-price-fill {
    position: absolute;
    height: 100%;
    background: var(--ffwc-accent);
    border-radius: 4px;
    pointer-events: none;
}

.ffwc-range {
    position: absolute;
    width: 100%;
    height: 4px;
    top: 0;
    left: 0;
    background: transparent;
    border: none;
    outline: none;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
}
.ffwc-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--ffwc-white);
    border: 2px solid var(--ffwc-accent);
    box-shadow: 0 1px 4px rgba(0,0,0,.15);
    cursor: pointer;
    pointer-events: all;
    transition: box-shadow var(--ffwc-transition);
}
.ffwc-range::-webkit-slider-thumb:hover { box-shadow: 0 0 0 4px var(--ffwc-accent-lt); }
.ffwc-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--ffwc-white);
    border: 2px solid var(--ffwc-accent);
    box-shadow: 0 1px 4px rgba(0,0,0,.15);
    cursor: pointer;
    pointer-events: all;
}

.ffwc-price-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    color: var(--ffwc-text-2);
}

/* ── Tags ─────────────────────────────────────────────────────────────── */

.ffwc-selected-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; min-height: 0; }

.ffwc-selected-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--ffwc-accent);
    color: #fff;
    border-radius: 20px;
    padding: 3px 8px 3px 10px;
    font-size: 12px;
    font-weight: 600;
}
.ffwc-selected-tag button {
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255,255,255,.8);
    padding: 0;
    line-height: 1;
    display: flex;
    align-items: center;
}
.ffwc-selected-tag button:hover { color: #fff; }

.ffwc-tag-ac-wrap { position: relative; margin-bottom: 10px; }
.ffwc-tag-ac-input {
    width: 100%;
    padding: 7px 10px 7px 30px;
    border: 1px solid var(--ffwc-border-2);
    border-radius: var(--ffwc-radius-sm);
    font-size: 13px;
    color: var(--ffwc-text);
    background: var(--ffwc-bg);
    outline: none;
    transition: border-color var(--ffwc-transition), box-shadow var(--ffwc-transition);
}
.ffwc-tag-ac-input:focus { border-color: var(--ffwc-accent); box-shadow: 0 0 0 3px var(--ffwc-accent-lt); background: var(--ffwc-white); }
.ffwc-tag-ac-wrap .ffwc-search-icon { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); }

.ffwc-tag-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: var(--ffwc-white);
    border: 1px solid var(--ffwc-border);
    border-radius: var(--ffwc-radius-sm);
    box-shadow: var(--ffwc-shadow-md);
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
}
.ffwc-tag-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 9px 12px;
    background: none;
    border: none;
    border-bottom: 1px solid var(--ffwc-border);
    cursor: pointer;
    font-size: 13px;
    color: var(--ffwc-text);
    text-align: left;
}
.ffwc-tag-dropdown-item:last-child { border-bottom: none; }
.ffwc-tag-dropdown-item:hover { background: var(--ffwc-bg); color: var(--ffwc-accent); }
.ffwc-tag-dropdown-item span { font-size: 11px; color: var(--ffwc-text-3); }
.ffwc-tag-dropdown-empty { padding: 10px 12px; font-size: 13px; color: var(--ffwc-text-3); }

.ffwc-tag-pills { display: flex; flex-wrap: wrap; gap: 5px; }
.ffwc-tag-pill {
    background: var(--ffwc-bg);
    border: 1px solid var(--ffwc-border-2);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 12px;
    color: var(--ffwc-text-2);
    cursor: pointer;
    transition: border-color var(--ffwc-transition), color var(--ffwc-transition), background var(--ffwc-transition);
}
.ffwc-tag-pill:hover,
.ffwc-tag-pill.ffwc-tag-pill--active { border-color: var(--ffwc-accent); color: var(--ffwc-accent); background: var(--ffwc-accent-lt); }

/* ── Sidebar footer buttons ──────────────────────────────────────────── */

.ffwc-btn-reset {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: var(--ffwc-text-2);
    padding: 6px 0;
    transition: color var(--ffwc-transition);
}
.ffwc-btn-reset:hover { color: var(--ffwc-text); }

.ffwc-btn-apply {
    flex: 1;
    background: var(--ffwc-accent);
    color: #fff;
    border: none;
    border-radius: var(--ffwc-radius-sm);
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--ffwc-transition), box-shadow var(--ffwc-transition);
}
.ffwc-btn-apply:hover { background: #1d4ed8; box-shadow: 0 4px 12px rgba(37,99,235,.25); }

/* ── Content area ────────────────────────────────────────────────────── */

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

/* ── Topbar ─────────────────────────────────────────────────────────── */

.ffwc-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
    flex-wrap: wrap;
}
.ffwc-topbar__count { font-size: 13px; color: var(--ffwc-text-2); font-weight: 500; }
.ffwc-topbar__right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.ffwc-active-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ffwc-active-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--ffwc-accent-lt);
    border: 1px solid var(--ffwc-accent-mid);
    border-radius: 20px;
    padding: 3px 6px 3px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ffwc-accent);
}
.ffwc-chip-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ffwc-accent);
    opacity: .7;
    padding: 1px;
    line-height: 1;
    display: flex;
    align-items: center;
}
.ffwc-chip-remove:hover { opacity: 1; }

.ffwc-orderby {
    appearance: none;
    -webkit-appearance: none;
    background: var(--ffwc-white) url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236B7280' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center;
    border: 1px solid var(--ffwc-border-2);
    border-radius: var(--ffwc-radius-sm);
    padding: 7px 30px 7px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ffwc-text);
    cursor: pointer;
    outline: none;
    transition: border-color var(--ffwc-transition), box-shadow var(--ffwc-transition);
}
.ffwc-orderby:focus { border-color: var(--ffwc-accent); box-shadow: 0 0 0 3px var(--ffwc-accent-lt); }

/* ── Loading ─────────────────────────────────────────────────────────── */

.ffwc-loading {
    display: flex;
    justify-content: center;
    padding: 40px 0;
}
.ffwc-spinner {
    width: 28px;
    height: 28px;
    border: 2.5px solid var(--ffwc-border);
    border-top-color: var(--ffwc-accent);
    border-radius: 50%;
    animation: ffwc-spin .7s linear infinite;
}
@keyframes ffwc-spin { to { transform: rotate(360deg); } }

/* ── Grid ────────────────────────────────────────────────────────────── */

.ffwc-results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ── No results ─────────────────────────────────────────────────────── */

.ffwc-no-results {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 60px 20px;
    color: var(--ffwc-text-3);
    text-align: center;
}
.ffwc-no-results__icon { font-size: 32px; }
.ffwc-no-results p { font-size: 14px; margin: 0; }

/* ── Product cards ──────────────────────────────────────────────────── */

.ffwc-card {
    background: var(--ffwc-white);
    border: 1px solid var(--ffwc-border);
    border-radius: var(--ffwc-radius);
    box-shadow: var(--ffwc-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow var(--ffwc-transition), transform var(--ffwc-transition);
}
.ffwc-card:hover { box-shadow: var(--ffwc-shadow-md); transform: translateY(-2px); }

.ffwc-card__image-link { display: block; text-decoration: none; }
.ffwc-card__image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--ffwc-bg);
}
.ffwc-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.ffwc-card:hover .ffwc-card__image img { transform: scale(1.04); }

.ffwc-card__image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ffwc-text-3);
}

.ffwc-card__image-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.ffwc-card__cat-badge {
    display: inline-block;
    background: rgba(0,0,0,.55);
    color: #fff;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .3px;
    backdrop-filter: blur(4px);
}

.ffwc-card__free-badge {
    display: inline-block;
    background: #059669;
    color: #fff;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .3px;
}

.ffwc-card__sale-badge {
    display: inline-block;
    background: #DC2626;
    color: #fff;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .3px;
}

.ffwc-card__body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }

.ffwc-card__brand-row { margin-bottom: 2px; }
.ffwc-card__brand {
    font-size: 11px;
    font-weight: 700;
    color: var(--ffwc-text-3);
    text-transform: uppercase;
    letter-spacing: .8px;
}

.ffwc-card__title {
    margin: 0;
    font-size: var(--ffwc-font-title, 14px);
    font-weight: 700;
    line-height: 1.4;
    color: var(--ffwc-text);
}
.ffwc-card__title a { color: inherit; text-decoration: none; }
.ffwc-card__title a:hover { color: var(--ffwc-accent); }

.ffwc-card__desc {
    margin: 0;
    font-size: var(--ffwc-font-desc, 12px);
    line-height: 1.55;
    color: var(--ffwc-text-2);
}

.ffwc-card__attrs { display: flex; flex-wrap: wrap; gap: 4px; }
.ffwc-card__attr {
    font-size: 11px;
    color: var(--ffwc-text-2);
    background: var(--ffwc-bg);
    border: 1px solid var(--ffwc-border);
    border-radius: 4px;
    padding: 2px 7px;
}
.ffwc-card__attr-label { color: var(--ffwc-text-3); font-weight: 600; }

.ffwc-card__tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; padding-top: 4px; }
.ffwc-card__tag {
    background: var(--ffwc-bg);
    border: 1px solid var(--ffwc-border);
    border-radius: 20px;
    padding: 2px 8px;
    font-size: 11px;
    color: var(--ffwc-text-3);
}

.ffwc-card__footer {
    padding: 12px 16px;
    border-top: 1px solid var(--ffwc-border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ffwc-card__price { font-size: 15px; font-weight: 700; color: var(--ffwc-text); line-height: 1.2; }
.ffwc-card__price--free { color: #059669; }
.ffwc-card__price del { opacity: .45; font-size: 12px; margin-right: 4px; font-weight: 500; }
.ffwc-card__price ins { text-decoration: none; }

.ffwc-card__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: var(--ffwc-accent);
    color: #fff !important;
    border-radius: var(--ffwc-radius-btn);
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background var(--ffwc-transition), box-shadow var(--ffwc-transition);
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}
.ffwc-card__cta:hover { background: var(--ffwc-accent-hover, #1d4ed8); box-shadow: 0 4px 10px rgba(0,0,0,.15); }

/* ── Pagination ─────────────────────────────────────────────────────── */

.ffwc-pagination { margin-top: 28px; }
.ffwc-pages { display: flex; align-items: center; justify-content: center; gap: 4px; }

.ffwc-page-btn {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--ffwc-border);
    border-radius: var(--ffwc-radius-sm);
    background: var(--ffwc-white);
    font-size: 13px;
    font-weight: 600;
    color: var(--ffwc-text);
    cursor: pointer;
    transition: border-color var(--ffwc-transition), background var(--ffwc-transition), color var(--ffwc-transition);
}
.ffwc-page-btn:hover { border-color: var(--ffwc-accent); color: var(--ffwc-accent); }
.ffwc-page-active { background: var(--ffwc-accent); border-color: var(--ffwc-accent); color: #fff !important; }
.ffwc-page-disabled { opacity: .35; cursor: default; pointer-events: none; }
.ffwc-page-ellipsis { width: 20px; text-align: center; color: var(--ffwc-text-3); font-size: 13px; }

/* ── Infinite scroll ─────────────────────────────────────────────────── */

.ffwc-load-more-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 28px auto 0;
    background: var(--ffwc-white);
    border: 1px solid var(--ffwc-border-2);
    border-radius: var(--ffwc-radius-sm);
    padding: 11px 24px;
    font-size: 13px;
    font-weight: 700;
    color: var(--ffwc-text);
    cursor: pointer;
    transition: border-color var(--ffwc-transition), box-shadow var(--ffwc-transition);
}
.ffwc-load-more-btn:hover { border-color: var(--ffwc-accent); color: var(--ffwc-accent); box-shadow: 0 0 0 3px var(--ffwc-accent-lt); }

/* ── Cards standalone ([ffwc_cards]) ─────────────────────────────────── */

.ffwc-cards-wrap .ffwc-results-grid { gap: 20px; }
.ffwc-empty { font-size: 14px; color: var(--ffwc-text-3); }

/* ── Carousel ─────────────────────────────────────────────────────────── */

.ffwc-carousel { display: none; }
.ffwc-carousel__desktop-grid { display: grid; }

.ffwc-carousel__track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 14px;
    cursor: grab;
}
.ffwc-carousel__track::-webkit-scrollbar { display: none; }
.ffwc-carousel__track.ffwc-grabbing { cursor: grabbing; }

.ffwc-carousel__slide {
    scroll-snap-align: start;
    flex-shrink: 0;
    width: calc(85vw - 28px);
    max-width: 320px;
}

.ffwc-carousel__dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 14px;
}
.ffwc-carousel__dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--ffwc-border-2);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background var(--ffwc-transition), width var(--ffwc-transition);
}
.ffwc-dot-active { background: var(--ffwc-accent); width: 20px; border-radius: 4px; }

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media ( max-width: 900px ) {
    .ffwc-results-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

@media ( max-width: 700px ) {
    .ffwc-mobile-bar { display: flex; }
    .ffwc-layout { display: block; }

    /* Sidebar base */
    .ffwc-sidebar {
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        z-index: 9999;
        pointer-events: none;
        opacity: 0;
        transition: opacity var(--ffwc-transition);
    }
    .ffwc-sidebar.ffwc-open { pointer-events: all; opacity: 1; }

    .ffwc-sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.45);
        opacity: 0;
        transition: opacity var(--ffwc-transition);
    }
    .ffwc-sidebar.ffwc-open .ffwc-sidebar-backdrop { opacity: 1; }

    /* Side drawer (default) */
    .ffwc-sidebar:not(.ffwc-drawer--bottom) .ffwc-sidebar-panel {
        position: fixed;
        top: 0; right: 0; bottom: 0;
        width: min(85vw, 320px);
        border-radius: 0;
        box-shadow: -4px 0 24px rgba(0,0,0,.12);
        transform: translateX(100%);
        transition: transform .25s cubic-bezier(.4,0,.2,1);
        z-index: 1;
    }
    .ffwc-sidebar:not(.ffwc-drawer--bottom).ffwc-open .ffwc-sidebar-panel {
        transform: translateX(0);
    }

    /* Bottom sheet */
    .ffwc-sidebar.ffwc-drawer--bottom .ffwc-sidebar-panel {
        position: fixed;
        bottom: 0; left: 0; right: 0; top: auto;
        width: 100%;
        max-height: 82vh;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -8px 32px rgba(0,0,0,.15);
        transform: translateY(100%);
        transition: transform .28s cubic-bezier(.4,0,.2,1);
        z-index: 1;
        display: flex;
        flex-direction: column;
    }
    .ffwc-sidebar.ffwc-drawer--bottom.ffwc-open .ffwc-sidebar-panel {
        transform: translateY(0);
    }
    .ffwc-sidebar.ffwc-drawer--bottom .ffwc-sidebar-head {
        border-radius: 20px 20px 0 0;
        position: relative;
        padding-top: 22px;
        flex-shrink: 0;
    }
    .ffwc-sidebar.ffwc-drawer--bottom .ffwc-sidebar-head::before {
        content: '';
        display: block;
        width: 36px; height: 4px;
        background: var(--ffwc-border-2);
        border-radius: 2px;
        position: absolute;
        top: 8px; left: 50%;
        transform: translateX(-50%);
    }
    .ffwc-sidebar.ffwc-drawer--bottom .ffwc-sidebar-body { overflow-y: auto; flex: 1; }
    .ffwc-sidebar.ffwc-drawer--bottom .ffwc-sidebar-foot { flex-shrink: 0; }

    .ffwc-sidebar-close { display: flex; }

    .ffwc-results-grid { grid-template-columns: 1fr !important; gap: 14px; }

    .ffwc-topbar { flex-direction: column; align-items: flex-start; gap: 8px; }
    .ffwc-topbar__right { width: 100%; justify-content: space-between; }

    .ffwc-has-carousel .ffwc-carousel { display: block; }
    .ffwc-has-carousel .ffwc-carousel__desktop-grid { display: none; }
}
