/**
 * Components — rt-* prefixed, per Phase 04 §37 naming convention.
 */

/* ---------- Shop / archive filters (moved from inline <style> in
   woocommerce/archive-product.php, Phase 10 code-quality review) ---------- */
.rt-shop-layout { display: block; }
.rt-shop-filters form { display: flex; flex-wrap: wrap; align-items: end; gap: var(--rt-space-2); }
.rt-shop-filters .rt-field { flex: 1 1 150px; min-width: 140px; margin-bottom: 0 !important; }
.rt-shop-filters .rt-field--inline { margin-bottom: var(--rt-space-2); }
.rt-shop-filters .rt-field__select { min-height: 48px; }
.rt-shop-results { margin-top: var(--rt-space-4); }
.rt-section--flush-top-pad { padding-block-start: 0; }

/* ---------- Buttons (Phase 04 §17-18) ---------- */
.rt-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	gap: var(--rt-space-1);
	padding: 14px 28px;
	border-radius: var(--rt-radius-button);
	font-weight: 400;
	font-size: var(--rt-fs-small);
	border: 1px solid transparent;
	cursor: pointer;
	transition: background var(--rt-motion-fast), color var(--rt-motion-fast), border-color var(--rt-motion-fast), transform var(--rt-motion-fast);
	white-space: nowrap;
}
.rt-button:active { transform: scale(0.98); }
.rt-button:disabled, .rt-button[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

.rt-button--primary { background: var(--rt-color-primary); color: var(--rt-color-white); }
.rt-button--primary:hover { background: var(--rt-color-primary-hover); }

.rt-button--secondary { background: var(--rt-color-secondary); color: var(--rt-color-white); }
.rt-button--secondary:hover { background: var(--rt-color-secondary-hover); }

.rt-button--outline { background: transparent; color: var(--rt-color-primary); border-color: var(--rt-color-primary); }
.rt-button--outline:hover { background: var(--rt-color-primary); color: var(--rt-color-white); }

.rt-button--ghost { background: transparent; color: var(--rt-color-primary); padding: 8px 12px; }
.rt-button--ghost:hover { background: var(--rt-color-ghost-hover); }

.rt-button--loading { position: relative; color: transparent !important; }
.rt-button--loading::after {
	content: "";
	position: absolute;
	width: 16px; height: 16px;
	border: 2px solid currentColor;
	border-top-color: transparent;
	border-radius: 50%;
	color: var(--rt-color-primary);
	animation: rt-spin 0.7s linear infinite;
}
@keyframes rt-spin { to { transform: rotate(360deg); } }

/* ---------- Header (Phase 04 §7) ---------- */
.rt-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--rt-color-header-glass);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--rt-color-border);
}
.rt-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: var(--rt-space-3);
	padding-block: var(--rt-space-2);
}
.rt-header__logo,
.rt-footer__brand {
	display: inline-flex;
	flex-direction: column;
	max-width: 100%;
}
.rt-header__logo,
.rt-header__logo > a {
	align-items: center;
}
.rt-footer__brand {
	align-items: flex-start;
}
.rt-footer__brand-mark {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	width: 180px;
	max-width: 100%;
}
.rt-header__logo img {
	max-width: min(170px, 34vw);
	max-height: 56px;
	width: auto;
	object-fit: contain;
}
.rt-brand-name {
	display: block;
	margin-top: 4px;
	font-size: var(--rt-fs-body);
	font-weight: 400;
	line-height: 1.25;
	text-align: center;
	white-space: nowrap;
}
.rt-header__logo .rt-brand-name {
	color: var(--rt-color-primary);
}
.rt-footer__brand .rt-brand-name {
	width: 180px;
	max-width: 100%;
	color: var(--rt-color-secondary);
}
.rt-header__logo .custom-logo-link,
.rt-header__logo > a > img {
	display: inline-flex;
	align-items: center;
}
.rt-header__logo > a > img {
	width: auto;
	height: auto;
}
.rt-footer__brand-mark > img,
.rt-footer__brand-mark .custom-logo {
	width: min(120px, 35vw);
	height: auto;
	max-width: 120px;
	max-height: 120px;
	object-fit: contain;
}
.rt-footer__brand-mark .custom-logo-link {
	display: inline-flex;
	max-width: 120px;
}
.rt-button--compact {
	min-height: 44px;
	padding: 10px 18px;
	font-size: var(--rt-fs-small);
}
.rt-nav { display: none; }
.rt-nav__list { display: flex; flex-wrap: wrap; gap: var(--rt-space-4); }
.rt-nav__list a { font-weight: 400; }
.rt-nav__list a:hover { color: var(--rt-color-secondary); }
.rt-header__actions { display: flex; align-items: center; gap: var(--rt-space-2); }
.rt-header__menu-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	background: none;
	border: none;
	cursor: pointer;
	padding: var(--rt-space-1);
}

