.product-search-filters {
    --psf-accent: var(--brand, #0A58CA);
    --psf-field-height: 62px;
}

.home-search-shell .product-search-filters--home {
    --psf-accent: var(--mode-color, #7C3AED);
}

/* ── Home layout ── */
.home-search-form .product-search-filters--home {
    display: flex;
    flex: 1 1 0;
    gap: 10px;
    min-width: 0;
    align-items: stretch;
}

.home-search-form .product-search-filters--home > .psf-field {
    flex: 1 1 0;
    min-width: 100px;
}

/* ── Listing layout ── */
.product-search-filters--listing {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) auto;
    gap: 10px;
    align-items: stretch;
}

@media (max-width: 767.98px) {
    .product-search-filters--listing {
        grid-template-columns: 1fr;
    }
}

/* ── Shared fields ── */
.product-search-filters .smart-field {
    min-height: var(--psf-field-height);
    height: 100%;
    background: #F8FAFC;
    border: 1px solid #E6EAF0;
    border-radius: 18px;
    padding: 10px 12px;
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 8px;
    align-items: center;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.product-search-filters .smart-field:focus-within {
    border-color: var(--psf-accent);
    background: #fff;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--psf-accent) 14%, transparent);
}

.product-search-filters .smart-field i {
    color: var(--psf-accent);
    font-size: 1.15rem;
    grid-row: span 2;
    align-self: center;
}

.product-search-filters .smart-field label {
    display: block;
    color: #64748B;
    font-size: 0.68rem;
    font-weight: 800;
    margin-bottom: 2px;
    line-height: 1.2;
}

.product-search-filters .smart-field input,
.product-search-filters .smart-field select {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
    font-size: 0.86rem;
    color: #1E293B;
    min-width: 0;
}

.product-search-filters--listing .smart-field input,
.product-search-filters--listing .smart-field select {
    font-size: 0.82rem;
}

.product-search-filters .psf-submit {
    min-height: var(--psf-field-height);
    height: 100%;
    border: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--psf-accent) 0%, color-mix(in srgb, var(--psf-accent) 80%, #000) 100%);
    color: #fff;
    font-weight: 800;
    padding: 0 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.product-search-filters .psf-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px color-mix(in srgb, var(--psf-accent) 28%, transparent);
    color: #fff;
}

.filter-card .card-body:has(.product-search-filters--listing) {
    padding: 18px !important;
}

@media (max-width: 575.98px) {
    .home-search-form .product-search-filters--home {
        flex-wrap: wrap;
    }

    .home-search-form .product-search-filters--home > .psf-field {
        flex: 1 1 calc(50% - 5px);
        min-width: calc(50% - 5px);
    }
}
