.iaws-advanced-search-form {
    max-width: 100%;
    margin: 0;
}

.iaws-search-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 16px;
}

.iaws-search-input-wrapper {
    position: relative;
    flex: 1;
    min-width: 0;
}

.iaws-search-input-wrapper .iaws-search-input {
    width: 100%;
    height: 50px;
    padding: 0 40px 0 16px;
    font-size: 16px;
    font-family: inherit;
    line-height: 1.4;
    border: 1px solid #d5d8dc;
    border-radius: 3px;
    background: #fff;
    color: #333;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
    appearance: none;
}

.iaws-search-input-wrapper .iaws-search-input:focus {
    border-color: #8c0030;
}

.iaws-search-input-wrapper .iaws-search-input::placeholder {
    color: #999;
}

.iaws-search-input-wrapper .iaws-input-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 50%;
}

.iaws-search-input-wrapper .iaws-input-clear.hidden {
    display: none;
}

.iaws-search-input-wrapper .iaws-input-clear:hover {
    background: rgba(0, 0, 0, 0.05);
}

.iaws-search-input-wrapper .iaws-input-clear svg {
    width: 14px;
    height: 14px;
    fill: #999;
    pointer-events: none;
}

.iaws-search-input-wrapper .iaws-input-clear:hover svg {
    fill: #666;
}

.iaws-search-submit {
    flex-shrink: 0;
    height: 50px;
    padding: 0 28px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    background: #8c0030;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.iaws-search-submit:hover {
    background: #6e0025;
}

@media (max-width: 768px) {
    .iaws-search-row {
        flex-wrap: wrap;
    }

    .iaws-search-input-wrapper {
        flex: 1 1 100%;
        order: 1;
    }

    .iaws-search-submit {
        order: 2;
    }
}

@media (max-width: 480px) {
    .iaws-search-row {
        gap: 10px;
    }

    .iaws-search-submit {
        flex: 1 1 100%;
    }
}

/* ── Collapsible Filter Sections ─────────────────────────────────────────── */

.iaws-filter-sections {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

@media (min-width: 769px) {
    .iaws-filter-sections {
        grid-template-columns: repeat(3, 1fr);
    }
}

.iaws-filter-section {
    border: 1px solid #d5d8dc;
    border-radius: 3px;
    background: #fff;
    overflow: hidden;
}

.iaws-filter-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    cursor: pointer;
    user-select: none;
    background: #fafbfc;
    transition: background 0.15s ease;
}

.iaws-filter-section-header:hover {
    background: #f0f2f5;
}

.iaws-filter-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.iaws-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.iaws-select-all-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    white-space: nowrap;
}

.iaws-filter-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #888;
    border-radius: 3px;
    transition: color 0.15s, background 0.15s;
}

.iaws-filter-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #555;
}

.iaws-filter-toggle svg {
    display: block;
    transition: transform 0.2s ease;
}

.iaws-filter-section.is-open .iaws-filter-toggle svg {
    transform: rotate(180deg);
}

.iaws-filter-section-body {
    display: none;
    padding: 4px 0;
    border-top: 1px solid #eef0f4;
    max-height: 200px;
    overflow-y: auto;
}

.iaws-filter-section.is-open .iaws-filter-section-body {
    display: block;
}

.iaws-filter-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px;
    cursor: pointer;
    transition: background 0.12s ease;
    font-size: 13px;
    color: #333;
    line-height: 1.3;
}

.iaws-filter-item:hover {
    background: #f7f8fa;
}

.iaws-filter-item span {
    line-height: 1.3;
}

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

.iaws-filter-item input[type="checkbox"],
.iaws-select-all-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    margin: 0;
    border: 2px solid #d5d8dc;
    border-radius: 3px;
    background: #fff;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.iaws-filter-item input[type="checkbox"]:hover,
.iaws-select-all-label input[type="checkbox"]:hover {
    border-color: #b0b3b8;
}

.iaws-filter-item input[type="checkbox"]:checked,
.iaws-select-all-label input[type="checkbox"]:checked {
    background: #8c0030;
    border-color: #8c0030;
    box-shadow: 0 0 6px rgba(140, 0, 48, 0.3);
}

.iaws-filter-item input[type="checkbox"]:checked::after,
.iaws-select-all-label input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.iaws-filter-item input[type="checkbox"]:focus-visible,
.iaws-select-all-label input[type="checkbox"]:focus-visible {
    outline: 2px solid #8c0030;
    outline-offset: 1px;
}

@media (max-width: 768px) {
    .iaws-filter-sections {
        gap: 6px;
    }
}