.rt-header-search { position: relative; }
.rt-header-search__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 1px solid var(--rt-color-border);
	border-radius: var(--rt-radius-button);
	background: var(--rt-color-surface);
	cursor: pointer;
	transition: border-color var(--rt-motion-fast), color var(--rt-motion-fast), background var(--rt-motion-fast);
}
.rt-header-search__toggle::-webkit-details-marker { display: none; }
.rt-header-search__toggle::marker { content: ''; }
.rt-header-search__toggle:hover,
.rt-header-search[open] .rt-header-search__toggle {
	color: var(--rt-color-secondary);
	border-color: var(--rt-color-secondary);
	background: var(--rt-color-ghost-hover);
}
.rt-header-search__panel {
	position: absolute;
	inset-inline-end: 0;
	top: calc(100% + var(--rt-space-1));
	width: min(360px, calc(100vw - (2 * var(--rt-space-2))));
	padding: var(--rt-space-2);
	border: 1px solid var(--rt-color-border);
	border-radius: var(--rt-radius-md);
	background: var(--rt-color-surface);
	box-shadow: var(--rt-shadow-md);
	z-index: 210;
}
.rt-search-form__label {
	display: block;
	margin-bottom: var(--rt-space-1);
	font-size: var(--rt-fs-small);
	font-weight: 400;
	color: var(--rt-color-text);
}
.rt-search-form__controls { display: flex; gap: var(--rt-space-1); }
.rt-search-form__input {
	width: 100%;
	min-width: 0;
	min-height: 44px;
	padding: 10px 12px;
	border: 1px solid var(--rt-color-border);
	border-radius: var(--rt-radius-sm);
	background: var(--rt-color-surface);
	color: var(--rt-color-text);
}
.rt-search-form__input:focus { border-color: var(--rt-color-secondary); }
.rt-mobile-menu__search { margin-bottom: var(--rt-space-3); }

@media (min-width: 1024px) {
	.rt-nav { display: block; }
	.rt-header__menu-toggle { display: none; }
}

.rt-mobile-menu {
	position: fixed;
	inset: 0 0 0 auto;
	width: min(320px, 85vw);
	max-inline-size: 85vw;
	box-sizing: border-box;
	background: var(--rt-color-surface);
	box-shadow: var(--rt-shadow-lg);
	padding: var(--rt-space-3);
	transform: translateX(100%);
	visibility: hidden;
	transition: transform var(--rt-motion-slow), visibility 0s linear var(--rt-motion-slow);
	z-index: 200;
	overflow-y: auto;
	overflow-x: clip;
}
html[dir="rtl"] .rt-mobile-menu { inset: 0 auto 0 0; transform: translateX(-100%); }
.rt-mobile-menu.is-open,
html[dir="rtl"] .rt-mobile-menu.is-open {
	transform: translateX(0) !important;
	visibility: visible;
	transition: transform var(--rt-motion-slow), visibility 0s linear 0s;
}
.rt-mobile-menu__list,
.rt-mobile-menu__list li,
.rt-mobile-menu__list a {
	min-width: 0;
	max-width: 100%;
	white-space: normal;
	overflow-wrap: anywhere;
}
.rt-mobile-menu__list li { margin-bottom: var(--rt-space-2); }
.rt-mobile-menu__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
}
.rt-mobile-menu-overlay {
	position: fixed; inset: 0; background: var(--rt-color-overlay);
	opacity: 0; pointer-events: none; transition: opacity var(--rt-motion-fast); z-index: 199;
}
.rt-mobile-menu-overlay.is-open { opacity: 1; pointer-events: auto; }

@media (max-width: 1023px) {
	body.rt-mobile-menu-open { overflow: hidden; }
}

/* ---------- Hero (Phase 04 §8) ---------- */
.rt-hero-section { padding-block: 0; }
.rt-hero {
	padding-block: var(--rt-space-5);
	display: grid;
	gap: var(--rt-space-4);
}
@media (min-width: 768px) and (max-width: 1023px) and (max-height: 500px) and (orientation: landscape) {
	.rt-hero { padding-block: var(--rt-space-1); }
	.rt-hero__actions { margin-top: var(--rt-space-2); }
}
@media (min-width: 1024px) {
	.rt-hero { grid-template-columns: 1fr 1fr; align-items: center; padding-block: var(--rt-space-6); }
}
.rt-hero__eyebrow { color: var(--rt-color-secondary); font-weight: 400; text-transform: uppercase; letter-spacing: 0.05em; font-size: var(--rt-fs-small); }
.rt-hero__title { margin-block: var(--rt-space-2); }
.rt-hero__description { font-size: var(--rt-fs-body); max-width: 480px; }
.rt-hero__actions { display: flex; flex-wrap: wrap; gap: var(--rt-space-2); margin-top: var(--rt-space-3); }
.rt-hero__image img { border-radius: var(--rt-radius-lg); width: 100%; object-fit: cover; aspect-ratio: 4/5; }

