/* pri-apf.css */

/* Ensure the loop container is positioned for absolute overlay */
#pri-product-loop {
    position: relative;
    padding: 0 15px;
    background-color: var(--white);
    border: 0;
}

/* Hidden by default */
.pri-loader-overlay {
    display: none;
    f position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* When .loading is applied to the grid, show the overlay */
#pri-product-loop.loading .pri-loader-overlay {
    display: flex;
}

/* Disabled filter chip appearance */
.pri-filter-chip.is-disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: default;
}

.pri-filter-chip.is-selected {
    background-color: var(--mid-blue-1);
    color: var(--white);
}

.pri-filter-chip.is-disabled input {
    display: none;
}

/* Custom Product Loop */
#product-loop-wrapper {
    display: flex;
    flex-flow: column nowrap;
    row-gap: 1em;
}

.product-results-count {
    color: var(--light-gray);
}

.selected-filters-wrapper {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
}

.filter-active {
    display: flex;
    flex-flow: row nowrap;
    padding: 0.5em;
    border: 1px solid var(--dark-pri-blue);
    background-color: var(--mid-blue-2);
    color: var(--dark-pri-blue);
}

.filter-remove {
    color: var(--pink);
}

.filter-remove:hover {
    color: var(--light-gray);
}

[data-grid-element="pri-product-archive-loop"] {
    grid-template-columns: repeat(auto-fill, minmax(30%, 1fr));
    row-gap: 2.5em;
    column-gap: 1.5em;
}

.pri-loop-product {
    display: flex;
    flex-flow: column nowrap;
    align-items: center;
    row-gap: 0.8em;
    border: 1px solid var(--lighter-gray);
    padding: 10px 10px 15px 10px;
    box-shadow: var(--box-shadow-default);
    min-height: 450px;
}

.pri-product-title {
    color: var(--gray);
    font-weight: 700;
    padding-top: 10px;
    text-align: center;
}

.loop-sku {
    width: 100%;
}

.loop-sku .icon {
    font-size: 1.2em;
    color: var(--mid-blue-1);
}

.view-product-link {
    color: var(--dark-pri-blue) !important;
}

.view-product-link:hover {
    color: var(--mid-blue-1) !important;
    cursor: pointer;
}

/* New Price Block */
.pri-apf.pri-price-block {
    display: flex;
    flex-flow: row nowrap;
    column-gap: 4em;
    justify-content: center;
    font-size: 0.9em;
}

.pri-apf.pri-price-block .price-row {
    display: flex;
    flex-flow: column nowrap;
    align-items: center;
    text-align: center;
}

.price-row.regular-price .price,
.price-row.sale-price .price {
    position: relative;
    display: inline-block;
    padding: 0.25em 0.5em;
    z-index: 1;
    margin: 0.5em 0;
}

.price-row.sale-price .price {
    font-weight: 700;
}

.price-row.regular-price .price {
    color: #58595b;
}

.price-row.regular-price .price::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 110%;
    height: 110%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10,50 C80,55 40,30 260,10' stroke='%23ba377d' stroke-width='15' fill='none' stroke-linecap='round' stroke-linejoin='round' opacity='0.7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
    transform: rotate(-5deg);
    pointer-events: none;
    z-index: 2;
}

.price-row.sale-price .price {
    color: #00506c;
}

.price-row.sale-price .price::before {
    content: "";
    position: absolute;
    top: -0.9em;
    bottom: -0.75em;
    left: -1.6em;
    right: -1.5em;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 190 75' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M29,40 C15,0 180,10 165,55 C170,75 20,65 30,40 C25,35 25,55 40,55 L72,55' stroke='%2300506c' stroke-width='6' fill='none' stroke-linecap='round' stroke-linejoin='round' opacity='0.8'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 120% 100%;
    transform: rotate(-8deg);
    pointer-events: none;
    z-index: -1;
}

.price-row .label {
    color: var(--dark-pri-blue);
    font-weight: 700;
}

.pri-apf-loop-button {
    margin-top: auto;
}

.button-note {
    font-size: 0.85em;
    text-align: center;
    font-style: italic;
    padding: 0.2em 0;
}

/* Filters */
.pri-filter-group {
    padding: 10px;
}

.filter-group-label {
    font-size: 0.9em;
}

.pri-filter-chip {
    font-size: 0.75em;
    border: 1px solid var(--mid-blue-1);
    color: var(--mid-blue-1);
    border-radius: 5px;
    padding: 0.1em 0.3em;
    background-color: var(--white);
}

.pri-filter-chip:hover {
    background-color: var(--mid-blue-1);
    color: var(--white);
    cursor: pointer;
}

/* Filter group header with toggle icon */
#pri-apf-filters {
    padding: 10px;
    display: flex;
    flex-flow: column nowrap;
    row-gap: 1em;
}

.filter-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 0.5em 0;
    border-bottom: 2px solid var(--dark-pri-blue);
    font-weight: 700;
    color: var(--dark-pri-blue);
}

.pri-apf-toggle-icon {
    color: var(--dark-pri-blue);
    font-size: 1.2em;
}

.pri-apf-toggle-icon:hover {
    color: var(--mid-blue-2);
    cursor: pointer;
}

/* Term chips container: collapsible */
.pri-filter-terms {
    display: flex;
    flex-flow: row wrap;
    gap: 0.4em;
    padding: 0.5em;
    transition: max-height 0.3s ease;
    gap: 0.4em;
    max-height: 200px;
    overflow-y: auto;
    background-color: var(--white);
}

.pri-filter-terms.collapsed {
    max-height: 0;
    padding: 0;
}

/* AJAX Running Overlays */
/* Overlay container */
#pri-apf-filters,
#pri-product-loop {
    position: relative;
}

/* Frosted-glass overlay */
.pri-loader-overlay {
    display: none;
    position: absolute;
    inset: 0;
    /* shorthand for top/right/bottom/left = 0 */
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(4px);
    /* frosted glass */
    overflow: hidden;
    z-index: 999;
}

/* Show it when loading */
#pri-apf-filters.loading .pri-loader-overlay,
#pri-product-loop.loading .pri-loader-overlay {
    display: block;
}

/* “Shine” pseudo-element */
.pri-loader-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 150%;
    height: 100%;
    background: linear-gradient(120deg,
            rgba(255, 255, 255, 0) 30%,
            rgba(255, 255, 255, 0.6) 50%,
            rgba(255, 255, 255, 0) 70%);
    animation: shine 1.5s ease-in-out infinite;
}

/* Keyframes for the sliding highlight */
@keyframes shine {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(100%);
    }
}