/* ==========================================================================
   WESTOREX Shop Sidebar Premium — Compact + Mobile Drawer
   ========================================================================== */

.shop-sidebar {
    position: sticky;
    top: calc(var(--header-height) + 20px);
    padding: 0;
    font-size: 0.85rem;
}

/* ── Master "Filters" title — ULTRA COMPACT ────────────────────────────── */
.shop-sidebar::before {
    content: 'Filters';
    display: block;
    font-family: var(--font-primary);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--color-black);
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--color-black);
}

/* ── Filter groups — ULTRA COMPACT ─────────────────────────────────────── */
.shop-sidebar .filter-group {
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid #eee;
    position: relative;
}
.shop-sidebar .filter-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* ── Filter titles — ULTRA COMPACT ─────────────────────────────────────── */
.shop-sidebar .filter-title {
    font-family: var(--font-primary);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--color-black);
    margin: 0 0 8px 0;
    padding-bottom: 5px;
    position: relative;
    display: inline-block;
}
.shop-sidebar .filter-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 16px;
    height: 1px;
    background: var(--color-accent);
}

/* ── Filter lists — ULTRA COMPACT ──────────────────────────────────────── */
.shop-sidebar .filter-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    margin: 0;
    list-style: none;
}

.shop-sidebar .filter-list li {
    margin: 0;
    padding: 0;
    line-height: 1;
}

.shop-sidebar .filter-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0 4px 10px;
    font-family: var(--font-primary);
    font-size: 0.75rem;
    font-weight: 400;
    color: #4a4a4a;
    text-decoration: none;
    position: relative;
    transition: all .15s ease;
    border-left: 2px solid transparent;
    line-height: 1.4;
}

.shop-sidebar .filter-list a:hover {
    color: var(--color-black);
    border-left-color: #ddd;
    padding-left: 12px;
}

.shop-sidebar .filter-list a.active {
    color: var(--color-black);
    border-left-color: var(--color-accent);
    font-weight: 700;
    padding-left: 12px;
}

/* Count numbers — mini chips */
.shop-sidebar .filter-list a span {
    font-size: 0.62rem;
    color: var(--color-gray-3);
    font-weight: 500;
    background: #f8f6f2;
    padding: 1px 5px;
    border-radius: 2px;
    min-width: 18px;
    text-align: center;
    transition: all .15s ease;
    line-height: 1.4;
}
.shop-sidebar .filter-list a:hover span,
.shop-sidebar .filter-list a.active span {
    background: var(--color-accent);
    color: var(--color-white);
}

/* ── Size chips (inline) — ULTRA COMPACT ───────────────────────────────── */
.shop-sidebar .filter-list--inline {
    flex-direction: row !important;
    flex-wrap: wrap;
    gap: 4px;
    padding: 0;
    list-style: none;
}

.shop-sidebar .filter-list--inline li {
    margin: 0;
}

.shop-sidebar .size-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 28px;
    padding: 0 6px;
    border: 1px solid #ddd;
    background: var(--color-white);
    font-family: var(--font-primary);
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--color-black) !important;
    text-decoration: none;
    transition: all .15s ease;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.shop-sidebar .size-chip:hover {
    border-color: var(--color-black);
    background: var(--color-black);
    color: var(--color-white) !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
}

.shop-sidebar .size-chip.is-active {
    border-color: var(--color-accent);
    background: var(--color-accent);
    color: var(--color-white) !important;
}

/* Shoe size chips — slightly wider for 2-digit numbers */
.shop-sidebar .size-chip--shoe {
    min-width: 36px;
    font-variant-numeric: tabular-nums;
}

/* One Size chip — full width elegant tag */
.shop-sidebar .size-chip--onesize {
    min-width: 100%;
    height: 30px;
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    justify-content: flex-start;
    padding: 0 12px;
    background: #fafaf7;
    border-color: #e5e0d3;
    color: var(--color-black) !important;
    font-weight: 500;
}
.shop-sidebar .size-chip--onesize:hover {
    background: var(--color-black);
    color: var(--color-white) !important;
    border-color: var(--color-black);
    transform: none;
    box-shadow: none;
}

