/* catalog.css - Специфични стилове за каталога (v1.05 - HARD FIX) */

body { 
    background: linear-gradient(135deg, #fff1f2 0%, #f5f3ff 25%, #ecf9ff 50%, #f0fdf4 75%, #fff7ed 100%); 
    background-attachment: fixed; 
}

/* --- ФИЛТРИ И ЧЕКБОКСОВЕ --- */
.filter-checkbox:checked + div, .occasion-checkbox:checked + div, .type-checkbox:checked + div,
.filter-checkbox-mobile:checked + div, .occasion-checkbox-mobile:checked + div, .type-checkbox-mobile:checked + div { 
    background-color: #883446; 
    border-color: #883446; 
}

.filter-checkbox:checked + div svg, .occasion-checkbox:checked + div svg, .type-checkbox:checked + div svg,
.filter-checkbox-mobile:checked + div svg, .occasion-checkbox-mobile:checked + div svg, .type-checkbox-mobile:checked + div svg { 
    display: block; 
}

/* Color Filter Styles */
.color-radio:checked + div, .color-radio-mobile:checked + div {
    transform: scale(1.15); 
    border-color: #883446; 
    box-shadow: 0 0 0 2px white, 0 0 0 3px #883446;
}

/* Product Card Interactions */
.product-card-hover { 
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
}
.product-card-hover:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 20px 40px -10px rgba(136, 52, 70, 0.15); 
}

/* Filter Accordion (Desktop) */
#filterContent { transition: all 0.3s ease; overflow: hidden; }
.filter-closed { max-height: 0; opacity: 0; padding: 0; margin: 0; }
.filter-open { max-height: 2000px; opacity: 1; }

@media (min-width: 1024px) {
    #filterContent { display: block !important; max-height: none !important; opacity: 1 !important; }
    .sidebar-sticky-desktop { position: sticky; top: 100px; }
}

/* Mobile Menu */
#mobileFilterContainer { z-index: 45; }
#mobileFilterContentWrapper {
     position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
     background-color: #fffaf0; z-index: 60; padding: 20px;
     overflow-y: auto; transform: translateY(-100%); transition: transform 0.3s ease-in-out;
}
#mobileFilterContentWrapper.open { transform: translateY(0); }

/* --- ДВОЕН ПЛЪЗГАЧ (THE FIX) --- */

.price-slider-container {
    position: relative;
    width: 100%;
    height: 30px; /* Малко повече височина */
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

/* 1. Сивата линия отдолу (най-нисък слой) */
.slider-track {
    position: absolute;
    width: 100%;
    height: 4px;
    background-color: #e2e8f0;
    border-radius: 2px;
    z-index: 1;
    top: 50%;
    transform: translateY(-50%);
}

/* 2. Червената линия (среден слой) */
.slider-range {
    position: absolute;
    height: 4px;
    background-color: #883446; /* Brand Rose */
    border-radius: 2px;
    z-index: 2;
    top: 50%;
    transform: translateY(-50%);
}

/* 3. Input елементите (най-висок слой, но прозрачни) */
.range-input {
    -webkit-appearance: none; /* Махаме дефолтния вид */
    appearance: none;
    width: 100%;
    position: absolute;
    background: transparent; /* Важно! */
    pointer-events: none;    /* Позволява да кликаме "през" input-а */
    z-index: 3;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    padding: 0;
    height: 0; /* Трикова настройка, за да не заема място, само палчето се вижда */
}

/* Стил на палчето (Thumb) - Chrome/Safari/Edge */
.range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    pointer-events: auto; /* Връщаме кликането само за топчето */
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #883446;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    cursor: pointer;
    margin-top: -9px; /* Центриране спрямо невидимия трак */
    position: relative;
    z-index: 4;
}

/* За да сме сигурни, че пистата на браузъра е скрита */
.range-input::-webkit-slider-runnable-track {
    width: 100%;
    height: 0; /* Скриваме я напълно */
    background: transparent;
    border: none;
}

/* Firefox Thumb */
.range-input::-moz-range-thumb {
    pointer-events: auto;
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 50%;
    background: #883446;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    cursor: pointer;
    z-index: 4;
}

/* Firefox Track */
.range-input::-moz-range-track {
    background: transparent;
    height: 0;
    border: none;
}

/* Input полетата за цифри */
.price-input-field {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    text-align: center;
    color: #475569;
}
.price-input-field:focus { outline: none; border-color: #883446; }