/* Plantshop theme (mobile-first) */
:root {
	/* Extracted from https://veldlof.nl/ (Avada/Fusion vars) */
	--bg: #faf9f6;
	--card: rgba(255, 255, 255, 0.94);
	--text: #0b2621;
	--muted: #6d6d6d;
	--brand: #004228;
	--brand-dark: #0b2621;
	--accent: #ad9741;
	--danger: #b42318;
	--border: rgba(14, 22, 15, 0.14);
	--shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
	--radius: 16px;
	--tap: 48px;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

html { background: var(--bg); }

body {
	margin: 0;
	font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial;
	color: var(--text);
	background: transparent;
	position: relative;
	z-index: 0;
	isolation: isolate;
}

/* Background layer (avoids mobile repaint artifacts from background-attachment: fixed) */
body::before {
	content: "";
	position: fixed;
	inset: 0;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.92)),
		url('/assets/img/bg.jpg') center / cover no-repeat;
	z-index: -1;
	pointer-events: none;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
	max-width: 980px;
	margin: 0 auto;
	padding: 14px;
}

/* Header */
.topbar {
	position: sticky;
	top: 0;
	z-index: 20;
	background: rgba(255, 255, 255, 0.86);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid rgba(11, 18, 12, 0.10);
}

.topbar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 10px 12px;
}

.logo {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 0;
	color: var(--text);
	border-radius: 0;
	background: transparent;
	border: none;
	line-height: 0;
}

.logo img {
	height: 60px;
	width: auto;
	display: block;
	filter: none;
}

.pill {
	display: inline-flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: center;
	gap: 2px;
	min-height: var(--tap);
	padding: 0 14px;
	border-radius: 999px;
	background: linear-gradient(180deg, var(--brand), var(--brand-dark));
	border: 1px solid rgba(0, 0, 0, 0.08);
	color: #ffffff;
	font-weight: 800;
}

.nav-cart-wrap {
	position: relative;
	display: inline-flex;
}

.pill-top {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.nav-badge {
	min-width: 22px;
	height: 22px;
	padding: 0 7px;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--accent);
	color: var(--text);
	font-weight: 900;
	font-size: 0.86rem;
	position: absolute;
	top: -9px;
	right: -9px;
	pointer-events: none;
}

.pill-total {
	font-size: 0.86rem;
	font-weight: 800;
	opacity: 0.95;
}

.pill strong { font-weight: 900; }

.nav-badge.is-zero { display: none; }

/* Cards & layout */
.card {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 16px;
	box-shadow: var(--shadow);
}

.product-card {
	--swatch-rgb: 0, 66, 40;
	background: linear-gradient(
		180deg,
		rgba(var(--swatch-rgb), 0.50),
		rgba(var(--swatch-rgb), 0.20)
	);
	border: 3px solid rgba(var(--swatch-rgb), 0.62);
}

.cart-controls {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.cart-controls .btn {
	min-width: var(--tap);
	padding: 0 12px;
}

.muted { color: var(--muted); }
.small { font-size: 0.92rem; }
.price { font-weight: 900; }

.site-footer {
	margin-top: 16px;
	margin-bottom: 12px;
	padding-left: 2px;
}

.stack { display: grid; gap: 12px; }

.product-list { display: grid; gap: 12px; }

.product-row {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 12px;
	align-items: center;
}

.product-row h3 { margin: 0 0 4px; font-size: 1.05rem; }
.product-row .desc { margin: 0; }

/* Buttons / inputs */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: var(--tap);
	padding: 0 14px;
	border-radius: 12px;
	border: none;
	cursor: pointer;
	font-weight: 900;
	font-size: larger;
	letter-spacing: 0.1px;
	background: linear-gradient(180deg, var(--brand), var(--brand-dark));
	color: white;
	position: relative;
	outline: none;
}

.btn.tap-success {
	animation: btnPulse 360ms ease-out;
}

