/* ===========================================================
   RedTagOffer design system
   See /DESIGN-SYSTEM.md in the project repo for rationale.
   =========================================================== */

:root {
	/* Color */
	--rto-ink: #14161c;
	--rto-paper: #faf6ef;
	--rto-surface: #ffffff;
	--rto-red: #d93a2b;
	--rto-red-dark: #b32a1d;
	--rto-teal: #0e5a52;
	--rto-gold: #e0a63a;
	--rto-green: #1f8a5f;
	--rto-line: #e7e0d2;
	--rto-muted: #6e6a60;

	/* Type */
	--font-display: "Fraunces", Georgia, "Times New Roman", serif;
	--font-body: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

	/* Space */
	--space-1: 4px;
	--space-2: 8px;
	--space-3: 12px;
	--space-4: 16px;
	--space-5: 24px;
	--space-6: 32px;
	--space-7: 48px;
	--space-8: 64px;
	--space-9: 96px;

	/* Misc */
	--radius: 10px;
	--radius-sm: 6px;
	--shadow-card: 0 1px 2px rgba(20, 22, 28, 0.04), 0 8px 24px rgba(20, 22, 28, 0.06);
	--shadow-card-hover: 0 2px 4px rgba(20, 22, 28, 0.06), 0 16px 32px rgba(20, 22, 28, 0.1);
	--ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* ---------- Reset / base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--rto-paper);
	color: var(--rto-ink);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--rto-teal); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
	font-family: var(--font-display);
	font-weight: 600;
	line-height: 1.15;
	margin: 0 0 var(--space-3);
	color: var(--rto-ink);
}

h1 { font-size: clamp(2rem, 1.5rem + 2vw, 3.25rem); font-weight: 500; }
h2 { font-size: clamp(1.5rem, 1.3rem + 1vw, 2.1rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 var(--space-4); }

.rto-container {
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 var(--space-5);
}

@media (max-width: 600px) {
	.rto-container { padding: 0 var(--space-4); }
}

/* ---------- Skip link / a11y ---------- */

.rto-skip-link {
	position: absolute;
	left: -999px;
	top: 0;
	background: var(--rto-ink);
	color: #fff;
	padding: var(--space-2) var(--space-4);
	z-index: 1000;
	border-radius: 0 0 var(--radius-sm) 0;
}
.rto-skip-link:focus { left: 0; }

:focus-visible {
	outline: 2px solid var(--rto-teal);
	outline-offset: 2px;
}

/* ---------- Buttons ---------- */

.rto-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-2);
	font-family: var(--font-body);
	font-weight: 600;
	font-size: 0.95rem;
	padding: 12px 22px;
	border-radius: var(--radius-sm);
	border: 1px solid transparent;
	cursor: pointer;
	transition: transform 0.12s var(--ease), box-shadow 0.12s var(--ease), background-color 0.12s var(--ease);
	text-decoration: none;
}
.rto-btn:hover { text-decoration: none; }
.rto-btn:active { transform: translateY(1px); }

