:root {
    --waaf-gold: #c5a880;
    --waaf-gold-hover: #b39368;
    --waaf-dark: #121212;
    --waaf-text: #2c2c2c;
    --waaf-muted: #767676;
    --waaf-border: #e8e8e8;
    --waaf-bg-light: #fbfbfb;
    --waaf-font-family: inherit;
}

/* ==========================================================================
   1. Control Bar (Shop Toolbar)
   ========================================================================== */
.woo-control-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 0 20px 0;
    margin-bottom: 35px;
    border-top: 1px solid var(--waaf-border);
    border-bottom: 1px solid var(--waaf-border);
    background: #ffffff;
    font-family: var(--waaf-font-family);
    box-sizing: border-box;
}

/* Filter Trigger Button */
.woo-filter-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent !important;
    border: none !important;
    padding: 6px 0 !important;
    margin: 0;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #121212;
    line-height: 1;
    transition: color 0.2s ease;
}

.woo-filter-toggle-btn svg {
    width: 18px;
    height: 18px;
    min-width: 18px;
    stroke: currentColor;
    fill: none;
    display: block;
    overflow: visible;
    transition: transform 0.2s ease;
}

.woo-filter-toggle-btn:hover {
    color: #c5a880; /* Subtle gold hover */
}
/* Results Count */
.woo-results-wrapper {
    font-size: 13px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--waaf-muted);
    font-weight: 400;
}

.woo-results-wrapper #woo-dynamic-count {
    font-weight: 700;
    color: var(--waaf-dark);
}

/* Sort Dropdown */
.woo-control-right {
    display: flex;
    align-items: center;
}

.woo-sort-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--waaf-muted);
}

.woo-orderby-select {
    appearance: none;
    -webkit-appearance: none;
    background: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2210%22%20height%3D%226%22%20viewBox%3D%220%200%2010%206%22%20fill%3D%22none%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%3Cpath%20d%3D%22M1%201L5%205L9%201%22%20stroke%3D%22%23121212%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22/%3E%3C/svg%3E") no-repeat right 4px center;
    padding-right: 20px;
    border: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--waaf-dark);
    cursor: pointer;
    outline: none;
}

/* ==========================================================================
   2. Off-Canvas Sidebar & Backdrop
   ========================================================================== */
.woo-filter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(18, 18, 18, 0.45);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s ease;
}

.woo-filter-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.woo-ajax-sidebar {
    position: fixed;
    top: 0;
    left: -420px;
    width: 390px;
    max-width: 90vw;
    height: 100vh;
    background: #ffffff;
    box-shadow: 10px 0 35px rgba(0, 0, 0, 0.08);
    z-index: 99999;
    padding: 0;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.woo-ajax-sidebar.is-open {
    left: 0;
}

/* Drawer Header */
.waaf-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 26px 30px;
    border-bottom: 1px solid var(--waaf-border);
}

.waaf-sidebar-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--waaf-dark);
}

#waaf-sidebar-close {
    background: none;
    border: none;
    font-size: 26px;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    color: var(--waaf-dark);
    transition: color 0.2s ease, transform 0.2s ease;
}

#waaf-sidebar-close:hover {
    color: var(--waaf-gold);
    transform: rotate(90deg);
}

/* Scrollable Form Body */
#woo-ajax-filter-form {
    flex: 1;
    overflow-y: auto;
    padding: 10px 30px 30px 30px;
    display: flex;
    flex-direction: column;
}

/* Custom Scrollbar for Drawer */
#woo-ajax-filter-form::-webkit-scrollbar {
    width: 5px;
}
#woo-ajax-filter-form::-webkit-scrollbar-track {
    background: transparent;
}
#woo-ajax-filter-form::-webkit-scrollbar-thumb {
    background: #e2e2e2;
    border-radius: 4px;
}

/* ==========================================================================
   3. Accordions & List Terms
   ========================================================================== */
.filter-accordion {
    border-bottom: 1px solid var(--waaf-border);
    padding: 18px 0;
}

.filter-accordion:last-of-type {
    border-bottom: none;
}

.filter-accordion-title {
    margin: 0;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--waaf-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: color 0.2s ease;
}

.filter-accordion-title:hover {
    color: var(--waaf-gold);
}

