/*All CSS for mobile filters*/

/* Separate Overlay Element */
.filter-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.filter-overlay.overlay-open {
    display: block;
    opacity: 1;
}

/* Filter Popup */
.filter-popup {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 90%;
    height: 100%;
    z-index: 999;
    box-sizing: border-box;
    transform: translateX(-100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
    /* Prevent interaction when closed */
}

.filter-popup.filter-popup-open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
    /* Allow interaction when open */
}

.filter-popup-content {
    background-color: #fff;
    display: flex;
    flex-direction: column;
    padding: 20px;
    border-radius: 0px;
    position: relative;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.mobile-filters-buttons {
    display: none;
}

@media (max-width: 1149px) {
    .mobile-filters-buttons {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: center;
        gap: 10px;
        background-color: transparent;
        z-index: 10;
        margin-left: -20px;
        margin-right: -20px;
        margin-bottom: 0px;
        position: fixed;
        left: calc(50% + 20px);
        transform: translateX(-50%);
        bottom: calc(env(safe-area-inset-bottom, 0px) + 22px);
        z-index: 997;
    }

    .sidebar-main {
        display: none;
    }
    .facet-selections>.facetwp-selections li {
        border-radius: 50rem;
    }

    .facet-selections>.facetwp-selections .facetwp-selection-value {
        background-size: 16px 16px;
        padding-top: 10px;
        padding-bottom: 10px;
        margin-top: -10px;
        margin-bottom: -10px;
    }
}

.filter-button,
.sort-button {
    width: 100%;
    background-color: #6D4157;
    border: 1px solid #6D4157;
    border-radius: 100rem;
    color: #ffffff;
    transition: all 0.3s ease;
    line-height: 130%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-button:hover,
.sort-button:hover {
    background-color: #8B536F;
    border: 1px solid #8B536F;
    color: #fff;
}

.filter-button>svg {
    transition: all 0.3s ease;
    margin-right: 5px;
}
.filter-button:hover>svg {
    fill: #fff;
}

.sort-button>svg {
    margin-right: 5px;
}
.sort-button>svg path {
    transition: all 0.3s ease;
}
.sort-button:hover>svg path {
    stroke: #fff;
}

.filter-content-buttons {
    display: flex;
    gap: 10px;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
    position: sticky;
    top: 0;
    background-color: #ffffff;
    padding: 15px 0;
    margin-top: -15px;
}

.skin-guru-button {
    background-color: #fff;
    border: 1px solid #000000;
    border-radius: 100rem;
    color: #000000;
    transition: all 0.3s ease;
    font-size: 21px;
    font-weight: 600;
    line-height: 130%;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}
.filter-popup-content .skin-guru-button,
.filter-popup-content .close-filter .facetwp-facet button {
    font-size: 14px;
    text-transform: uppercase;
    padding: 10px 7px;
}
.filter-popup-content .facetwp-type-reset {
    padding: 0;
}
.skin-guru-button:hover {
    background-color: #8B536F;
    border: 1px solid #8B536F;
    color: #fff;
}

.close-filter {
    width: 50%;
}

.close-filter .facetwp-facet {
    margin-bottom: 0;
}

.close-filter .facetwp-facet button {
    width: 100%;
    background-color: #fff;
    border: 1px solid #000000;
    border-radius: 100rem;
    color: #000000;
    transition: all 0.3s ease;
    box-shadow: none;
    font-size: 21px;
    line-height: 130%;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    font-size: 21px;
}

.close-filter .facetwp-facet button:hover {
    background-color: #8B536F;
    border: 1px solid #8B536F;
    color: #fff;
    box-shadow: none;
}

.apply-filters {
    background-color: #6D4157;
    color: #fff;
    border: 1px solid #6D4157;
    border-radius: 150rem;
    margin-top: auto;
    bottom: 20px;
    width: auto;
    max-width: 100%;
    left: 20px;
    right: 20px;
    transition: all 0.3s ease;
    font-weight: 600;
    line-height: 130%;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    text-transform: uppercase;
}
.apply-filters:hover {
    background-color: #fff;
    color: #6D4157;
    border: 1px solid #6D4157;
}

.facet-wrap {
    width: 100%;
}

.filter-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    cursor: pointer;
    margin-bottom: 0px;
}

.selected-items {
    background-color: #AD678A;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px !important;
    display: inline;
}

/* Submenu Content */
.submenu-content {
    overflow: scroll;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    padding: 20px;
    padding-top: 20px;
    box-sizing: border-box;
    z-index: 1001;
    transform: translateX(100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    overflow: scroll;
}

.submenu-open {
    transform: translateX(0);
    /* Slide in to appear inside the popup */
    opacity: 1;
    /* Fade in */
}

.close-submenu {
    width: 50%;
}

.selected-label {
    margin-left: 10px;
    color: #0073aa;
    /* You can adjust the color as needed */
    font-size: 14px;
    font-weight: bold;
}

/* Responsive Styles */
@media (max-width: 768px) {
    input.facetwp-slider-reset {
        visibility: hidden;
    }
}

/* Sort Popup Styles */
.sort-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.sort-popup-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    width: 100%;
    max-width: 90%;
    text-align: center;
    box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
}

.close-sort {
    background-color: #6D4157;
    color: #fff;
    border: none;
    align-self: self-end;
    padding: 5px;
    cursor: pointer;
    margin-bottom: 10px;
    display: flex;
}

.facetwp-facet.sorting_filter select {
    display: none;
}

.facetwp-radio {
    display: flex;
    padding: 10px;
    margin-right: 10px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    word-break: keep-all;
    line-height: 1.3;
    background-position: left 6px !important;
}

.facetwp-radio:hover,
.facetwp-radio.checked {
    background-color: #f0f0f0;
}

.filter-option-title>.facet-wrap>.facetwp-facet {
    display: none !important;
}

.filter-option-title {
    width: 100%;
}

.filter-option-title>.facet-wrap>.facet-label {
    font-size: 20px;
    font-weight: 500;
    line-height: 130%;
    width: 100%;
    margin-bottom: 25px;
    position: relative;
}

.filter-option-title>.facet-wrap>.facet-label:after {
    content: url("/wp-content/themes/astra-child-skinguru24/assets/images/filter-arrow.svg");
    position: absolute;
    top: 0;
    right: 0;
}

.filter-options {
    overflow-x: scroll;
    margin-bottom: 16px;
}

.submenu-content>.facet-wrap>.facet-label {
    display: none;
}

@media (max-width: 920px) {
    .facetwp-selections ul {
        margin-left: 0;
        display: flex;
        flex-wrap: wrap;
        gap: 3px;
    }

    .facetwp-selections li {
        display: inline-block;
        background-color: #CF7BA5;
        color: white;
        padding: 7px 10px;
        border-radius: 4px;
        font-size: 12px !important;
        line-height: 130% !important;
    }
    .facetwp-selection-label {
        font-weight: 700;
    }
    .facetwp-selections .facetwp-selection-value {
        padding-right: 20px !important;
    }
}

@media (min-width: 1150px) {
    .facet-selections {
        display: none;
    }
}

/* Prevent body scroll when popup is open */
body.no-scroll {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}


/* SEE MORE BUTTON - start*/

/* SEE MORE BUTTON */

/* Collapsed by default — before JS runs */
/* Undo clamp on container once JS has wrapped the content */
.ast-archive-description.has-truncation,
.ast-archive-description.no-truncation {
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
}
/* Clamp lives on the wrapper now */
.ast-archive-description .truncate-wrapper {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* When expanded by JS */
.ast-archive-description.expanded .truncate-wrapper {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
}

.ast-archive-description.no-truncation::after {
    display: none;
}

.auto-show-more {
    border: none;
    color: var(--ast-global-color-6) !important;
    cursor: pointer;
    font-size: inherit;
    text-decoration: underline;
    padding: 0 0 5px 10px;
    background-color: #fff !important;
    transition: color 0.3s ease;
    display: none; /* hidden until JS confirms truncation is needed */
}

.ast-archive-description.has-truncation .auto-show-more {
    display: inline-block;
}

.auto-show-more:hover {
    color: var(--ast-global-color-8) !important;
    background-color: #fff !important;
}

/* SEE MORE BUTTON - end*/

/*keep filter bar unsticky on mobile for Appearance>Product Catalog>Shop Layout 2*/
.ast-shop-toolbar-container {
    position: static !important;
}

/* Mobile Filter button styling on Shop Pages */
.mobile-filters-buttons .filter-button {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #AD678A;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    line-height: 1;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
    text-align: center;
    text-decoration: none;
    outline: none;
    text-transform: uppercase;
}

.mobile-filters-buttons .filter-button svg {
    margin-right: 8px;
    /* Add space between the SVG and the text */
}

.mobile-filters-buttons .filter-button svg path {
    stroke: #fff;
}

.mobile-filters-buttons .filter-button:hover {
    background-color: var(--ast-global-color-1);
    color: var(--ast-global-color-3);
}

.mobile-filters-buttons .filter-button:hover svg path {
    stroke: var(--ast-global-color-3);
}

/* Hides the description paragraph ONLY on the New Arrivals virtual archive
   and ONLY when the description content is empty. */
.archive-slug-new-arrivals .ast-archive-description {
    display: none;
}
.ast-view-trigger.active {
    color: var(--ast-global-color-6);
}