/* RTS Sleek Cart */
:root {
	--rtssc-accent: #1e293b;
	--rtssc-ink: #0f172a;
	--rtssc-muted: #64748b;
	--rtssc-line: #e2e8f0;
	--rtssc-bg: #ffffff;
	--rtssc-paypal: #ffc439;
	--rtssc-radius: 14px;
	--rtssc-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--rtssc-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

.rtssc-buy, .rtssc-drawer, .rtssc-inline, .rtssc-fab, .rtssc-toast {
	font-family: var(--rtssc-font);
	box-sizing: border-box;
}
.rtssc-buy *, .rtssc-drawer *, .rtssc-inline *, .rtssc-fab *, .rtssc-toast * {
	box-sizing: border-box;
}

/* ---------- Buy button ---------- */
.rtssc-buy {
	display: inline-block;
	margin: 6px 0;
}
.rtssc-add {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 12px 22px;
	border: 0;
	border-radius: 999px;
	background: var(--rtssc-accent);
	color: #fff;
	font-family: var(--rtssc-font);
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.01em;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
	transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
	-webkit-tap-highlight-color: transparent;
}
.rtssc-add:hover {
	filter: brightness(1.18);
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(15, 23, 42, 0.24);
	color: #fff;
}
.rtssc-add:active {
	transform: translateY(0);
	box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
}
.rtssc-add:focus-visible {
	outline: 2px solid var(--rtssc-accent);
	outline-offset: 3px;
}
.rtssc-add svg {
	flex: 0 0 auto;
}
.rtssc-add-sep {
	opacity: 0.55;
}
.rtssc-add-price {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

/* ---------- Floating cart bubble ---------- */
.rtssc-fab {
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 999990;
	width: 58px;
	height: 58px;
	border: 0;
	border-radius: 50%;
	background: var(--rtssc-accent);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.3);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.rtssc-fab:hover {
	transform: scale(1.07);
	box-shadow: 0 12px 30px rgba(15, 23, 42, 0.35);
}
.rtssc-fab[hidden] {
	display: none;
}
.rtssc-badge {
	position: absolute;
	top: -4px;
	right: -4px;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 999px;
	background: #ef4444;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 22px;
	text-align: center;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.rtssc-badge.rtssc-pop {
	animation: rtssc-pop 0.35s ease;
}
@keyframes rtssc-pop {
	0% { transform: scale(1); }
	40% { transform: scale(1.45); }
	100% { transform: scale(1); }
}

/* ---------- Overlay & drawer ---------- */
.rtssc-overlay {
	position: fixed;
	inset: 0;
	z-index: 999995;
	background: rgba(15, 23, 42, 0.48);
	backdrop-filter: blur(2px);
	opacity: 0;
	transition: opacity 0.28s ease;
}
.rtssc-overlay.rtssc-open {
	opacity: 1;
}
.rtssc-overlay[hidden] {
	display: none;
}
.rtssc-drawer {
	position: fixed;
	top: 0;
	right: 0;
	z-index: 999999;
	height: 100dvh;
	width: min(420px, 100vw);
	display: flex;
	flex-direction: column;
	background: var(--rtssc-bg);
	color: var(--rtssc-ink);
	box-shadow: -18px 0 50px rgba(15, 23, 42, 0.25);
	transform: translateX(105%);
	transition: transform 0.32s cubic-bezier(0.22, 0.9, 0.34, 1);
}
.rtssc-drawer.rtssc-open {
	transform: translateX(0);
}
.rtssc-drawer[hidden] {
	display: none;
}

.rtssc-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 22px;
	border-bottom: 1px solid var(--rtssc-line);
}
.rtssc-head h2 {
	margin: 0;
	font-family: var(--rtssc-font);
	font-size: 18px;
	font-weight: 700;
	color: var(--rtssc-ink);
	display: flex;
	align-items: center;
	gap: 10px;
}
.rtssc-count-pill {
	background: var(--rtssc-accent);
	color: #fff;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	padding: 2px 9px;
	line-height: 1.5;
}
.rtssc-close {
	border: 0;
	background: #f1f5f9;
	color: var(--rtssc-ink);
	width: 34px;
	height: 34px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.15s ease;
}
.rtssc-close:hover {
	background: #e2e8f0;
}

.rtssc-items {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 8px 22px;
}

/* ---------- Cart item row ---------- */
.rtssc-item {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	padding: 16px 0;
	border-bottom: 1px solid var(--rtssc-line);
}
.rtssc-item:last-child {
	border-bottom: 0;
}
.rtssc-thumb {
	flex: 0 0 46px;
	width: 46px;
	height: 46px;
	border-radius: 12px;
	background: color-mix(in srgb, var(--rtssc-accent) 10%, #ffffff);
	color: var(--rtssc-accent);
	display: flex;
	align-items: center;
	justify-content: center;
}
.rtssc-item-main {
	flex: 1 1 auto;
	min-width: 0;
}
.rtssc-item-name {
	margin: 0 0 2px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--rtssc-ink);
}
.rtssc-item-price {
	margin: 0 0 10px;
	font-size: 12.5px;
	color: var(--rtssc-muted);
}
.rtssc-item-ctrl {
	display: flex;
	align-items: center;
	gap: 10px;
}
.rtssc-stepper {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--rtssc-line);
	border-radius: 999px;
	overflow: hidden;
}
.rtssc-stepper button {
	border: 0;
	background: transparent;
	width: 30px;
	height: 30px;
	font-size: 16px;
	color: var(--rtssc-ink);
	cursor: pointer;
	line-height: 1;
	transition: background 0.12s ease;
}
.rtssc-stepper button:hover {
	background: #f1f5f9;
}
.rtssc-stepper span {
	min-width: 26px;
	text-align: center;
	font-size: 13.5px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}
.rtssc-remove {
	border: 0;
	background: transparent;
	color: #94a3b8;
	cursor: pointer;
	padding: 5px;
	border-radius: 8px;
	display: flex;
	transition: color 0.14s ease, background 0.14s ease;
}
.rtssc-remove:hover {
	color: #ef4444;
	background: #fef2f2;
}
.rtssc-line-total {
	flex: 0 0 auto;
	font-size: 14px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	color: var(--rtssc-ink);
	padding-top: 2px;
}

/* ---------- Empty state ---------- */
.rtssc-empty {
	text-align: center;
	padding: 48px 10px;
	color: var(--rtssc-muted);
}
.rtssc-empty svg {
	opacity: 0.4;
	margin-bottom: 12px;
}
.rtssc-empty p {
	margin: 0;
	font-size: 14.5px;
}

/* ---------- Footer / totals ---------- */
.rtssc-foot {
	border-top: 1px solid var(--rtssc-line);
	padding: 18px 22px 20px;
	background: #fafbfc;
}
.rtssc-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin: 0 0 8px;
	font-size: 14px;
	color: var(--rtssc-muted);
}
.rtssc-row b {
	color: var(--rtssc-ink);
	font-variant-numeric: tabular-nums;
	font-weight: 600;
}
.rtssc-row.rtssc-total {
	margin: 12px 0 16px;
	font-size: 16px;
	color: var(--rtssc-ink);
	font-weight: 700;
}
.rtssc-row.rtssc-total b {
	font-size: 20px;
	font-weight: 800;
}