/* ---------- Trust bar (Phase 04 §9) ---------- */
.rt-trust-bar { padding-block: var(--rt-space-3); border-block: 1px solid var(--rt-color-border); }
.rt-trust-bar__list { display: grid; grid-template-columns: repeat(2,1fr); gap: var(--rt-space-3); }
@media (min-width: 768px) { .rt-trust-bar__list { grid-template-columns: repeat(4,1fr); } }
.rt-trust-item {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--rt-space-1);
	text-align: center;
}
.rt-trust-item__title { font-weight: 400; font-size: var(--rt-fs-small); color: var(--rt-color-text); }

/* ---------- Cards (Phase 04 §10-16) ---------- */
.rt-card {
	background: var(--rt-color-surface);
	border-radius: var(--rt-radius-card);
	overflow: hidden;
	border: 1px solid var(--rt-color-border);
	transition: box-shadow var(--rt-motion-fast), transform var(--rt-motion-fast);
	display: flex;
	flex-direction: column;
	height: 100%;
}

.rt-grid--categories {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--rt-space-3);
}
@media (min-width: 768px) {
	.rt-grid--categories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.rt-category-card .rt-card__image-wrap { aspect-ratio: 16/10; }
.rt-card:hover { box-shadow: var(--rt-shadow-md); transform: translateY(-2px); }
.rt-card__image-wrap { position: relative; aspect-ratio: 4/5; overflow: hidden; background: var(--rt-color-border); }
.rt-card__image-wrap > a { display: block; width: 100%; height: 100%; }
.rt-card__image-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--rt-motion-slow); }
.rt-card:hover .rt-card__image-wrap img { transform: scale(1.04); }
.rt-card__body { padding: var(--rt-space-2); display: flex; flex-direction: column; gap: var(--rt-space-1); flex: 1; }
.rt-card__title { font-size: var(--rt-fs-body); font-weight: 700; margin: 0; }
.rt-card__meta { font-size: var(--rt-fs-small); color: var(--rt-color-text-secondary); }
.rt-product-card__identity {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
}
.rt-product-card__identity span {
	display: inline-flex;
	align-items: baseline;
	gap: 4px;
	max-width: 100%;
	padding: 3px 8px;
	border: 1px solid var(--rt-color-border);
	border-radius: 999px;
	background: var(--rt-color-background);
	color: var(--rt-color-text-secondary);
	font-size: var(--rt-fs-caption);
	line-height: 1.6;
	overflow-wrap: anywhere;
}
.rt-product-card__identity strong { color: var(--rt-color-text); font-weight: 700; }
.rt-product-card__specs {
	display: flex;
	flex-wrap: wrap;
	gap: 4px var(--rt-space-2);
	margin: 0;
	padding-block: var(--rt-space-1);
	border-block: 1px solid var(--rt-color-border);
}
.rt-product-card__spec {
	display: flex;
	align-items: baseline;
	gap: 4px;
	min-width: 0;
	font-size: var(--rt-fs-caption);
	line-height: 1.6;
}
.rt-product-card__spec dt {
	color: var(--rt-color-text-secondary);
}
.rt-product-card__spec dd {
	margin: 0;
	color: var(--rt-color-text);
	font-weight: 400;
}
.rt-card__footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: var(--rt-space-1); }
.rt-card__badge {
	position: absolute; margin: var(--rt-space-1);
	background: var(--rt-color-secondary); color: var(--rt-color-white);
	font-size: var(--rt-fs-caption); padding: 4px 10px; border-radius: 999px;
}
.rt-card__price { font-weight: 400; color: var(--rt-color-primary); }

/* ---------- Price lock (Phase 04 §12, Phase 07 §7-10) ---------- */
.rt-price-lock { display: flex; flex-direction: column; gap: var(--rt-space-1); }
.rt-price-lock__message { font-size: var(--rt-fs-small); color: var(--rt-color-text-secondary); margin: 0; }
.rt-price-lock__actions { display: flex; gap: var(--rt-space-1); flex-wrap: wrap; }

/* Keep fragment targets below the sticky header. */
#rt-consultation {
	scroll-margin-top: 7rem;
}

/* ---------- Shared section modifiers ---------- */
/* Reused across single-product, single (blog), single-collection, single-project
   — kept generic and reusable rather than page-specific (code-quality pass, v1.0.19). */
.rt-section--flush-top { padding-block-start: 0; }
.rt-section--flush-bottom { padding-block-end: 0; }
.rt-section--surface { background: var(--rt-color-surface); }
.rt-section--narrow { max-width: 760px; }
.rt-lede { max-width: 640px; }

/* ---------- Blog single post ---------- */
.rt-post-thumbnail-wrap { margin-block: var(--rt-space-3); }
.rt-featured-image { border-radius: var(--rt-radius-lg); width: 100%; }