.rto-btn-primary { background: var(--rto-red); color: #fff; }
.rto-btn-primary:hover { background: var(--rto-red-dark); }

.rto-btn-secondary { background: transparent; color: var(--rto-ink); border-color: var(--rto-line); }
.rto-btn-secondary:hover { border-color: var(--rto-ink); }

/* ---------- Header ---------- */

/* Light, layered "product" header — not a corporate black bar. A warm
   translucent surface floating above the page, with the logo's dark
   wordmark legible against it (the old dark header swallowed the
   logo's black "OFFER" text — see DESIGN-SYSTEM.md). */
.rto-header {
	background: rgba(250, 246, 239, 0.88);
	backdrop-filter: blur(14px) saturate(1.4);
	-webkit-backdrop-filter: blur(14px) saturate(1.4);
	color: var(--rto-ink);
	border-bottom: 1px solid var(--rto-line);
	box-shadow: 0 1px 0 rgba(20, 22, 28, 0.02), 0 10px 24px -12px rgba(20, 22, 28, 0.14);
	position: sticky;
	top: 0;
	z-index: 100;
}

.rto-header-inner {
	display: flex;
	align-items: center;
	gap: var(--space-6);
	padding: var(--space-3) 0;
}

.rto-logo {
	display: flex;
	align-items: center;
	white-space: nowrap;
}
.rto-logo:hover { text-decoration: none; }

.rto-nav { display: flex; gap: var(--space-5); flex: 1; }
.rto-nav a {
	color: var(--rto-muted);
	font-size: 0.92rem;
	font-weight: 600;
	position: relative;
	padding-bottom: 2px;
	transition: color 0.12s var(--ease);
}
.rto-nav a::after {
	content: "";
	position: absolute;
	left: 0; right: 100%; bottom: -3px;
	height: 2px;
	background: var(--rto-red);
	border-radius: 2px;
	transition: right 0.18s var(--ease);
}
.rto-nav a:hover { color: var(--rto-ink); text-decoration: none; }
.rto-nav a:hover::after { right: 0; }

.rto-search {
	display: flex;
	align-items: center;
	background: var(--rto-surface);
	border: 1px solid var(--rto-line);
	border-radius: 999px;
	padding: 7px 7px 7px 16px;
	min-width: 260px;
	box-shadow: inset 0 1px 2px rgba(20, 22, 28, 0.04), 0 1px 0 rgba(255, 255, 255, 0.6);
	transition: box-shadow 0.18s var(--ease), border-color 0.18s var(--ease), transform 0.18s var(--ease);
}
.rto-search:focus-within {
	border-color: rgba(217, 58, 43, 0.4);
	box-shadow: inset 0 1px 2px rgba(20, 22, 28, 0.04), 0 6px 18px -6px rgba(217, 58, 43, 0.28);
	transform: translateY(-1px);
}
.rto-search input {
	background: none;
	border: none;
	color: var(--rto-ink);
	font-family: var(--font-body);
	font-size: 0.9rem;
	flex: 1;
	outline: none;
}
.rto-search input::placeholder { color: var(--rto-muted); }
.rto-search button {
	background: var(--rto-red);
	border: none;
	color: #fff;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	flex-shrink: 0;
	box-shadow: 0 2px 6px rgba(217, 58, 43, 0.35);
	transition: transform 0.12s var(--ease);
}
.rto-search button:hover { transform: scale(1.06); }

.rto-nav-toggle {
	display: none;
	background: none;
	border: none;
	color: var(--rto-ink);
	width: 36px;
	height: 36px;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	border-radius: var(--radius-sm);
	flex-shrink: 0;
}
.rto-nav-toggle:hover { background: rgba(20, 22, 28, 0.06); }

.rto-logo-img { height: 40px; width: auto; display: block; }

@media (max-width: 860px) {
	.rto-header-inner { flex-wrap: wrap; row-gap: var(--space-3); }
	.rto-logo-img { height: 32px; }
	.rto-nav-toggle { display: flex; order: 2; margin-left: auto; }
	.rto-search { order: 3; min-width: 0; flex: 1 1 100%; }
	.rto-nav {
		display: none;
		order: 4;
		flex-basis: 100%;
		flex-direction: column;
		gap: 2px;
		padding-top: var(--space-2);
		border-top: 1px solid var(--rto-line);
	}
	.rto-nav.is-open { display: flex; }
	.rto-nav a { padding: 8px 4px; }
}

/* ---------- Compact hero / search entry ----------
   Deliberately short — identity + search only, deals start right after.
   See DESIGN-SYSTEM.md: "compact discovery, not a marketing hero." */

.rto-hero-compact {
	position: relative;
	padding: var(--space-6) 0 var(--space-5);
	border-bottom: 1px solid var(--rto-line);
	overflow: hidden;
	background:
		radial-gradient(560px 260px at 88% -25%, rgba(217, 58, 43, 0.09), transparent 70%),
		radial-gradient(420px 220px at 4% 120%, rgba(14, 90, 82, 0.06), transparent 70%),
		var(--rto-paper);
}

/* A quiet, oversized decorative tag silhouette anchored top-right —
   depth without competing with the headline. Purely decorative. */
.rto-hero-compact::after {
	content: "";
	position: absolute;
	top: -40px;
	right: -30px;
	width: 220px;
	height: 220px;
	background: linear-gradient(135deg, rgba(217, 58, 43, 0.1), rgba(217, 58, 43, 0.02));
	clip-path: polygon(35% 0, 100% 0, 100% 100%, 35% 100%, 0 50%);
	transform: rotate(18deg);
	pointer-events: none;
}
@media (max-width: 780px) { .rto-hero-compact::after { display: none; } }

.rto-hero-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	font-size: 0.74rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--rto-teal);
	margin-bottom: var(--space-2);
}
.rto-hero-eyebrow::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--rto-green);
	box-shadow: 0 0 0 3px rgba(31, 138, 95, 0.18);
}

