/* Cedar Price Filter Styles */
.cedar-price-filter {
    max-width: 100%;
    box-sizing: border-box;
}

.cedar-price-title {
    margin: 0 0 20px;
    font-size: 18px;
    font-weight: 600;
    color: #000;
}

/* Slider Wrapper */
.cedar-slider-wrapper {
    position: relative;
    height: 36px;
    margin-bottom: 24px;
    padding: 0 9px;
}

.cedar-slider-wrapper:focus-visible {
    outline: none !important;
}

/* Slider Track */
.cedar-slider-track {
    position: absolute;
    width: 100%;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    pointer-events: none;
}

/* Slider Range (Active Part) */
.cedar-slider-range {
    position: absolute;
    height: 4px;
    background: #000;
    border-radius: 2px;
    top: 50%;
    transform: translateY(-50%);
    transition: all 0.1s ease;
    pointer-events: none;
}

/* Range Input Sliders - CRITICAL FIXES */
.cedar-slider {
    position: absolute;
    width: calc(100% + 0px) !important;
    height: 40px;
    background: transparent !important;
    pointer-events: none !important;
    -webkit-appearance: none;
    appearance: none;
    top: 0;
    left: 0;
    right: 0;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    outline: none !important;
    z-index: 1;
}

.cedar-slider:focus{
	outline: none !important;
    box-shadow: none !important;
}
/* Ensure proper z-index layering */
.cedar-slider-min {
    z-index: 3;
}

.cedar-slider-max {
    z-index: 4;
}

/* Slider Thumbs - The actual handles you drag */
.cedar-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #000;
    cursor: pointer;
    pointer-events: auto !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: -7px;
    position: relative;
    z-index: 10;
}

.cedar-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #000;
    cursor: pointer;
    pointer-events: auto !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    z-index: 10;
}

/* Max slider thumb stays on top when overlapping */
.cedar-slider-max::-webkit-slider-thumb {
    z-index: 11;
}

.cedar-slider-max::-moz-range-thumb {
    z-index: 11;
}

/* When min slider is interacted with, bring it to front on hover/active */
.cedar-slider-min:hover {
    z-index: 5;
}

.cedar-slider-min:active {
    z-index: 5;
}

/* Input Fields Container */
.cedar-inputs {
    display: flex;
    gap: 16px;
    align-items: center;
}

/* Input Wrapper */
.cedar-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

/* Currency Symbol */
.cedar-currency {
    position: absolute;
    left: 16px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    pointer-events: none;
    z-index: 1;
}

/* Price Input */
.cedar-price-input {
    width: 100%;
    padding: 12px 16px 12px 32px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #f8f8f8;
    font-size: 14px;
    font-weight: 500;
    color: #000;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.cedar-price-input:focus {
    border-color: #000;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.cedar-price-input:hover {
    border-color: #999;
}

/* Remove spinner arrows for number inputs */
.cedar-price-input::-webkit-inner-spin-button,
.cedar-price-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cedar-price-input[type=number] {
    -moz-appearance: textfield;
}

/* Loading State */
.cedar-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
    min-height: 200px;
}

.cedar-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 999;
}

.cedar-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #000;
    border-radius: 50%;
    animation: cedar-spin 1s linear infinite;
    z-index: 1000;
}

@keyframes cedar-spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Product Grid Fix */


/* Ensure product items display properly */

.jupiterx-product-container .jupiterx-wc-loop-product-image img{
	transition: all 0.3s ease;
}
.jupiterx-product-container:hover .jupiterx-wc-loop-product-image img{
	transform: scale(1.3);
}
/* Hide add to cart button ONLY after price filtering */
.products.cedar-filtered .product .button,
.products.cedar-filtered .product .add_to_cart_button,
.products.cedar-filtered .product .product_type_simple,
.products.cedar-filtered .product .product_type_variable,
.products.cedar-filtered .product .ajax_add_to_cart {
    display: none !important;
}

/* No products message */
.woocommerce-no-products-found {
    padding: 40px 20px;
    text-align: center;
    grid-column: 1 / -1;
    list-style: none;
}

.woocommerce-no-products-found .woocommerce-info {
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .cedar-price-filter {
        padding: 20px;
    }
    
    .cedar-inputs {
        flex-direction: column;
        gap: 12px;
    }
    
    .cedar-input-wrapper {
        width: 100%;
    }
    
    /* Responsive product grid */
    .products.columns-4,
    .products.columns-5,
    .products.columns-6 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .products.columns-2,
    .products.columns-3,
    .products.columns-4,
    .products.columns-5,
    .products.columns-6 {
        grid-template-columns: repeat(1, 1fr);
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .products.columns-5,
    .products.columns-6 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* RTL Support */
[dir="rtl"] .cedar-currency {
    left: auto;
    right: 16px;
}

[dir="rtl"] .cedar-price-input {
    padding: 12px 32px 12px 16px;
}