/* ---------- Project single page ---------- */
.rt-project-meta { font-size: var(--rt-fs-small); }
.rt-project-testimonial {
	border-inline-start: 3px solid var(--rt-color-secondary);
	padding-inline-start: var(--rt-space-2);
	font-style: italic;
	margin: var(--rt-space-3) 0;
}
.rt-project-gallery-item { grid-column: span 4; }

/* ---------- Single Product page (Phase 07 §37) ---------- */
/* Replaces what were previously inline style="..." attributes (code-quality
   pass, v1.0.19) — kept as dedicated classes so the page follows the same
   modular-CSS convention as the rest of the theme (Phase 04 §38 / §42). */

.rt-product-layout {
	display: grid;
	gap: var(--rt-space-4);
	grid-template-columns: 1fr;
}
.rt-product-gallery {
	min-width: 0;
}
.rt-product-gallery .woocommerce-product-gallery {
	position: relative;
	margin: 0;
}
.rt-product-gallery .flex-viewport,
.rt-product-gallery .woocommerce-product-gallery__image {
	border-radius: var(--rt-radius-lg);
	background: var(--rt-color-surface);
}
.rt-product-gallery .flex-viewport {
	overflow: hidden;
	box-shadow: var(--rt-shadow-sm);
}
.rt-product-gallery .woocommerce-product-gallery__image a,
.rt-product-gallery .woocommerce-product-gallery__image img {
	display: block;
	width: 100%;
}
.rt-product-gallery .flex-control-thumbs {
	display: flex;
	flex-wrap: nowrap;
	gap: var(--rt-space-1);
	margin: var(--rt-space-2) 0 0;
	padding: 4px;
	list-style: none;
	overflow-x: auto;
	overflow-y: hidden;
	overscroll-behavior-inline: contain;
	scroll-snap-type: inline mandatory;
	scrollbar-color: var(--rt-color-border) transparent;
	scrollbar-width: thin;
}
.rt-product-gallery .flex-control-thumbs li {
	flex: 0 0 72px;
	float: none;
	width: 72px;
	margin: 0;
	scroll-snap-align: start;
}
.rt-product-gallery .flex-control-thumbs img {
	display: block;
	width: 72px;
	height: 88px;
	padding: 3px;
	border: 1px solid var(--rt-color-border);
	border-radius: var(--rt-radius-sm);
	background: var(--rt-color-surface);
	object-fit: cover;
	opacity: 0.72;
	cursor: pointer;
	transition:
		border-color var(--rt-motion-fast),
		box-shadow var(--rt-motion-fast),
		opacity var(--rt-motion-fast),
		transform var(--rt-motion-fast);
}
.rt-product-gallery .flex-control-thumbs img:hover,
.rt-product-gallery .flex-control-thumbs img:focus-visible,
.rt-product-gallery .flex-control-thumbs img.flex-active {
	border-color: var(--rt-color-secondary);
	opacity: 1;
}
.rt-product-gallery .flex-control-thumbs img:focus-visible {
	outline: 3px solid var(--rt-color-focus-ring);
	outline-offset: 2px;
}
.rt-product-gallery .flex-control-thumbs img.flex-active {
	box-shadow:
		0 0 0 2px var(--rt-color-surface),
		0 0 0 4px var(--rt-color-focus-ring);
}
.rt-product-gallery .flex-control-thumbs img:hover {
	transform: translateY(-2px);
}
.rt-product-gallery .woocommerce-product-gallery__trigger {
	position: absolute;
	inset-block-start: var(--rt-space-2);
	inset-inline-end: var(--rt-space-2);
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 1px solid var(--rt-color-border);
	border-radius: var(--rt-radius-sm);
	background: var(--rt-color-surface);
	color: var(--rt-color-text);
	text-decoration: none;
}
.rt-product-gallery .woocommerce-product-gallery__trigger span {
	position: relative;
	display: block;
	width: 22px;
	height: 22px;
	font-size: 0;
}
.rt-product-gallery .woocommerce-product-gallery__trigger span::before {
	content: '';
	position: absolute;
	inset-block-start: 2px;
	inset-inline-start: 2px;
	width: 11px;
	height: 11px;
	border: 2px solid currentColor;
	border-radius: 50%;
}
.rt-product-gallery .woocommerce-product-gallery__trigger span::after {
	content: '';
	position: absolute;
	inset-block-start: 14px;
	inset-inline-start: 13px;
	width: 8px;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
	transform: rotate(45deg);
	transform-origin: left center;
}
@media (min-width: 1024px) {
	.rt-product-layout { grid-template-columns: 1fr 1fr; align-items: start; }
	.rt-product-gallery .flex-control-thumbs {
		gap: var(--rt-space-2);
	}
	.rt-product-gallery .flex-control-thumbs li,
	.rt-product-gallery .flex-control-thumbs img {
		width: 80px;
	}
	.rt-product-gallery .flex-control-thumbs li {
		flex-basis: 80px;
	}
	.rt-product-gallery .flex-control-thumbs img {
		height: 96px;
	}
}

