/* Side cart (includes/side_cart + front/cart/drawer). Classes start with "sc-". */
.sc {
    --sc-ink: #111111;
    --sc-muted: #8a8f98;
    --sc-line: #ececec;
    --sc-accent: #fe7e00;
    position: fixed; inset: 0; z-index: 2000; visibility: hidden; pointer-events: none;
    color: var(--sc-ink); font-size: 14px; line-height: 1.5;
}
.sc *, .sc *::before, .sc *::after { box-sizing: border-box; }
.sc a { text-decoration: none !important; }
.sc.is-open { visibility: visible; pointer-events: auto; }
html.sc-lock, html.sc-lock body { overflow: hidden !important; }

.sc-overlay { position: absolute; inset: 0; background: rgba(17, 17, 17, .45); opacity: 0; transition: opacity .3s; }
.sc.is-open .sc-overlay { opacity: 1; }

.sc-panel {
    position: absolute; top: 0; bottom: 0; inset-inline-end: 0; width: 100%; max-width: 420px;
    display: flex; flex-direction: column; background: #fff; box-shadow: -10px 0 40px rgba(17, 17, 17, .15);
    transform: translateX(100%); transition: transform .32s cubic-bezier(.22, 1, .36, 1);
}
[dir="rtl"] .sc-panel { transform: translateX(-100%); }
.sc.is-open .sc-panel { transform: none; }

.sc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--sc-line); }
.sc-head h3 { margin: 0; font-size: 18px; font-weight: 800; color: var(--sc-ink) !important; }
.sc-head__count { color: var(--sc-accent); font-size: 15px; }
.sc-close { width: 40px; height: 40px; border: 0; border-radius: 50%; background: #f3f3f5; color: var(--sc-ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: background .2s; }
.sc-close:hover { background: #e9e9ec; }
.sc-close svg { width: 20px; height: 20px; }

.sc-body { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
.sc-body.is-busy .sc-content { opacity: .55; pointer-events: none; }
.sc-content { flex: 1; min-height: 0; display: flex; flex-direction: column; transition: opacity .2s; }

.sc-loading { flex: 1; display: flex; align-items: center; justify-content: center; }
.sc-loading span { width: 32px; height: 32px; border-radius: 50%; border: 3px solid #f1e3d4; border-top-color: var(--sc-accent); animation: sc-spin .7s linear infinite; }
@keyframes sc-spin { to { transform: rotate(360deg); } }

/* items */
.sc-items { list-style: none; margin: 0; padding: 4px 20px; overflow-y: auto; flex: 1; }
.sc-item { position: relative; display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--sc-line); transition: opacity .2s; }
.sc-item:last-child { border-bottom: 0; }
.sc-item.is-busy { opacity: .45; pointer-events: none; }
.sc-item__img { width: 76px; height: 88px; flex: none; border-radius: 12px; overflow: hidden; background: #f6f6f7; }
.sc-item__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sc-item__body { flex: 1; min-width: 0; display: flex; flex-direction: column; padding-inline-end: 28px; }
.sc-item__brand { font-size: 12px; color: var(--sc-muted); }
.sc .sc-item__name {
    color: var(--sc-ink) !important; font-size: 14px; font-weight: 700; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sc .sc-item__name:hover { color: var(--sc-accent) !important; }
.sc-item__variant { font-size: 12px; color: #555; margin-top: 2px; display: flex; align-items: center; gap: 6px; }
.sc-swatch { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--sc-line); display: inline-block; }
.sc-item__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; }
.sc-item__price { font-size: 15px; font-weight: 800; white-space: nowrap; }
.sc-item__remove {
    position: absolute; top: 12px; inset-inline-end: 0; width: 30px; height: 30px; border: 0; border-radius: 50%;
    background: transparent; color: var(--sc-muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.sc-item__remove:hover { background: #fdecec; color: #e5484d; }
.sc-item__remove svg { width: 18px; height: 18px; }

.sc-qty { display: inline-flex; align-items: center; gap: 8px; }
.sc-qty button { width: 28px; height: 28px; border: 0; border-radius: 50%; background: #ececec; color: var(--sc-ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.sc-qty button:hover:not(:disabled) { background: #dedede; }
.sc-qty button:disabled { opacity: .4; cursor: not-allowed; }
.sc-qty svg { width: 14px; height: 14px; }
.sc-qty span { min-width: 16px; text-align: center; font-weight: 700; }

/* footer */
.sc-footer { padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--sc-line); box-shadow: 0 -8px 24px rgba(17, 17, 17, .05); display: grid; gap: 10px; }
.sc-total { display: flex; justify-content: space-between; align-items: center; font-size: 15px; font-weight: 700; }
.sc-total strong { font-size: 20px; font-weight: 800; }
.sc-note { margin: -4px 0 4px; font-size: 12px; color: var(--sc-muted); }
.sc .sc-btn {
    display: flex; align-items: center; justify-content: center; height: 50px; border-radius: 14px;
    background: var(--sc-ink); color: #fff !important; font-size: 15px; font-weight: 700; transition: background .2s;
}
.sc .sc-btn:hover { background: #2b2b2b; }
.sc .sc-btn--ghost { background: #fff; color: var(--sc-ink) !important; border: 1.5px solid var(--sc-line); }
.sc .sc-btn--ghost:hover { background: #f6f6f7; }

/* empty */
.sc-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; padding: 32px 24px; }
.sc-empty__icon { width: 84px; height: 84px; border-radius: 50%; background: #fff4e8; color: var(--sc-accent); display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.sc-empty__icon svg { width: 40px; height: 40px; }
.sc-empty strong { font-size: 18px; }
.sc-empty p { color: var(--sc-muted); margin: 0 0 16px; }
.sc-empty .sc-btn { width: 100%; max-width: 260px; }
