/**
 * Products Page - Range Slider Fix
 * نسخه قوی‌تر برای حذف کامل محورهای اضافی
 */

/* Font */
* {
    font-family: "Vazirmatn", sans-serif;
}

[x-cloak] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #2d5f5d;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1d4442;
}

/* ========================================
   RANGE INPUT - بازنویسی کامل
   ======================================== */

.range-input {
    position: absolute;
    width: 100%;
    height: 6px;
    top: 0;
    left: 0;
    right: 0;
    margin: 0;
    padding: 0;
    background: none !important;
    pointer-events: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    z-index: 10;
    outline: none;
    border: none;
}

/* ========================================
   حذف TRACK برای همه مرورگرها
   ======================================== */

/* Webkit */
.range-input::-webkit-slider-runnable-track {
    width: 100%;
    height: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Firefox */
.range-input::-moz-range-track {
    width: 100%;
    height: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.range-input::-moz-range-progress {
    background: transparent !important;
}

/* Edge/IE */
.range-input::-ms-track {
    width: 100%;
    height: 0 !important;
    background: transparent !important;
    border-color: transparent !important;
    color: transparent !important;
}

.range-input::-ms-fill-lower,
.range-input::-ms-fill-upper {
    background: transparent !important;
}

/* ========================================
   THUMBS - دایره‌ها
   ======================================== */

/* Chrome, Safari, Edge, Opera */
.range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    
    /* Position & Size */
    width: 20px;
    height: 20px;
    margin-top: -7px; /* نصف (ارتفاع دایره - ارتفاع track) */
    
    /* Style */
    border-radius: 50%;
    background: linear-gradient(135deg, #2d5f5d 0%, #3d7f7d 100%);
    border: 3px solid #ffffff;
    box-shadow: 0 2px 8px rgba(45, 95, 93, 0.4),
                0 0 0 1px rgba(45, 95, 93, 0.1);
    
    /* Interaction */
    pointer-events: auto;
    cursor: grab;
    
    /* Animation */
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Layer */
    position: relative;
    z-index: 100;
}

.range-input::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(45, 95, 93, 0.5),
                0 0 0 2px rgba(45, 95, 93, 0.15);
}

.range-input::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.25);
    box-shadow: 0 6px 16px rgba(45, 95, 93, 0.6),
                0 0 0 3px rgba(45, 95, 93, 0.2);
}

/* Firefox */
.range-input::-moz-range-thumb {
    /* Size */
    width: 20px;
    height: 20px;
    
    /* Style */
    border-radius: 50%;
    background: linear-gradient(135deg, #2d5f5d 0%, #3d7f7d 100%);
    border: 3px solid #ffffff;
    box-shadow: 0 2px 8px rgba(45, 95, 93, 0.4),
                0 0 0 1px rgba(45, 95, 93, 0.1);
    
    /* Interaction */
    pointer-events: auto;
    cursor: grab;
    
    /* Animation */
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Layer */
    position: relative;
    z-index: 100;
}

.range-input::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(45, 95, 93, 0.5);
}

.range-input::-moz-range-thumb:active {
    cursor: grabbing;
}

/* Edge/IE */
.range-input::-ms-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2d5f5d 0%, #3d7f7d 100%);
    border: 3px solid #ffffff;
    box-shadow: 0 2px 8px rgba(45, 95, 93, 0.4);
    cursor: grab;
    z-index: 100;
}

/* ========================================
   FOCUS
   ======================================== */

.range-input:focus {
    outline: none !important;
    box-shadow: none !important;
}

.range-input:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 4px rgba(45, 95, 93, 0.2),
                0 4px 12px rgba(45, 95, 93, 0.5);
}

.range-input:focus::-moz-range-thumb {
    box-shadow: 0 0 0 4px rgba(45, 95, 93, 0.2),
                0 4px 12px rgba(45, 95, 93, 0.5);
}

/* ========================================
   MOBILE
   ======================================== */

@media (max-width: 640px) {
    .range-input::-webkit-slider-thumb {
        width: 24px;
        height: 24px;
        margin-top: -9px;
        border-width: 4px;
    }
    
    .range-input::-moz-range-thumb {
        width: 24px;
        height: 24px;
        border-width: 4px;
    }
    
    .range-input::-ms-thumb {
        width: 24px;
        height: 24px;
        border-width: 4px;
    }
}

/* ========================================
   UTILITIES
   ======================================== */

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Performance */
.range-input::-webkit-slider-thumb,
.range-input::-moz-range-thumb {
    will-change: transform;
    backface-visibility: hidden;
}