.rtssc-checkout {
	width: 100%;
	height: 50px;
	border: 0;
	border-radius: 999px;
	background: var(--rtssc-paypal);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 2px;
	box-shadow: 0 3px 10px rgba(255, 196, 57, 0.5);
	transition: filter 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.rtssc-checkout:hover {
	filter: brightness(1.05);
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(255, 196, 57, 0.6);
}
.rtssc-checkout:active {
	transform: translateY(0);
}
.rtssc-pp {
	font-family: Verdana, Tahoma, sans-serif;
	font-style: italic;
	font-weight: 800;
	font-size: 19px;
	letter-spacing: -0.5px;
	line-height: 1;
}
.rtssc-pp .rtssc-pp1 { color: #003087; }
.rtssc-pp .rtssc-pp2 { color: #0070ba; }

.rtssc-secure {
	margin: 12px 0 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-size: 12px;
	color: var(--rtssc-muted);
	text-align: center;
}
.rtssc-secure svg {
	flex: 0 0 auto;
	opacity: 0.7;
}

/* ---------- Inline cart (shortcode in posts/sidebar) ---------- */
.rtssc-inline {
	max-width: 480px;
	margin: 18px 0;
	border: 1px solid var(--rtssc-line);
	border-radius: var(--rtssc-radius);
	background: var(--rtssc-bg);
	box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
	overflow: hidden;
}
.rtssc-inline[hidden] {
	display: none;
}
.rtssc-inline .rtssc-head {
	padding: 16px 18px;
}
.rtssc-inline .rtssc-head h2 {
	font-size: 16px;
}
.rtssc-inline .rtssc-items {
	padding: 4px 18px;
	overflow: visible;
}
.rtssc-inline .rtssc-foot {
	padding: 14px 18px 16px;
}
.rtssc-inline .rtssc-empty {
	padding: 28px 10px;
}

/* ---------- Toast ---------- */
.rtssc-toast {
	position: fixed;
	top: 24px;
	left: 50%;
	transform: translate(-50%, -16px);
	z-index: 9999999;
	display: flex;
	align-items: center;
	gap: 9px;
	background: var(--rtssc-ink);
	color: #fff;
	font-size: 14px;
	font-weight: 500;
	padding: 12px 20px;
	border-radius: 999px;
	box-shadow: var(--rtssc-shadow);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease, transform 0.25s ease;
}
.rtssc-toast.rtssc-show {
	opacity: 1;
	transform: translate(-50%, 0);
}
.rtssc-toast svg {
	color: #4ade80;
}

/* ---------- Mobile ---------- */
@media (max-width: 520px) {
	.rtssc-drawer {
		width: 100vw;
	}
	.rtssc-fab {
		right: 16px;
		bottom: 16px;
		width: 54px;
		height: 54px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rtssc-drawer, .rtssc-overlay, .rtssc-add, .rtssc-fab, .rtssc-toast, .rtssc-checkout {
		transition: none;
	}
	.rtssc-badge.rtssc-pop {
		animation: none;
	}
}