/* Accordion indicator (+ / -) */
.filter-accordion-title::after {
    content: "+";
    font-size: 16px;
    font-weight: 400;
    transition: transform 0.25s ease;
}

.filter-accordion-title.active::after {
    content: "–";
}

.filter-accordion-content {
    display: none;
    padding: 16px 0 6px 0;
}

.filter-term-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.filter-term-list li {
    margin-bottom: 12px;
}

.filter-term-list label {
    display: flex;
    align-items: center;
    font-size: 13.5px;
    color: var(--waaf-text);
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.filter-term-list label:hover {
    color: var(--waaf-dark);
}

/* Custom Checkbox Design */
.filter-term-list input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 17px;
    height: 17px;
    border: 1px solid #d0d0d0;
    border-radius: 2px;
    margin: 0 12px 0 0;
    cursor: pointer;
    display: grid;
    place-content: center;
    transition: all 0.2s ease;
    background-color: #ffffff;
}

.filter-term-list input[type="checkbox"]:hover {
    border-color: var(--waaf-dark);
}

.filter-term-list input[type="checkbox"]:checked {
    background-color: var(--waaf-dark);
    border-color: var(--waaf-dark);
}

.filter-term-list input[type="checkbox"]:checked::before {
    content: "";
    width: 7px;
    height: 4px;
    border-left: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    transform: rotate(-45deg) translate(1px, -1px);
}

.filter-term-list .term-name {
    flex-grow: 1;
}

.filter-term-list .term-count {
    font-size: 12px;
    color: var(--waaf-muted);
    margin-left: 6px;
}

/* ==========================================================================
   4. Sticky Drawer Footer & Actions
   ========================================================================== */
.waaf-sidebar-footer {
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid var(--waaf-border);
}

.waaf-clear-btn {
    width: 100%;
    padding: 15px;
    background-color: var(--waaf-dark);
    color: #ffffff;
    border: 1px solid var(--waaf-dark);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1.8px;
    font-size: 12px;
    cursor: pointer;
    border-radius: 2px;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.waaf-clear-btn:hover {
    background-color: var(--waaf-gold);
    border-color: var(--waaf-gold);
    color: #ffffff;
}

/* ==========================================================================
   5. Mobile Responsiveness
   ========================================================================== */
@media screen and (max-width: 768px) {
    .woo-control-bar {
        flex-wrap: wrap;
        row-gap: 14px;
        padding: 16px 0;
        margin-bottom: 25px;
    }

    .woo-filter-toggle-btn {
        order: 1;
        flex: 0 0 auto;
    }

    .woo-control-right {
        order: 2;
        flex: 0 0 auto;
    }

    .woo-results-wrapper {
        order: 3;
        flex: 0 0 100%;
        width: 100%;
        padding-top: 14px;
        border-top: 1px dashed var(--waaf-border);
        font-size: 12px;
    }

    .woo-ajax-sidebar {
        width: 85vw;
    }
}

/* ==========================================================================
   Active Filter Shortcuts (Pill Badges)
   ========================================================================== */
.waaf-active-filters-container {
    display: none; /* Controlled dynamically via JS */
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: -15px;
    margin-bottom: 25px;
    padding: 6px 0;
}

/* "Filters (X):" label */
.waaf-active-label {
    font-size: 15px;
    font-weight: 800;
    color: #121212;
    margin-right: 4px;
    letter-spacing: -0.2px;
}

/* Individual Pill: e.g. Gold Note*/
.waaf-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #f1f3f4;
    color: #1a1a1a;
    border: none;
    border-radius: 50px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    line-height: 1;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.waaf-filter-pill:hover {
    background-color: #969696;
    transform: translateY(-1px);
}

.waaf-pill-remove {
    font-size: 16px;
    line-height: 1;
    font-weight: 400;
    color: #444;
}

/* "Clear filters" underline button */
.waaf-clear-shortcut-btn {
    background: none;
    border: none;
    padding: 0;
    margin-left: 6px;
    font-size: 15px;
    font-weight: 600;
    color: #121212;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.waaf-clear-shortcut-btn:hover {
    opacity: 0.7;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .waaf-active-filters-container {
        gap: 8px;
        margin-top: -10px;
    }
    
    .waaf-filter-pill {
        padding: 6px 12px;
        font-size: 13px;
    }

    .waaf-active-label,
    .waaf-clear-shortcut-btn {
        font-size: 13.5px;
    }
}