/* ==============================================
   Airshopi Filters
   ============================================== */

/* ── Loading ───────────────────────────────── */
.airshopi-loading {
    opacity: 0.4;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* ── Mobile toggle button ──────────────────── */
.airshopi-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1.25rem;
    background: #fff;
    border: 2px solid #E5E5E5;
    border-radius: 6.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    margin-bottom: 1rem;
    transition: border-color 0.2s ease;
}
.airshopi-mobile-toggle:hover { border-color: #a3a3a3; }
@media (min-width: 992px) {
    .airshopi-mobile-toggle { display: none; }
}

/* ── Filters container ─────────────────────── */
.airshopi-filters {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    z-index: 10001;
    max-height: 85vh;
    border-radius: 0.75rem 0.75rem 0 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 1rem 2rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
}
.airshopi-filters.is-open { transform: translateY(0); }

/* Mobile header */
.airshopi-filters__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #E5E5E5;
    font-weight: 700;
    font-size: 1rem;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}
.airshopi-filters__close {
    background: none;
    border: 0;
    font-size: 1.5rem;
    cursor: pointer;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    color: #737373;
}
.airshopi-filters__close:hover { color: #0a0a0a; }

/* Desktop: static in sidebar */
@media (min-width: 992px) {
    .airshopi-filters {
        position: static;
        width: auto;
        max-height: none;
        transform: none;
        box-shadow: none;
        padding: 0;
        overflow: visible;
        border-radius: 0;
    }
    .airshopi-filters__header { display: none; }
    .airshopi-filters { margin-bottom: 2.5rem; }
}

/* ── Overlay ───────────────────────────────── */
.airshopi-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.airshopi-overlay.is-open {
    opacity: 1;
    pointer-events: all;
}

/* ── Filters heading (desktop only) ─────────── */
.airshopi-filters__heading {
    display: none;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #E5E5E5;
    color: #0a0a0a;
}
@media (min-width: 992px) {
    .airshopi-filters__heading { display: block; }
}

/* ── Filter group ──────────────────────────── */
.airshopi-filter {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #E5E5E5;
}
.airshopi-filter:last-child {
    border-bottom: 0;
    margin-bottom: 0;
    padding-bottom: 0;
}
.airshopi-filter__title {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #0a0a0a;
}

/* ── Checkbox list ─────────────────────────── */
.airshopi-filter__list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.airshopi-filter__item {
    margin-bottom: 0.125rem;
}
.airshopi-filter__link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3125rem 0;
    font-size: 0.875rem;
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}
.airshopi-filter__link:hover { color: #314D3E; }

/* Checkbox */
.airshopi-filter__checkbox {
    width: 1rem;
    height: 1rem;
    min-width: 1rem;
    border: 2px solid #a3a3a3;
    border-radius: 0.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    flex-shrink: 0;
}
.airshopi-filter__item.is-active .airshopi-filter__checkbox {
    background: #0a0a0a;
    border-color: #0a0a0a;
}
.airshopi-filter__item.is-active .airshopi-filter__checkbox::after {
    content: "\2713";
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 1;
}
.airshopi-filter__label { flex: 1; }
.airshopi-filter__count {
    font-size: 0.75rem;
    color: #a3a3a3;
}
.airshopi-filter__count::before { content: "("; }
.airshopi-filter__count::after { content: ")"; }

/* Show more / less */
.airshopi-filter__item--hidden {
    display: none;
}
.airshopi-filter.is-expanded .airshopi-filter__item--hidden {
    display: block;
}
.airshopi-filter__toggle {
    display: inline-block;
    margin-top: 0.375rem;
    padding: 0;
    background: none;
    border: 0;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 500;
    color: #0a0a0a;
    cursor: pointer;
    text-decoration: underline;
}

/* ── Logo mode (brands) ───────────────────── */
.airshopi-filter__logos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}
.airshopi-filter__logo-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 3rem;
    border: 1px solid #E5E5E5;
    border-radius: 0.375rem;
    overflow: hidden;
    padding: 0.375rem;
    transition: all 0.15s ease;
    text-decoration: none;
    font-size: 0.625rem;
    color: #737373;
    text-align: center;
    background: #fff;
}
.airshopi-filter__logo-item:hover { border-color: #314D3E; }
.airshopi-filter__logo-item.is-active {
    border-color: #314D3E;
    border-width: 2px;
    background: #F5F5F5;
}
.airshopi-filter__logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ── Active filters (above products) ───────── */
.airshopi-active {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    align-items: center;
}
.airshopi-active__chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: #0a0a0a;
    border-radius: 6.25rem;
    font-size: 1rem;
    font-weight: 500;
    color: #fff;
    text-decoration: none;
}
.airshopi-active__chip span {
    font-size: 1.125rem;
    line-height: 1;
    opacity: 0.7;
}
.airshopi-active__clear {
    display: inline-flex;
    align-items: center;
    font-size: 0.875rem;
    color: #0a0a0a;
    text-decoration: underline;
    padding: 0.375rem 0;
}

/* ── Category tree filter ────────────────── */

.airshopi-filter__tree-children {
    list-style: none;
    margin: 0;
    padding: 0 0 0 1.25rem;
}

/* Items that have subcategories: collapsible */
.airshopi-filter__item--branch {
    position: relative;
}
.airshopi-filter__item--branch > .airshopi-filter__link {
    padding-right: 1.75rem;
}
.airshopi-filter__item--branch > .airshopi-filter__tree-children {
    display: none;
}
.airshopi-filter__item--branch.is-expanded > .airshopi-filter__tree-children {
    display: block;
}

.airshopi-filter__expand {
    position: absolute;
    top: 0;
    right: 0;
    width: 1.5rem;
    height: 1.75rem;
    padding: 0;
    background: none;
    border: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #737373;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.15s ease;
}
.airshopi-filter__expand:hover {
    color: #0a0a0a;
}
.airshopi-filter__expand::before {
    content: "+";
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
}
.airshopi-filter__item--branch.is-expanded > .airshopi-filter__expand::before {
    content: "−";
}
