/* Filter Modal Overlay */
.filter-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 9999;
    overflow-y: auto;
    backdrop-filter: blur(4px);
}

body {
    position: relative;
    left: 0;
    transition: left .5s cubic-bezier(.25, .46, .45, .94);
}

.filter-modal-overlay.active {
    display: block;
}

.filter-modal {
    position: fixed;
    width: var(--sidebar-width-filter);
    height: 100vh;
    top: 0;
    left: 0;
    background: #fff;
    z-index: 99999;
    overflow: hidden;
    transition: transform .5s cubic-bezier(.25, .46, .45, .94);
    transform: translateX(-100%);
}

.filter-modal.active {
    transform: translateX(0);
    left: 0;
}

/* Modal Content */
.filter-modal-content {
    position: relative;
    background: #fff;
    width: 100%;
    padding: 50px 25px;
}

/* Body context when modal is open */
body.modal-open {
    overflow: hidden;
}

.filter-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    padding-bottom: 20px;
}

.filter-accordion {
    padding: 20px 0;
    border-top: 1px solid #ddd;
}

.filter-content {
    margin-top: 15px;
}

.close-filter {
    border: none;
    cursor: pointer;
    padding: 0;
    box-shadow: none;
    font-size: 16px !important;
    position: absolute;
    right: 20px;
    top: 35px;
    color: #fff;
}

.close-filter svg {
    width: 20px;
    height: 20px;
}

.close-filter:hover {
    transform: scale(1.07);
}

.filter-summary {
    list-style: none;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-summary::-webkit-details-marker {
    display: none;
}

.filter-summary span,
.filter-modal-header h3 {
    font-size: 20px;
    line-height: 1;
    font-family: var(--headingFont);
    font-weight: 600;
}

.filter-summary span.icon::after {
    content: '\2b';
    font-family: 'FontAwesome';
    font-size: 16px;
    padding-right: 10px;
}

.filter-accordion[open] .filter-summary .icon::after {
    content: '\f068';
}

/* Category Links */
.category-link {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.category-link:hover {
    color: #d40026;
}

.category-link .count {
    color: #000;
}

.filter-content .price-slider-track {
    background-color: var(--primaryClr);
    width: 100%;
    height: 2px;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    z-index: 1;
}

.price-slider-fill {
    background-color: #000;
    height: 2px;
    width: auto;
    top: 50%;
    position: absolute;
    transform: translateY(-50%);
}


/* Filter Checkboxes */
.filter-checkbox-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    margin: 0 0 15px;
}
.filter-checkbox-item:last-child {
    margin: 0;
}

.filter-checkbox-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    color: #000;
}

.filter-checkbox-item input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;

    appearance: none;
    -webkit-appearance: none;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

/* Checked background */
.filter-checkbox-item input[type="checkbox"]:checked {
    background: var(--primaryClr);
    border-color: var(--primaryClr);
}

/* Check icon */
.filter-checkbox-item input[type="checkbox"]:checked::after {
    content: "✓";
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

.filter-checkbox-item .count {
    color: #000;
    font-size: 0.9rem;
    margin-left: auto;
    padding-left: 10px;
    padding-right: 10px;
}

/* Footer */
.filter-modal-footer {
    display: flex;
    gap: 1rem;
    margin-top: 20px;
}

.apply-button, .reset-button {
    background: #000;
    color: #fff;
    border: none;
    padding: 12px 25px;
    font-weight: 700;
    cursor: pointer;
    flex-grow: 1;
    transition: background 0.2s;
    font-family: var(--headingFont);
    font-size: 20px;
    line-height: 1.4;
    border-radius: 50px;
}

.apply-button:hover {
    background: var(--primaryClr);
}

.reset-button {
    background: #f5f5f5;
    border: 1px solid #000;
    color: #000;
}

.reset-button:hover {
    background: #000;
    color: #fff;
}

/* Shop Trigger Button */
.filter-trigger-wrapper {
    margin-top: 1rem;
}
.filter-button .icon {
    color: rgba(30, 30, 30, 1);
}
.filter-button:hover .icon {
    color: #fff;
}
.filter-button {
    background: #fff;
    color: #000;
    padding: 10px 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    border: 1px solid rgba(201, 198, 189, 1);
    border-radius: 60px;
    letter-spacing: 0.7px;
    font-size: 20px;
    line-height: 1;
    font-family: var(--headingFont);
    transition: all 0.4s ease;
    width: 100%;
    max-width: 115px;
    height: 45px;
    cursor: pointer;
}

.filter-button:hover {
    background-color: var(--primaryClr);
    border-color: var(--primaryClr);
    color: #fff;
}

/* Scrollbar for body when modal open */
.filter-modal-body {
    max-height: 73vh;
    overflow-y: auto;
}

.filter-modal-body::-webkit-scrollbar {
    width: 5px;
    border-radius: 10px;
}

.filter-modal-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}
.filter-accordion:last-child {
    padding-bottom: 5px;
}
.filter-content .price-inputs {
    display: flex;
    gap: 20px;
}

.filter-content .price-inputs .price-input-group {
    width: 100%;
    border: 1px solid rgba(201, 198, 189, 1);
    border-radius: 8px;
    padding: 11px;
    display: flex;
    align-items: center;
    font-size: 14px;
    line-height: 18px;
    font-weight: 500;
    gap: 5px;
}

.filter-content .price-inputs .price-input-group input {
    background-color: transparent;
    box-shadow: none;
    border: 0;
    width: 100%;
    text-align: right;
    font: inherit;
    color: inherit;
    font-family: var(--bodyFont);
    font-size: 16px;
    line-height: 20px;
}

.filter-content>.filter-checkbox-item {
    justify-content: flex-start;
}

.woocommerce .filter-content .star-rating::before {
    display: none;
}