:root {
    --arso-primary: #ef5aa8;
    --arso-soft: #fff3f9;
    --arso-text: #3f3340;
    --arso-success: #22a06b;
}

.arso-offer-banner,
.arso-cart-recommendations,
.arso-modal,
.arso-mini-offer {
    direction: rtl;
    text-align: right;
    box-sizing: border-box;
}

.arso-offer-banner * ,
.arso-cart-recommendations *,
.arso-modal * {
    box-sizing: border-box;
}

.arso-offer-banner {
    width: 100%;
    margin: 0 0 22px;
    padding: 18px;
    border: 1px solid rgba(239, 90, 168, .22);
    border-radius: 20px;
    background: linear-gradient(135deg, var(--arso-soft), #fff 70%);
    box-shadow: 0 12px 30px rgba(37, 26, 36, .07);
    color: var(--arso-text);
}

.arso-offer-banner__head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.arso-offer-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 15px;
    background: var(--arso-primary);
    color: #fff;
    font-size: 22px;
    box-shadow: 0 8px 18px rgba(239, 90, 168, .25);
}

.arso-offer-copy {
    min-width: 0;
    flex: 1;
}

.arso-offer-copy > strong {
    display: block;
    margin-bottom: 4px;
    font-size: 16px;
}

.arso-offer-copy p {
    margin: 0;
    color: var(--arso-text);
    font-size: 13px;
    line-height: 1.9;
}

.arso-offer-copy p strong,
.arso-mini-offer strong,
.arso-popup__offer strong {
    color: var(--arso-primary);
}

.arso-cart-subtotal {
    flex: 0 0 auto;
    padding: 7px 10px;
    border-radius: 999px;
    background: #fff;
    color: var(--arso-primary);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.arso-progress {
    height: 7px;
    margin: 14px 0 13px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(239, 90, 168, .12);
}

.arso-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--arso-primary), #ff8cc5);
    transition: width .3s ease;
}

.arso-tier-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 9px;
}

.arso-tier {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 64px;
    padding: 9px;
    border: 1px solid #ece7eb;
    border-radius: 14px;
    background: rgba(255,255,255,.86);
    opacity: .78;
}

.arso-tier.is-active {
    border-color: var(--arso-primary);
    background: var(--arso-soft);
    opacity: 1;
}

.arso-tier__check {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 50%;
    background: #f0edf0;
    color: #817680;
    font-size: 12px;
    font-weight: 800;
}

.arso-tier.is-active .arso-tier__check {
    background: var(--arso-success);
    color: #fff;
}

.arso-tier__text {
    min-width: 0;
}

.arso-tier__text b,
.arso-tier__text small {
    display: block;
}

.arso-tier__text b {
    color: var(--arso-text);
    font-size: 11px;
    line-height: 1.55;
}

.arso-tier__text small {
    margin-top: 3px;
    color: #766d75;
    font-size: 9px;
    line-height: 1.55;
}

.arso-mini-offer {
    margin: 10px 0;
    padding: 11px 12px;
    border-radius: 11px;
    background: var(--arso-soft);
    color: var(--arso-text);
    font-size: 12px;
    line-height: 1.85;
}

.arso-cart-recommendations {
    margin-top: 28px;
    padding: 22px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 9px 27px rgba(30, 20, 29, .07);
}

.arso-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.arso-section-title > span {
    color: var(--arso-primary);
    font-size: 24px;
}

.arso-section-title h2 {
    margin: 0 0 3px;
    font-size: 19px;
}

.arso-section-title p {
    margin: 0;
    color: #7d737b;
    font-size: 12px;
}

.arso-products-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.arso-products-grid.is-compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.arso-product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 11px;
    border: 1px solid #eee9ed;
    border-radius: 15px;
    background: #fff;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.arso-product-card:hover {
    transform: translateY(-2px);
    border-color: rgba(239, 90, 168, .35);
    box-shadow: 0 9px 22px rgba(35, 24, 34, .08);
}

.arso-product-card__image {
    display: block;
    aspect-ratio: 1 / 1;
    margin-bottom: 8px;
}

