/* Product Filter Plugin Styles */

.product-filter-container {
    background: #fff;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: sticky;
    top: calc(var(--header-height) + 20px);
}

.product-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-filter-header .fira-sans {
    font-size: 24px;
    line-height: 24px;
}

.product-filter-header .icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    
    svg {
        width: 100%;
        height: auto;
    }
}

.filter-taxonomy-block {
   padding: 24px 0;
   border-top: 1px solid #0E2E50;
}

.filter-taxonomy-title {
    font-weight: bold;
    color: var(--mint-blue);
    font-size: 20px;
    
}

.filter-checkbox-item {
    padding: 6px 0;
    border-bottom: 0.6px solid #828282;
}

.filter-checkbox-item:last-child {
    padding-bottom: 0;
    border: none;
}

.filter-checkbox-item .fira-sans {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 12px;
}

.filter-checkbox-item .checkbox-btn {
    display: block;
    position: relative;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.filter-checkbox-item .checkbox-btn input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}


.filter-checkbox-item .checkbox-btn label {
    display: flex;
    align-items: center;
    line-height: 24px;
    font-size: 18px;
    color: #666;
    transition: .2s linear;
}

.filter-checkbox-item .checkbox-btn label::before {
    border: 1px solid #666;
}

.filter-checkbox-item .checkbox-btn label::before,
.filter-checkbox-item .checkmark {
    height: 12px;
    width: 12px;
    transition: .2s linear;
    transform: rotate(45deg);   
}

.filter-checkbox-item .checkmark {
    position: absolute;
    top: 50%;
    left: 1px;
    transform: translateY(-50%) rotate(45deg) scale(0);
    opacity: 0;
    visibility: hidden;
    background: #38769F;
}
/* Show the checkmark when checked */

.checkbox-btn:has(input[type="checkbox"]:checked) label,
.checkbox-btn:has(input[type="checkbox"]):hover label {
    color: #38769F;
}

.checkbox-btn:has(input[type="checkbox"]:checked) label {
    font-weight: 500;
}

.checkbox-btn:has(input[type="checkbox"]:checked) label::before, .checkbox-btn label:hover::before {
    border-color: #38769F !important;
}

.filter-checkbox-item .checkbox-btn input:checked ~ .checkmark {
  visibility: visible;
  opacity: 1;
  transform: translateY(-50%) rotate(45deg) scale(1);
}

.filter-checkbox-item .input-wrapper {
    display: flex;
    align-items: center;
    gap: 5px;
}

.price-filter-block {
    padding-bottom: 16px;
}

#price-slider {
    width: calc(100% - 24px);
    margin: 16px auto 0 auto;
    height: 1px;
    border: none;
    background: #38769F !important;
}

#price-slider .ui-widget-header {
    height: 3px;
}

#price-slider .ui-widget-header,
#price-slider .ui-state-default, 
#price-slider .ui-widget-content .ui-state-default {
    border: none !important;
    background: #38769F !important;
    top: 50%;
    transform: translateY(-50%);
}


#price-slider .ui-state-default, 
#price-slider .ui-widget-content .ui-state-default {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

#price-display {
    margin-top: 24px;
    display: flex;
    align-items: center;
    font-family: var(--fira-sans-family);
    font-weight: 300;
    font-size: 20px;
    justify-content: space-between;
}


#price-display span {
    padding: 5px 25px;
    background: #f8f8f8;
}

/* Clear All Filters Button Styles */
.filter-clear-section {
    margin-bottom: 15px;
    display: none; /* Hidden by default, shown when filters are active */
}

.clear-filters-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--mint-blue);
    /*border-radius: 6px;*/
    padding: 8px 12px;
    font-size: 14px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    justify-content: center;
}


.clear-filters-btn svg {
    width: 14px;
    height: 14px;
    stroke-width: 2;
    stroke: #fff;
    path {
        stroke: #fff;
    }
}

/* Loading state styles */
.product-filter-form[style*="opacity: 0.7"] {
    pointer-events: none;
}

.product-filter-form[style*="opacity: 0.7"] .clear-filters-btn {
    opacity: 0.6;
    cursor: not-allowed;
}


@media screen and (max-width: 1023px) {
    .product-filter-container {
        /*width: 100%;*/
        gap: 0;
        position: initial;
        padding: 0;
    }
    
    .product-filter-header {
        padding: 32px 24px;
    }
    
    .product-filter-form {
        padding: 0 24px;
        max-height: 0;
        overflow: hidden;
        transition: .5s ease-out;
    }
    
    
    .product-filter-form.expand-filter {
        max-height: 3000px;
        transition: .5s ease-in;
    }
    
   
    .filter-taxonomy-title {
        font-size: 18px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        transition: .3s linear;
    }
    
       
    .filter-taxonomy-title.clicked-filter {
        padding-bottom: 16px;
        transition: .3s linear;
    }
    
    .filter-taxonomy-title::after {
        content: '';
        width: 24px;
        height: 24px;
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M6 7.4L0 1.4L1.4 0L6 4.6L10.6 0L12 1.4L6 7.4Z' fill='%231C1B1F'/%3E%3C/svg%3E");
        mask-repeat: no-repeat;
        mask-position: center;
        background: #1C1B1F;
        transition: .3s linear;
    }
    
       
    .filter-taxonomy-title.clicked-filter::after {
        transform: rotate(-180deg);
        transition: .3s linear;
    }
    
    .filter-checkbox-item,
    #price-slider,
    #price-display {
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        padding: 0;
        border-bottom-width: 0;
        overflow: hidden;
        transition: .3s ease-out;
    }
    .filter-checkbox-item.expand-item {
        padding: 6px 0;
        opacity: 1;
        visibility: visible;
        max-height: 300px;
        transition: .3s ease-in;
        border-bottom-width: 1px;
    }
    
    #price-slider.expand-item,
    #price-display.expand-item {
        opacity: 1;
        visibility: visible;
        max-height: 300px;
        transition: .3s ease-in;
        overflow: visible;
    }
    
    .filter-clear-section  {
        padding: 0 24px;
    }
}