/**
 * Editorial + shop layout (reference rhythm). Fonts: Pretendard = sans, Cormorant Garamond = serif.
 */

/* Explicit type roles (matches structure-design.md) */
.on-type-serif {
	font-family: var(--font-serif, "Cormorant Garamond", "Times New Roman", serif);
}

.on-type-sans {
	font-family: var(--font-sans, "Pretendard", -apple-system, system-ui, sans-serif);
}

/* Reference header: small caps nav / logo (October November rhythm) */
.site-header--ref .site-header__inner {
	min-height: 52px;
}

.site-header--ref .site-header__logo,
.site-header--ref .site-header__logo a {
	font-size: 11px;
	font-weight: 400;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.site-header--ref .site-nav__list {
	gap: 14px 24px;
}

.site-header--ref .site-nav__item {
	font-size: 11px;
	font-weight: 400;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.site-header--ref .site-nav__sub li {
	font-size: 10px;
	letter-spacing: 0.12em;
}

.site-header--ref .site-header__utils {
	font-size: 11px;
	gap: 16px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.site-header--ref .theme-toggle__icon {
	font-size: 15px;
	line-height: 1;
	letter-spacing: 0;
	text-transform: none;
}

.site-header--ref .menu-toggle {
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.site-footer__nav a,
.site-footer__social a {
	font-size: 11px;
	font-weight: 400;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.site-footer__copy {
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.on-front {
	scroll-snap-type: y proximity;
}

/* Hero */
.on-hero {
	min-height: 85vh;
	min-height: 85dvh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: clamp(32px, 8vw, 96px) 24px;
	scroll-snap-align: start;
}

.on-hero__title {
	font-size: clamp(2.75rem, 6.5vw, 4.25rem);
	font-weight: 500;
	margin: 0 0 16px;
	line-height: 1.05;
	letter-spacing: -0.02em;
}

.on-hero__tagline {
	margin: 0;
	font-size: clamp(0.8125rem, 1.6vw, 0.8125rem);
	color: var(--text-secondary);
	max-width: 40ch;
	font-weight: 400;
	line-height: 1.5;
}

/* Editorial row: 50/50, full viewport */
.on-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	min-height: 100vh;
	min-height: 100dvh;
	scroll-snap-align: start;
	border-top: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .on-row {
	border-top-color: rgba(255, 255, 255, 0.08);
}

.on-row--reverse .on-row__text {
	order: 2;
}

.on-row--reverse .on-row__media {
	order: 1;
}

/* Text column: centered serif headline + bottom meta bar (reference layout) */
.on-row__text {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: stretch;
	min-height: 100%;
	min-height: 100dvh;
	padding: 0;
	background: var(--bg-primary);
}

.on-row__text-inner {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(32px, 6vw, 72px) clamp(20px, 4vw, 48px);
	min-height: 0;
}

.on-row__title {
	font-size: clamp(1.875rem, 3.2vw, 3rem);
	font-weight: 500;
	margin: 0;
	line-height: 1.12;
	max-width: min(18ch, 90vw);
	text-align: center;
	letter-spacing: -0.02em;
}

.on-row__title a {
	text-decoration: none;
}

.on-row__title a:hover {
	opacity: 0.75;
	text-decoration: none;
}

/* Bottom bar: series | stacked specs | price */
.on-row__meta-bar {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: end;
	gap: clamp(12px, 3vw, 28px);
	padding: clamp(20px, 4vw, 36px) clamp(16px, 3vw, 40px) clamp(24px, 5vw, 48px);
	font-size: 10px;
	font-weight: 400;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--text-primary);
	border-top: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .on-row__meta-bar {
	border-top-color: rgba(255, 255, 255, 0.1);
}

.on-row__meta-bar-left {
	justify-self: start;
	text-align: left;
	max-width: 28ch;
	line-height: 1.35;
}

.on-row__meta-bar-center {
	justify-self: center;
	text-align: center;
	display: flex;
	flex-direction: column;
	gap: 5px;
	align-items: center;
	max-width: min(42ch, 88vw);
	line-height: 1.4;
}

.on-row__spec-line {
	display: block;
	font-size: 9px;
	letter-spacing: 0.12em;
}

.on-row__meta-bar-right {
	justify-self: end;
	text-align: right;
	letter-spacing: 0.04em;
	font-size: 11px;
	font-weight: 400;
	text-transform: none;
}

.on-row__media {
	position: relative;
	display: block;
	min-height: 50vh;
	overflow: hidden;
	background: #e8e6e1;
}

[data-theme="dark"] .on-row__media {
	background: #2a2a2a;
}

.on-row__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	min-height: 50vh;
	transition: transform 0.5s ease;
}

.on-row__media:hover img {
	transform: scale(1.03);
}

/* Dark newsletter band */
.on-row--dark {
	grid-template-columns: 1fr;
	min-height: auto;
	background: #0a0a0a;
	color: #f5f5f5;
	border-top: none;
}

.on-row--dark .on-row__text--dark {
	background: transparent;
	padding-top: clamp(64px, 12vh, 120px);
	padding-bottom: clamp(64px, 12vh, 120px);
}

.on-row__title--light {
	color: #fff;
}

.on-dark-list {
	list-style: none;
	margin: 24px 0;
	padding: 0;
	text-align: center;
	font-size: 0.95rem;
	line-height: 1.85;
	color: rgba(255, 255, 255, 0.88);
	font-weight: 400;
}

.on-row__fineprint {
	margin: 32px 0 0;
	font-size: 0.75rem;
	color: rgba(255, 255, 255, 0.45);
	max-width: 36ch;
	margin-left: auto;
	margin-right: auto;
}

/* More mockups CTA */
.on-more {
	min-height: 40vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 48px 24px;
	scroll-snap-align: start;
}

.on-more__link {
	font-size: clamp(1.5rem, 4vw, 2.5rem);
	font-weight: 500;
	text-decoration: none;
	border-bottom: 1px solid currentColor;
	padding-bottom: 4px;
}

.on-more__link:hover {
	opacity: 0.7;
	text-decoration: none;
}

/* Shop archive title */
.on-shop-header {
	padding: clamp(20px, 4vw, 40px) clamp(20px, 4vw, 48px) 4px;
	text-align: center;
}

.on-shop-header__title {
	font-size: clamp(2rem, 4.2vw, 2.875rem);
	font-weight: 500;
	margin: 0;
	letter-spacing: -0.02em;
	line-height: 1.08;
}

.shop-filter-label {
	font-size: 10px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	margin: 0 0 10px;
	color: var(--text-muted);
}

.on-shop-widgets {
	max-width: 720px;
	margin: 48px auto 0;
	padding: 32px clamp(20px, 4vw, 48px) 64px;
	border-top: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .on-shop-widgets {
	border-top-color: rgba(255, 255, 255, 0.08);
}

.on-shop-widgets .widget {
	margin-bottom: 28px;
}

.on-shop-widgets .widget:last-child {
	margin-bottom: 0;
}

/* Shop toolbar */
.on-shop-archive {
	padding-bottom: 48px;
}

.on-shop-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px 32px;
	padding: 24px clamp(20px, 4vw, 48px) 20px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
	max-width: 100%;
}

[data-theme="dark"] .on-shop-toolbar {
	border-bottom-color: rgba(255, 255, 255, 0.08);
}

.on-shop-toolbar__filters {
	flex: 1 1 280px;
	min-width: 0;
}

.on-shop-toolbar__filters .shop-sidebar__title {
	margin-top: 0;
}

.on-shop-toolbar__filters .shop-filter-list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 20px;
	align-items: center;
}

.on-shop-toolbar__filters .shop-filter-list li {
	margin-bottom: 0;
}

.on-shop-toolbar__filters .shop-filter-list a {
	font-size: 11px;
	font-weight: 400;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-decoration: none;
}

.on-shop-toolbar__filters .shop-filter-list a:hover {
	opacity: 0.72;
	text-decoration: none;
}

.on-shop-toolbar__sort {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 8px;
}

.on-shop-toolbar__sort .woocommerce-result-count {
	margin: 0;
	font-size: 11px;
	letter-spacing: 0.06em;
	color: var(--text-secondary);
}

.on-shop-toolbar__sort .woocommerce-ordering {
	margin: 0;
}

.on-shop-toolbar__sort select {
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 8px 12px;
	border: 1px solid rgba(0, 0, 0, 0.15);
	background: var(--bg-primary);
	color: var(--text-primary);
}

[data-theme="dark"] .on-shop-toolbar__sort select {
	border-color: rgba(255, 255, 255, 0.2);
}

/* Shop: 2-column square grid */
.on-shop-archive ul.products {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	gap: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
	width: 100% !important;
}

.on-shop-archive ul.products::before,
.on-shop-archive ul.products::after {
	display: none !important;
}

.on-shop-archive ul.products li.product {
	margin: 0 !important;
	width: 100% !important;
	float: none !important;
}

.product-card--on-tile {
	list-style: none;
}

.product-card__link--tile {
	display: block;
	height: 100%;
	color: inherit;
	text-decoration: none;
}

.product-card__link--tile:hover {
	opacity: 1;
	text-decoration: none;
}

.product-card__thumb--tile {
	position: relative;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #ddd;
}

[data-theme="dark"] .product-card__thumb--tile {
	background: #333;
}

.product-card__thumb--tile img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.45s ease;
}

.product-card__link--tile:hover .product-card__thumb--tile img {
	transform: scale(1.05);
}

.product-card__overlay {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: clamp(16px, 4vw, 28px);
	background: linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.2) 55%, transparent 100%);
	color: #fff;
	text-align: left;
}

.product-card__overlay-cat {
	margin: 0 0 6px;
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	opacity: 0.85;
	font-family: var(--font-sans, "Pretendard", system-ui, sans-serif);
}

.product-card__overlay-title {
	margin: 0 0 8px;
	font-size: clamp(1.1rem, 2.5vw, 1.5rem);
	font-weight: 500;
	line-height: 1.2;
	color: #fff;
	font-family: var(--font-serif, "Cormorant Garamond", serif);
}

.product-card__overlay-price {
	margin: 0;
	font-size: 0.9rem;
	color: rgba(255, 255, 255, 0.92);
	font-family: var(--font-sans, "Pretendard", system-ui, sans-serif);
}

.on-shop-archive .woocommerce-pagination {
	margin-top: 32px;
	padding: 0 24px 48px;
}

@media (max-width: 991px) {
	.on-row {
		grid-template-columns: 1fr;
		min-height: unset;
	}

	.on-row--reverse .on-row__text,
	.on-row--reverse .on-row__media {
		order: unset;
	}

	.on-row__media {
		min-height: 55vh;
		order: -1;
	}

	.on-row__media img {
		min-height: 55vh;
	}

	.on-row__text {
		min-height: auto;
	}

	.on-row__text-inner {
		padding-top: 48px;
		padding-bottom: 40px;
	}

	.on-row__meta-bar {
		grid-template-columns: 1fr;
		justify-items: center;
		gap: 14px;
		padding: 24px 20px 36px;
	}

	.on-row__meta-bar-left,
	.on-row__meta-bar-center,
	.on-row__meta-bar-right {
		justify-self: center;
		text-align: center;
	}
}

@media (max-width: 639px) {
	.on-shop-archive ul.products {
		grid-template-columns: 1fr !important;
	}

	.on-shop-toolbar {
		flex-direction: column;
		align-items: stretch;
	}
}
