/* Shared components: buttons, logo, header, mobile menu, footer. Values from design/pages/*.dc.html. */

/* ---------- Buttons ---------- */
.r-btn {
	display: inline-block;
	background: var(--c-accent);
	color: var(--c-white);
	border: 0;
	text-decoration: none;
	text-align: center;
	padding: 15px 40px;
	font-family: var(--f-body);
	font-size: 13px;
	letter-spacing: .22em;
	text-transform: uppercase;
	cursor: pointer;
	border-radius: 0;
}

.r-btn:hover,
.r-btn:focus-visible {
	background: var(--c-accent-hover);
	color: var(--c-white);
}

/* Outline on a photo (white). */
.r-btn--ghost {
	background: transparent;
	border: 1px solid rgb(255 255 255 / .85);
	padding: 15px 30px;
	letter-spacing: .2em;
}

.r-btn--ghost:hover,
.r-btn--ghost:focus-visible {
	background: rgb(255 255 255 / .12);
}

/* Outline on cream (ink). */
.r-btn--outline {
	background: transparent;
	color: var(--c-ink);
	border: 1px solid var(--c-ink);
}

.r-btn--outline:hover,
.r-btn--outline:focus-visible {
	background: rgb(43 36 30 / .06);
	color: var(--c-ink);
}

/* ---------- Icon button / link (44px tap target) ---------- */
.r-icon-btn {
	position: relative;
	width: var(--tap);
	height: var(--tap);
	display: grid;
	place-items: center;
	padding: 0;
	border: 0;
	background: none;
	color: var(--c-ink);
	cursor: pointer;
}

.r-icon-btn svg {
	display: block;
}

/* Bag count badge */
.r-badge {
	position: absolute;
	top: 4px;
	right: 2px;
	min-width: 18px;
	height: 18px;
	border-radius: 9px;
	background: var(--c-accent);
	color: var(--c-white);
	font-size: 11px;
	line-height: 18px;
	text-align: center;
}

.r-badge[hidden] {
	display: none;
}

/* ---------- Logo wordmark ---------- */
.r-logo {
	display: flex;
	flex-direction: column;
	align-items: center;
	line-height: 1;
	text-decoration: none;
	color: var(--c-ink);
}

.r-logo__script {
	color: var(--c-logo);
	font-family: var(--f-script);
	font-size: clamp(36px, 4vw, 50px);
	line-height: .9;
}

.r-logo__sub {
	color: var(--c-logo-sub);
	font-size: 9px;
	letter-spacing: .42em;
	padding-left: .42em;
	margin-top: 2px;
}

.r-logo__img {
	display: block;
	max-height: 56px;
	width: auto;
}

/* ---------- Header ---------- */
.r-header {
	position: sticky;
	top: 0;
	z-index: 10;
	background: var(--c-bg);
	border-bottom: 1px solid var(--c-line);
}

.admin-bar .r-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .r-header {
		top: 46px;
	}
}

@media (max-width: 600px) {
	.admin-bar .r-header {
		top: 0;
	}
}

.r-hdr {
	max-width: var(--max-w);
	margin: 0 auto;
	padding: 0 var(--gutter);
	height: var(--hdr-h);
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 16px;
}

.r-hdr__nav {
	display: flex;
	align-items: center;
	gap: clamp(16px, 3vw, 44px);
	font-size: 14px;
}

.r-hdr__tools {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: clamp(8px, 2vw, 24px);
	font-size: 14px;
}

.r-hdr__link {
	display: inline-flex;
	align-items: center;
	min-height: 23px; /* content-box: 23 + 20 padding + 1 border = 44px tap target */
	padding: 10px 0;
	text-decoration: none;
	border-bottom: 1px solid transparent;
}

.r-hdr__link[aria-current="page"] {
	border-bottom-color: var(--c-ink);
}

.r-hdr__menu-btn {
	margin-left: -10px;
}

/* ---------- Mobile menu drawer (<dialog>) ---------- */
.r-mm {
	position: fixed;
	inset: 0 auto 0 0;
	margin: 0;
	padding: 0;
	border: 0;
	width: calc(100% - 34px);
	max-width: 420px;
	height: 100%;
	max-height: none;
	background: var(--c-bg);
	color: var(--c-ink);
	box-shadow: 8px 0 32px rgb(43 36 30 / .18);
	overflow: hidden;
}

.r-mm[open] {
	display: flex;
	flex-direction: column;
	animation: r-mm-in .22s ease-out;
}

.r-mm::backdrop {
	background: var(--c-overlay);
}

