/* ── Fonts ──────────────────────────────────────────── */
@font-face {
	font-family: 'TiemposFine';
	src: url('/fonts/TiemposFine-Black.otf') format('opentype');
	font-weight: 900;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'HelveticaNow';
	src: url('/fonts/HelveticaNowDisplay-Light.ttf') format('truetype');
	font-weight: 300;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'HelveticaNow';
	src: url('/fonts/HelveticaNowDisplay-Regular.ttf') format('truetype');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

/* ── Tokens ─────────────────────────────────────────── */
:root {
	--bg: #0d0d0d;
	--fg: #ffffff;
	--border: #fff;
	--nav-height: 56px;
	--font-serif: 'TiemposFine', Georgia, serif;
	--font-sans: 'HelveticaNow', Helvetica, Arial, sans-serif;
}

/* ── Reset ──────────────────────────────────────────── */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	background: var(--bg);
	color: var(--fg);
	font-family: var(--font-sans);
	font-weight: 300;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body {
	min-height: 100dvh;
	background: var(--bg);
}

a {
	color: inherit;
	text-decoration: none;
}

button {
	font-family: inherit;
	font-weight: inherit;
	color: inherit;
	background: none;
	border: none;
	cursor: pointer;
}

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

/* ── Nav ────────────────────────────────────────────── */
.site-nav {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: var(--nav-height);
	display: grid;
	grid-template-columns: var(--nav-height) 1fr var(--nav-height);
	border-bottom: 1px solid var(--border);
	background: var(--bg);
	z-index: 200;
}

.nav-menu,
.nav-cart {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
}

.nav-menu {
	border-right: 1px solid var(--border);
}

.nav-cart {
	border-left: 1px solid var(--border);
}

.nav-logo {
	display: flex;
	align-items: center;
	justify-content: center;
	border-right: 1px solid var(--border);
}

.nav-logo img {
	height: 40px;
	width: auto;
}

.nav-menu svg,
.nav-cart img {
	width: 18px;
	height: auto;
}

/* ── Page shell ─────────────────────────────────────── */
.page-content {
	padding-top: var(--nav-height);
}

/* ── Product grid ───────────────────────────────────── */
.products {
	list-style: none;
	display: flex;
	flex-direction: column;
}

.product-card {
	display: block;
	border-bottom: 1px solid #fff;
}

.product-card__image {
	width: 100%;
	aspect-ratio: 3 / 4;
	object-fit: contain;
	object-position: center;
	background: var(--bg);
}

.product-card__body {
	padding: 1.25rem 1rem 1.5rem;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

.product-card__name {
	font-family: var(--font-serif);
	font-weight: 900;
	font-size: clamp(1.75rem, 7vw, 2.5rem);
	line-height: 1;
	margin-bottom: 0.6rem;
}

.product-card__sub {
	font-size: 0.8rem;
	font-weight: 300;
	margin-bottom: 0.75rem;
}

.product-card__cta {
	font-size: 0.875rem;
	font-weight: 300;
	letter-spacing: 0.02em;
}

/* Desktop: 3-column grid */
@media (min-width: 768px) {
	.products {
		display: grid;
		grid-template-columns: 1fr 1fr 1fr;
	}

	.product-card {
		border-right: 1px solid #fff;
	}

	.product-card:nth-child(3n) {
		border-right: none;
	}

	.product-card__image {
		aspect-ratio: 1 / 1;
	}

	.product-card__name {
		font-size: clamp(1.1rem, 2vw, 1.5rem);
	}
}

/* ── Product detail ─────────────────────────────────── */
.product-detail {
	display: flex;
	flex-direction: column;
	min-height: calc(100dvh - var(--nav-height));
}

.product-detail__image-wrap {
	flex: 1;
	position: relative;
	background: var(--bg);
}

.product-detail__img {
	width: 100%;
	height: 60dvh;
	object-fit: contain;
	object-position: center;
}

.product-detail__panel {
	border-top: 1px solid var(--border);
}

/* Vorderseite / Rückseite toggle */
.side-toggle {
	display: grid;
	grid-template-columns: 1fr 1fr;
	border-bottom: 1px solid var(--border);
}

.side-toggle__btn {
	padding: 0.9rem 0;
	font-size: 0.875rem;
	font-weight: 300;
	text-align: center;
	transition: background 0.15s, color 0.15s;
	border-right: 1px solid var(--border);
}

.side-toggle__btn:last-child {
	border-right: none;
}

.side-toggle__btn.active {
	background: var(--fg);
	color: var(--bg);
}

/* Size selector */
.size-selector {
	display: flex;
	border-bottom: 1px solid var(--border);
}

.size-btn {
	flex: 1;
	padding: 0.9rem 0;
	font-size: 0.8rem;
	font-weight: 300;
	text-align: center;
	border-right: 1px solid var(--border);
	transition: background 0.15s, color 0.15s;
}

.size-btn:last-child {
	border-right: none;
}

.size-btn.active {
	background: var(--fg);
	color: var(--bg);
}


/* Desktop product detail */
@media (min-width: 768px) {
	.product-detail {
		flex-direction: row;
		align-items: stretch;
		min-height: calc(100dvh - var(--nav-height));
	}

	.product-detail__image-wrap {
		flex: 0 0 66.666%;
		display: flex;
		align-items: center;
		justify-content: center;
		border-right: 1px solid var(--border);
	}

	.product-detail__img {
		width: 100%;
		height: calc(100dvh - var(--nav-height));
		object-fit: contain;
	}

	.product-detail__panel {
		flex: 0 0 33.333%;
		display: flex;
		flex-direction: column;
		border-top: none;
		justify-content: flex-end;
		padding-bottom: 0;
	}

	.detail-action {
		padding: 1.4rem;
	}
}

/* ── Admin ──────────────────────────────────────────── */
.admin-page {
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

.admin-page__header {
	display: flex;
	align-items: baseline;
	gap: 1.5rem;
}

.admin-page__header h1 {
	font-family: var(--font-serif);
	font-size: 1.75rem;
	font-weight: 900;
}

.a-form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	border: 1px solid var(--border);
	padding: 1.5rem;
}

.a-form h2 {
	font-size: 0.9rem;
	font-weight: 400;
	margin-bottom: 0.25rem;
}

.a-form__row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 1rem;
}

.a-label {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	font-size: 0.75rem;
	font-weight: 300;
}

.a-input {
	background: transparent;
	border: 1px solid var(--border);
	color: var(--fg);
	font-family: var(--font-sans);
	font-size: 0.875rem;
	font-weight: 300;
	padding: 0.55rem 0.7rem;
	outline: none;
	width: 100%;
}

.a-input:focus {
	border-color: var(--fg);
}

.a-input--inline {
	width: 70px;
	padding: 0.3rem 0.5rem;
}

.a-textarea {
	resize: vertical;
	min-height: 80px;
}

.a-upload-group {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.a-label-text {
	font-size: 0.75rem;
	font-weight: 300;
}

.a-upload {
	display: flex;
	align-items: center;
	cursor: pointer;
}

.a-upload input[type='file'] {
	display: none;
}

.a-upload span {
	font-size: 0.8rem;
	font-weight: 300;
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--border);
	transition: background 0.15s, color 0.15s;
}

.a-upload:hover span {
	background: var(--fg);
	color: var(--bg);
}

.a-upload-or {
	font-size: 0.7rem;
	font-weight: 300;
}

.a-select {
	background: var(--bg);
	border: 1px solid var(--border);
	color: var(--fg);
	font-family: var(--font-sans);
	font-size: 0.8rem;
	font-weight: 300;
	padding: 0.3rem 0.5rem;
	cursor: pointer;
}

.a-btn {
	padding: 0.55rem 1rem;
	border: 1px solid var(--border);
	font-size: 0.8rem;
	font-weight: 300;
	letter-spacing: 0.02em;
	white-space: nowrap;
	transition: background 0.15s, color 0.15s;
}

.a-btn:hover {
	background: var(--fg);
	color: var(--bg);
}

.a-btn--primary {
	background: var(--fg);
	color: var(--bg);
}

.a-btn-xs {
	font-size: 0.75rem;
	font-weight: 300;
	padding: 0.25rem 0.5rem;
	border: 1px solid var(--border);
	transition: background 0.15s, color 0.15s;
}

.a-btn-xs:hover {
	background: var(--fg);
	color: var(--bg);
}

.a-btn-xs--danger:hover {
	background: transparent;
	color: #ff6b6b;
	border-color: #ff6b6b;
}

.a-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.875rem;
	font-weight: 300;
}

.a-table th {
	text-align: left;
	font-weight: 400;
	font-size: 0.75rem;
	padding: 0.5rem 0.75rem;
	border-bottom: 1px solid var(--border);
}

.a-table td {
	padding: 0.75rem;
	border-bottom: 1px solid var(--border);
	vertical-align: middle;
}

.a-table tr:last-child td {
	border-bottom: none;
}

.stock-form,
.status-form {
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.order-items-list {
	list-style: none;
	padding: 0;
	font-size: 0.8rem;
}

.a-link {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.a-muted {
	font-size: 0.8rem;
}

.a-empty {
	font-size: 0.875rem;
}

.a-error {
	font-size: 0.8rem;
	color: #ff6b6b;
}

.a-success {
	font-size: 0.8rem;
	color: #68d391;
}

/* ── Cart page ──────────────────────────────────────── */
.btn {
	padding: 0.75rem 1.5rem;
	border: 1px solid var(--border);
	font-size: 0.875rem;
	font-weight: 300;
	letter-spacing: 0.03em;
	transition: background 0.15s, color 0.15s;
}

.btn:hover,
.btn--primary {
	background: var(--fg);
	color: var(--bg);
}
