/* Woo Product Search & Filter */
.wapsf-product-filters {
    margin: 1.5em 0;
    padding: 1.25em 1.5em;
    background: #f7f7f9;
    border-radius: 10px;
    border: 1px solid #e0e0e5;
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    align-items: flex-end;
    font-size: 14px;
}

.wapsf-product-filters .wapsf-field {
    display: flex;
    flex-direction: column;
    min-width: 160px;
}

.wapsf-product-filters .wapsf-field label {
    font-weight: 600;
    margin-bottom: 0.25em;
    color: #333;
}

.wapsf-product-filters input[type="text"],
.wapsf-product-filters input[type="number"],
.wapsf-product-filters select {
    padding: 0.45em 0.55em;
    border-radius: 4px;
    border: 1px solid #ccc;
    min-height: 36px;
    background: #fff;
}

.wapsf-price-row {
    display: flex;
    gap: 0.4em;
}

.wapsf-product-filters .wapsf-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    margin-left: auto;
}

.wapsf-product-filters .button-primary,
.wapsf-product-filters .button-secondary {
    border-radius: 4px;
    padding: 0.55em 0.95em;
    cursor: pointer;
    font-weight: 600;
    border: none;
    line-height: 1.4;
}

.wapsf-product-filters .button-primary {
    background: #2271b1;
    color: #fff;
}

.wapsf-product-filters .button-primary:hover {
    background: #1b5a8c;
}

.wapsf-product-filters .button-secondary {
    background: #e4e4e7;
    color: #333;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.wapsf-product-filters .wapsf-checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.4em;
    margin-top: 0.3em;
}

.wapsf-product-filters .wapsf-checkbox-row label {
    font-weight: 400;
    margin-bottom: 0;
}

.wapsf-category-tree {
    min-width: 240px;
    flex: 1 1 300px;
}

.wapsf-category-levels {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6em;
    align-items: flex-end;
}

.wapsf-category-level {
    display: flex;
    flex-direction: column;
    min-width: 190px;
    flex: 1 1 190px;
}

.wapsf-category-level select {
    width: 100%;
}

@media (max-width: 768px) {
    .wapsf-product-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .wapsf-price-row,
    .wapsf-category-levels {
        flex-direction: column;
        align-items: stretch;
    }

    .wapsf-product-filters .wapsf-actions {
        margin-left: 0;
    }

    .wapsf-category-level {
        width: 100%;
    }
}

/* Header-only search shortcode */
.wapsf-header-search {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 420px;
    gap: 0.35em;
}

.wapsf-header-search input[type="search"] {
    width: 100%;
    min-height: 40px;
    padding: 0.55em 0.75em;
    border: 1px solid #d0d0d4;
    border-radius: 6px;
    background: #fff;
    color: #222;
    box-sizing: border-box;
}

.wapsf-header-search button {
    min-height: 40px;
    padding: 0.55em 0.9em;
    border: 0;
    border-radius: 6px;
    background: #2271b1;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.wapsf-header-search button:hover {
    background: #1b5a8c;
}

@media (max-width: 768px) {
    .wapsf-header-search {
        max-width: 100%;
    }
}
