/* ==========================================================================
   MYMALLBEAUTY - SHOP FILTERS
   Price range slider, filter layout, mobile panel styles.
   ========================================================================== */

/* ── Checkbox accent ── */
.mmb-brand-filter,
.mmb-onsale-filter {
    accent-color: #23bac5;
}

/* ── Price Range Inputs ── */
.mmb-price-input {
    width: 100%;
    text-align: center;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 13px;
    color: #374151;
    outline: none;
    transition: border-color 0.2s;
    -moz-appearance: textfield;
}

.mmb-price-input::-webkit-outer-spin-button,
.mmb-price-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.mmb-price-input:focus {
    border-color: #23bac5;
    box-shadow: 0 0 0 3px rgba(35, 186, 197, 0.08);
}

/* ── Dual Range Slider Track ── */
.mmb-range-track {
    position: relative;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    margin-top: 4px;
}

.mmb-range-fill {
    position: absolute;
    height: 100%;
    background: #23bac5;
    border-radius: 3px;
    top: 0;
    left: 0;
    right: 0;
    pointer-events: none;
}

.mmb-range-input {
    position: absolute;
    width: 100%;
    top: -6px;
    height: 18px;
    pointer-events: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: transparent;
    margin: 0;
    padding: 0;
}

/* Webkit thumb */
.mmb-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    pointer-events: all;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #23bac5;
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.mmb-range-input::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(35, 186, 197, 0.3);
}

.mmb-range-input::-webkit-slider-thumb:active {
    transform: scale(1.25);
}

/* Firefox thumb */
.mmb-range-input::-moz-range-thumb {
    pointer-events: all;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #23bac5;
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

/* Firefox track */
.mmb-range-input::-moz-range-track {
    background: transparent;
    border: none;
}

/* ── Top Filter Layout — Collapsible Wrapper ── */
.mmb-filters-top-wrapper {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.25s ease, margin 0.35s ease;
    margin-bottom: 0;
}

.mmb-filters-top-wrapper.is-open {
    max-height: 600px;
    opacity: 1;
    margin-bottom: 20px;
}

/* Chevron rotation when open */
.mmb-top-filter-toggle-active #mmb-top-filter-chevron,
#mmb-top-filter-toggle.is-active .lucide-chevron-down {
    transform: rotate(180deg);
}

.mmb-filters-top {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
    padding: 16px 20px;
    border: 1px solid #f3f4f6;
    border-radius: 16px;
    background: #fafafa;
}

.mmb-filters-top .mmb-filter-group {
    min-width: 160px;
    flex: 1;
    max-width: 280px;
}

.mmb-filters-top .mmb-filter-group h3 {
    font-size: 11px;
    margin-bottom: 8px;
}

/* Top layout: brands in a compact grid */
.mmb-filters-top .mmb-filter-group ul {
    max-height: 180px;
    overflow-y: auto;
}

/* ── Mobile Filter Panel ── */
#mmb-filter-overlay {
    backdrop-filter: blur(2px);
}

#mmb-filter-panel {
    scrollbar-width: thin;
    scrollbar-color: #23bac5 transparent;
}

#mmb-filter-panel::-webkit-scrollbar {
    width: 4px;
}

#mmb-filter-panel::-webkit-scrollbar-track {
    background: transparent;
}

#mmb-filter-panel::-webkit-scrollbar-thumb {
    background: #23bac5;
    border-radius: 2px;
}

/* ── WC orderby select styling ── */
.woocommerce-ordering select.orderby {
    padding: 8px 32px 8px 12px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    font-size: 13px;
    color: #374151;
    outline: none;
    transition: border-color 0.2s;
    background-color: white;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.woocommerce-ordering select.orderby:focus {
    border-color: #23bac5;
}

/* ── Responsive ── */
@media (max-width: 1023px) {
    /* Hide top collapsible filters on mobile — use offcanvas panel instead */
    .mmb-filters-top-wrapper {
        display: none !important;
    }

    .mmb-filters-top {
        flex-direction: column;
        gap: 12px;
    }

    .mmb-filters-top .mmb-filter-group {
        max-width: 100%;
        min-width: 100%;
    }
}
