/* ============================================ */
/* ULTRACOMP FILTERS & TOP PRODUCTS — OPTIMIZED */
/* Loads on: CATEGORY PAGES ONLY                */
/* Requires: ultracomp-core.css                 */
/* ============================================ */
/* REMOVED: @import Orbitron (already in core)  */
/* REMOVED: backdrop-filter on mobile           */
/* REMOVED: duplicate @media blocks             */
/* REMOVED: dead .filter-section-count glass    */
/* REMOVED: fadeIn animation on filter-section  */

/* --- Main filters container (transparent) --- */
.box-filters {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin-top: 30px !important;
    margin-bottom: 30px !important;
    box-shadow: none !important;
    position: relative !important;
    overflow: visible !important;
}

.box-filters::before { display: none !important; }
.box-filters:hover { transform: none !important; border-color: transparent !important; box-shadow: none !important; }
.box-filters > * { position: relative; z-index: 1; }
.filters-wrapper { display: block !important; }

/* --- Glass card base (shared) --- */
.filters-unveil-button-wrapper,
.slider-wrapper,
.filter-sections {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px !important;
    padding: 24px !important;
    position: relative !important;
    overflow: hidden !important;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease !important;
}

.filters-unveil-button-wrapper::before,
.slider-wrapper::before,
.filter-sections::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important; left: 0 !important; right: 0 !important;
    height: 3px !important;
    background: linear-gradient(90deg, #892CFF, #A459FF, #FF6B9D) !important;
    z-index: 1 !important;
}

.filters-unveil-button-wrapper > *,
.slider-wrapper > *,
.filter-sections > * {
    position: relative !important;
    z-index: 2 !important;
}

.filters-unveil-button-wrapper:hover,
.slider-wrapper:hover {
    transform: translateY(-2px) !important;
    border-color: rgba(137, 44, 255, 0.3) !important;
    box-shadow: 0 8px 25px rgba(137, 44, 255, 0.2) !important;
}

/* --- Unveil button --- */
.filters-unveil-button-wrapper { margin-bottom: 24px !important; }

.filters-unveil-button-wrapper .unveil-button {
    background: linear-gradient(135deg, rgba(137, 44, 255, 0.2), rgba(137, 44, 255, 0.1)) !important;
    border: 1px solid #892CFF !important;
    color: #fff !important;
    padding: 14px 24px !important;
    border-radius: 12px !important;
    font-size: 1.15rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    justify-content: center !important;
}

.filters-unveil-button-wrapper .unveil-button:hover {
    background: linear-gradient(135deg, rgba(137, 44, 255, 0.3), rgba(137, 44, 255, 0.2)) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(137, 44, 255, 0.3) !important;
}

