/* STA Side Cart. Scoped to #sta-sc; buttons use !important because the theme styles every button. */
#sta-sc {
	--sc-red: #e0282e;
	--sc-red-dark: #b81f24;
	--sc-ink: #16181d;
	--sc-muted: #6b7280;
	--sc-line: #e5e7eb;
	--sc-soft: #f6f6f7;
	position: fixed; inset: 0; z-index: 999998; font-size: 15px; line-height: 1.45; color: var(--sc-ink);
}
#sta-sc[hidden] { display: none !important; }
#sta-sc *, #sta-sc *::before, #sta-sc *::after { box-sizing: border-box; }
html.sta-sc-lock, html.sta-sc-lock body { overflow: hidden; }

.sta-sc-backdrop { position: absolute; inset: 0; background: rgba(15, 17, 21, 0); transition: background .25s; }
#sta-sc.is-open .sta-sc-backdrop { background: rgba(15, 17, 21, .55); }
.sta-sc-panel {
	position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); display: flex; flex-direction: column;
	background: #fff; box-shadow: -12px 0 40px rgba(0, 0, 0, .18); transform: translateX(100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); outline: 0;
}
#sta-sc.is-open .sta-sc-panel { transform: none; }

.sta-sc-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--sc-line); }
#sta-sc .sta-sc-head h2 { margin: 0 !important; font-size: 19px !important; font-weight: 800 !important; color: var(--sc-ink) !important; text-transform: none !important; letter-spacing: 0 !important; line-height: 1.2 !important; }
.sta-sc-count { color: var(--sc-muted); font-weight: 600; }
#sta-sc .sta-sc-close { width: 38px !important; height: 38px !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important; border: 0 !important; border-radius: 50% !important; background: var(--sc-soft) !important; color: var(--sc-ink) !important; font-size: 24px !important; line-height: 38px !important; cursor: pointer; box-shadow: none !important; }
#sta-sc .sta-sc-close:hover { background: #ececee !important; }

.sta-sc-added { display: flex; align-items: center; gap: 8px; margin: 12px 20px 0; padding: 10px 12px; border-radius: 10px; background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; font-weight: 600; font-size: 14px; }
.sta-sc-added[hidden] { display: none; }
.sta-sc-added svg { flex: 0 0 auto; }

.sta-sc-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.sta-sc-loading { padding: 40px 20px; text-align: center; color: var(--sc-muted); }

#sta-sc .sta-sc-items { list-style: none; margin: 0; padding: 6px 20px; overflow-y: auto; flex: 1; }
#sta-sc .sta-sc-item { position: relative; display: grid; grid-template-columns: 76px 1fr; gap: 14px; padding: 16px 28px 16px 0; margin: 0; border-bottom: 1px solid var(--sc-line); transition: opacity .2s; }
.sta-sc-item.is-busy { opacity: .45; pointer-events: none; }
.sta-sc-thumb { width: 76px; height: 76px; border-radius: 10px; overflow: hidden; background: var(--sc-soft); border: 1px solid var(--sc-line); }
#sta-sc .sta-sc-thumb img { width: 100% !important; height: 100% !important; object-fit: cover; display: block; margin: 0 !important; }
.sta-sc-name { font-weight: 700; font-size: 14.5px; line-height: 1.35; }
#sta-sc .sta-sc-name a { color: var(--sc-ink) !important; text-decoration: none !important; }
#sta-sc .sta-sc-name a:hover { color: var(--sc-red) !important; }
.sta-sc-meta { margin-top: 3px; font-size: 12.5px; color: var(--sc-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sta-sc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.sta-sc-price { font-weight: 800; font-variant-numeric: tabular-nums; }
.sta-sc-qty-fixed { font-size: 13px; color: var(--sc-muted); }
.sta-sc-qty { display: inline-flex; border: 1px solid #d1d5db; border-radius: 8px; overflow: hidden; }
#sta-sc .sta-sc-qty button { width: 32px !important; height: 32px !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important; border: 0 !important; border-radius: 0 !important; background: var(--sc-soft) !important; color: var(--sc-ink) !important; font-size: 17px !important; line-height: 32px !important; cursor: pointer; box-shadow: none !important; }
#sta-sc .sta-sc-qty input { width: 42px !important; height: 32px !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important; border: 0 !important; border-radius: 0 !important; text-align: center; font-size: 14px !important; background: #fff !important; color: var(--sc-ink) !important; box-shadow: none !important; -moz-appearance: textfield; }
#sta-sc .sta-sc-qty input::-webkit-outer-spin-button, #sta-sc .sta-sc-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
#sta-sc .sta-sc-remove { position: absolute; top: 14px; right: 0; width: 26px !important; height: 26px !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important; border: 0 !important; border-radius: 50% !important; background: transparent !important; color: var(--sc-muted) !important; font-size: 20px !important; line-height: 26px !important; cursor: pointer; box-shadow: none !important; }
#sta-sc .sta-sc-remove:hover { background: #fee2e2 !important; color: var(--sc-red) !important; }

.sta-sc-foot { padding: 16px 20px 20px; border-top: 1px solid var(--sc-line); background: #fff; box-shadow: 0 -8px 20px rgba(0, 0, 0, .04); }
.sta-sc-subtotal { display: flex; justify-content: space-between; align-items: baseline; font-size: 16px; }
.sta-sc-subtotal strong { font-size: 20px; font-variant-numeric: tabular-nums; }
#sta-sc .sta-sc-note { margin: 4px 0 14px !important; font-size: 12.5px; color: var(--sc-muted); }
#sta-sc .sta-sc-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 14px; margin: 0 0 8px; border-radius: 10px; background: var(--sc-red); color: #fff !important; font-weight: 700; font-size: 15px; text-decoration: none !important; border: 0; transition: background .15s; }
#sta-sc .sta-sc-btn:hover { background: var(--sc-red-dark); }
#sta-sc .sta-sc-btn.ghost { background: #fff; color: var(--sc-ink) !important; border: 1px solid var(--sc-ink); margin: 0; }
#sta-sc .sta-sc-btn.ghost:hover { background: var(--sc-ink); color: #fff !important; }

.sta-sc-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 40px 30px; text-align: center; color: var(--sc-muted); }
.sta-sc-empty svg { width: 48px; height: 48px; color: #d1d5db; }
#sta-sc .sta-sc-empty p { margin: 0 !important; font-size: 16px; }
#sta-sc .sta-sc-empty .sta-sc-btn { width: auto; padding: 12px 22px; margin-top: 6px; }

#sta-sc svg { fill: none !important; }
.single_add_to_cart_button.loading { opacity: .7; cursor: wait; }

@media (prefers-reduced-motion: reduce) {
	.sta-sc-panel, .sta-sc-backdrop { transition: none; }
}
