.sp-cart-backdrop {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.22s ease;
}

body.sp-cart-open .sp-cart-backdrop {
    opacity: 1;
}

.sp-cart-drawer,
.sp-cart-drawer * {
    box-sizing: border-box;
}

.sp-cart-drawer {
    --cart-bg: #0b0f14;
    --cart-surface: #0f141b;
    --cart-line: rgba(226, 232, 240, 0.12);
    --cart-text: #f8fafc;
    --cart-muted: #98a4b5;
    --cart-blue: #2d7dff;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 210;
    width: min(480px, 100vw);
    display: flex;
    flex-direction: column;
    color: var(--cart-text);
    background: var(--cart-bg);
    border-left: 1px solid var(--cart-line);
    box-shadow: -14px 0 34px rgba(0, 0, 0, 0.32);
    transform: translateX(100%);
    transition: transform 0.26s ease;
}

body.sp-cart-open .sp-cart-drawer {
    transform: translateX(0);
}

body.sp-cart-open {
    overflow: hidden;
}

.sp-cart-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px 18px;
    border-bottom: 1px solid var(--cart-line);
}

.sp-cart-drawer__eyebrow {
    margin: 0 0 5px;
    color: var(--cart-muted);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sp-cart-drawer h2,
.sp-cart-empty h3,
.sp-cart-item h3 {
    margin: 0;
    color: #ffffff;
}

.sp-cart-drawer h2 {
    font-size: 24px;
    line-height: 1.1;
}

.sp-cart-close,
.sp-cart-item__remove button {
    display: grid;
    place-items: center;
    border: 0;
    color: #d8e0ec;
    background: transparent;
    cursor: pointer;
    transition: color 0.18s ease, background 0.18s ease;
}

.sp-cart-close {
    width: 38px;
    height: 38px;
    border-radius: 999px;
}

.sp-cart-close:hover,
.sp-cart-item__remove button:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.07);
}

.sp-cart-close svg,
.sp-cart-item__remove svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sp-cart-items {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding: 4px 24px 0;
}

.sp-cart-items::-webkit-scrollbar {
    width: 8px;
}

.sp-cart-items::-webkit-scrollbar-track {
    background: transparent;
}

.sp-cart-items::-webkit-scrollbar-thumb {
    border: 2px solid var(--cart-bg);
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.34);
}

.sp-cart-item {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr) 34px;
    gap: 14px;
    align-items: center;
    min-height: 116px;
    padding: 18px 0;
    border-bottom: 1px solid var(--cart-line);
}

.sp-cart-item__image {
    width: 82px;
    height: 82px;
    overflow: hidden;
    border-radius: 8px;
    background: #070b10;
}

.sp-cart-item__image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.sp-cart-item h3 {
    font-size: 15px;
    line-height: 1.25;
}

.sp-cart-item h3 a {
    color: inherit;
    text-decoration: none;
}

.sp-cart-item h3 a:hover {
    color: #dbeafe;
}

.sp-cart-item p {
    margin: 7px 0 9px;
    color: var(--cart-muted);
    font-size: 13px;
    line-height: 1.35;
}

.sp-cart-item strong {
    color: #ffffff;
    font-size: 16px;
}

.sp-cart-item__remove {
    align-self: start;
    padding-top: 2px;
}

.sp-cart-item__remove button {
    width: 34px;
    height: 34px;
    border-radius: 999px;
}

.sp-cart-checkout-panel {
    padding: 18px 24px 22px;
    border-top: 1px solid var(--cart-line);
    background: var(--cart-surface);
}

.sp-cart-summary {
    display: grid;
    gap: 9px;
    margin-bottom: 16px;
}

.sp-cart-summary div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: var(--cart-muted);
    font-size: 14px;
}

.sp-cart-summary strong {
    color: #ffffff;
}

.sp-cart-summary .total {
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--cart-line);
    color: #ffffff;
    font-size: 17px;
}

.sp-cart-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 50px;
    border-radius: 999px;
    padding: 13px 18px;
    border: 1px solid transparent;
    text-decoration: none;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.sp-cart-button.primary {
    color: #ffffff;
    background: var(--cart-blue);
}

.sp-cart-button.primary:hover {
    background: #4b91ff;
}

.sp-cart-footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 13px;
}

.sp-cart-clear {
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--cart-muted);
    font: inherit;
    font-size: 14px;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
}

.sp-cart-clear:hover {
    color: #ffffff;
}

.sp-cart-empty {
    margin: 24px;
    padding: 28px 0;
    border-top: 1px solid var(--cart-line);
    border-bottom: 1px solid var(--cart-line);
}

.sp-cart-empty p {
    color: var(--cart-muted);
    line-height: 1.55;
}

.sp-cart-mini-error {
    margin-bottom: 14px;
    padding: 12px 0;
    color: #fecaca;
    border-top: 1px solid rgba(239, 68, 68, 0.26);
    border-bottom: 1px solid rgba(239, 68, 68, 0.26);
}

@media (max-width: 560px) {
    .sp-cart-drawer__head,
    .sp-cart-items,
    .sp-cart-checkout-panel {
        padding-left: 18px;
        padding-right: 18px;
    }

    .sp-cart-item {
        grid-template-columns: 72px minmax(0, 1fr) 34px;
    }

    .sp-cart-item__image {
        width: 72px;
        height: 72px;
    }
}