@keyframes r-mm-in {
	from { transform: translateX(-100%); }
	to { transform: none; }
}

.r-mm__head {
	height: 72px;
	flex: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 8px 0 20px;
	border-bottom: 1px solid var(--c-line);
}

.r-mm__head .r-logo {
	align-items: flex-start;
}

.r-mm__head .r-logo__script {
	font-size: 34px;
}

.r-mm__head .r-logo__sub {
	font-size: 8px;
	padding-left: 0;
	margin-top: 0;
}

.r-mm__body {
	flex: 1;
	overflow-y: auto;
	padding: 8px 20px 20px;
}

.r-mm__big {
	display: block;
	width: 100%;
	padding: 14px 0;
	border: 0;
	border-bottom: 1px solid var(--c-line);
	background: none;
	text-decoration: none;
	text-align: left;
	font-family: var(--f-display);
	font-size: 26px;
	line-height: 1.6;
	color: var(--c-ink);
	cursor: pointer;
}

.r-mm__group {
	border-bottom: 1px solid var(--c-line);
}

.r-mm__toggle {
	line-height: normal; /* a <button> in the design: UA line-height, not the 1.6 body value */
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 0;
}

.r-mm__sign {
	font-family: var(--f-body);
	font-size: 20px;
	font-weight: 300;
}

.r-mm__sub {
	display: flex;
	flex-direction: column;
	padding: 0 0 12px 2px;
}

.r-mm__sub[hidden] {
	display: none;
}

.r-mm__sub a {
	display: flex;
	align-items: center;
	min-height: 24px; /* + 20 padding = 44px */
	padding: 10px 0;
	text-decoration: none;
	font-size: 13px;
	letter-spacing: .18em;
	text-transform: uppercase;
}

.r-mm__utils {
	display: flex;
	flex-direction: column;
	margin-top: 18px;
}

.r-mm__utils a {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: var(--tap);
	text-decoration: none;
	font-size: 14px;
}

.r-mm__foot {
	flex: none;
	border-top: 1px solid var(--c-line);
	padding: 14px 20px 22px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.r-mm__foot .r-socials {
	gap: 0;
}

.r-mm__foot .r-handle {
	font-size: 13px;
}

/* ---------- Social links ---------- */
.r-socials {
	display: flex;
	gap: 4px;
}

.r-socials a {
	width: var(--tap);
	height: var(--tap);
	display: grid;
	place-items: center;
}

/* ---------- Footer ---------- */
.r-footer {
	border-top: 1px solid var(--c-line);
	background: var(--c-bg);
}

.r-foot {
	max-width: var(--max-w);
	margin: 0 auto;
	padding: 32px var(--gutter) 16px;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 24px;
}

.r-foot .r-logo {
	display: inline-flex;
	justify-self: start;
}

.r-foot .r-logo__script {
	font-size: 44px;
}

.r-foot .r-logo__sub {
	margin-top: 0;
}

.r-foot__social {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
}

.r-handle {
	font-size: 14px;
}

.r-foot-r {
	justify-self: end;
	border-left: 1px solid var(--c-line);
	padding-left: 32px;
	font-size: 13px;
	color: var(--c-muted-2);
}

.r-foot-nav {
	max-width: var(--max-w);
	margin: 0 auto;
	padding: 0 var(--gutter) 24px;
}

.r-foot-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0 28px;
	font-size: 13px;
}

.r-foot-nav a {
	display: flex;
	align-items: center;
	min-height: 24px; /* + 20 padding = 44px */
	padding: 10px 0;
	text-decoration: none;
	color: var(--c-muted);
}

.r-foot-nav a:hover {
	color: var(--c-olive);
}

/* Developer credit — a quiet bar under the footer links. */
.r-credit {
	border-top: 1px solid var(--c-line);
	padding: 6px var(--gutter);
	text-align: center;
}

.r-credit__link {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 2px 10px;
	min-height: var(--tap);
	font-size: 12px;
	letter-spacing: .04em;
	color: var(--c-muted-2);
	text-decoration: none;
}

.r-credit__link strong {
	font-weight: 500;
	color: var(--c-ink);
}

.r-credit__cta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--c-ink);
	text-decoration: underline;
	text-decoration-color: var(--c-line-3);
	text-underline-offset: 4px;
}

.r-credit__cta svg {
	transition: transform .2s ease;
}

.r-credit__link:hover .r-credit__cta {
	color: var(--c-olive);
	text-decoration-color: currentColor;
}