.rt-product-specs { margin-block: var(--rt-space-2); }
.rt-product-specs__row {
	border-bottom: 1px solid var(--rt-color-border);
	padding-block: 8px;
}

.rt-product-price { margin-block: var(--rt-space-2); font-size: var(--rt-fs-h4); }

.rt-product-cta-group { margin-block: var(--rt-space-3); }

.rt-product-qty-input { width: 100px; display: inline-block; }

.rt-product-forms-grid > * { grid-column: span 6; }

/* ---------- Forms (Phase 04 §19-22) ---------- */
.rt-form { display: flex; flex-direction: column; gap: var(--rt-space-2); max-width: 560px; }
.rt-form__heading { font-size: 22px; }
@media (min-width: 1024px) { .rt-form__heading { font-size: var(--rt-fs-h3); } }
.rt-field { display: flex; flex-direction: column; gap: 6px; }
.rt-field__label { font-weight: 400; font-size: var(--rt-fs-small); }
.rt-required { color: var(--rt-color-danger); font-weight: 400; margin-inline-start: 3px; }
.rt-field__input,
.rt-field__textarea,
.rt-field__select {
	padding: 12px 16px;
	border: 1px solid var(--rt-color-border);
	border-radius: var(--rt-radius-sm);
	background: var(--rt-color-surface);
	color: var(--rt-color-text);
	width: 100%;
}
.rt-field__input:focus, .rt-field__textarea:focus, .rt-field__select:focus { border-color: var(--rt-color-secondary); }
.rt-field__helper { font-size: var(--rt-fs-caption); color: var(--rt-color-text-secondary); }
.rt-field--error .rt-field__input,
.rt-field--error .rt-field__textarea { border-color: var(--rt-color-danger); }
.rt-field__error { font-size: var(--rt-fs-caption); color: var(--rt-color-danger); }
.rt-field--success .rt-field__input { border-color: var(--rt-color-success); }

