/**
 * EpicShreds Product Filters
 * Developed by WHYATT Media
 */

.es-shop-preview .es-shop-sidebar {
    background: #fff;
    border: 1px solid #e4e0dc;
    border-radius: 6px;
    padding: 22px !important;
    box-sizing: border-box;
    align-self: start;
}

/* Main filter heading */

.es-filter-panel-title {
    display: block;
    font-size: 24px;
    font-weight: 900;
    font-style: italic;
    color: #141414;
    padding-bottom: 14px;
    margin-bottom: 6px;
    border-bottom: 4px solid #D4FF00;
    cursor: pointer;
    list-style: none;
}

.es-filter-panel-title::-webkit-details-marker {
    display: none;
}

.es-filter-panel-title::after {
    content: "+";
    float: right;
}

.es-filter-panel[open] > .es-filter-panel-title::after {
    content: "-";
}

/* Filter sections */

.es-filter-section {
    padding: 20px 0;
    border-bottom: 1px solid #e8e5e2;
}

.es-shop-preview .es-filter-section h4 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #8009A6;
    margin: 0 0 14px;
    padding: 0;
}

/* Standard checkboxes */

.es-filter-checkbox {
    display: flex !important;
    align-items: center;
    gap: 9px;
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 500;
    color: #141414;
    cursor: pointer;
}

.es-filter-checkbox:last-child {
    margin-bottom: 0;
}

.es-filter-checkbox input[type="checkbox"] {
    appearance: auto;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px;
    margin: 0 !important;
    accent-color: #8009A6;
    cursor: pointer;
}

/* Categories */

.es-filter-category {
    margin-bottom: 12px;
}

.es-filter-category:last-child {
    margin-bottom: 0;
}

.es-filter-category-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.es-filter-subcategories {
    padding-left: 25px;
    margin-top: 5px;
}

.es-filter-subcategories summary {
    font-size: 11px;
    color: #777;
    cursor: pointer;
    margin-bottom: 8px;
}

.es-filter-subcategories summary:hover {
    color: #8009A6;
}

.es-filter-subcategories .es-filter-checkbox {
    font-size: 12px;
    margin-bottom: 8px;
}

/* Price range */

.es-filter-price {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
}

.es-filter-price label {
    display: block;
    min-width: 0;
    margin: 0;
}

.es-filter-price label span {
    display: block;
    font-size: 11px;
    color: #666;
    margin-bottom: 5px;
}

.es-shop-preview .es-filter-price input {
    width: 100% !important;
    min-width: 0;
    height: 38px;
    padding: 8px !important;
    margin: 0 !important;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: #fff;
    font-size: 13px;
    box-sizing: border-box;
}

.es-filter-price input:focus {
    border-color: #8009A6 !important;
    outline: none;
}

/* Size buttons */

.es-filter-sizes {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
}

.es-filter-size {
    position: relative;
    display: block;
    margin: 0 !important;
    cursor: pointer;
}

.es-filter-size input,
.es-filter-colour input {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0;
    overflow: hidden;
}

.es-filter-size span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 35px;
    padding: 4px 2px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: #fff;
    color: #141414;
    font-size: 11px;
    font-weight: 700;
    transition: all 0.15s ease;
}

.es-filter-size:hover span {
    border-color: #8009A6;
    color: #8009A6;
}

.es-filter-size input:checked + span {
    background: #D4FF00;
    border-color: #141414;
    color: #141414;
}

.es-filter-size input:focus-visible + span {
    outline: 2px solid #8009A6;
    outline-offset: 2px;
}

/* Colour swatches */

.es-filter-colours {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 9px 5px;
}

.es-filter-colour {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    cursor: pointer;
}

.es-filter-swatch {
    position: relative;
    display: block;
    width: 27px;
    height: 27px;
    background: var(--swatch-colour);
    border: 1px solid rgba(0,0,0,0.2);
    border-radius: 50%;
    box-sizing: border-box;
    transition: transform 0.15s ease;
}

.es-filter-colour:hover .es-filter-swatch {
    transform: scale(1.12);
}

.es-filter-colour input:checked + .es-filter-swatch {
    outline: 2px solid #8009A6;
    outline-offset: 3px;
}

.es-filter-colour input:checked + .es-filter-swatch::after {
    content: "✓";
    position: absolute;
    right: -5px;
    bottom: -5px;
    width: 15px;
    height: 15px;
    line-height: 15px;
    text-align: center;
    font-size: 10px;
    font-weight: 900;
    background: #D4FF00;
    color: #141414;
    border-radius: 50%;
}

