/* ==========================================================================
   Dravix Shop Filter – Layout & Sidebar Styles Only
   Product cards are rendered & styled entirely by WooCommerce + your theme.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Wrapper
   -------------------------------------------------------------------------- */
.dravix-shop-wrap {
    display: flex;
    gap: 0;
    width: 100%;
    box-sizing: border-box;
    align-items: flex-start;
}

/* --------------------------------------------------------------------------
   Sidebar
   -------------------------------------------------------------------------- */
.dravix-sidebar {
    width: 220px;
    min-width: 220px;
    background-color: #0d1120;
    padding: 24px 16px;
    border-right: 1px solid #1c2540;
    display: flex;
    flex-direction: column;
    gap: 28px;
    box-sizing: border-box;
    position: sticky;
    top: 20px;
    align-self: flex-start;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

/* Scrollbar for sidebar */
.dravix-sidebar::-webkit-scrollbar { width: 4px; }
.dravix-sidebar::-webkit-scrollbar-track { background: transparent; }
.dravix-sidebar::-webkit-scrollbar-thumb { background: #1c2540; border-radius: 2px; }

.dravix-sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dravix-sidebar-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #8892b0;
    text-transform: uppercase;
    margin-bottom: 2px;
}

/* --------------------------------------------------------------------------
   Category Buttons
   -------------------------------------------------------------------------- */
.dravix-cat-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dravix-cat-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    border: none;
    color: #ccd6f6;
    font-size: 14px;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: background 0.18s, color 0.18s;
    font-family: inherit;
    line-height: 1.3;
}

.dravix-cat-btn:hover:not(.active) {
    background: rgba(0, 200, 255, 0.08);
    color: #ffffff;
}

.dravix-cat-btn.active {
    background-color: #00c8ff;
    color: #0a0e1a;
    font-weight: 600;
}

.dravix-cat-btn.active .dravix-cat-count {
    background: rgba(0, 0, 0, 0.18);
    color: #0a0e1a;
}

.dravix-cat-label { flex: 1; }

.dravix-cat-count {
    font-size: 12px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.08);
    color: #8892b0;
    padding: 1px 7px;
    border-radius: 20px;
    min-width: 22px;
    text-align: center;
    margin-left: 6px;
}

/* --------------------------------------------------------------------------
   Price Slider
   -------------------------------------------------------------------------- */
.dravix-price-display {
    font-size: 22px;
    font-weight: 700;
    color: #00c8ff;
    margin: 2px 0 6px;
}

.dravix-price-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    background: linear-gradient(to right, #00c8ff 100%, #1c2540 100%);
}

.dravix-price-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #00c8ff;
    cursor: pointer;
    border: 2px solid #0a0e1a;
    box-shadow: 0 0 6px rgba(0, 200, 255, 0.45);
    transition: transform 0.15s;
}

.dravix-price-slider::-webkit-slider-thumb:hover { transform: scale(1.15); }
.dravix-price-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #00c8ff;
    cursor: pointer;
    border: 2px solid #0a0e1a;
}

/* --------------------------------------------------------------------------
   Sort Dropdown
   -------------------------------------------------------------------------- */
.dravix-sort-select {
    background: #131c34;
    color: #ccd6f6;
    border: 1px solid #1c2540;
    border-radius: 6px;
    padding: 8px 28px 8px 10px;
    font-size: 13px;
    width: 100%;
    cursor: pointer;
    font-family: inherit;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238892b0' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    transition: border-color 0.18s;
}

.dravix-sort-select:focus { border-color: #00c8ff; }

/* --------------------------------------------------------------------------
   Main Area
   -------------------------------------------------------------------------- */
.dravix-main {
    flex: 1;
    min-width: 0;
    padding: 20px 24px;
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Top Bar
   -------------------------------------------------------------------------- */
.dravix-topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.dravix-search-wrap {
    position: relative;
    flex: 1;
}

.dravix-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #8892b0;
    pointer-events: none;
    flex-shrink: 0;
}

.dravix-search-wrap input[type="text"] {
    width: 100%;
    height: 44px;
    background: #0d1120;
    border: 1px solid #1c2540;
    border-radius: 8px;
    padding: 0 16px 0 44px;
    color: #ffffff;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.18s;
}

.dravix-search-wrap input[type="text"]::placeholder { color: #4a5568; }
.dravix-search-wrap input[type="text"]:focus { border-color: #00c8ff; }

.dravix-results-count {
    font-size: 13px;
    color: #8892b0;
    white-space: nowrap;
    font-weight: 500;
    flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   WooCommerce loop container — no interference
   -------------------------------------------------------------------------- */
.dravix-wc-loop-wrap {
    width: 100%;
}

/* Loading state overlay */
.dravix-wc-loop-wrap.is-loading {
    opacity: 0.45;
    pointer-events: none;
    transition: opacity 0.2s;
}

/* "No results" text */
.dravix-wc-loop-wrap .dravix-no-results {
    padding: 60px 20px;
    text-align: center;
    color: #8892b0;
    font-size: 16px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .dravix-shop-wrap {
        flex-direction: column;
    }

    .dravix-sidebar {
        width: 100% !important;
        min-width: unset;
        position: static;
        max-height: none;
        border-right: none;
        border-bottom: 1px solid #1c2540;
        padding: 16px;
        gap: 16px;
    }

    .dravix-cat-list {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .dravix-cat-btn {
        width: auto;
        flex: none;
    }

    .dravix-main { padding: 16px; }

    .dravix-topbar {
        flex-wrap: wrap;
        gap: 8px;
    }
}