.arso-product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.arso-smart-badge {
    align-self: flex-start;
    margin-bottom: 6px;
    padding: 3px 7px;
    border-radius: 999px;
    background: var(--arso-soft);
    color: var(--arso-primary);
    font-size: 8px;
    font-weight: 800;
}

.arso-product-card__name {
    min-height: 44px;
    color: var(--arso-text);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.75;
}

.arso-product-card__price {
    margin: 7px 0 10px;
    color: var(--arso-primary);
    font-size: 11px;
    font-weight: 800;
}

.arso-product-card .arso-add-button {
    width: 100%;
    min-height: 34px;
    margin-top: auto;
    padding: 8px 9px;
    border: 0;
    border-radius: 10px;
    background: var(--arso-primary);
    color: #fff;
    text-align: center;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.5;
}

.arso-modal[hidden] {
    display: none !important;
}

.arso-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: grid;
    place-items: center;
    padding: 18px;
    opacity: 0;
    transition: opacity .18s ease;
}

.arso-modal.is-open {
    opacity: 1;
}

.arso-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(24, 17, 23, .58);
    backdrop-filter: blur(3px);
}

.arso-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(820px, 100%);
    max-height: min(90vh, 860px);
    overflow: auto;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(15, 10, 14, .28);
    transform: translateY(14px) scale(.985);
    transition: transform .18s ease;
    overscroll-behavior: contain;
}

.arso-modal.is-open .arso-modal__dialog {
    transform: translateY(0) scale(1);
}

.arso-modal__close {
    position: sticky;
    top: 12px;
    z-index: 4;
    float: left;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin: 12px 0 -46px 12px;
    border: 0;
    border-radius: 50%;
    background: #f4f0f3;
    color: #4c4149;
    font-size: 24px;
    cursor: pointer;
}

.arso-sheet-handle {
    display: none;
}

.arso-modal__content {
    padding: 24px;
}

html.arso-modal-open,
html.arso-modal-open body {
    overflow: hidden !important;
}

.arso-popup__success {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding-left: 42px;
}

.arso-popup__tick {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 50%;
    background: var(--arso-success);
    color: #fff;
    font-size: 21px;
    font-weight: 900;
}

.arso-popup__success-copy {
    min-width: 0;
    flex: 1;
}

.arso-popup h3 {
    margin: 2px 0 10px;
    color: var(--arso-text);
    font-size: 20px;
}

.arso-added-product {
    display: flex;
    align-items: center;
    gap: 10px;
}

.arso-added-product img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    border: 1px solid #eee8ec;
    border-radius: 12px;
}

.arso-added-product strong,
.arso-added-product span {
    display: block;
}

.arso-added-product strong {
    color: var(--arso-text);
    font-size: 12px;
    line-height: 1.75;
}

.arso-added-product span {
    margin-top: 4px;
    color: var(--arso-primary);
    font-size: 11px;
    font-weight: 800;
}

.arso-popup__offer {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 18px 0;
    padding: 13px 14px;
    border: 1px solid rgba(239, 90, 168, .18);
    border-radius: 14px;
    background: var(--arso-soft);
}

.arso-popup__offer > span {
    font-size: 20px;
}

.arso-popup__offer b {
    display: block;
    margin-bottom: 2px;
    color: var(--arso-text);
    font-size: 12px;
}

.arso-popup__offer p {
    margin: 0;
    color: var(--arso-text);
    font-size: 12px;
    line-height: 1.85;
}

.arso-popup-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.arso-popup-heading h4 {
    margin: 0;
    color: var(--arso-text);
    font-size: 15px;
}

.arso-popup-heading span {
    color: #847981;
    font-size: 10px;
}

.arso-popup__actions {
    position: sticky;
    bottom: 0;
    z-index: 3;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 18px -24px -24px;
    padding: 14px 24px 18px;
    border-top: 1px solid #eee8ec;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(8px);
}

.arso-popup__actions .button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 800;
}

.arso-primary-button {
    border-color: var(--arso-primary) !important;
    background: var(--arso-primary) !important;
    color: #fff !important;
}

.arso-secondary-button {
    border: 1px solid #ded7dc !important;
    background: #fff !important;
    color: var(--arso-text) !important;
}

