/* Rivermill 7.1 — mobile-first product catalog */

:root {
	--rm-bg: #f3efe6;
	--rm-bg-2: #e7e0d2;
	--rm-surface: #fffdf8;
	--rm-ink: #1f1a14;
	--rm-muted: #6b6258;
	--rm-line: #d9d0c2;
	--rm-accent: #2f6b4f;
	--rm-accent-2: #1e4d39;
	--rm-sale: #b42318;
	--rm-top: #243028;
	--rm-radius: 10px;
	--rm-shadow: 0 10px 28px rgba(31, 26, 20, 0.08);
	--rm-font: "Outfit", sans-serif;
	--rm-display: "Fraunces", Georgia, serif;
	--rm-max: 1120px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: var(--rm-font);
	color: var(--rm-ink);
	background:
		radial-gradient(1200px 500px at 10% -10%, rgba(47, 107, 79, 0.08), transparent 60%),
		radial-gradient(900px 400px at 100% 0%, rgba(180, 140, 70, 0.08), transparent 55%),
		linear-gradient(180deg, var(--rm-bg), var(--rm-bg-2));
	line-height: 1.55;
	min-height: 100vh;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--rm-accent-2);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

h1, h2, h3 {
	font-family: var(--rm-display);
	line-height: 1.2;
	margin: 0 0 0.5rem;
	font-weight: 700;
}

p {
	margin: 0 0 0.75rem;
}

.screen-reader-text,
.rm-skip {
	position: absolute;
	left: -9999px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.rm-skip:focus {
	left: 12px;
	top: 12px;
	width: auto;
	height: auto;
	padding: 8px 12px;
	background: #fff;
	z-index: 1000;
}

/* Top bar — mirrors shop contact strip */
.rm-topbar {
	background: var(--rm-top);
	color: #e8efe9;
	font-size: 0.75rem;
}

.rm-topbar__inner {
	max-width: var(--rm-max);
	margin: 0 auto;
	padding: 0.45rem 0.85rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 0.55rem;
	align-items: center;
	justify-content: center;
	text-align: center;
}

.rm-topbar a {
	color: #fff;
}

.rm-topbar__sep {
	opacity: 0.45;
}

/* Header */
.rm-header {
	background: rgba(255, 253, 248, 0.92);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--rm-line);
	position: sticky;
	top: 0;
	z-index: 50;
}

.rm-header__inner {
	max-width: var(--rm-max);
	margin: 0 auto;
	padding: 0.7rem 0.85rem;
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 0.55rem;
	align-items: center;
}

.rm-brand {
	display: inline-flex;
	align-items: center;
	min-width: 0;
}

.rm-brand__text {
	font-family: var(--rm-display);
	font-size: 1.35rem;
	font-weight: 800;
	color: var(--rm-ink);
	letter-spacing: -0.02em;
	text-decoration: none;
}

.rm-brand .custom-logo {
	max-height: 42px;
	width: auto;
}

.rm-nav-toggle {
	display: inline-flex;
	flex-direction: column;
	justify-content: center;
	gap: 4px;
	width: 40px;
	height: 40px;
	border: 1px solid var(--rm-line);
	border-radius: 8px;
	background: var(--rm-surface);
	padding: 0;
	cursor: pointer;
}

.rm-nav-toggle__bar {
	display: block;
	width: 18px;
	height: 2px;
	margin: 0 auto;
	background: var(--rm-ink);
}

.rm-search {
	display: none;
	grid-column: 1 / -1;
}

.rm-search input[type="search"] {
	flex: 1;
	border: 1px solid var(--rm-line);
	border-radius: 8px 0 0 8px;
	padding: 0.55rem 0.75rem;
	font: inherit;
	background: #fff;
	min-width: 0;
}

.rm-search__btn,
.rm-search button {
	border: 1px solid var(--rm-accent);
	background: var(--rm-accent);
	color: #fff;
	border-radius: 0 8px 8px 0;
	padding: 0.55rem 0.85rem;
	font: inherit;
	cursor: pointer;
}

.rm-search--inline {
	display: flex;
	max-width: 420px;
}

.rm-header__actions {
	display: flex;
	gap: 0.4rem;
}

.rm-icon-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.45rem 0.7rem;
	border-radius: 999px;
	border: 1px solid var(--rm-line);
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--rm-ink);
	text-decoration: none;
	white-space: nowrap;
}

.rm-icon-link--accent {
	background: var(--rm-accent);
	border-color: var(--rm-accent);
	color: #fff;
}

.rm-category-nav {
	border-top: 1px solid var(--rm-line);
	background: #faf7f0;
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.28s ease;
}

.rm-category-nav.is-open {
	max-height: 320px;
}

.rm-category-nav__list {
	list-style: none;
	margin: 0;
	padding: 0.55rem 0.85rem 0.75rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	max-width: var(--rm-max);
	margin-inline: auto;
}