.filters-unveil-button-wrapper .icon-filter { color: #892CFF !important; font-size: 1.2rem !important; }

/* --- Filter titles (uses OrbitronCZ from core) --- */
.filters h4,
.filter-section h4 {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #fff !important;
    margin: 24px 0 16px 0 !important;
    padding: 0 0 12px 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    font-family: 'OrbitronCZ', monospace !important;
}

.filters h4:first-child,
.filter-section:first-child h4 { margin-top: 0 !important; }

/* --- Price slider --- */
.slider-wrapper { margin-bottom: 24px !important; }

.slider-header {
    display: flex !important;
    justify-content: space-between !important;
    margin-bottom: 16px !important;
    font-size: 1.15rem !important;
    font-weight: 600 !important;
    color: #fff !important;
}

.slider-header .from,
.slider-header .to { color: #892CFF !important; }

.ui-slider {
    background: rgba(255, 255, 255, 0.1) !important;
    border: none !important;
    border-radius: 8px !important;
    height: 8px !important;
    position: relative !important;
}

.ui-slider-range {
    background: linear-gradient(90deg, #892CFF, #A459FF) !important;
    border-radius: 8px !important;
}

.ui-slider-handle {
    background: #fff !important;
    border: 3px solid #892CFF !important;
    border-radius: 50% !important;
    width: 24px !important;
    height: 24px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin-left: -12px !important;
    cursor: pointer !important;
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease !important;
}

.ui-slider-handle:hover,
.ui-slider-handle:focus {
    background: #892CFF !important;
    box-shadow: 0 0 15px rgba(137, 44, 255, 0.5) !important;
    transform: translateY(-50%) scale(1.2) !important;
}

.ui-slider-horizontal .ui-slider-handle { margin-left: -12px !important; }
.ui-slider-horizontal .ui-slider-handle:last-child { margin-left: 0 !important; margin-right: -12px !important; }

/* --- Filter sections container --- */
.filter-sections {
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
}

/* --- Individual filter section --- */
.filter-section {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 0 !important;
    padding: 20px 0 !important;
    margin-bottom: 0 !important;
    position: relative !important;
    overflow: visible !important;
}

.filter-section:last-child { border-bottom: none !important; padding-bottom: 0 !important; }
.filter-section:first-child { padding-top: 0 !important; }
.filter-section > * { position: relative !important; z-index: 2 !important; }

/* --- Checkboxes (native) --- */
.filter-section input[type="checkbox"] {
    margin: 0 !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    vertical-align: middle !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    position: static !important;
    appearance: auto !important;
    -webkit-appearance: auto !important;
}

.filter-section input[type="checkbox"]:hover { opacity: 0.8 !important; }

.filter-section input[type="checkbox"]::before,
.filter-section input[type="checkbox"]::after,
.filter-section .filter-label::before,
.filter-section .filter-label::after,
.filter-section input[type="checkbox"] + label::before,
.filter-section input[type="checkbox"] + label::after {
    display: none !important;
    content: none !important;
}

/* --- Filter labels --- */
.filter-label {
    color: #ccc !important;
    font-size: 1.3rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 8px 0 !important;
    transition: color 0.3s ease !important;
    width: 100% !important;
    flex: 1 !important;
    margin-left: 0 !important;
    position: relative !important;
    z-index: 2 !important;
}

.filter-label:hover { color: #fff !important; }

.filter-section fieldset > div {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 12px !important;
    position: relative !important;
}

.filter-section fieldset > div:last-child { margin-bottom: 0 !important; }

.filter-count {
    background: rgba(137, 44, 255, 0.2) !important;
    color: #892CFF !important;
    padding: 4px 10px !important;
    border-radius: 14px !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    margin-left: auto !important;
    border: 1px solid rgba(137, 44, 255, 0.3) !important;
    flex-shrink: 0 !important;
}

/* --- Filter total count (transparent) --- */
.filter-section-count,
.filter-section.filter-section-count,
.filter-sections .filter-section-count {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 20px 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: none !important;
}

.filter-section-count::before,
.filter-section-count::after,
.filter-total-count::before,
.filter-total-count::after {
    display: none !important;
    content: none !important;
}

.filter-total-count {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    background: transparent !important;
    border: none !important;
    font-size: 1.2rem !important;
    color: #fff !important;
}

.filter-total-count strong { color: #892CFF !important; font-size: 1.5rem !important; font-weight: 700 !important; }

.filter-section fieldset { border: none !important; padding: 0 !important; margin: 0 !important; }
.filter-section form { margin: 0 !important; }

.filter-section[style*="display: none"],
.filter-section-button[style*="display: none"] { display: none !important; }
.filter-section[style*="display: block"],
.filter-section-button[style*="display: block"] { display: block !important; }
.advanced-filters-wrapper { display: block !important; visibility: visible !important; }

/* --- TOP PRODUCTS (sidebar) --- */
.box-topProducts {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin-top: 30px !important;
    margin-bottom: 30px !important;
    box-shadow: none !important;
    position: relative !important;
    overflow: visible !important;
}

.top-products-wrapper {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px !important;
    padding: 24px !important;
    position: relative !important;
    overflow: hidden !important;
}

.top-products-wrapper::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important; left: 0 !important; right: 0 !important;
    height: 3px !important;
    background: linear-gradient(90deg, #892CFF, #A459FF, #FF6B9D) !important;
    z-index: 1 !important;
}

.top-products-wrapper > * { position: relative !important; z-index: 2 !important; }

.top-products-wrapper h4 {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #fff !important;
    margin: 0 0 20px 0 !important;
    padding: 0 0 12px 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    font-family: 'OrbitronCZ', monospace !important;
}

.top-products { list-style: none !important; margin: 0 !important; padding: 0 !important; }

.top-products li {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    padding: 16px 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: background 0.3s ease !important;
}

.top-products li:last-child { border-bottom: none !important; padding-bottom: 0 !important; }
.top-products li:first-child { padding-top: 0 !important; }

.top-products li:hover {
    background: rgba(137, 44, 255, 0.05) !important;
    border-radius: 8px !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
}

.top-products-image {
    display: block !important;
    width: 120px !important;
    height: 120px !important;
    min-width: 120px !important;
    min-height: 120px !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    flex-shrink: 0 !important;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease !important;
    background: rgba(0, 0, 0, 0.2) !important;
}

.top-products-image:hover {
    border-color: #892CFF !important;
    box-shadow: 0 4px 15px rgba(137, 44, 255, 0.3) !important;
    transform: scale(1.05) !important;
}

.top-products-image img { width: 100% !important; height: 100% !important; object-fit: contain !important; display: block !important; }

.top-products-content {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    text-decoration: none !important;
    min-width: 0 !important;
}

.top-products-name {
    color: #fff !important;
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    transition: color 0.3s ease !important;
}

.top-products-content:hover .top-products-name { color: #892CFF !important; }
.top-products-content strong { color: #892CFF !important; font-size: 1.35rem !important; font-weight: 800 !important; }

/* --- SIDEBAR BORDER REMOVAL --- */
.sidebar, .sidebar-left, .sidebar-inner, .sidebar-filters-wrapper,
.sidebar .box, .sidebar-left .box, .box-border, .box-primary, .has-border {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* ============================================ */
/* DESKTOP — glass effects                      */
/* ============================================ */
@media (min-width: 769px) {
    .filters-unveil-button-wrapper,
    .slider-wrapper,
    .filter-sections,
    .top-products-wrapper {
        backdrop-filter: blur(16px) !important;
        -webkit-backdrop-filter: blur(16px) !important;
    }

    .filter-section-button,
    .toggle-filters { display: none !important; }

    #category-filter-hover,
    #category-filter-hover.visible,
    #category-filter-hover.hidden {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        max-height: none !important;
        height: auto !important;
    }
}

/* ============================================ */
/* MOBILE                                        */
/* ============================================ */
@media (max-width: 768px) {
    .box-filters { padding: 0 !important; margin-top: 20px !important; margin-bottom: 20px !important; }

    .filter-section-button {
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 16px !important;
        padding: 20px !important;
        margin-bottom: 16px !important;
        position: relative !important;
        overflow: hidden !important;
    }

    .filter-section-button::before {
        content: '' !important;
        position: absolute !important;
        top: 0 !important; left: 0 !important; right: 0 !important;
        height: 3px !important;
        background: linear-gradient(90deg, #892CFF, #A459FF, #FF6B9D) !important;
        z-index: 1 !important;
    }

    .toggle-filters {
        display: inline-block !important;
        color: #892CFF !important;
        text-decoration: none !important;
        font-size: 1rem !important;
        font-weight: 600 !important;
        padding: 10px 16px !important;
        border-radius: 12px !important;
        background: linear-gradient(135deg, rgba(137, 44, 255, 0.2), rgba(137, 44, 255, 0.1)) !important;
        border: 1px solid #892CFF !important;
        transition: background 0.3s ease !important;
        width: 100% !important;
        text-align: center !important;
        position: relative !important;
        z-index: 2 !important;
    }

    .toggle-filters:hover {
        background: linear-gradient(135deg, rgba(137, 44, 255, 0.3), rgba(137, 44, 255, 0.2)) !important;
    }

    #category-filter-hover.visible,
    #category-filter-hover.hidden {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        max-height: none !important;
    }

    .filters h4, .filter-section h4 { font-size: 1.1rem !important; margin: 20px 0 12px 0 !important; }
    .slider-wrapper { padding: 16px !important; }
    .slider-header { font-size: 0.95rem !important; }
    .filter-section { padding: 12px 0 !important; }
    .filter-label { font-size: 0.95rem !important; }
    .filters-unveil-button-wrapper { padding: 16px !important; margin-bottom: 16px !important; }
    .filters-unveil-button-wrapper .unveil-button { font-size: 1rem !important; padding: 12px 20px !important; }
    .filter-total-count { font-size: 1rem !important; }
    .filter-total-count strong { font-size: 1.15rem !important; }

    .box-topProducts { margin-top: 20px !important; margin-bottom: 20px !important; }
    .top-products-wrapper { padding: 20px !important; }
    .top-products-wrapper h4 { font-size: 1.3rem !important; margin-bottom: 16px !important; }
    .top-products li { gap: 12px !important; padding: 12px 0 !important; }
    .top-products-image { width: 100px !important; height: 100px !important; min-width: 100px !important; min-height: 100px !important; }
    .top-products-name { font-size: 1.1rem !important; }
    .top-products-content strong { font-size: 1.2rem !important; }
}