@keyframes btnPulse {
	0% { box-shadow: 0 0 0 0 rgba(0, 66, 40, 0.38); }
	100% { box-shadow: 0 0 0 14px rgba(0, 66, 40, 0); }
}

.btn-wrap {
	position: relative;
	display: inline-flex;
	align-items: center;
}

.qty-badge {
	position: absolute;
	top: -9px;
	right: -9px;
	min-width: 22px;
	height: 22px;
	padding: 0 7px;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--accent);
	color: var(--text);
	font-size: 12px;
	font-weight: 900;
	border: 1px solid rgba(11, 18, 12, 0.18);
	box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.qty-badge.is-zero { display: none; }

.qty-badge.pop {
	animation: badgePop 220ms ease-out;
}

@keyframes badgePop {
	0% { transform: scale(0.92); }
	60% { transform: scale(1.12); }
	100% { transform: scale(1); }
}

.btn.secondary {
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.80), rgba(255, 255, 255, 0.50));
	border: 1px solid rgba(11, 18, 12, 0.18);
	color: var(--text);
}

.btn.danger {
	background: linear-gradient(180deg, var(--danger), #7a1510);
}

.input {
	width: 100%;
	min-height: var(--tap);
	padding: 10px 12px;
	border-radius: 12px;
	border: 1px solid rgba(11, 18, 12, 0.18);
	background: rgba(255, 255, 255, 0.92);
	color: var(--text);
}

textarea.input { min-height: 110px; }

/* Toggle switch (checkout PDF opt-in) */
.switch {
	position: relative;
	display: inline-block;
	width: 52px;
	height: 30px;
}

.switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(11, 18, 12, 0.18);
	transition: 160ms ease;
	border-radius: 999px;
	border: 1px solid rgba(11, 18, 12, 0.18);
}

.slider:before {
	position: absolute;
	content: "";
	height: 24px;
	width: 24px;
	left: 3px;
	top: 50%;
	transform: translateY(-50%);
	background: #ffffff;
	transition: 160ms ease;
	border-radius: 999px;
	box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

.switch input:checked + .slider {
	background: linear-gradient(180deg, var(--brand), var(--brand-dark));
	border-color: rgba(0, 0, 0, 0.08);
}

.switch input:checked + .slider:before {
	transform: translate(22px, -50%);
}

/* Tables (cart) */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 8px; border-bottom: 1px solid rgba(11, 18, 12, 0.10); text-align: left; }
.table th { font-size: 0.9rem; color: rgba(11, 18, 12, 0.7); }

tr.order-row { cursor: pointer; }
tr.order-row:hover td { background: rgba(11, 18, 12, 0.06); }

.admin-row {
	--swatch-rgb: 0, 66, 40;
}

.admin-row.is-inactive {
	opacity: 0.55;
}

.admin-row td:first-child {
	position: relative;
}

.admin-row td:first-child::before {
	content: "";
	display: inline-block;
	width: 12px;
	height: 12px;
	border-radius: 4px;
	margin-right: 10px;
	background: rgba(var(--swatch-rgb), 0.22);
	border: 2px solid rgba(var(--swatch-rgb), 0.45);
	vertical-align: middle;
}

.row { display: flex; gap: 16px; align-items: flex-start; }
.row > .grow { flex: 1; }

@media (min-width: 840px) {
	.container { padding: 22px; }
	.logo img { height: 72px; }
	.product-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Modal (admin) */
dialog.modal {
	width: min(760px, calc(100vw - 28px));
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 0;
	background: var(--card);
	box-shadow: var(--shadow);
}

dialog.modal::backdrop {
	background: rgba(0, 0, 0, 0.55);
}

.modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px;
	border-bottom: 1px solid rgba(11, 18, 12, 0.10);
}

.modal-body {
	padding: 16px;
}

.modal-close {
	min-height: 40px;
	min-width: 40px;
	border-radius: 10px;
	border: 1px solid rgba(11, 18, 12, 0.18);
	background: rgba(255, 255, 255, 0.6);
	color: var(--text);
	font-weight: 900;
	font-size: 18px;
	cursor: pointer;
}