.rm-category-nav__list a {
	display: inline-block;
	padding: 0.4rem 0.7rem;
	border-radius: 999px;
	background: #fff;
	border: 1px solid var(--rm-line);
	color: var(--rm-ink);
	font-size: 0.82rem;
	font-weight: 600;
	text-decoration: none;
}

.rm-category-nav__list a:hover,
.rm-category-nav__list .current-menu-item > a {
	background: var(--rm-accent);
	border-color: var(--rm-accent);
	color: #fff;
}

/* Banner */
.rm-banner {
	position: relative;
	overflow: hidden;
	border-bottom: 1px solid var(--rm-line);
}

.rm-banner__media {
	min-height: 180px;
	background: #d7cbb8;
}

.rm-banner__media img {
	width: 100%;
	height: 180px;
	object-fit: cover;
}

.rm-banner__copy {
	padding: 1rem 0.85rem 1.15rem;
	max-width: var(--rm-max);
	margin: 0 auto;
}

.rm-banner__copy h1 {
	font-size: clamp(1.45rem, 5vw, 2.35rem);
	margin-bottom: 0.35rem;
}

.rm-banner__copy p {
	color: var(--rm-muted);
	max-width: 42rem;
	margin: 0;
}

/* Catalog grid — dense like reference shop */
.rm-catalog {
	max-width: var(--rm-max);
	margin: 0 auto;
	padding: 1.1rem 0.75rem 1.5rem;
}

.rm-catalog__head,
.rm-reviews__head {
	margin-bottom: 0.85rem;
}

.rm-catalog__head h2,
.rm-reviews__head h2 {
	font-size: 1.25rem;
}

.rm-product-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.7rem;
}

.rm-product {
	background: var(--rm-surface);
	border: 1px solid var(--rm-line);
	border-radius: var(--rm-radius);
	overflow: hidden;
	box-shadow: var(--rm-shadow);
	display: flex;
	flex-direction: column;
	animation: rm-rise 0.55s ease both;
}

.rm-product:nth-child(2n) { animation-delay: 0.05s; }
.rm-product:nth-child(3n) { animation-delay: 0.1s; }
.rm-product:nth-child(4n) { animation-delay: 0.15s; }

.rm-product__media {
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #ebe4d8;
}

.rm-product__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.35s ease;
}

.rm-product:hover .rm-product__media img {
	transform: scale(1.04);
}

.rm-product__body {
	padding: 0.7rem 0.7rem 0.85rem;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	flex: 1;
}

.rm-product__title {
	font-size: 0.95rem;
	margin: 0;
}

.rm-product__title a {
	color: var(--rm-ink);
	text-decoration: none;
}

.rm-product__sku {
	margin: 0;
	font-size: 0.78rem;
	color: var(--rm-accent-2);
	font-weight: 600;
}

.rm-product__desc {
	margin: 0;
	font-size: 0.78rem;
	color: var(--rm-muted);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.rm-product__sold {
	margin: 0.15rem 0 0;
	font-size: 0.75rem;
	color: #8a7f72;
}

.rm-product__price {
	margin-top: auto;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.35rem;
	padding-top: 0.35rem;
}

.rm-price {
	font-weight: 700;
	font-size: 1rem;
	color: var(--rm-ink);
}

.rm-price--sale {
	color: var(--rm-sale);
}

.rm-price--compare,
.rm-price--ghost {
	font-size: 0.85rem;
	font-weight: 500;
	color: #9a9084;
	text-decoration: line-through;
}

.rm-price--ghost {
	opacity: 0.55;
}

.rm-price__badge {
	font-size: 0.72rem;
	font-weight: 700;
	color: #fff;
	background: var(--rm-sale);
	padding: 0.15rem 0.4rem;
	border-radius: 4px;
}

/* Reviews band */
.rm-reviews {
	max-width: var(--rm-max);
	margin: 0 auto;
	padding: 0 0.75rem 1.75rem;
}

.rm-reviews__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.65rem;
}

.rm-review {
	background: var(--rm-surface);
	border: 1px solid var(--rm-line);
	border-radius: var(--rm-radius);
	padding: 0.85rem 0.9rem;
}

.rm-review__meta {
	display: flex;
	justify-content: space-between;
	gap: 0.5rem;
	font-size: 0.8rem;
	margin-bottom: 0.35rem;
}

.rm-review__meta span {
	color: var(--rm-muted);
}

.rm-review__content {
	margin: 0 0 0.5rem;
	font-size: 0.9rem;
}

.rm-review__foot {
	display: flex;
	justify-content: space-between;
	font-size: 0.78rem;
	color: var(--rm-muted);
}

.rm-review__reply {
	font-weight: 600;
	color: var(--rm-accent-2);
}

/* Footer — company line + horizontal links (no friendship label) */
.rm-footer {
	background: #1c221e;
	color: #d7ddd8;
	padding: 1.25rem 0.85rem 1.5rem;
}

.rm-footer__company {
	max-width: var(--rm-max);
	margin: 0 auto 0.9rem;
	font-size: 0.8rem;
	line-height: 1.6;
	text-align: center;
}

.rm-footer__company p {
	margin: 0;
}