/* ══════════════════════════════════════════════════════════════════════════
   PRICE FILTER — FORCE OVERRIDE OF WOOCOMMERCE DEFAULT (violet/purple)
   ══════════════════════════════════════════════════════════════════════════ */

/* Container */
.shop-sidebar .price-filter,
.shop-sidebar .widget_price_filter {
    padding: 0;
}

/* Kill the huge default "Filter by price" widget title + any WooCommerce H2/H3 */
.shop-sidebar .widget_price_filter .widget-title,
.shop-sidebar .widget_price_filter > h2,
.shop-sidebar .widget_price_filter > h3,
.shop-sidebar .widget_price_filter form > h2,
.shop-sidebar .widget_price_filter form > h3 {
    display: none !important;
}

.shop-sidebar .widget_price_filter .price_slider_wrapper {
    padding: 2px 0 0 0;
}

/* SLIDER TRACK — override violet with light gray */
.shop-sidebar .widget_price_filter .price_slider,
.shop-sidebar .widget_price_filter .ui-slider {
    background: #e5e5e5 !important;
    background-color: #e5e5e5 !important;
    height: 2px !important;
    border-radius: 2px;
    margin: 6px 6px 6px 6px !important;
    position: relative;
    border: none !important;
    box-shadow: none !important;
}

/* SLIDER FILLED PART (between handles) — GOLD */
.shop-sidebar .widget_price_filter .ui-slider-range,
.shop-sidebar .widget_price_filter .price_slider .ui-slider-range {
    background: var(--color-accent) !important;
    background-color: var(--color-accent) !important;
    height: 2px !important;
    border-radius: 2px;
    position: absolute !important;
    top: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

/* SLIDER HANDLES — small round premium */
.shop-sidebar .widget_price_filter .ui-slider-handle,
.shop-sidebar .widget_price_filter .price_slider .ui-slider-handle {
    width: 12px !important;
    height: 12px !important;
    background: var(--color-black) !important;
    background-color: var(--color-black) !important;
    border: 2px solid var(--color-white) !important;
    border-radius: 50% !important;
    top: -5px !important;
    margin-left: -6px !important;
    outline: none !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
    cursor: grab;
    transition: all .15s ease;
    display: block !important;
    position: absolute !important;
}

.shop-sidebar .widget_price_filter .ui-slider-handle:hover,
.shop-sidebar .widget_price_filter .ui-slider-handle:focus {
    transform: scale(1.25);
    background: var(--color-accent) !important;
    background-color: var(--color-accent) !important;
}

.shop-sidebar .widget_price_filter .ui-slider-handle:active {
    cursor: grabbing;
}

/* PRICE LABEL + BUTTON on same row — COMPACT */
.shop-sidebar .widget_price_filter .price_slider_amount {
    text-align: left;
    padding: 0 !important;
    font-family: var(--font-primary) !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 8px !important;
    margin-top: 8px !important;
    flex-wrap: wrap;
}

.shop-sidebar .widget_price_filter .price_label {
    font-family: var(--font-primary);
    font-size: 0.68rem;
    color: var(--color-black);
    text-align: left;
    margin: 0 !important;
    padding: 0 !important;
    flex: 1;
    min-width: 0;
    order: 2;
    width: 100%;
    line-height: 1.4;
}

.shop-sidebar .widget_price_filter .price_label span {
    color: var(--color-black);
    font-weight: 700;
    font-family: var(--font-primary);
    font-size: 0.7rem;
}

.shop-sidebar .price_slider_amount .from,
.shop-sidebar .price_slider_amount .to {
    font-family: var(--font-primary) !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    color: var(--color-black) !important;
}

/* FILTER BUTTON — MINI */
.shop-sidebar .widget_price_filter .button,
.shop-sidebar .widget_price_filter button[type="submit"],
.shop-sidebar .widget_price_filter input[type="submit"],
.shop-sidebar .price_slider_amount .button {
    background: var(--color-black) !important;
    background-color: var(--color-black) !important;
    color: var(--color-white) !important;
    border: 1px solid var(--color-black) !important;
    padding: 5px 12px !important;
    font-family: var(--font-primary) !important;
    font-size: 0.55rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.18em !important;
    text-transform: uppercase !important;
    cursor: pointer;
    border-radius: 0 !important;
    transition: all .15s ease;
    box-shadow: none !important;
    text-shadow: none !important;
    line-height: 1.4 !important;
    height: auto !important;
    width: auto !important;
    display: inline-block !important;
    float: none !important;
    margin: 0 !important;
    order: 1;
    flex-shrink: 0;
}
.shop-sidebar .widget_price_filter .button:hover,
.shop-sidebar .widget_price_filter button[type="submit"]:hover,
.shop-sidebar .widget_price_filter input[type="submit"]:hover {
    background: var(--color-accent) !important;
    background-color: var(--color-accent) !important;
    border-color: var(--color-accent) !important;
}

/* ══════════════════════════════════════════════════════════════════════════
   MOBILE — SIDEBAR SLIDE-IN DRAWER
   ══════════════════════════════════════════════════════════════════════════ */

/* Filter trigger button visible on mobile */
.shop-filter-trigger {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--color-black);
    color: var(--color-white);
    border: 1px solid var(--color-black);
    padding: 12px 20px;
    font-family: var(--font-primary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    cursor: pointer;
    width: 100%;
    margin-bottom: 20px;
    transition: background .2s ease;
}

.shop-filter-trigger:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
}