.rto-hero-compact h1 { max-width: 18ch; margin-bottom: var(--space-2); font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.5rem); }
.rto-hero-sub { font-size: 0.98rem; color: var(--rto-muted); max-width: 52ch; margin-bottom: var(--space-4); }

.rto-hero-search { max-width: 460px; margin-bottom: var(--space-3); }

.rto-hero-quicklinks { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); }
.rto-hero-quicklinks a { font-size: 0.85rem; font-weight: 600; color: var(--rto-muted); }
.rto-hero-quicklinks a:hover { color: var(--rto-red); text-decoration: none; }

/* ---------- Section scaffolding ---------- */

.rto-section { padding: var(--space-8) 0; }
.rto-section-tight { padding: var(--space-6) 0; }
.rto-section + .rto-section { border-top: 1px solid var(--rto-line); }

.rto-live-count {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--rto-muted);
	white-space: nowrap;
}
.rto-live-dot {
	width: 7px; height: 7px; border-radius: 50%;
	background: var(--rto-green);
	box-shadow: 0 0 0 3px rgba(31, 138, 95, 0.18);
}

.rto-section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--space-4);
	margin-bottom: var(--space-6);
	flex-wrap: wrap;
}
.rto-section-head h2 { margin: 0; }
.rto-section-head .rto-section-sub { color: var(--rto-muted); font-size: 0.95rem; margin: 0; }
.rto-section-link { font-weight: 600; font-size: 0.9rem; white-space: nowrap; }

/* ---------- Category chips ---------- */

.rto-categories {
	display: flex;
	gap: var(--space-3);
	flex-wrap: wrap;
}
@media (max-width: 600px) {
	.rto-categories { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
	.rto-categories::-webkit-scrollbar { display: none; }
	.rto-category-chip { flex-shrink: 0; }
}
.rto-category-chip {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	padding: 10px 18px;
	border-radius: 999px;
	background: var(--rto-surface);
	border: 1px solid var(--rto-line);
	color: var(--rto-ink);
	font-weight: 600;
	font-size: 0.9rem;
	transition: border-color 0.12s var(--ease), transform 0.12s var(--ease), box-shadow 0.12s var(--ease);
}
.rto-category-chip:hover {
	text-decoration: none;
	border-color: var(--rto-red);
	box-shadow: var(--shadow-card);
	transform: translateY(-1px);
}

/* ---------- Deal grid / card ---------- */

.rto-deal-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: var(--space-5);
}

.rto-card {
	--rx: 0deg;
	--ry: 0deg;
	--ty: 0px;
	background: var(--rto-surface);
	border: 1px solid var(--rto-line);
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow-card);
	transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease), border-color 0.2s var(--ease);
	transform-style: preserve-3d;
	opacity: 0;
	transform: perspective(1000px) rotateX(6deg) translateY(18px);
}
/* Tilt (--rx/--ry) is set by main.js on pointermove for fine-pointer
   desktops only — a resting/touch/keyboard state still works via the
   plain :hover/:focus-within lift below, just without the tilt. */
