/* ─────────────────────────────────────────────
   Product Filter Sidebar  –  Myntra style
   Used in: resources/views/website/product/index.blade.php
───────────────────────────────────────────── */

/* ── Sidebar container ── */
.filter-sidebar {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}
.filter-sidebar::-webkit-scrollbar { width: 4px; }
.filter-sidebar::-webkit-scrollbar-thumb { background: #d4d4d4; border-radius: 4px; }

/* ── Header ── */
.filter-header {
    padding: 16px 16px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e8e8e8;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2;
}
.filter-header .fh-title {
    font-size: 15px;
    font-weight: 700;
    color: #282c3f;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.filter-header .fh-clear {
    background: none;
    border: none;
    color: var(--brand);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    text-transform: uppercase;
    letter-spacing: .4px;
}

/* ── Section ── */
.filter-section { border-bottom: 1px solid #e8e8e8; }

.filter-section-title {
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 700;
    color: #282c3f;
    text-transform: uppercase;
    letter-spacing: .5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}
.filter-section-title .fst-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.filter-section-title .fst-right i {
    font-size: 15px;
    color: #94969f;
    transition: transform .2s;
}
.filter-section-title.collapsed .fst-right .la-angle-down {
    transform: rotate(-90deg);
}
.filter-section-title .fst-search-icon {
    font-size: 15px;
    color: #94969f;
    cursor: pointer;
    padding: 2px;
}
.filter-section-title .fst-search-icon:hover { color: var(--brand); }

.filter-section-body { padding: 0 16px 14px; }

/* ── Inline search box ── */
.filter-search-box {
    display: none;
    padding: 0 16px 10px;
}
.filter-search-box.open { display: block; }
.filter-search-box input {
    width: 100%;
    border: 1px solid #d4d4d4;
    border-radius: 4px;
    padding: 7px 10px;
    font-size: 12px;
    color: #282c3f;
    outline: none;
}
.filter-search-box input:focus { border-color: var(--brand); }

/* ── Myntra-style checkbox rows ── */
.myn-check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
    cursor: pointer;
}
.myn-check-item input[type=checkbox] { display: none; }
.myn-check-box {
    width: 16px;
    height: 16px;
    border: 2px solid #d4d4d4;
    border-radius: 2px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
}
.myn-check-item input:checked ~ .myn-check-box,
.myn-check-item.checked .myn-check-box {
    background: var(--brand);
    border-color: var(--brand);
}
.myn-check-item input:checked ~ .myn-check-box::after,
.myn-check-item.checked .myn-check-box::after {
    content: '';
    display: block;
    width: 4px;
    height: 8px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translate(-1px, -1px);
}
.myn-check-label { font-size: 13px; color: #282c3f; flex: 1; line-height: 1.3; }
.myn-check-count { font-size: 11px; color: #94969f; flex-shrink: 0; }
.myn-check-item:hover .myn-check-label { color: var(--brand); }

/* ── Subcategory indent ── */
.sub-cat-indent { padding-left: 26px; }

/* ── Color rows ── */
.myn-color-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
    cursor: pointer;
}
.myn-color-item input[type=checkbox] { display: none; }
.myn-color-dot-wrap {
    display: inline-block;
    position: relative;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
.myn-color-dot {
    display: block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1.5px solid rgba(0, 0, 0, .12);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
    transition: outline .15s;
}
.myn-color-item input:checked ~ .myn-color-dot-wrap .myn-color-dot,
.myn-color-item.checked .myn-color-dot {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}
.myn-color-name { font-size: 13px; color: #282c3f; flex: 1; }
.myn-color-count { font-size: 11px; color: #94969f; }
.myn-color-item:hover .myn-color-name { color: var(--brand); }

/* ── "Show more" link ── */
.show-more-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--brand);
    cursor: pointer;
    text-decoration: none;
}
.show-more-link:hover { text-decoration: underline; }

/* ── Dual range price slider ── */
.price-slider-wrap { padding: 4px 0 8px; }
.price-range-display {
    font-size: 13px;
    color: #282c3f;
    font-weight: 600;
    margin-bottom: 14px;
}
.dual-slider {
    position: relative;
    height: 4px;
    margin: 0 6px;
}
.dual-slider .track {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: #e8e8e8;
    border-radius: 4px;
}
.dual-slider .fill {
    position: absolute;
    top: 0;
    height: 4px;
    background: var(--brand);
    border-radius: 4px;
}
.dual-slider input[type=range] {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    margin: 0;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    pointer-events: none;
    height: 16px;
}
.dual-slider input[type=range]::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--brand);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
    pointer-events: all;
    cursor: pointer;
}
.dual-slider input[type=range]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--brand);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
    pointer-events: all;
    cursor: pointer;
}

/* ── Apply / price filter button ── */
.filter-apply-btn {
    display: block;
    width: calc(100% - 32px);
    margin: 12px 16px 16px;
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 11px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    transition: background .2s;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.filter-apply-btn:hover { background: var(--brand-dark); }

/* ── Sort bar ── */
.sort-bar {
    background: #fff;
    border-radius: 4px;
    border: 1px solid #e8e8e8;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}
.sort-bar .result-count { font-size: 13px; color: #94969f; }

/* ── Mobile filter toggle ── */
.mobile-filter-btn {
    display: none;
    background: var(--brand);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 14px;
}
@media (max-width: 991px) {
    .mobile-filter-btn { display: flex; align-items: center; gap: 8px; }
    .filter-sidebar {
        display: none;
        position: fixed;
        top: 0; left: 0;
        height: 100vh;
        overflow-y: auto;
        z-index: 99999;
        border-radius: 0;
        width: 290px;
        max-height: 100vh;
    }
    .filter-sidebar.open { display: block; }
    .filter-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, .5);
        z-index: 99998;
    }
    .filter-overlay.show { display: block; }
}