/* Honeypot — clipped in place, present for bots and removed from keyboard flow. */
.rt-hp-field,
.rt-hp-field input {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.rt-form-message { padding: var(--rt-space-2); border-radius: var(--rt-radius-sm); font-size: var(--rt-fs-small); display: none; }
.rt-form-message.is-visible { display: block; }
.rt-form-message--success { background: var(--rt-color-success-surface); color: var(--rt-color-success); }
.rt-form-message--error { background: var(--rt-color-danger-surface); color: var(--rt-color-danger); }

/* ---------- FAQ Accordion (Phase 04 §23) ---------- */
.rt-faq__item { border-bottom: 1px solid var(--rt-color-border); }
.rt-faq__question {
	width: 100%; text-align: right; background: none; border: none; cursor: pointer;
	padding: var(--rt-space-2) 0; font-weight: 400; font-size: var(--rt-fs-body);
	display: flex; align-items: center; justify-content: space-between; gap: var(--rt-space-2);
}
.rt-faq__icon { transition: transform var(--rt-motion-fast); flex-shrink: 0; }
.rt-faq__item.is-open .rt-faq__icon { transform: rotate(45deg); }
.rt-faq__answer { max-height: 0; overflow: hidden; transition: max-height var(--rt-motion-slow); }
.rt-faq__answer p { padding-bottom: var(--rt-space-2); }

/* ---------- Breadcrumb (Phase 04 §24) ---------- */
.rt-breadcrumb { padding-block: var(--rt-space-2); }
.rt-breadcrumb__list { display: flex; flex-wrap: wrap; gap: 6px; font-size: var(--rt-fs-small); color: var(--rt-color-text-secondary); }
.rt-breadcrumb__item:not(:last-child)::after { content: "/"; margin-inline-start: 6px; }
.rt-breadcrumb__item a:hover { color: var(--rt-color-secondary); }

/* ---------- Legal and policy pages ---------- */
.rt-legal-page { padding-block-start: var(--rt-space-3); }
.rt-legal-page__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--rt-space-3);
}
.rt-legal-document {
	min-width: 0;
	background: var(--rt-color-surface);
	border: 1px solid var(--rt-color-border);
	border-radius: var(--rt-radius-card);
	box-shadow: var(--rt-shadow-sm);
	padding: var(--rt-space-3);
}
.rt-legal-document__header {
	padding-bottom: var(--rt-space-3);
	border-bottom: 1px solid var(--rt-color-border);
}
.rt-legal-document__header h1 { margin-bottom: 0; }
.rt-legal-document__content {
	max-width: 72ch;
	margin-inline: auto;
	padding-block: var(--rt-space-4);
	overflow-wrap: anywhere;
}
.rt-legal-document__content > p:first-child {
	display: inline-block;
	margin-bottom: var(--rt-space-3);
	padding: var(--rt-space-1) var(--rt-space-2);
	border: 1px solid var(--rt-color-border);
	border-radius: var(--rt-radius-md);
	background: var(--rt-color-background);
	font-size: var(--rt-fs-small);
}
.rt-legal-document__content > p:nth-child(2) {
	font-size: 18px;
	line-height: 1.9;
	color: var(--rt-color-text);
}
.rt-legal-document__content h2 {
	margin-top: var(--rt-space-5);
	padding-top: var(--rt-space-3);
	border-top: 1px solid var(--rt-color-border);
	font-size: var(--rt-fs-h4);
}
.rt-legal-document__content h3 { margin-top: var(--rt-space-4); }
.rt-legal-document__content p,
.rt-legal-document__content li { line-height: 1.9; }
.rt-legal-document__content ul {
	list-style: disc;
	padding-inline-start: var(--rt-space-3);
	margin-bottom: var(--rt-space-3);
}
.rt-legal-document__content ol {
	list-style: decimal;
	padding-inline-start: var(--rt-space-3);
	margin-bottom: var(--rt-space-3);
}
.rt-legal-document__content li { margin-bottom: var(--rt-space-1); color: var(--rt-color-text-secondary); }
.rt-legal-document__content li::marker { color: var(--rt-color-secondary); }
.rt-legal-document__content strong { color: var(--rt-color-text); }
.rt-legal-document__support {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--rt-space-2);
	padding: var(--rt-space-3);
	border-radius: var(--rt-radius-lg);
	background: var(--rt-color-background);
}
.rt-legal-document__support h2 { margin-bottom: var(--rt-space-1); font-size: var(--rt-fs-h4); }
.rt-legal-document__support p { margin-bottom: 0; }
.rt-legal-sidebar { min-width: 0; }
.rt-legal-nav {
	padding: var(--rt-space-3);
	border: 1px solid var(--rt-color-border);
	border-radius: var(--rt-radius-lg);
	background: var(--rt-color-surface);
}
.rt-legal-nav h2 { font-size: var(--rt-fs-h4); }
.rt-legal-nav__list { display: grid; gap: var(--rt-space-1); }
.rt-legal-nav__link {
	display: flex;
	align-items: center;
	min-height: 44px;
	padding: 10px var(--rt-space-2);
	border-inline-start: 3px solid transparent;
	border-radius: var(--rt-radius-sm);
	color: var(--rt-color-text);
	font-size: var(--rt-fs-small);
	font-weight: 400;
	transition: color var(--rt-motion-fast), background var(--rt-motion-fast), border-color var(--rt-motion-fast);
}
.rt-legal-nav a.rt-legal-nav__link:hover {
	color: var(--rt-color-secondary-hover);
	background: var(--rt-color-background);
}
.rt-legal-nav__link.is-current {
	border-inline-start-color: var(--rt-color-secondary);
	background: var(--rt-color-background);
	color: var(--rt-color-primary);
}
@media (min-width: 768px) {
	.rt-legal-document { padding: var(--rt-space-5); }
	.rt-legal-document__support { flex-direction: row; align-items: center; justify-content: space-between; }
}
@media (min-width: 1024px) {
	.rt-legal-page__layout { grid-template-columns: minmax(0, 2fr) minmax(240px, 0.75fr); gap: var(--rt-space-4); align-items: start; }
	.rt-legal-sidebar { position: sticky; top: 8rem; }
}

/* ---------- Footer (Phase 04 §25) ---------- */
.rt-footer { flex: 0 0 auto; background: var(--rt-color-primary); color: var(--rt-color-footer-text); padding-block: var(--rt-space-6) var(--rt-space-3); }
.rt-footer .rt-brand-name { color: var(--rt-color-white); }
.rt-footer a { color: var(--rt-color-footer-text); }
.rt-footer a:hover { color: var(--rt-color-white); }
.rt-footer__grid { display: grid; gap: var(--rt-space-4); grid-template-columns: 1fr; margin-bottom: var(--rt-space-4); }
@media (min-width: 768px) { .rt-footer__grid { grid-template-columns: repeat(4, 1fr); } }
.rt-footer__heading { color: var(--rt-color-white); font-size: var(--rt-fs-small); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: var(--rt-space-2); }
.rt-footer__list li { margin-bottom: var(--rt-space-1); font-size: var(--rt-fs-small); }
.rt-footer__bottom { border-top: 1px solid var(--rt-color-footer-border); padding-top: var(--rt-space-2); display: flex; flex-wrap: wrap; gap: var(--rt-space-2); justify-content: space-between; font-size: var(--rt-fs-caption); }
.rt-footer__legal-links { display: flex; flex-wrap: wrap; gap: var(--rt-space-1) var(--rt-space-2); }