.es-filter-colour input:focus-visible + .es-filter-swatch {
    outline: 2px solid #8009A6;
    outline-offset: 3px;
}

/* Apply filters button */

.es-shop-preview .es-filter-form .es-filter-apply {
    display: block;
    width: 100%;
    padding: 13px 5px !important;
    margin: 20px 0 12px !important;
    background: #D4FF00 !important;
    color: #141414 !important;
    border: 2px solid #141414 !important;
    border-radius: 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: 900;
    font-style: italic;
    text-transform: uppercase;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.es-shop-preview .es-filter-form .es-filter-apply:hover {
    background: #141414 !important;
    color: #D4FF00 !important;
}

/* Clear filters */

.es-shop-preview .es-filter-clear {
    display: block;
    text-align: center;
    font-size: 12px;
    color: #777;
    text-decoration: underline;
}

.es-shop-preview .es-filter-clear:hover {
    color: #8009A6;
}

/* Tablet */

@media (min-width: 769px) and (max-width: 1100px) {

    .es-shop-preview .es-shop-sidebar {
        padding: 15px !important;
    }

    .es-filter-sizes {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .es-filter-colours {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .es-filter-panel-title {
        font-size: 20px;
    }
}

/* Mobile */

@media (max-width: 768px) {

    .es-shop-preview .es-shop-sidebar {
        padding: 16px !important;
        margin-bottom: 10px;
    }

    .es-filter-panel-title {
        font-size: 20px;
        margin-bottom: 0;
        padding-bottom: 10px;
    }

    .es-filter-sizes {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .es-filter-colours {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .es-filter-swatch {
        width: 32px;
        height: 32px;
    }

    .es-filter-section {
        padding: 16px 0;
    }

    .es-filter-size span {
        min-height: 40px;
    }
}
/* =========================================
   Mesmerize theme compatibility fixes
   ========================================= */

/* Remove inherited clearfix grid elements */

.es-filter-price::before,
.es-filter-price::after,
.es-filter-sizes::before,
.es-filter-sizes::after,
.es-filter-colours::before,
.es-filter-colours::after {
    display: none !important;
    content: none !important;
}

/* Reset inherited label styling */

.es-shop-preview .es-filter-form label {
    float: none !important;
    text-align: left !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Left-align category checkboxes */

.es-shop-preview .es-filter-checkbox {
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    width: 100% !important;
    text-align: left !important;
    gap: 8px;
    margin-bottom: 8px !important;
}

.es-shop-preview .es-filter-category-row {
    justify-content: flex-start !important;
    text-align: left !important;
    width: 100%;
}

.es-shop-preview .es-filter-checkbox span {
    text-align: left !important;
    flex: 1;
}

.es-shop-preview .es-filter-subcategories {
    text-align: left !important;
    padding-left: 24px;
}

/* Correct price field alignment */

.es-shop-preview .es-filter-price {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
}

.es-shop-preview .es-filter-price label {
    display: block !important;
    width: 100% !important;
    min-width: 0;
}

.es-shop-preview .es-filter-price input {
    width: 100% !important;
}

/* Correct size button alignment */

.es-shop-preview .es-filter-size {
    width: 100% !important;
    min-width: 0;
}

.es-shop-preview .es-filter-size span {
    text-align: center !important;
}

/* Correct colour swatch alignment */

.es-shop-preview .es-filter-colour {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
}

/* Improve category spacing */

.es-shop-preview .es-filter-category {
    margin-bottom: 10px;
}

.es-shop-preview .es-filter-subcategories summary {
    margin-bottom: 6px;
    font-size: 12px;
}
/* =========================================
   MOBILE COLLAPSIBLE FILTER PANEL
   ========================================= */

@media (max-width: 767px) {

    .es-shop-preview .es-filter-panel-title {
        position: relative;
        cursor: pointer;
        padding-right: 28px;
        padding-left: 28px;
        list-style: none;
    }

    .es-shop-preview .es-filter-panel-title::-webkit-details-marker {
        display: none;
    }

    .es-shop-preview .es-filter-panel-title::marker {
        content: "";
    }

    .es-shop-preview .es-filter-panel-title::after {
        content: "+";
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        font-size: 26px;
        font-weight: 700;
        line-height: 1;
        color: #8009A6;
    }

    .es-shop-preview .es-filter-panel[open]
    > .es-filter-panel-title::after {
        content: "\2212";
    }
}