.rto-card.is-visible {
	opacity: 1;
	transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(var(--ty));
}
.rto-card:hover, .rto-card:focus-within { --ty: -6px; box-shadow: var(--shadow-card-hover); border-color: rgba(217, 58, 43, 0.25); }

.rto-card-link { display: block; color: inherit; }
.rto-card-link:hover { text-decoration: none; }

.rto-card-media {
	aspect-ratio: 1 / 1;
	background: #f4efe6;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	overflow: hidden;
}
.rto-card-media img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.3s var(--ease); }
.rto-card:hover .rto-card-media img, .rto-card:focus-within .rto-card-media img { transform: scale(1.07) translateY(-2px); }

/* The Red Tag — the site's signature: a real tag silhouette (notch +
   "hole" dot) sitting at a slight physical rest angle, not a flat pill.
   See DESIGN-SYSTEM.md §Red Tag. */
.rto-badge-discount {
	position: absolute;
	top: 14px;
	left: -2px;
	background: linear-gradient(135deg, var(--rto-red), var(--rto-red-dark));
	color: #fff;
	font-size: 0.78rem;
	font-weight: 800;
	padding: 5px 12px 5px 16px;
	clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%);
	box-shadow: 0 4px 10px -2px rgba(179, 42, 29, 0.45);
	transform: rotate(-4deg);
	transform-origin: 4px 50%;
	transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.rto-badge-discount::after {
	content: "";
	position: absolute;
	left: 5px;
	top: 50%;
	width: 3px;
	height: 3px;
	background: #fff;
	border-radius: 50%;
	transform: translateY(-50%);
	opacity: 0.9;
}
.rto-card:hover .rto-badge-discount, .rto-card:focus-within .rto-badge-discount {
	transform: rotate(-7deg) translateY(-2px) scale(1.05);
	box-shadow: 0 8px 16px -4px rgba(179, 42, 29, 0.5);
}
@keyframes rto-tag-settle {
	0% { transform: rotate(-16deg) scale(0.85); opacity: 0; }
	65% { transform: rotate(-1deg) scale(1.04); opacity: 1; }
	100% { transform: rotate(-4deg) scale(1); opacity: 1; }
}
.rto-card.is-visible .rto-badge-discount { animation: rto-tag-settle 0.5s 0.15s var(--ease) both; }

.rto-card-body { padding: var(--space-4); }

.rto-retailer {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--rto-muted);
	margin-bottom: var(--space-2);
}

/* The "RED TAG DEAL" mark — reserved for offers with a verified
   reference price. Never shown just because a price exists. */
.rto-tag-label {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 0.7rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--rto-red);
	margin-bottom: var(--space-2);
}
.rto-tag-label-lg { font-size: 0.8rem; margin-bottom: var(--space-3); }

.rto-card-title {
	font-size: 0.92rem;
	line-height: 1.35;
	font-weight: 600;
	color: var(--rto-ink);
	margin: 0 0 var(--space-3);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	height: 2.7em;
}

.rto-price-row { display: flex; align-items: baseline; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-3); }
.rto-price-current { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; color: var(--rto-ink); }
.rto-price-reference { font-size: 0.85rem; color: var(--rto-muted); text-decoration: line-through; }
.rto-savings-pill { font-size: 0.76rem; font-weight: 700; color: var(--rto-green); }

.rto-freshness {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 0.74rem;
	color: var(--rto-muted);
	margin-bottom: var(--space-3);
}
.rto-freshness::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--rto-green); flex-shrink: 0; }
.rto-freshness.is-stale::before { background: var(--rto-muted); }