/* ---------- WooCommerce My Account / Login / Registration (Phase 04 §20) ---------- */
.woocommerce-account .woocommerce,
.woocommerce-page.woocommerce-checkout .woocommerce {
	max-width: 960px;
	margin-inline: auto;
	padding-inline: var(--rt-space-2);
}
.woocommerce-account .woocommerce > h2,
.woocommerce-account .woocommerce > h3 { color: var(--rt-color-primary); }
.woocommerce-account .woocommerce form.login,
.woocommerce-account .woocommerce form.register,
.woocommerce-account .woocommerce form.woocommerce-ResetPassword {
	background: var(--rt-color-surface);
	border: 1px solid var(--rt-color-border);
	border-radius: var(--rt-radius-card);
	box-shadow: var(--rt-shadow-sm);
	padding: var(--rt-space-3);
}
.woocommerce-account .woocommerce form .form-row label .required,
.woocommerce-account .woocommerce form .form-row label abbr.required,
.woocommerce-account .woocommerce form.register .required {
	color: var(--rt-color-danger);
	text-decoration: none;
}
.woocommerce-account .woocommerce form .form-row .password-input { display: block; position: relative; }
.woocommerce-account .woocommerce form .form-row input.input-text:focus,
.woocommerce-account .woocommerce form .form-row select:focus {
	border-color: var(--rt-color-secondary);
	box-shadow: 0 0 0 3px var(--rt-color-focus-ring);
}
.woocommerce-account .woocommerce form .form-row label { color: var(--rt-color-text); }
.woocommerce-account .woocommerce form .form-row .woocommerce-form__label-for-checkbox { display: inline-flex; align-items: center; gap: 8px; }
.woocommerce-account .woocommerce .woocommerce-LostPassword { margin-top: var(--rt-space-1); font-size: var(--rt-fs-small); }
.woocommerce-account .woocommerce .woocommerce-LostPassword a { color: var(--rt-color-secondary); text-decoration: underline; text-underline-offset: 3px; }
.woocommerce-account .woocommerce .woocommerce-privacy-policy-text { font-size: var(--rt-fs-caption); }
.woocommerce-account .woocommerce .woocommerce-form-login__rememberme { margin-inline-end: var(--rt-space-1); }

.woocommerce form.login,
.woocommerce form.register,
.woocommerce form.woocommerce-EditAccountForm,
.woocommerce form.checkout {
	display: flex;
	flex-direction: column;
	gap: var(--rt-space-2);
	max-width: 480px;
}
.woocommerce form .form-row label { font-weight: 400; font-size: var(--rt-fs-small); display: block; margin-bottom: 6px; }
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row select {
	width: 100%; padding: 12px 16px; border: 1px solid var(--rt-color-border);
	border-radius: var(--rt-radius-sm); background: var(--rt-color-surface);
}
.woocommerce form .form-row { margin-bottom: var(--rt-space-1); }
.woocommerce form .form-row.validate-required label .required,
.woocommerce form .form-row.validate-required label abbr.required { color: var(--rt-color-danger); text-decoration: none; }
.woocommerce #customer_login.rt-account-auth {
	display: block;
	width: 100%;
	max-width: 680px;
	margin-inline: auto;
}
.rt-account-auth__panel[hidden] { display: none !important; }
.rt-account-auth__panel > h2 {
	margin-bottom: var(--rt-space-3);
	color: var(--rt-color-primary);
	text-align: center;
}
.woocommerce .rt-account-auth form.login,
.woocommerce .rt-account-auth form.register {
	width: 100%;
	max-width: none;
}
.rt-account-auth__actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: var(--rt-space-2);
}
.rt-account-auth__switch {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: var(--rt-space-1) var(--rt-space-2);
	margin-top: var(--rt-space-3);
	padding-top: var(--rt-space-3);
	border-top: 1px solid var(--rt-color-border);
	text-align: center;
}
.rt-account-auth__switch p { margin: 0; }
.rt-account-auth__switch .rt-button { min-width: 132px; }
@media (max-width: 480px) {
	.rt-account-auth__actions,
	.rt-account-auth__switch { align-items: stretch; flex-direction: column; }
	.rt-account-auth__actions .woocommerce-button,
	.rt-account-auth__switch .rt-button { width: 100%; }
}
.woocommerce button.woocommerce-Button,
.woocommerce input.woocommerce-Button {
	display: inline-flex; align-items: center; justify-content: center;
	padding: 14px 28px; border-radius: var(--rt-radius-button);
	background: var(--rt-color-primary); color: var(--rt-color-white); border: none;
	font-weight: 400; cursor: pointer;
}
.woocommerce button.woocommerce-Button:hover { background: var(--rt-color-primary-hover); }
.woocommerce-error, .woocommerce-message, .woocommerce-info {
	list-style: none; padding: var(--rt-space-2); border-radius: var(--rt-radius-sm);
	background: var(--rt-color-danger-surface-subtle); color: var(--rt-color-danger); margin-bottom: var(--rt-space-2);
}
.woocommerce-message { background: var(--rt-color-success-surface-subtle); color: var(--rt-color-success); }
.woocommerce-MyAccount-navigation ul { display: flex; flex-wrap: wrap; gap: var(--rt-space-1); margin-bottom: var(--rt-space-3); }
.woocommerce-MyAccount-navigation a {
	display: inline-block; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--rt-color-border);
	font-size: var(--rt-fs-small);
}
.woocommerce-MyAccount-navigation .is-active a { background: var(--rt-color-primary); color: var(--rt-color-white); border-color: var(--rt-color-primary); }


