/*
 * Homepage product finder section.
 *
 * Used by mod_custom layout:
 * template/fusioncommerce/html/mod_custom/product-finder.php
 */

.plx-home-product-finder {
    padding-block: clamp(2.5rem, 4.5vw, 4.25rem);
    background: var(--color-surface);
}

.plx-home-product-finder__inner {
    width: min(100%, 1120px);
    margin-inline: auto;
}

.plx-home-product-finder__header {
    max-width: 48rem;
    margin: 0 auto clamp(1.75rem, 3vw, 2.5rem);
    text-align: center;
}

.plx-home-product-finder__title {
    margin: 0;
    color: var(--color-text-strong);
    font-size: clamp(1.8rem, 3vw, 2.55rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.035em;
    text-wrap: balance;
}

.plx-home-product-finder__intro {
    max-width: 38rem;
    margin: 0.8rem auto 0;
    color: var(--color-text-muted);
    font-size: clamp(1rem, 1.2vw, 1.08rem);
    line-height: 1.65;
}

.plx-home-product-finder__intro> :last-child {
    margin-bottom: 0;
}

.plx-home-product-finder__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(1.25rem, 2vw, 1.75rem);
    margin: 0;
    padding: 0;
    list-style: none;
}

.plx-home-product-finder__cell {
    min-width: 0;
}

.plx-home-product-finder__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
    min-height: 11rem;
    padding: 1.35rem 1rem 1.2rem;
    border-radius: var(--bs-border-radius-xxl);
    background: transparent;
    color: var(--color-text-strong);
    text-align: center;
    text-decoration: none;
    transition: color 0.18s ease;
}

.plx-home-product-finder__item:hover,
.plx-home-product-finder__item:focus-visible {
    color: var(--color-text-strong);
    text-decoration: none;
}

.plx-home-product-finder__item:focus-visible {
    outline: var(--focus-outline-primary);
    outline-offset: var(--focus-outline-offset);
}

.plx-home-product-finder__icon {
    --plx-product-finder-icon: none;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(6.15rem, 9vw, 8.1rem);
    height: clamp(6.15rem, 9vw, 8.1rem);
    margin-bottom: 1rem;
    border-radius: var(--bs-border-radius-pill);
    background: var(--color-primary-soft);
    transition: background-color 0.18s ease;
}

.plx-home-product-finder__icon::before {
    content: "";
    display: block;
    width: 56%;
    height: 56%;
    background: var(--color-primary);
    mask: var(--plx-product-finder-icon) center / contain no-repeat;
    -webkit-mask: var(--plx-product-finder-icon) center / contain no-repeat;
    transition: background-color 0.18s ease;
}

.plx-home-product-finder__item:hover .plx-home-product-finder__icon,
.plx-home-product-finder__item:focus-visible .plx-home-product-finder__icon {
    background: var(--color-accent);
}

.plx-home-product-finder__item:hover .plx-home-product-finder__icon::before,
.plx-home-product-finder__item:focus-visible .plx-home-product-finder__icon::before {
    background: var(--color-white);
}

.plx-home-product-finder__label {
    display: block;
    max-width: 11rem;
    color: currentColor;
    font-size: clamp(0.98rem, 1.2vw, 1.12rem);
    font-weight: 700;
    line-height: 1.25;
    text-wrap: balance;
}

.plx-home-product-finder__icon--cold-season {
    --plx-product-finder-icon: url("../icons/cold-season.svg");
}

.plx-home-product-finder__icon--immunity {
    --plx-product-finder-icon: url("../icons/immunity.svg");
}

.plx-home-product-finder__icon--digestion {
    --plx-product-finder-icon: url("../icons/digestion.svg");
}

.plx-home-product-finder__icon--energy {
    --plx-product-finder-icon: url("../icons/energy.svg");
}

.plx-home-product-finder__icon--sleep {
    --plx-product-finder-icon: url("../icons/sleep.svg");
}

.plx-home-product-finder__icon--joints {
    --plx-product-finder-icon: url("../icons/joints.svg");
}

.plx-home-product-finder__icon--hormonal-balance {
    --plx-product-finder-icon: url("../icons/hormonal-balance.svg");
}

.plx-home-product-finder__icon--detox {
    --plx-product-finder-icon: url("../icons/detox.svg");
}

@media (max-width: 991.98px) {
    .plx-home-product-finder__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 1rem;
    }

    .plx-home-product-finder__item {
        min-height: 9.75rem;
        padding: 1rem 0.75rem;
    }

    .plx-home-product-finder__label {
        font-size: 0.95rem;
    }
}

@media (max-width: 767.98px) {
    .plx-home-product-finder__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem 0.75rem;
    }

    .plx-home-product-finder__item {
        min-height: 8rem;
    }

    .plx-home-product-finder__icon {
        width: 5.85rem;
        height: 5.85rem;
        margin-bottom: 0.8rem;
    }
}

@media (max-width: 359.98px) {
    .plx-home-product-finder__grid {
        grid-template-columns: 1fr;
    }
}