.rto-card-cta {
	display: block;
	width: 100%;
	text-align: center;
	padding: 10px 0;
	border-radius: var(--radius-sm);
	background: var(--rto-ink);
	color: #fff;
	font-weight: 600;
	font-size: 0.88rem;
	transition: background-color 0.12s var(--ease);
}
.rto-card:hover .rto-card-cta { background: var(--rto-red); }

/* ---------- Featured deal ----------
   The spotlight presentation used when there's exactly one standout
   deal — a layered composition, not a stretched grid card. Shares the
   card's tilt/entrance mechanics (main.js targets .rto-tilt). */

.rto-featured {
	--rx: 0deg; --ry: 0deg; --ty: 0px;
	position: relative;
	display: grid;
	grid-template-columns: 1fr 1.1fr;
	gap: var(--space-8);
	align-items: center;
	background: linear-gradient(180deg, var(--rto-surface), #fffdf9);
	border: 1px solid var(--rto-line);
	border-radius: 20px;
	padding: var(--space-8);
	box-shadow: 0 1px 2px rgba(20, 22, 28, 0.04), 0 30px 60px -20px rgba(20, 22, 28, 0.16);
	transform-style: preserve-3d;
	transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
	opacity: 0;
	transform: perspective(1400px) rotateX(4deg) translateY(16px);
}
.rto-featured.is-visible { opacity: 1; transform: perspective(1400px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(var(--ty)); }
.rto-featured:hover { --ty: -4px; box-shadow: 0 1px 2px rgba(20, 22, 28, 0.04), 0 40px 70px -18px rgba(20, 22, 28, 0.22); }

.rto-featured-media {
	position: relative;
	aspect-ratio: 4/3;
	display: flex;
	align-items: center;
	justify-content: center;
}
.rto-featured-media::after {
	/* A soft ambient shadow the product appears to sit on — implies depth
	   without a literal floor/ground plane. */
	content: "";
	position: absolute;
	bottom: 4%;
	left: 12%;
	right: 12%;
	height: 14%;
	background: radial-gradient(closest-side, rgba(20, 22, 28, 0.16), transparent 75%);
	filter: blur(4px);
	z-index: 0;
}
.rto-featured-media img {
	position: relative;
	z-index: 1;
	width: 100%;
	height: 100%;
	object-fit: contain;
	filter: drop-shadow(0 18px 24px rgba(20, 22, 28, 0.14));
	transition: transform 0.35s var(--ease);
}
.rto-featured:hover .rto-featured-media img { transform: translateY(-6px) scale(1.02); }

.rto-featured-title { font-size: clamp(1.3rem, 1.1rem + 1vw, 1.7rem); margin: var(--space-2) 0 var(--space-3); }
.rto-featured .rto-price-current { font-size: 2.1rem; }
.rto-featured .rto-badge-discount { position: static; display: inline-flex; margin-bottom: var(--space-3); transform: rotate(-3deg); }
.rto-featured .rto-badge-discount::after { display: none; }

@media (max-width: 780px) {
	.rto-featured { grid-template-columns: 1fr; padding: var(--space-5); gap: var(--space-5); }
}

/* ---------- Trust / value section ---------- */

.rto-trust-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--space-6);
}
.rto-trust-item h3 { font-size: 1.05rem; margin-bottom: var(--space-2); }
.rto-trust-item p { color: var(--rto-muted); font-size: 0.92rem; margin: 0; }
.rto-trust-icon {
	width: 40px; height: 40px; border-radius: 10px;
	background: rgba(14, 90, 82, 0.09);
	color: var(--rto-teal);
	display: flex; align-items: center; justify-content: center;
	margin-bottom: var(--space-3);
	font-size: 1.1rem;
}
@media (max-width: 780px) { .rto-trust-grid { grid-template-columns: 1fr; } }

/* ---------- Empty / loading / error states ---------- */

