.product-list__grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: var(--wp--preset--spacing--spacing-xbig);
    max-width: 460px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 630px) {
    .product-list__grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: calc((460px * 2) + var(--wp--preset--spacing--spacing-xbig));
    }

    .product-list__grid[data-count='1'] {
        grid-template-columns: repeat(1, 1fr);
        max-width: 460px;
    }
}

.acf-block-preview.aligncenter .product-list__grid,
.product-list.aligncenter .product-list__grid {
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
}

.acf-block-preview.alignright .product-list__grid,
.product-list.alignright .product-list__grid {
    justify-content: right;
    margin-left: auto;
    margin-right: 0;
}

.product-card {
    box-sizing: border-box;
    width: 100%;
    padding: var(--wp--preset--spacing--spacing-md);
    border: 1px solid var(--wp--preset--color--border-default);
    border-radius: var(--wp--preset--spacing--spacing-xbig);
    display: flex;
    flex-flow: column;
    gap: var(--wp--preset--spacing--spacing-xbig);
    background-color: var(--wp--preset--color--white, #ffffff);
}

.product-card--hide-ctas .product-card__buttons {
    display: none !important;
}

.product-card > section {
    display: flex;
    flex-flow: column;
}

.product-card__header {
    align-items: center;
    position: relative;
    padding-top: var(--wp--preset--spacing--spacing-xsm);
}

.product-card__campaign-tag {
    position: absolute;
    top: 0;
    left: 0;
    padding: var(--wp--preset--spacing--spacing-xxsm) var(--wp--preset--spacing--spacing-xsm);
    font-size: var(--wp--preset--font-size--body-s);
    border-radius: var(--wp--preset--spacing--spacing-xsm);
}

.product-card__title,
.product-card h3 {
    font-size: var(--wp--preset--font-size--heading-s);
    font-weight: 500;
}

.product-card h4 {
    font-size: var(--wp--preset--font-size--body-default);
    color: var(--wp--preset--color--brand-primary-navy);
}

.product-card__header > *:first-child {
    margin-top: var(--wp--preset--spacing--spacing-big);
}

.product-card__header > .product-card__icon,
.product-card__header > picture {
    height: 64px;
    width: auto;
    align-self: center;
    margin-bottom: var(--wp--preset--spacing--spacing-md);
    object-fit: contain;
    display: block;
}

.product-card__header > picture img {
    height: 100%;
    width: auto;
    object-fit: contain;
    display: block;
}

.product-card__price {
    gap: 8px;
    color: var(--wp--preset--color--brand-primary-navy);
}

.main-price__value {
    font-size: var(--wp--preset--font-size--heading-l);
    font-weight: 500;
}

.main-price__unit {
    font-size: var(--wp--preset--font-size--body-xl);
}

.main-price__info {
    font-size: var(--wp--preset--font-size--body-default);
    line-height: 20px;
    font-weight: 500;
}

/* Establish the boundary for the full-width tooltip */
div.sub-price {
    position: relative;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

p.sub-price {
    margin-top: 8px;
    margin-bottom: 0;
    font-size: var(--wp--preset--font-size--body-default);
}

.product-card__description {
    font-size: var(--wp--preset--font-size--body-default);
    line-height: 20px;
    font-weight: 400;
    color: var(--wp--preset--color--brand-primary-navy);
}

.product-card__description ul {
    padding-left: var(--wp--preset--spacing--spacing-md);
}

.product-card__description ul:first-child,
.product-card__description ul:last-child {
    margin: 0;
}

.product-card__description ul li:not(:last-child) {
    margin-bottom: var(--wp--preset--spacing--spacing-sm);
}

.product-card__description ul li {
    padding-left: var(--wp--preset--spacing--spacing-xsm);
}

.product-card__description ul li::marker {
    content: '✓';
    font-weight: 500;
}

section.product-card__banner {
    flex-flow: row;
    border-radius: var(--wp--preset--spacing--spacing-xsm);
    padding: var(--wp--preset--spacing--spacing-sm);
    gap: var(--wp--preset--spacing--spacing-sm);
    align-items: center;
}

.product-card__banner > .product-card__banner-icon,
.product-card__banner > picture {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    object-fit: contain;
    display: block;
}

.product-card__banner > picture img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

p.product-card__banner-text {
    margin: 0;
    height: fit-content;
}

.product-card__estimation p {
    font-size: var(--wp--preset--font-size--body-s);
    line-height: 20px;
    color: var(--wp--preset--color--text-secondary);
    margin: 0;
}

.product-card__footer {
    margin-top: auto;
    gap: 24px;
}

.product-card__buttons {
    display: flex;
    flex-flow: row;
    justify-content: space-around;
    white-space: nowrap;
    flex-wrap: wrap;
    gap: var(--wp--preset--spacing--spacing-sm);
}

.product-card__buttons .wp-block-button {
    flex-grow: 1;
    flex-basis: auto;
}

.product-card__buttons .wp-block-button:first-child {
    flex-grow: 999;
}

.product-card__buttons .wp-block-button a,
.product-card__buttons .wp-block-button button {
    width: 100%;
}

.product-card__popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.product-card__popup.is-active {
    display: flex;
}

.product-card__popup-content {
    background-color: var(--wp--preset--color--white, #fff);
    padding: var(--wp--preset--spacing--spacing-xxlg);
    border-radius: var(--wp--preset--spacing--spacing-xsm);
    max-width: 600px;
    width: 60vw;
    max-height: calc((100vh - 32px) * 0.8);
    overflow-y: auto;
    position: relative;
}

.product-card__popup-close {
    position: absolute;
    top: var(--wp--preset--spacing--spacing-big);
    right: var(--wp--preset--spacing--spacing-big);
    width: 40px;
    height: 40px;
    background: none;
    border: 1px solid transparent;
    border-radius: 50%;
    box-sizing: border-box;
    cursor: pointer;
    font-size: var(--wp--preset--font-size--body-l);
    color: var(--wp--preset--color--brand-primary-navy);
    background-color: var(--wp--preset--color--neutral-grey-100);
    padding: 0;
}

.product-card__popup-close:hover {
    background: var(--wp--custom--button--secondary--hover);
    color: var(--wp--custom--button--secondary--text);
}

.product-card__popup-close:focus-visible {
    outline: 2px solid var(--wp--preset--color--brand-primary-navy);
    outline-offset: 2px;
}

.product-card__popup-close:active {
    background: var(--wp--custom--button--primary--active);
    color: var(--wp--custom--button--primary--text);
    border-color: var(--wp--custom--button--primary--active);
}

.product-card__popup-content h3,
.product-card__popup-content h4 {
    font-size: var(--wp--preset--font-size--heading-l);
    margin-bottom: var(--wp--preset--spacing--spacing-md);
}

.product-card__popup-content p {
    margin-bottom: var(--wp--preset--spacing--spacing-sm);
    font-size: var(--wp--preset--font-size--body-l);
    line-height: 1.33;
}

.product-card__popup-content :last-child {
    margin-bottom: 0;
}

.product-card__info-tooltip-wrap {
    position: static;
}

.product-card__info-trigger {
    color: var(--wp--preset--color--brand-primary-violet);
    cursor: pointer;
    background: none;
    padding: 0;
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.product-card__info-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    right: 0;
    border-radius: var(--wp--preset--spacing--spacing-xsm);
    background-color: var(--wp--preset--color--brand-primary-navy);
    color: var(--wp--preset--color--white);
    padding: var(--wp--preset--spacing--spacing-md);
    font-size: var(--wp--preset--font-size--body-s);
    opacity: 0;
    visibility: hidden;
    width: auto;
    max-width: none;
    z-index: 10;
    transition:
        opacity 0.2s ease,
        visibility 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.product-card__info-trigger[aria-expanded='true'] + .product-card__info-tooltip {
    opacity: 1;
    visibility: visible;
}

.product-card__info-tooltip:after {
    display: none;
}

.product-list__filter {
    display: flex;
    flex-direction: column;
    gap: var(--wp--preset--spacing--spacing-sm);
    margin-bottom: var(--wp--preset--spacing--spacing-xbig);
}

.product-list__filter-header {
    display: flex;
    align-items: center;
    width: 100%;
}

.product-list__filter-label--desktop {
    display: none;
    font-weight: 500;
    color: var(--wp--preset--color--brand-primary-navy);
    font-size: var(--wp--preset--font-size--body-xl);
}

.product-list__filter-label {
    font-weight: 500;
    color: var(--wp--preset--color--brand-primary-navy);
    font-size: var(--wp--preset--font-size--body-l);
}

.product-list__filter-toggle {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    text-align: left;
    gap: var(--wp--preset--spacing--spacing-sm);
}

.toggle-icon {
    display: inline-block;
    transition: transform 0.2s;
    color: var(--wp--preset--color--brand-primary-navy);
}

.product-list__filter-toggle[aria-expanded='false'] .toggle-icon {
    transform: rotate(180deg);
}

.product-list__filter-body {
    display: flex;
    flex-direction: column;
    gap: var(--wp--preset--spacing--spacing-md);
}

.product-list__filter-body[hidden] {
    display: none;
}

.product-list__filter-group {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: var(--wp--preset--spacing--spacing-xsm);
}

.product-list__filter-group-label {
    font-weight: 500;
    color: var(--wp--preset--color--brand-primary-navy);
    white-space: nowrap;
}

.product-list__filter-group label {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--wp--preset--spacing--spacing-xsm);
    cursor: pointer;
    color: var(--wp--preset--color--brand-primary-navy);
    line-height: 1;
}

/* Visually hide native checkbox; keep it in the accessibility tree */
.product-list__filter-group input[type='checkbox'] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

/* Default: show unchecked icon, hide checked icon */
.product-list__filter-group .checkbox-icon--on {
    display: none;
}

/* Checked: hide unchecked icon, show checked icon */
.product-list__filter-group input[type='checkbox']:checked ~ .checkbox-icon--off {
    display: none;
}

.product-list__filter-group input[type='checkbox']:checked ~ .checkbox-icon--on {
    display: inline-flex;
}

.product-list__filter .svg-inline--fa {
    height: 20px;
}

/* Focus ring on the currently visible icon */
.product-list__filter-group input[type='checkbox']:focus-visible + .checkbox-icon--off {
    outline: 1px solid var(--wp--preset--color--brand-primary-navy);
    outline-offset: 2px;
    border-radius: 2px;
}

.product-list__filter-group input[type='checkbox']:checked:focus-visible ~ .checkbox-icon--on {
    outline: 1px solid var(--wp--preset--color--brand-primary-navy);
    outline-offset: 2px;
    border-radius: 2px;
}

.product-card[hidden] {
    display: none !important;
}

@media (min-width: 960px) {
    .product-list__grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: calc((460px * 3) + (var(--wp--preset--spacing--spacing-xbig) * 2));
    }

    .product-list__grid[data-count='1'] {
        grid-template-columns: repeat(1, 1fr);
        max-width: 460px;
    }

    .product-list__grid[data-count='2'] {
        grid-template-columns: repeat(2, 1fr);
        max-width: calc((460px * 2) + var(--wp--preset--spacing--spacing-xbig));
    }

    .product-list__filter {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: var(--wp--preset--spacing--spacing-lg);
    }

    .product-list__filter-header {
        width: auto;
    }

    .product-list__filter-toggle {
        display: none;
    }

    .product-list__filter-label--desktop {
        display: block;
    }

    .product-list__filter-group {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }

    .product-list__filter-body {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: var(--wp--preset--spacing--spacing-xlg);
    }

    .product-list__filter-body[hidden] {
        display: flex !important;
    }
}

/* ==========================================================================
   SINGLE CARD + CONTENT MODE
   ========================================================================== */
.product-list {
    position: relative;
}

.product-list--single-content .product-list__container {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--wp--preset--spacing--spacing-lg);
    reading-flow: grid-order;
}

.product-list--single-content .product-list__media {
    position: relative;
    width: 100%;
}

.product-list--single-content .product-list__media .product-card {
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 960px) {
    .product-list--single-content .product-list__container {
        gap: var(--wp--preset--spacing--spacing-xxlg);
        align-items: center;
    }

    .product-list--single-content.card-on-left .product-list__container {
        grid-template-columns: minmax(auto, 460px) 1fr;
    }

    .product-list--single-content.card-on-right .product-list__container {
        grid-template-columns: 1fr minmax(auto, 460px);
    }

    .product-list--single-content.card-on-left .product-list__media {
        order: 1;
    }

    .product-list--single-content.card-on-left .product-list__content {
        order: 2;
    }

    .product-list--single-content.card-on-right .product-list__media {
        order: 2;
    }

    .product-list--single-content.card-on-right .product-list__content {
        order: 1;
    }
}
