/* Kohler Product Filters - CSS Styles */

.kohler-woocommerce-filters {
    /* font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; */
    color: #1a1a1a;
    margin-bottom: 30px;
    overflow-y: scroll;
    /* height: calc(100vh - 150px); */

    @media (min-width: 769px) {
        height: calc(100vh - 150px);
    }

    @media (min-width: 1400px) {
        height: calc(100vh - 190px);
    }

    @media (min-width: 1900px) {
        height: calc(100vh - 290px);
    }
}

/* Accordion Styling */
.kohler-filter-accordion-item {
    border-bottom: 1px solid #e5e5e5;
    padding: 16px 0;
}

.kohler-filter-accordion-item:first-child {
    /* border-top: 1px solid #e5e5e5; */
}

.kohler-filter-accordion-title {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 4px 0;
    user-select: none;
}

.kohler-filter-accordion-title .toggle-icon {
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    font-weight: normal;
    flex-shrink: 0;
}

.kohler-filter-accordion-item.collapsed .kohler-filter-accordion-title .toggle-icon::before {
    content: "+";
}

.kohler-filter-accordion-item:not(.collapsed) .kohler-filter-accordion-title .toggle-icon::before {
    content: "–";
}

.kohler-filter-accordion-content {
    padding-top: 12px;
    transition: max-height 0.3s ease-out;
}

/* List Items and Custom Checkboxes */
.kohler-filter-list,
.kohler-filter-sublist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.kohler-filter-sublist {
    padding-left: 20px;
    margin-top: 8px;
}

.kohler-filter-list li {
    margin-bottom: 10px;
}

.kohler-filter-list li:last-child {
    margin-bottom: 0;
}

/* Premium Checkbox Styling */
.kohler-checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
    user-select: none;
}

/* Hide default checkbox */
.kohler-filter-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Create a custom checkbox */
.kohler-checkbox-container::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 1.5px solid #b3b3b3;
    background-color: #fff;
    margin-right: 12px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

/* Hover state */
.kohler-checkbox-container:hover::before {
    border-color: #1a1a1a;
}

/* Checked state */
.kohler-checkbox-container:has(input:checked)::before {
    background-color: #000;
    border-color: #000;
}

.kohler-checkbox-container:has(input:checked)::after {
    opacity: 1;
}

.kohler-checkbox-container:has(input:checked) .label-text {
    font-weight: 500;
    color: #000;
}

.kohler-checkbox-container:has(input:checked) .count {
    font-weight: 500;
}

/* Clean count styling */
.kohler-checkbox-container .count {
    color: #888;
    margin-left: 6px;
    font-size: 12px;
}

/* Color Swatches List styling */
.kohler-color-checkbox-container {
    display: flex;
    align-items: center;
}

.kohler-color-swatch-circle {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.1);
    margin-right: 10px;
    flex-shrink: 0;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kohler-color-swatch-circle.has-border {
    border: 1.5px solid #d3d3d3;
}

/* Ring effect for checked colors */
.kohler-checkbox-container:has(input:checked) .kohler-color-swatch-circle {
    box-shadow: 0 0 0 1.5px #fff, 0 0 0 3px #000;
}

.kohler-checkbox-container:hover .kohler-color-swatch-circle {
    transform: scale(1.1);
}

/* Active filters summary bar */
.kohler-active-filters-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f7f7f7;
    padding: 10px 14px;
    margin-bottom: 20px;
    border: 1px solid #eaeaea;
}

.kohler-active-filters-summary .clear-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #666;
}

.kohler-clear-all-filters-btn {
    background: none;
    border: none;
    border-bottom: 1.5px solid #000;
    color: #000;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: opacity 0.2s ease;
}

.kohler-clear-all-filters-btn:hover {
    opacity: 0.6;
}


/* Checkmark tick mark — rendered via ::after on the label container */
.kohler-checkbox-container::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 4px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.1s ease;
}

/* Show tick when the hidden checkbox inside is checked */
.kohler-checkbox-container:has(input:checked)::after {
    opacity: 1;
}

/* Active Category Parent Style */
.kohler-filter-list li.active-parent>.kohler-checkbox-container>.label-text {
    font-weight: bold;
}

/* AJAX Fading Transition */
.kohler-ajax-loading {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

/* Responsive Mobile Layout */
.kohler-filters-mobile-toggle {
    display: none;
    width: 100%;
    padding: 12px 20px;
    background-color: #000;
    color: #fff;
    border: none;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    transition: background-color 0.2s ease;
}

.kohler-filters-mobile-toggle:hover {
    background-color: #222;
}

.kohler-filters-header-mobile {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eaeaea;
}

.kohler-filters-header-mobile h3 {
    margin: 0;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.kohler-filters-close-mobile {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

/* Media Query for Mobile */
@media (max-width: 768px) {
    .kohler-filters-mobile-toggle {
        display: flex;
    }

    .kohler-filters-wrapper {
        position: fixed;
        top: 112px;
        left: 0;
        width: 80%;
        max-width: 360px;
        height: calc(100vh - 112px);
        background-color: #fff;
        z-index: 10000;
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.15);
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        overflow-y: auto;
        display: flex;
        flex-direction: column;
    }

    .kohler-filters-wrapper.open {
        transform: translateX(0);
    }

    .kohler-filters-header-mobile {
        display: flex;
    }

    .kohler-filters-accordion-group {
        padding: 20px;
        flex: 1;
    }

    .kohler-filters-overlay-mobile {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.4);
        z-index: 9999;
    }

    .kohler-filters-overlay-mobile.open {
        display: block;
    }
}

@media (max-width: 480px) {
    .kohler-filters-wrapper {
        top: 66px;
        height: calc(100vh - 66px);
    }
}

.elementor-kit-5 {
    button.kohler-filters-close-mobile {
        padding: 14px 14px;
        font-size: 20px;
        line-height: 12px;
    }
}
/* No checkbox for Categories and Families */
.kohler-checkbox-container:has(input[data-filter="cat"])::before,
.kohler-checkbox-container:has(input[data-filter="cat"])::after,
.kohler-checkbox-container:has(input[data-filter="familia"])::before,
.kohler-checkbox-container:has(input[data-filter="familia"])::after {
    display: none !important;
}

.kohler-checkbox-container:has(input[data-filter="cat"]:checked) .label-text,
.kohler-checkbox-container:has(input[data-filter="familia"]:checked) .label-text {
    font-weight: 700;
}