.rto-empty-state, .rto-error-state {
	text-align: center;
	padding: var(--space-8) var(--space-5);
	border: 1px dashed var(--rto-line);
	border-radius: var(--radius);
	color: var(--rto-muted);
	background: rgba(255, 255, 255, 0.5);
}
.rto-empty-state .rto-empty-icon { font-size: 1.8rem; margin-bottom: var(--space-3); }
.rto-error-state { border-color: rgba(217, 58, 43, 0.35); color: var(--rto-red-dark); }

.rto-skeleton-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-5); }
.rto-skeleton-card { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--rto-line); background: var(--rto-surface); }
.rto-skeleton-media { aspect-ratio: 1/1; background: linear-gradient(100deg, #eee6d8 30%, #f4efe6 50%, #eee6d8 70%); background-size: 200% 100%; animation: rto-shimmer 1.4s ease-in-out infinite; }
.rto-skeleton-line { height: 12px; margin: var(--space-3) var(--space-4) 0; border-radius: 4px; background: #eee6d8; }
.rto-skeleton-line:last-child { margin-bottom: var(--space-4); width: 60%; }
@keyframes rto-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---------- Footer ---------- */

.rto-footer {
	background: var(--rto-ink);
	color: rgba(255, 255, 255, 0.75);
	padding: var(--space-7) 0 var(--space-5);
	margin-top: var(--space-8);
}
.rto-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--space-6); padding-bottom: var(--space-6); border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.rto-footer-brand { font-family: var(--font-display); color: #fff; font-size: 1.2rem; margin-bottom: var(--space-3); }
.rto-footer-desc { max-width: 40ch; font-size: 0.9rem; }
.rto-footer h4 { color: #fff; font-family: var(--font-body); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: var(--space-3); }
.rto-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.rto-footer a { color: rgba(255, 255, 255, 0.75); font-size: 0.9rem; }
.rto-footer a:hover { color: #fff; }

.rto-footer-bottom {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-top: var(--space-5);
	font-size: 0.82rem;
	flex-wrap: wrap;
	gap: var(--space-3);
}
.rto-powered-by { color: rgba(255, 255, 255, 0.6); }
.rto-powered-by a { color: rgba(255, 255, 255, 0.85); font-weight: 600; }

@media (max-width: 780px) {
	.rto-footer-grid { grid-template-columns: 1fr; gap: var(--space-5); }
}

/* ---------- Deal detail page ---------- */

.rto-deal-detail {
	display: grid;
	grid-template-columns: 0.85fr 1.15fr;
	gap: var(--space-6);
	padding: var(--space-6) 0;
	align-items: start;
}
/* Capped, not a full-bleed half-column — a controlled stage for the
   product, not an oversized hero image (Phase 7 §12). */
.rto-deal-detail-media {
	position: relative;
	max-width: 380px;
	aspect-ratio: 1/1;
	background: #f4efe6;
	border-radius: var(--radius);
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: var(--shadow-card);
}
.rto-deal-detail-media img { width: 82%; height: 82%; object-fit: contain; filter: drop-shadow(0 12px 16px rgba(20, 22, 28, 0.12)); }
.rto-deal-detail h1 { margin-bottom: var(--space-2); font-size: clamp(1.3rem, 1.1rem + 1vw, 1.7rem); }

.rto-rating {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 0.85rem;
	color: var(--rto-ink);
	margin: 0 0 var(--space-2);
}
.rto-rating-star { color: #e0a63a; font-size: 0.95rem; }
.rto-rating-count { color: var(--rto-muted); font-size: 0.82rem; }
.rto-why-deal {
	background: rgba(31, 138, 95, 0.07);
	border: 1px solid rgba(31, 138, 95, 0.2);
	border-radius: var(--radius-sm);
	padding: var(--space-3) var(--space-4);
	font-size: 0.88rem;
	color: #0f4a34;
	margin: var(--space-3) 0;
}
.rto-stale-notice {
	background: rgba(224, 166, 58, 0.12);
	border: 1px solid rgba(224, 166, 58, 0.35);
	border-radius: var(--radius-sm);
	padding: var(--space-3) var(--space-4);
	font-size: 0.85rem;
	color: #7a5a12;
	margin: var(--space-3) 0;
}
@media (max-width: 780px) { .rto-deal-detail { grid-template-columns: 1fr; padding: var(--space-6) 0; } }

/* ---------- Vote widget ("Community opinion") ----------
   Phase 8: no border/card, no boxed container — a plain inline line of
   text plus small buttons, sized to feel like a supporting signal, not
   a component. Stays visually lighter than the CTA below it. */

.rto-vote {
	margin: var(--space-2) 0 var(--space-3);
}

.rto-vote-line {
	margin: 0 0 6px;
	font-size: 0.82rem;
	line-height: 1.4;
}

.rto-vote-label {
	font-weight: 700;
	color: var(--rto-ink);
}

.rto-vote-row {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	flex-wrap: wrap;
}

.rto-vote-buttons { display: flex; gap: 6px; flex-wrap: wrap; }

.rto-vote-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-family: var(--font-body);
	font-size: 0.74rem;
	font-weight: 600;
	color: var(--rto-ink);
	background: var(--rto-paper);
	border: 1px solid var(--rto-line);
	border-radius: 999px;
	padding: 4px 10px;
	cursor: pointer;
	transition: border-color 0.12s var(--ease), background-color 0.12s var(--ease), transform 0.12s var(--ease);
}
.rto-vote-btn:hover:not(:disabled) { border-color: var(--rto-ink); }
.rto-vote-btn:active:not(:disabled) { transform: translateY(1px); }
.rto-vote-btn:disabled { cursor: default; opacity: 0.55; }

.rto-vote-btn[aria-pressed="true"].rto-vote-btn-up { background: rgba(31, 138, 95, 0.12); border-color: var(--rto-green); color: #0f4a34; opacity: 1; }
.rto-vote-btn[aria-pressed="true"].rto-vote-btn-down { background: rgba(217, 58, 43, 0.1); border-color: var(--rto-red); color: var(--rto-red-dark); opacity: 1; }

.rto-vote-result {
	margin: 0;
	font-size: 0.8rem;
	color: var(--rto-muted);
	line-height: 1.4;
	opacity: 1;
	transition: opacity 0.2s var(--ease);
}
.rto-vote-result[hidden] { display: none; }
.rto-vote-result.is-updating { opacity: 0.4; }
.rto-vote-result strong { color: var(--rto-ink); }

.rto-vote-error { color: var(--rto-red-dark); font-size: 0.8rem; margin-top: var(--space-2); }

/* ---------- Motion ---------- */

/* Hero entrance — fires once on load, staggered ~70ms/element, with
   enough vertical travel + a touch of scale to actually be perceived
   (the first pass here was too subtle to notice). */
.rto-anim { opacity: 0; transform: translateY(16px) scale(0.985); animation: rto-fade-up 0.55s var(--ease) forwards; }
.rto-anim-1 { animation-delay: 0.02s; }
.rto-anim-2 { animation-delay: 0.09s; }
.rto-anim-3 { animation-delay: 0.16s; }
.rto-anim-4 { animation-delay: 0.23s; }
.rto-anim-5 { animation-delay: 0.32s; }
@keyframes rto-fade-up { to { opacity: 1; transform: none; } }

@keyframes rto-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.rto-live-dot { animation: rto-pulse 2.2s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
	.rto-card, .rto-featured, .rto-card-media img, .rto-featured-media img, .rto-category-chip, .rto-btn,
	.rto-vote-btn, .rto-vote-result, .rto-anim, .rto-badge-discount, .rto-search, .rto-nav a::after {
		transition: none !important;
		animation: none !important;
	}
	.rto-card, .rto-featured, .rto-anim { opacity: 1 !important; transform: none !important; }
	.rto-skeleton-media, .rto-live-dot { animation: none; }
}