@media (max-width: 1100px) {
    .arso-tier-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .arso-products-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .arso-offer-banner {
        margin-bottom: 15px;
        padding: 13px;
        border-radius: 16px;
    }

    .arso-offer-banner__head {
        align-items: flex-start;
        gap: 9px;
    }

    .arso-offer-icon {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
        border-radius: 12px;
        font-size: 18px;
    }

    .arso-offer-copy > strong {
        font-size: 13px;
    }

    .arso-offer-copy p {
        font-size: 11px;
        line-height: 1.8;
    }

    .arso-cart-subtotal {
        display: none;
    }

    .arso-progress {
        margin: 11px 0 10px;
    }

    .arso-tier-list {
        display: flex;
        gap: 8px;
        margin: 0 -3px;
        padding: 2px 3px 5px;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
    }

    .arso-tier-list::-webkit-scrollbar {
        display: none;
    }

    .arso-tier {
        min-width: 168px;
        min-height: 56px;
        flex: 0 0 168px;
        padding: 8px;
        scroll-snap-align: start;
    }

    .arso-tier__text b {
        font-size: 10px;
    }

    .arso-tier__text small {
        font-size: 8px;
    }

    .arso-cart-recommendations {
        margin-top: 20px;
        padding: 15px;
        border-radius: 16px;
    }

    .arso-section-title {
        align-items: flex-start;
    }

    .arso-section-title h2 {
        font-size: 15px;
    }

    .arso-section-title p {
        font-size: 10px;
        line-height: 1.7;
    }

    .arso-products-grid,
    .arso-products-grid.is-compact {
        display: flex;
        gap: 10px;
        margin: 0 -2px;
        padding: 2px 2px 7px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .arso-products-grid::-webkit-scrollbar {
        display: none;
    }

    .arso-product-card {
        min-width: 145px;
        flex: 0 0 145px;
        padding: 9px;
        border-radius: 13px;
        scroll-snap-align: start;
    }

    .arso-product-card__name {
        min-height: 39px;
        font-size: 10px;
    }

    .arso-product-card__price {
        font-size: 10px;
    }

    .arso-modal {
        align-items: end;
        padding: 0;
    }

    .arso-modal.arso-mobile-sheet .arso-modal__dialog {
        width: 100%;
        max-height: 86vh;
        border-radius: 22px 22px 0 0;
        transform: translateY(100%);
        transition: transform .22s ease;
    }

    .arso-modal.arso-mobile-sheet.is-open .arso-modal__dialog {
        transform: translateY(0);
    }

    .arso-sheet-handle {
        display: block;
        width: 48px;
        height: 5px;
        margin: 9px auto 0;
        border-radius: 999px;
        background: #ddd5da;
    }

    .arso-modal__close {
        top: 10px;
        width: 32px;
        height: 32px;
        margin-top: 5px;
        font-size: 22px;
    }

    .arso-modal__content {
        padding: 15px;
    }

    .arso-popup__success {
        gap: 9px;
        padding-left: 35px;
    }

    .arso-popup__tick {
        width: 35px;
        height: 35px;
        flex-basis: 35px;
        font-size: 17px;
    }

    .arso-popup h3 {
        margin-bottom: 7px;
        font-size: 16px;
    }

    .arso-added-product img {
        width: 48px;
        height: 48px;
    }

    .arso-added-product strong {
        font-size: 10px;
    }

    .arso-added-product span {
        font-size: 9px;
    }

    .arso-popup__offer {
        margin: 13px 0;
        padding: 10px 11px;
    }

    .arso-popup__offer p {
        font-size: 10px;
    }

    .arso-popup-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .arso-popup-heading h4 {
        font-size: 13px;
    }

    .arso-popup__actions {
        grid-template-columns: 1fr 1fr;
        margin: 13px -15px -15px;
        padding: 11px 15px calc(12px + env(safe-area-inset-bottom));
    }

    .arso-popup__actions .button {
        min-height: 42px;
        padding: 8px 5px;
        font-size: 10px;
    }
}

@media (max-width: 390px) {
    .arso-popup__actions {
        grid-template-columns: 1fr;
    }

    .arso-tier {
        min-width: 155px;
        flex-basis: 155px;
    }
}
