/* ═══════════════════════════════════════════════════════════════
   WC Car Filter — Dark Automotive Theme
   Matching the screenshot: dark bar, red accent, clean selects
   ═══════════════════════════════════════════════════════════════ */

:root {
    --wcf-bg:       #2a2a2a;
    --wcf-border:   rgba(255,255,255,0.12);
    --wcf-text:     #ffffff;
    --wcf-muted:    #aaaaaa;
    --wcf-red:      #e8173a;
    --wcf-red-dark: #c0102e;
    --wcf-track:    rgba(255,255,255,0.2);
    --wcf-radius:   4px;
    --wcf-font:     'Segoe UI', -apple-system, sans-serif;
}

/* ── Wrapper ─────────────────────────────────────────────────── */
.wcf-wrapper {
    width: 100%;
    font-family: var(--wcf-font);
}

.wcf-title {
    font-size: 1.6rem;
    font-weight: 300;
    color: var(--wcf-text);
    margin: 0 0 0px;
    letter-spacing: 0.01em;
}

/* ── Filter Bar ──────────────────────────────────────────────── */
.wcf-bar {
    display: flex;
    align-items: center;
    background: var(--wcf-bg);
    padding: 18px 24px;
    gap: 0;
    flex-wrap: nowrap;
    width: 100%;
    box-sizing: border-box;
}

/* ── Dividers ────────────────────────────────────────────────── */
.wcf-divider {
    width: 1px;
    height: 44px;
    background: var(--wcf-border);
    flex-shrink: 0;
    margin: 0 4px;
}

/* ── Field ───────────────────────────────────────────────────── */
.wcf-field {
    display: flex;
    flex-direction: column;
    padding: 0 22px;
    min-width: 160px;
    flex: 1;
}

.wcf-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--wcf-text);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

/* ── Select ──────────────────────────────────────────────────── */
.wcf-select-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.wcf-select {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    color: var(--wcf-muted);
    font-size: 0.95rem;
    font-family: var(--wcf-font);
    cursor: pointer;
    width: 100%;
    padding-right: 20px;
    outline: none;
    line-height: 1.4;
}

.wcf-select option {
    background: #2a2a2a;
    color: #fff;
}

.wcf-select:focus {
    color: var(--wcf-text);
}

.wcf-arrow {
    position: absolute;
    right: 0;
    color: var(--wcf-muted);
    font-size: 1.1rem;
    pointer-events: none;
    line-height: 1;
}

/* ── Price Range Field ───────────────────────────────────────── */
.wcf-price-field {
    min-width: 200px;
    flex: 1.4;
}

.wcf-range-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Track container */
.wcf-range-track {
    position: relative;
    height: 20px;
    display: flex;
    align-items: center;
}

/* Red filled area between thumbs */
.wcf-range-fill {
    position: absolute;
    height: 3px;
    background: var(--wcf-red);
    border-radius: 2px;
    z-index: 1;
    pointer-events: none;
}

/* Base track line */
.wcf-range-track::before {
    content: '';
    position: absolute;
    left: 0; right: 0;
    height: 3px;
    background: var(--wcf-track);
    border-radius: 2px;
}

/* Range inputs stacked */
.wcf-range {
    position: absolute;
    width: 100%;
    height: 3px;
    background: transparent;
    border: none;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    pointer-events: none;
    z-index: 2;
}

.wcf-range::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--wcf-red);
    border-radius: 50%;
    cursor: pointer;
    pointer-events: all;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
    transition: transform 0.15s;
}

.wcf-range::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--wcf-red);
    border-radius: 50%;
    cursor: pointer;
    pointer-events: all;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.wcf-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.wcf-price-display {
    font-size: 0.85rem;
    color: var(--wcf-muted);
    margin-top: 4px;
    white-space: nowrap;
}

/* ── Search Button ───────────────────────────────────────────── */
.wcf-search-btn {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    background: var(--wcf-red);
    border: none;
    border-radius: var(--wcf-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 16px;
    transition: background 0.2s, transform 0.15s;
}

.wcf-search-btn:hover {
    background: var(--wcf-red-dark);
    transform: scale(1.04);
}

.wcf-search-btn svg {
    width: 22px;
    height: 22px;
    color: #fff;
    stroke: #fff;
}

/* ── Loading state ───────────────────────────────────────────── */
.wcf-search-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.wcf-search-btn.loading svg {
    animation: wcf-spin 0.7s linear infinite;
}

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

/* ── Results ─────────────────────────────────────────────────── */
.wcf-results {
    margin-top: 32px;
}

.wcf-results-inner {
    min-height: 0;
    transition: opacity 0.25s;
}

.wcf-results-inner.loading {
    opacity: 0.4;
}

.wcf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

/* ── Product Card ────────────────────────────────────────────── */
.wcf-card {
    display: flex;
    flex-direction: column;
    background: #1a1a1a;
    border-radius: 6px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid rgba(255,255,255,0.07);
}

.wcf-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.5);
    border-color: var(--wcf-red);
}

.wcf-card-img {
    width: 100%;
    padding-top: 60%;
    background-size: cover;
    background-position: center;
    background-color: #2a2a2a;
}

.wcf-card-body {
    padding: 14px 16px 16px;
}

.wcf-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 6px;
    line-height: 1.3;
}

.wcf-card-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--wcf-red);
}

.wcf-card-price .woocommerce-Price-amount {
    color: var(--wcf-red);
}

/* ── No Results ──────────────────────────────────────────────── */
.wcf-no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--wcf-muted);
}

.wcf-no-results svg {
    width: 48px;
    height: 48px;
    stroke: var(--wcf-muted);
    margin-bottom: 16px;
    display: block;
    margin: 0 auto 12px;
}

.wcf-no-results p {
    font-size: 1rem;
    margin: 0;
}

/* ── Result count badge ──────────────────────────────────────── */
.wcf-count {
    font-size: 0.82rem;
    color: var(--wcf-muted);
    margin-bottom: 16px;
    display: block;
}

.wcf-count strong {
    color: var(--wcf-text);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .wcf-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 16px;
    }

    .wcf-divider {
        width: 100%;
        height: 1px;
        margin: 8px 0;
    }

    .wcf-field {
        padding: 10px 0;
    }

    .wcf-search-btn {
        margin: 16px 0 0;
        width: 100%;
        height: 48px;
        border-radius: var(--wcf-radius);
    }

    .wcf-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}
