.product-ingredients {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.product-ingredients__item {
    display: inline-flex;
    align-items: center;
    padding: 8px 10px !important;
    font-size: 12px;
    border-radius: 999px;
    background: #FF66D2;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease;
}
.product-ingredients__item:hover {
    background: #cf452085;
}

/* overlay */
.ingredient-popup {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    display: flex !important;
    align-items: stretch !important;
    justify-content: flex-end !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    z-index: 9999 !important;
}
.ingredient-popup.is-open {
    opacity: 1;
    pointer-events: auto;
}

.ingredient-popup__backdrop {
    position: absolute !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity .25s ease;
    z-index: 1;
}
.ingredient-popup.is-open .ingredient-popup__backdrop {
    opacity: 1;
}

.ingredient-popup__dialog {
    position: relative !important;
    width: min(520px, 92vw) !important;
    max-width: 720px !important; 
    height: 100vh !important;
    max-height: 100vh !important;
    transform: translateX(110%);
    transition: transform .32s ease-in-out;
    background: #fff !important;
    padding: 24px !important;
    box-shadow: 0 10px 40px rgba(0,0,0,.25);
    z-index: 2;
    overflow: auto !important;
    overflow-y: auto !important;
    will-change: transform;
}

/* when open - slide to left */
.ingredient-popup.is-open .ingredient-popup__dialog {
    transform: translateX(0);
}

/* close button */
.ingredient-popup__close {
    position: sticky;       
    top: 0;
    margin-left: -30px;
    display: inline-block;
    font-size: 28px;
    line-height: 1;
    background: transparent;
    border: 0;
    cursor: pointer;
    z-index: 3;
}

/* lock scroll */
html.is-popup-open,
body.is-popup-open {
    overflow: hidden;
}

.ingredient-popup__dialog:focus { outline: none; }
@media (prefers-reduced-motion: reduce) {
    .ingredient-popup,
    .ingredient-popup__backdrop,
    .ingredient-popup__dialog { transition: none !important; }
}