.rt-empty-state { text-align: center; padding: var(--rt-space-5) var(--rt-space-2); color: var(--rt-color-text-secondary); }
.rt-empty-state__message { margin-bottom: var(--rt-space-2); }

.rt-skeleton {
	background: linear-gradient(90deg, var(--rt-color-border) 25%, var(--rt-color-skeleton-highlight) 37%, var(--rt-color-border) 63%);
	background-size: 400% 100%;
	animation: rt-skeleton-loading 1.4s ease infinite;
	border-radius: var(--rt-radius-sm);
}
@keyframes rt-skeleton-loading { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- 404 page (code-quality pass, v1.0.23) ---------- */
.rt-eyebrow--block { display: block; justify-content: center; }
.rt-404-search { max-width: 400px; margin-inline: auto; margin-block: var(--rt-space-3); }

/* ---------- Mobile menu structural pieces (code-quality pass, v1.0.23) ---------- */
.rt-mobile-menu__header { margin-bottom: var(--rt-space-3); }
.rt-mobile-menu__brand { font-weight: 400; }
.rt-mobile-menu__actions { margin-top: var(--rt-space-4); display: flex; flex-direction: column; gap: var(--rt-space-2); }

/* ---------- Skeleton placeholder variants (code-quality pass, v1.0.23) ---------- */
.rt-skeleton--portrait { aspect-ratio: 4/5; border-radius: var(--rt-radius-lg); }

/* ---------- Testimonial card (code-quality pass, v1.0.23) ---------- */
.rt-testimonial-card {
	grid-column: span 4;
	background: var(--rt-color-background);
	padding: var(--rt-space-3);
	border-radius: var(--rt-radius-lg);
}
.rt-testimonial-card__quote { font-style: italic; }
.rt-testimonial-card__meta { font-size: var(--rt-fs-caption); }

/* ---------- Why Us section (code-quality pass, v1.0.23) ---------- */
.rt-why-us__item-title { font-size: var(--rt-fs-h4); }


/* ---------- CTA banner ---------- */
.rt-cta-banner {
	background: var(--rt-color-primary); color: var(--rt-color-white); border-radius: var(--rt-radius-lg);
	padding: var(--rt-space-5) var(--rt-space-3); text-align: center;
}
.rt-cta-banner h2 { color: var(--rt-color-white); }
.rt-cta-banner__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--rt-space-2); margin-top: var(--rt-space-3); }
.rt-cta-banner .rt-button--outline { color: var(--rt-color-white); border-color: var(--rt-color-outline-on-dark); }
.rt-cta-banner .rt-button--outline:hover { background: var(--rt-color-white); color: var(--rt-color-primary); }

/* ---------- Consent-gated analytics ---------- */
.rt-footer__privacy-settings {
	appearance: none;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-decoration: underline;
	text-underline-offset: 0.18em;
	cursor: pointer;
}
.rt-analytics-consent {
	position: fixed;
	inset-inline: var(--rt-space-2);
	bottom: var(--rt-space-2);
	z-index: 300;
	max-width: 920px;
	margin-inline: auto;
	padding: var(--rt-space-3);
	border: 1px solid var(--rt-color-border);
	border-radius: var(--rt-radius-lg);
	background: var(--rt-color-background);
	box-shadow: 0 18px 50px rgb(0 0 0 / 18%);
}
.rt-analytics-consent[hidden] { display: none; }
.rt-analytics-consent__content {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--rt-space-3);
}
.rt-analytics-consent h2 {
	margin: 0 0 var(--rt-space-1);
	font-size: var(--rt-fs-h4);
}
.rt-analytics-consent p { margin: 0; color: var(--rt-color-text-secondary); }
.rt-analytics-consent p a { color: var(--rt-color-secondary); text-decoration: underline; }
.rt-analytics-consent__actions {
	display: flex;
	flex: 0 0 auto;
	flex-wrap: wrap;
	gap: var(--rt-space-1);
}

@media (max-width: 720px) {
	.rt-analytics-consent__content { align-items: stretch; flex-direction: column; }
	.rt-analytics-consent__actions { flex-direction: column; }
	.rt-analytics-consent__actions .rt-button { width: 100%; }
}
