html:has(.basket--side) { scrollbar-gutter: stable; overflow-x: clip; }
.basket.basket--side {
    width: 100%; height: 100vh; height: 100dvh; z-index: 10000020;
    direction: rtl; font-family: YekanBakh, sans-serif; color: var(--blackcolor, #17153b);
}
.basket--side::after { display: none; }
.basket--side .basket__underlay {
    inset: 0; width: 100%; height: 100%; transform: none;
    background: rgba(35, 25, 55, .38); pointer-events: auto;
}
.basket--side .basket__wrap {
    position: absolute; right: 0; top: 0; width: min(420px, 100%); max-width: 420px;
    display: flex; flex-direction: column; border-radius: 24px 0 0 24px;
    overflow: hidden; background: #f8f7fb; box-shadow: -16px 0 60px rgba(56, 35, 90, .16);
    transform: translateX(100%);
}
.basket--side.basket--show .basket__wrap { transform: translateX(0); }
.basket--side .basket__header {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 22px 20px; flex-shrink: 0; border-bottom: 1px solid #e9e5f1;
    background: linear-gradient(110deg, #fff, #f3effb);
}
.basket--side .basket__header-title { padding: 0; margin: 0 0 4px; color: #4b388a; font-size: 18px; font-weight: 800; }
.basket--side .basket__header-note { color: #81788e; font-size: 12px; }
.basket--side .basket__close {
    position: relative; inset: auto; margin: 0; width: 40px; height: 40px;
    flex-shrink: 0; border-radius: 50%; background: #fff;
}
.basket--side .basket__close::before, .basket--side .basket__close::after,
.basket--side .basket__list-del::before, .basket--side .basket__list-del::after {
    width: 16px; height: 2px; margin: -1px 0 0 -8px; background: #81788e;
}
.basket--side .basket__body { display: flex; flex: 1; flex-direction: column; min-height: 0; height: auto; overflow: hidden; }
.basket--side .basket__scroll { flex: 1; min-height: 0; max-height: none; overscroll-behavior: contain; padding: 16px; }
.basket--side .basket__list { display: grid; gap: 12px; padding: 0; margin: 0; height: auto; overflow: visible; list-style: none; }
.basket--side .basket__list-item {
    display: grid; grid-template-columns: 68px minmax(0, 1fr) 30px; gap: 8px 10px;
    align-items: start; padding: 12px; background: #fff; border: 1px solid #e9e5f1; border-radius: 16px;
}
.basket--side .basket__list-thumb {
    grid-column: 1; grid-row: 1 / 3; width: 68px; height: 80px; border-radius: 12px;
    background-size: contain; background-repeat: no-repeat; background-position: center; background-color: #f8f7fb;
}
.basket--side .price-box { grid-column: 2; grid-row: 1; margin: 0; min-width: 0; }
.basket--side .basket__list-title {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
    font-size: 13px; line-height: 1.9; color: #17153b; text-indent: 0; margin: 0;
}
.basket--side .basket__list-del {
    grid-column: 3; grid-row: 1; position: relative; inset: auto; width: 30px; height: 32px;
    margin: 0; border: 0; border-radius: 10px; background: #f8f7fb; cursor: pointer;
}
.basket--side .basket__list-del:hover { background: #ffefef; }
.basket--side .basket__list-price { grid-column: 2 / 4; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; text-align: right; }
.basket--side .basket__list-price > var { font: inherit; font-size: 15px; font-weight: 700; color: #5a45ad; line-height: 1.8; }
.basket--side .basket__list-price > span { font-size: 11px; margin: 0; color: #81788e; }
.basket--side .basket__list-price .basket__quantity { margin-right: auto; padding: 2px 8px; border-radius: 7px; background: #f0ebf9; color: #5a45ad; }
.basket--side .basket__footer {
    position: static; flex-shrink: 0; padding: 16px 20px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid #e9e5f1; background: #fff;
}
.basket--side .basket__cost { padding: 0; margin: 0 0 14px; }
.basket--side .basket__cost-wrap { display: flex; align-items: baseline; gap: 6px; background: transparent; padding: 0; }
.basket--side .basket__cost-title { margin: 0 auto 0 0; font-size: 13px; color: #81788e; }
.basket--side .basket__cost-wrap > var { margin: 0; font-size: 22px; font-style: normal; font-weight: 800; color: #4b388a; }
.basket--side .basket__cost-unit { font-size: 11px; color: #81788e; }
.basket--side .basket__btns { padding: 0; }
.basket--side .basket__btns > a { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border-radius: 13px; background: var(--maincolor, #5a45ad); color: #fff; font-size: 14px; font-weight: 700; }
.basket--side .basket__btns > a:hover { background: var(--subcolor, #403080); }
.basket--side .basket__continue { border: 0; padding: 10px; background: transparent; color: #777087; cursor: pointer; font: inherit; font-size: 12px; }
.basket--side .basket__empty { margin: auto; padding: 32px 20px; text-align: center; }
.basket--side .basket__empty strong { display: block; font-size: 17px; color: #4b388a; }
.basket--side .basket__empty p { margin: 10px 0; font-size: 13px; color: #81788e; }
.basket--side .basket__empty-icon { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 20px; border-radius: 24px; background: #eee8f8; color: #5a45ad; font-size: 36px; }
.basket--side :is(a, button):focus-visible { outline: 2px solid var(--maincolor, #5a45ad) !important; outline-offset: 2px; }
@media (max-width: 540px) {
    .basket--side .basket__wrap { width: calc(100% - 16px); }
    .basket--side .basket__header { padding: 18px 16px; }
    .basket--side .basket__scroll { padding: 12px; }
    .basket--side .basket__footer { padding-inline: 16px; }
}
@media (prefers-reduced-motion: reduce) { .basket.basket--side, .basket--side .basket__wrap { transition: none; } }