.rm-footer__links {
	max-width: var(--rm-max);
	margin: 0 auto 0.85rem;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.rm-flink-row {
	list-style: none;
	margin: 0;
	padding: 0.15rem 0;
	display: flex;
	flex-wrap: nowrap;
	gap: 0.85rem;
	justify-content: flex-start;
	min-width: min-content;
}

.rm-flink-row a {
	color: #f2f5f2;
	font-size: 0.82rem;
	white-space: nowrap;
	text-decoration: none;
	border-bottom: 1px solid transparent;
}

.rm-flink-row a:hover {
	border-bottom-color: currentColor;
}

.rm-footer__copy {
	max-width: var(--rm-max);
	margin: 0 auto;
	text-align: center;
	font-size: 0.75rem;
	opacity: 0.75;
}

/* Interior pages */
.rm-content {
	max-width: var(--rm-max);
	margin: 0 auto;
	padding: 1.1rem 0.85rem 2rem;
	display: grid;
	gap: 1rem;
}

.rm-content__wrap {
	background: var(--rm-surface);
	border: 1px solid var(--rm-line);
	border-radius: var(--rm-radius);
	padding: 1rem;
	box-shadow: var(--rm-shadow);
}

.rm-page-head {
	margin-bottom: 0.85rem;
}

.rm-entry-content > *:last-child {
	margin-bottom: 0;
}

.rm-post-list {
	display: grid;
	gap: 0.85rem;
}

.rm-card-post {
	display: grid;
	gap: 0.65rem;
	padding-bottom: 0.85rem;
	border-bottom: 1px solid var(--rm-line);
}

.rm-card-post__title {
	font-size: 1.1rem;
}

.rm-card-post__meta {
	font-size: 0.8rem;
	color: var(--rm-muted);
}

.rm-sidebar {
	background: var(--rm-surface);
	border: 1px solid var(--rm-line);
	border-radius: var(--rm-radius);
	padding: 0.9rem;
}

.widget + .widget {
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid var(--rm-line);
}

.rm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	padding: 0.65rem 1rem;
	border-radius: 8px;
	border: 1px solid transparent;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
}

.rm-btn--primary {
	background: var(--rm-accent);
	color: #fff;
}

.rm-btn--primary:hover {
	background: var(--rm-accent-2);
	text-decoration: none;
	color: #fff;
}

.rm-contact-form {
	display: grid;
	gap: 0.75rem;
	max-width: 520px;
}

.rm-contact-form label {
	display: grid;
	gap: 0.3rem;
	font-size: 0.9rem;
	font-weight: 600;
}

.rm-contact-form input,
.rm-contact-form textarea {
	font: inherit;
	padding: 0.6rem 0.75rem;
	border: 1px solid var(--rm-line);
	border-radius: 8px;
	background: #fff;
}

.rm-form-ok {
	color: var(--rm-accent-2);
	font-weight: 600;
}

.rm-single-product {
	display: grid;
	gap: 1rem;
	background: var(--rm-surface);
	border: 1px solid var(--rm-line);
	border-radius: var(--rm-radius);
	padding: 0.85rem;
}

.rm-single-product__media img {
	width: 100%;
	border-radius: 8px;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

.rm-comments {
	margin-top: 1.25rem;
	padding-top: 1rem;
	border-top: 1px solid var(--rm-line);
}

.rm-comment-list {
	padding-left: 1.1rem;
}

@keyframes rm-rise {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (min-width: 640px) {
	.rm-header__inner {
		grid-template-columns: auto 1fr auto auto;
	}

	.rm-nav-toggle {
		display: none;
	}

	.rm-search {
		display: flex;
		grid-column: auto;
	}

	.rm-category-nav {
		max-height: none;
		overflow: visible;
	}

	.rm-category-nav__list {
		flex-wrap: nowrap;
		overflow-x: auto;
		padding-bottom: 0.65rem;
	}

	.rm-banner__media img {
		height: 280px;
	}

	.rm-product-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 0.9rem;
	}

	.rm-product__desc {
		-webkit-line-clamp: 4;
	}

	.rm-reviews__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.rm-flink-row {
		flex-wrap: wrap;
		justify-content: center;
	}

	.rm-single-product {
		grid-template-columns: 1fr 1.1fr;
		padding: 1.1rem;
	}
}

@media (min-width: 960px) {
	.rm-topbar__inner {
		justify-content: flex-end;
		text-align: right;
	}

	.rm-banner {
		display: grid;
		grid-template-columns: 1.4fr 1fr;
		align-items: stretch;
	}

	.rm-banner__media img {
		height: 100%;
		min-height: 320px;
	}

	.rm-banner__copy {
		display: flex;
		flex-direction: column;
		justify-content: center;
		padding: 1.5rem 1.25rem;
	}

	.rm-product-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.rm-content {
		grid-template-columns: minmax(0, 1fr) 280px;
		align-items: start;
	}

	.rm-content:has(.rm-single-product),
	.rm-content:not(:has(.rm-sidebar)) {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
	}
}