.r-credit__link:hover .r-credit__cta svg {
	transform: translateX(3px);
}

@media (max-width: 860px) {
	.r-credit {
		padding: 10px var(--gutter) 14px;
	}

	.r-credit__link {
		flex-direction: column;
	}

	.r-credit__sep {
		display: none;
	}
}

@media (max-width: 860px) {
	.r-foot {
		grid-template-columns: 1fr;
		text-align: center;
		justify-items: center;
	}

	.r-foot > *,
	.r-foot .r-logo {
		justify-self: center;
	}

	.r-foot-r {
		border-left: none;
		padding-left: 0;
	}
}

/* ---------- Generic page (fallback templates) ---------- */
.r-page-content {
	max-width: var(--max-w);
	margin: 0 auto;
	padding: 56px var(--gutter) 96px;
}

.r-page-title {
	font-family: var(--f-display);
	font-style: italic;
	font-weight: 400;
	font-size: clamp(40px, 5vw, 64px);
	line-height: 1.02;
	text-align: center;
	margin-bottom: 32px;
}

/* ---------- Product grid + card (Shop.dc.html; compact = "You may also like") ---------- */
.r-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
	gap: 40px 28px;
}

.r-card {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.r-card__media {
	display: block;
	overflow: hidden;
	background: var(--c-surface-2);
}

.r-card__img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 7 / 5;
	object-fit: cover;
	transition: transform .5s ease;
}

.r-card--shop:hover .r-card__img {
	transform: scale(1.03);
}

.r-card__name {
	margin: 12px 0 0;
	font-family: var(--f-body);
	font-size: 15px;
	font-weight: 500;
	letter-spacing: .14em;
	line-height: var(--lh-body);
	text-transform: uppercase;
}

.r-card__name a {
	text-decoration: none;
}

.r-card__sub {
	margin-top: -4px;
	font-family: var(--f-display);
	font-size: 16px;
	color: var(--c-muted);
}

.r-card__price {
	font-size: 15px;
}

.r-card__opts {
	display: flex;
	align-items: flex-end;
	gap: 24px;
	margin-top: 6px;
}

.r-card__opt {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.r-card__label {
	font-size: 11px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--c-muted);
}

.r-card__swatches {
	display: flex;
	gap: 10px;
}

.r-card__divider {
	width: 1px;
	height: 40px;
	background: var(--c-line);
}

.r-card__sizes {
	display: flex;
	gap: 8px;
	font-size: 12px;
}

.r-card__sizes span {
	width: 32px;
	height: 32px;
	border: 1px solid var(--c-line-3);
	display: grid;
	place-items: center;
}

/* Compact card (related products). */
.r-card--compact {
	gap: 4px;
}

.r-card--compact .r-card__img {
	aspect-ratio: 4 / 3;
}

.r-card--compact .r-card__name,
.r-card--compact .r-card__price {
	font-size: 14px;
}

.r-card--compact .r-card__swatches {
	gap: 8px;
	margin-top: 6px;
}

/* ---------- Image + text bands (home video/about, 404) — Main.dc.html ---------- */
.r-split {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
	background: var(--c-bg);
}

.r-split--video {
	grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
	background: var(--c-surface-2);
}

.r-split__media {
	position: relative;
	min-height: 480px;
	background: var(--c-surface-2);
}

.r-split--video .r-split__media {
	min-height: 440px;
}

.r-split__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.r-split__text {
	padding: clamp(40px, 6vw, 80px) clamp(24px, 5vw, 80px);
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 18px;
}

.r-split--video .r-split__text {
	padding: clamp(40px, 6vw, 72px) clamp(24px, 5vw, 72px);
}

.r-split__eyebrow {
	font-size: 12px;
	letter-spacing: .24em;
	font-weight: 500;
	text-transform: uppercase;
}

.r-split__title {
	margin: 0;
	font-family: var(--f-display);
	font-style: italic;
	font-weight: 400;
	font-size: clamp(36px, 3.6vw, 52px);
	line-height: 1.05;
}

.r-split__rule {
	width: 40px;
	height: 1px;
	background: var(--c-rule);
}

.r-split__body {
	margin: 0;
	max-width: 440px;
	font-size: 16px;
	color: var(--c-muted);
}

.r-split__body--narrow {
	max-width: 300px;
	font-size: inherit;
}

.r-split__cta {
	margin-top: 6px;
}

.r-split__btn {
	padding: 14px 44px;
	letter-spacing: .2em;
}