/* Mobile overlay */
.wstx-shop-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity .3s ease;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.wstx-shop-overlay.is-visible {
    display: block;
    opacity: 1;
}

@media (max-width: 767px) {
    .shop-filter-trigger {
        display: flex !important;
    }

    /* Sidebar hidden by default, becomes fixed drawer when opened */
    .shop-sidebar {
        position: fixed !important;
        top: var(--header-height) !important;
        left: 0 !important;
        width: 85%;
        max-width: 340px;
        height: calc(100vh - var(--header-height));
        background: var(--color-white);
        z-index: 999;
        padding: 60px 20px 20px 20px !important;
        margin: 0 !important;
        border: none !important;
        border-top: 1px solid #eee;
        overflow-y: auto;
        overflow-x: hidden;
        transform: translateX(-100%);
        transition: transform .35s cubic-bezier(.2,.7,.3,1);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
        display: block !important;
    }

    .shop-sidebar.open {
        transform: translateX(0);
    }

    /* Close button inside sidebar (top right) */
    .shop-sidebar::after {
        content: '×';
        position: absolute;
        top: 14px;
        right: 16px;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        color: var(--color-black);
        font-size: 1.8rem;
        font-weight: 300;
        line-height: 1;
        cursor: pointer;
        z-index: 10;
        pointer-events: none;
    }

    /* Master title — positioned absolute in the header space */
    .shop-sidebar::before {
        position: absolute;
        top: 20px;
        left: 20px;
        right: 60px;
        margin: 0;
        padding: 0 0 10px 0;
        font-size: 0.7rem;
        letter-spacing: 0.24em;
        border-bottom: 1px solid #eee;
    }


    .shop-sidebar .filter-group {
        margin-bottom: 16px;
        padding-bottom: 16px;
    }

    .shop-sidebar .filter-title {
        font-size: 0.62rem;
        margin-bottom: 10px;
    }

    .shop-sidebar .filter-list a {
        padding: 6px 0 6px 12px;
        font-size: 0.82rem;
    }

    .shop-sidebar .size-chip {
        min-width: 36px;
        height: 32px;
        font-size: 0.7rem;
    }

    /* Body when sidebar open — prevent scroll */
    body.wstx-shop-drawer-open {
        overflow: hidden;
    }
}
