.hk-ingredient-tabs {
    --hk-it-left-width: 44%;
    --hk-it-gap: 44px;
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, var(--hk-it-left-width)) minmax(0, 1fr);
    gap: var(--hk-it-gap);
    width: 100%;
    background: transparent;
}

.hk-ingredient-tabs *,
.hk-ingredient-tabs *::before,
.hk-ingredient-tabs *::after {
    box-sizing: border-box;
}

.hk-ingredient-tabs__left,
.hk-ingredient-tabs__right {
    min-width: 0;
}

.hk-ingredient-tabs__tablist {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: flex-end;
    gap: 14px;
    width: 100%;
    overflow: visible;
}

/* Elementor/global button rules must never override the ingredient colors. */
.hk-ingredient-tabs .hk-ingredient-tabs__tab {
    appearance: none;
    -webkit-appearance: none;
    flex: 1 1 0;
    min-width: 0;
    min-height: 98px;
    padding: 18px 16px;
    border: 0 !important;
    outline: 0;
    border-radius: 40px 40px 0 0;
    background: var(--hk-it-color) !important;
    background-color: var(--hk-it-color) !important;
    background-image: none !important;
    box-shadow: none !important;
    color: #fff;
    font: inherit;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    opacity: 1;
    transform: translateY(0);
    transition: filter .28s ease, transform .28s ease, opacity .28s ease;
}

.hk-ingredient-tabs .hk-ingredient-tabs__tab:hover,
.hk-ingredient-tabs .hk-ingredient-tabs__tab:focus-visible {
    background: var(--hk-it-color) !important;
    background-color: var(--hk-it-color) !important;
    filter: brightness(1.035) saturate(1.03);
}

.hk-ingredient-tabs .hk-ingredient-tabs__tab.is-active {
    background: var(--hk-it-color) !important;
    background-color: var(--hk-it-color) !important;
    transform: translateY(1px);
}

.hk-ingredient-tabs__panels {
    position: relative;
    z-index: 2;
}

.hk-ingredient-tabs__panel {
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    min-height: 505px;
    border-radius: 0 0 30px 30px;
    background: var(--hk-it-color) !important;
    background-color: var(--hk-it-color) !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity .38s ease, transform .38s ease, visibility .38s ease, background-color .38s ease;
}

.hk-ingredient-tabs__panel.is-active {
    position: relative;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.hk-ingredient-tabs__panel-inner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: inherit;
    padding: 60px 68px 52px;
}

.hk-ingredient-tabs__description,
.hk-ingredient-tabs__description p {
    margin: 0;
}

.hk-ingredient-tabs__description p + p {
    margin-top: .9em;
}

.hk-ingredient-tabs__description strong,
.hk-ingredient-tabs__description b {
    font-weight: 700;
}

.hk-ingredient-tabs__note {
    margin-top: 34px;
    font-style: italic;
}

.hk-ingredient-tabs__right {
    position: relative;
    min-height: 100%;
}

.hk-ingredient-tabs__visual {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: stretch;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity .4s ease, transform .4s ease, visibility .4s ease;
}

.hk-ingredient-tabs__visual.is-active {
    position: relative;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.hk-ingredient-tabs__visual-stage {
    display: flex;
    width: 100%;
    min-height: 100%;
    flex-direction: column;
    justify-content: flex-end;
}

.hk-ingredient-tabs__products {
    display: flex;
    width: 100%;
    align-items: flex-end;
    justify-content: space-evenly;
    gap: 28px;
}

.hk-ingredient-tabs__product {
    display: flex;
    flex: 0 1 31%;
    max-width: 31%;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}

/*
 * Keep three permanent product slots. Hidden products leave their slot empty
 * so Evermilk / Everscrub / Evercream never shift position between tabs.
 */
.hk-ingredient-tabs__product.is-empty {
    visibility: hidden;
    pointer-events: none;
}

.hk-ingredient-tabs__product-placeholder {
    width: 100%;
    height: 100%;
    min-height: inherit;
}

/* All images share the same bottom baseline, regardless of their proportions. */
.hk-ingredient-tabs__product-image {
    display: flex;
    width: 100%;
    height: 470px;
    align-items: flex-end;
    justify-content: center;
}

.hk-ingredient-tabs__product-image-link {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: flex-end;
    justify-content: center;
    text-decoration: none !important;
}

.hk-ingredient-tabs__product-image img {
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center bottom;
    opacity: 1 !important;
    visibility: visible !important;
}

.hk-ingredient-tabs__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 210px;
    max-width: 100%;
    margin-top: 22px;
    padding: 14px 28px;
    border-style: solid;
    border-width: 1px;
    border-radius: 40px;
    text-align: center;
    text-decoration: none !important;
    transition: color .28s ease, background-color .28s ease, border-color .28s ease, transform .18s ease;
}

.hk-ingredient-tabs__button:active {
    transform: translateY(1px);
}

.hk-ingredient-tabs__button--disabled {
    cursor: default;
}

@media (max-width: 1024px) {
    .hk-ingredient-tabs {
        --hk-it-gap: 28px;
    }

    .hk-ingredient-tabs__panel-inner {
        padding: 48px 42px 44px;
    }

    .hk-ingredient-tabs__product-image {
        height: 400px;
    }

    .hk-ingredient-tabs__products {
        gap: 18px;
    }
}

@media (max-width: 767px) {
    .hk-ingredient-tabs {
        display: block;
    }

    .hk-ingredient-tabs__tablist {
        gap: 7px;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .hk-ingredient-tabs__tablist::-webkit-scrollbar {
        display: none;
    }

    .hk-ingredient-tabs .hk-ingredient-tabs__tab {
        flex: 1 0 auto;
        min-width: max(105px, 31%);
        min-height: 72px;
        padding: 14px 12px;
        border-radius: 26px 26px 0 0;
    }

    .hk-ingredient-tabs__panel {
        min-height: 390px;
        border-radius: 0 0 24px 24px;
    }

    .hk-ingredient-tabs__panel-inner {
        min-height: 390px;
        padding: 36px 28px 34px;
    }

    .hk-ingredient-tabs__note {
        margin-top: 24px;
    }

    .hk-ingredient-tabs__right {
        margin-top: 34px;
    }

    .hk-ingredient-tabs__products {
        align-items: flex-end;
        gap: 12px;
    }

    .hk-ingredient-tabs__product {
        flex-basis: 31%;
        max-width: 31%;
    }

    .hk-ingredient-tabs__product-image {
        height: 260px;
    }

    .hk-ingredient-tabs__button {
        width: 100%;
        margin-top: 14px;
        padding-inline: 12px;
    }
}

@media (max-width: 480px) {
    .hk-ingredient-tabs__products {
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 8px;
    }

    .hk-ingredient-tabs__product {
        flex: 0 1 31%;
        flex-basis: 31%;
        max-width: 31%;
    }

    .hk-ingredient-tabs__product-image {
        height: 220px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hk-ingredient-tabs__tab,
    .hk-ingredient-tabs__panel,
    .hk-ingredient-tabs__visual,
    .hk-ingredient-tabs__button {
        transition: none !important;
    }
}
