.lmb-bundle {
    --lmb-border: #ddd8d6;
    --lmb-loader-color: #2271b1;
    --lmb-site-accent: var(--e-global-color-primary, var(--wp--preset--color--primary, var(--lmb-loader-color)));
    border: 1px solid var(--lmb-border);
    border-radius: 12px;
    container-type: inline-size;
    margin-block: 2rem;
    padding: clamp(1rem, 3vw, 1.5rem);
}

.lmb-bundle__header h2 {
    font-size: clamp(1.75rem, 6cqi, 2.35rem);
    line-height: 1.15;
    margin-block: 0 .45rem;
}

.lmb-bundle__header p {
    font-size: 1rem;
    line-height: 1.55;
    margin-block: 0 1.25rem;
}

.lmb-bundle__products {
    --lmb-visible-rows: 3;
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lmb-bundle--group .lmb-bundle__products {
    overflow: hidden;
}

.lmb-bundle--group .lmb-bundle__products.is-expanded {
    max-block-size: none !important;
}

.lmb-bundle__expand {
    background: transparent;
    border: 0;
    color: var(--lmb-site-accent);
    cursor: pointer;
    display: block;
    font: inherit;
    font-weight: 650;
    inline-size: 100%;
    margin-block-start: .75rem;
    padding: .6rem;
    text-align: center;
}

.lmb-product.is-unavailable {
    cursor: not-allowed;
    opacity: .55;
}

.lmb-product {
    align-items: center;
    background: #fff;
    border: 1px solid var(--lmb-border);
    border-radius: 9px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: .55rem;
    justify-content: flex-start;
    min-block-size: 172px;
    padding: .9rem .65rem .8rem;
    position: relative;
    text-align: center;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.lmb-product::after {
    align-items: center;
    background: #fff;
    block-size: 20px;
    border: 1px solid var(--lmb-site-accent);
    border-color: color-mix(in srgb, var(--lmb-site-accent) 40%, var(--lmb-border));
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
    color: var(--lmb-site-accent);
    content: "+";
    display: none;
    font-size: .9rem;
    font-weight: 700;
    inline-size: 20px;
    justify-content: center;
    left: calc(-.375rem - 10px);
    line-height: 1;
    pointer-events: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.lmb-product:nth-child(2n + 1):not(:last-child)::after {
    display: grid;
}

.lmb-product:hover {
    border-color: #b8b1ae;
}

.lmb-product.is-selected {
    background: color-mix(in srgb, var(--lmb-site-accent) 5%, #fff);
    border-color: var(--lmb-site-accent);
    border-color: color-mix(in srgb, var(--lmb-site-accent) 55%, var(--lmb-border));
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}

.lmb-product--origin {
    cursor: default;
}

.lmb-product input[type="checkbox"] {
    appearance: none;
    background: #fff;
    border: 1.5px solid #a9a3a0;
    border-radius: 4px;
    block-size: 20px;
    cursor: pointer;
    inline-size: 20px;
    inset-block-start: .7rem;
    inset-inline-end: .7rem;
    margin: 0;
    opacity: 1;
    position: absolute;
}

.lmb-product input[type="checkbox"]:checked {
    background-color: var(--lmb-site-accent);
    border-color: var(--lmb-site-accent);
}

.lmb-product input[type="checkbox"]:checked::after {
    border: solid #fff;
    border-width: 0 2px 2px 0;
    block-size: 8px;
    content: "";
    display: block;
    inline-size: 4px;
    margin: 3px 6px;
    transform: rotate(45deg);
}

.lmb-product input[type="checkbox"]:disabled {
    cursor: default;
    opacity: 1;
}

.lmb-product input[type="checkbox"]:focus-visible {
    outline: 3px solid var(--lmb-site-accent);
    outline: 3px solid color-mix(in srgb, var(--lmb-site-accent) 35%, transparent);
    outline-offset: 2px;
}

.lmb-product__image {
    align-items: center;
    block-size: 64px;
    display: flex;
    inline-size: 64px;
    justify-content: center;
    margin-block-start: .1rem;
}

.lmb-product__image img {
    block-size: 64px;
    display: block;
    inline-size: 64px;
    margin: 0;
    object-fit: contain;
}

.lmb-product__content {
    align-items: center;
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: .35rem;
    justify-content: flex-start;
    min-inline-size: 0;
}

.lmb-product__content strong {
    font-size: .98rem;
    font-weight: 650;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.lmb-product__price {
    font-size: .9rem;
    line-height: 1.4;
}

.lmb-product__price del {
    opacity: .55;
}

.lmb-product__variations {
    display: grid;
    gap: .4rem;
    inline-size: 100%;
    margin-block-start: .2rem;
}

.lmb-product__variation-select {
    background: #fff;
    border: 1px solid var(--lmb-border);
    border-radius: 6px;
    color: inherit;
    font: inherit;
    font-size: .82rem;
    inline-size: 100%;
    min-block-size: 36px;
    padding: .35rem .55rem;
}

.lmb-product__variation-select:focus-visible {
    border-color: var(--lmb-site-accent);
}

.lmb-product__variation-feedback {
    color: #646970;
    font-size: .78rem;
    line-height: 1.35;
    min-block-size: 1.05em;
}

.lmb-bundle__summary {
    align-items: center;
    border-block: 1px solid var(--lmb-border);
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1.5rem;
    margin-block: 1rem;
    padding-block: 1rem;
}

.lmb-bundle__total {
    font-size: 1.15rem;
    margin-inline-start: auto;
}

.lmb-bundle__saving {
    color: #137333;
}

.lmb-bundle__submit {
    min-block-size: 44px;
}

.lmb-bundle__feedback {
    margin-block: .75rem 0;
    min-block-size: 1.5em;
}

.lmb-bundle__loader {
    animation: lmb-spin .75s linear infinite;
    block-size: 22px;
    border: 3px solid #dcdcde;
    border-block-start-color: var(--lmb-loader-color);
    border-radius: 50%;
    display: none;
    inline-size: 22px;
    margin-inline-start: .75rem;
    vertical-align: middle;
}

.lmb-bundle.is-loading .lmb-bundle__loader {
    display: inline-block;
}

.lmb-bundle.is-loading {
    opacity: .72;
    pointer-events: none;
}

.lmb-bundle :focus-visible {
    outline-offset: 3px;
}

@container (max-width: 299px) {
    .lmb-bundle__products {
        grid-template-columns: 1fr;
    }

    .lmb-product:nth-child(2n + 1):not(:last-child)::after {
        display: none;
    }

    .lmb-bundle--group .lmb-bundle__products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@container (min-width: 620px) {
    .lmb-bundle__products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .lmb-product:nth-child(2n + 1):not(:last-child)::after {
        display: none;
    }

    .lmb-product:not(:nth-child(3n)):not(:last-child)::after {
        display: grid;
    }
}

@container (min-width: 850px) {
    .lmb-bundle__products {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .lmb-product:nth-child(2n + 1):not(:last-child)::after,
    .lmb-product:not(:nth-child(3n)):not(:last-child)::after {
        display: none;
    }

    .lmb-product:not(:nth-child(4n)):not(:last-child)::after {
        display: grid;
    }
}

@container (min-width: 1050px) {
    .lmb-bundle--group .lmb-bundle__products {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .lmb-bundle--group .lmb-product:not(:nth-child(4n)):not(:last-child)::after {
        display: none;
    }

    .lmb-bundle--group .lmb-product:not(:nth-child(5n)):not(:last-child)::after {
        display: grid;
    }
}

@container (max-width: 500px) {
    .lmb-bundle__summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .lmb-bundle__total {
        margin-inline-start: 0;
    }

    .lmb-bundle__submit {
        inline-size: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lmb-product {
        transition: none;
    }

    .lmb-bundle__loader {
        animation-duration: 1.5s;
    }
}

@keyframes lmb-spin {
    to {
        transform: rotate(360deg);
    }
}
