html:has(.basket--side) { scrollbar-gutter: stable; }
.basket.basket--side {
    width: 100%; height: 100vh; height: 100dvh; z-index: 10000020;
    direction: rtl; font-family: YekanBakh, sans-serif; color: var(--blackcolor, #45474b);
}
.basket--side::after { display: none; }
.basket--side .basket__underlay {
    inset: 0; width: 100%; height: 100%; transform: none;
    background: rgba(25, 44, 37, .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: #f7f9f8; box-shadow: -16px 0 60px rgba(25, 65, 51, .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 #e6eeea;
    background: linear-gradient(110deg, #fff, #eff8f4);
}
.basket--side .basket__header-title { padding: 0; margin: 0 0 4px; color: #245d48; font-size: 18px; font-weight: 800; }
.basket--side .basket__header-note { color: #718178; 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: #718178;
}
.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 #e6eeea; 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: #f7f9f8;
}
.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: #45474b; 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: #f7f9f8; 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: #246d54; line-height: 1.8; }
.basket--side .basket__list-price > span { font-size: 11px; margin: 0; color: #718178; }
.basket--side .basket__list-price .basket__quantity { margin-right: auto; padding: 2px 8px; border-radius: 7px; background: #eef7f2; color: #246d54; }
.basket--side .basket__footer {
    position: static; flex-shrink: 0; padding: 16px 20px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid #e6eeea; 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: #718178; }
.basket--side .basket__cost-wrap > var { margin: 0; font-size: 22px; font-style: normal; font-weight: 800; color: #245d48; }
.basket--side .basket__cost-unit { font-size: 11px; color: #718178; }
.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, #379777); color: #fff; font-size: 14px; font-weight: 700; }
.basket--side .basket__btns > a:hover { background: var(--subcolor, #00453d); }
.basket--side .basket__continue { border: 0; padding: 10px; background: transparent; color: #65756e; 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: #245d48; }
.basket--side .basket__empty p { margin: 10px 0; font-size: 13px; color: #718178; }
.basket--side .basket__empty-icon { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 20px; border-radius: 24px; background: #e8f3ed; color: #379777; font-size: 36px; }
.basket--side :is(a, button):focus-visible { outline: 2px solid var(--maincolor, #379777) !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; } }