@media (max-width: 860px) {
	.r-split,
	.r-split--video {
		grid-template-columns: 1fr;
	}

	.r-split__media,
	.r-split--video .r-split__media {
		min-height: 300px;
	}
}

/* ---------- 404 — NotFound.dc.html ---------- */
.r-split--404 {
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	min-height: 600px;
}

.r-split--404 .r-split__media {
	min-height: 0;
}

.r-split--404 .r-split__text {
	padding: clamp(48px, 7vw, 96px) clamp(24px, 6vw, 96px);
}

.r-split--404 .r-split__eyebrow {
	font-weight: 400;
	color: var(--c-muted);
}

.r-split--404 .r-split__title {
	font-size: clamp(40px, 4.4vw, 60px);
}

.r-split--404 .r-split__body {
	max-width: 400px;
	font-size: inherit;
}

.r-404__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 8px;
}

.r-404__actions .r-btn {
	padding: 15px 34px;
}

.r-404__actions .r-btn--outline {
	padding: 14px 34px;
}

.r-404__search {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: var(--tap);
	margin-top: 4px;
	font-size: 14px;
	align-self: flex-start;
}

@media (max-width: 860px) {
	.r-split--404 {
		grid-template-columns: 1fr;
		min-height: 0;
	}

	.r-split--404 .r-split__media {
		min-height: 300px;
	}
}

/* ---------- Phones: compact two-column product grid (shop, collections, related, search) ----------
 * Deliberate change from the design files' one-card-per-row phone layout (client request
 * 2026-10-14): more products per screen, same card anatomy as desktop, scaled down. */
@media (max-width: 860px) {
	.r-grid {
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
		gap: 28px 12px;
	}

	.r-card {
		gap: 4px;
	}

	.r-card__img,
	.r-card--compact .r-card__img {
		aspect-ratio: 4 / 5;
	}

	.r-card__name {
		margin-top: 10px;
		font-size: 12px;
		letter-spacing: .1em;
		line-height: 1.4;
	}

	.r-card__sub {
		margin-top: 0;
		font-size: 14px;
		line-height: 1.3;
	}

	.r-card__price,
	.r-card--compact .r-card__name,
	.r-card--compact .r-card__price {
		font-size: 13px;
	}

	.r-card--compact .r-card__name {
		font-size: 12px;
	}

	/* Colors and sizes share one quiet line: ●● S · M · L */
	.r-card__opts {
		margin-top: 6px;
		align-items: center;
		justify-content: space-between;
		gap: 8px;
	}

	.r-card__label,
	.r-card__divider {
		display: none;
	}

	.r-card__swatches,
	.r-card--compact .r-card__swatches {
		gap: 6px;
		margin-top: 0;
	}

	.r-card__swatches > span {
		width: 14px !important; /* inline size comes from ruthina_swatch_style() */
		height: 14px !important;
	}

	.r-card--compact .r-card__swatches {
		margin-top: 4px;
	}

	.r-card__sizes {
		gap: 0;
		font-size: 11px;
		letter-spacing: .06em;
		color: var(--c-muted);
	}

	.r-card__sizes span {
		width: auto;
		height: auto;
		border: 0;
		display: inline;
	}

	.r-card__sizes span + span::before {
		content: "·";
		margin: 0 4px;
	}
}

/* ---------- Section title flanked by rules ---------- */
.r-section-title {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 28px;
	margin-bottom: 8px;
}

.r-section-title h2 {
	margin: 0;
	font-family: var(--f-display);
	font-weight: 500;
	font-size: clamp(26px, 3vw, 36px);
	letter-spacing: .2em;
	text-align: center;
	text-transform: uppercase;
}

.r-section-title__rule {
	flex: 0 1 140px;
	height: 1px;
	background: var(--c-line-3);
}

/* Signature (Allura name + tagline) — home About block, About page */
.r-signature {
	margin-top: 8px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
}

.r-signature__name {
	font-family: var(--f-script);
	font-size: 44px;
	line-height: 1;
}

.r-signature__tagline {
	font-size: 11px;
	letter-spacing: .26em;
	padding-left: 28px;
	text-transform: uppercase;
}

/* Uppercase section titles in the client's green-grey (colour refresh 2026-10-15).
   Italic page titles, product names and body text stay ink. */
.r-section-title h2,
.r-shop-section__title,
.r-col__title,
.r-about-col__name,
.r-value__title,
.r-co__legend,
.r-co__summary-title,
.r-ty__h2,
.r-contact__h2,
.r-auth__title,
.r-address__title,
.related > h2,
.upsells > h2 {
	color: var(--c-heading);
}
