:root {
	color-scheme: light;
	--bg: #f6f0ea;
	--surface: #ffffff;
	--fg: #2a1215;
	--muted: #6e5a5c;
	--accent: #8c1c26;
	--accent-deep: #5c0a12;
	--accent-soft: #f5e1e3;
	--gold: #d9b26a;
	--border: #e3d6d0;
	--danger: #b42318;
	--radius: 6px;
	--radius-lg: 12px;
	--space: 1rem;
	--shadow: 0 8px 30px rgba(20, 32, 46, 0.14);
	--font: "Manrope", "Segoe UI", Roboto, Arial, sans-serif;
	--display: "Unbounded", "Manrope", Arial, sans-serif;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

h1,
h2 {
	margin: 0;
}

.shell {
	max-width: 46rem;
	margin: 0 auto;
	padding: 1.5rem var(--space) 3rem;
	display: grid;
	gap: 1.5rem;
}

/* Hero: the one bold colour field on the page */
.hero {
	background: var(--accent-deep);
	color: #f2f7f5;
	background-image: repeating-linear-gradient(
		-45deg,
		rgba(255, 255, 255, 0.03) 0 2px,
		transparent 2px 14px
	);
}

.hero-inner {
	max-width: 46rem;
	margin: 0 auto;
	padding: 2.5rem var(--space) 2rem;
}

.brand {
	font-family: var(--display);
	font-weight: 700;
	font-size: clamp(2rem, 8vw, 3.5rem);
	line-height: 1.08;
	letter-spacing: -0.02em;
	overflow-wrap: anywhere;
}

.tagline {
	margin: 0.75rem 0 0;
	max-width: 36rem;
	color: #ecd3cf;
	font-size: 1.05rem;
}

.contacts {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.25rem;
	margin-top: 1.25rem;
}

.contact {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	min-height: 44px;
	color: #f2f7f5;
	font-weight: 600;
	text-decoration: none;
}

a.contact:hover {
	text-decoration: underline;
}

.hero-skeleton {
	display: grid;
	gap: 0.75rem;
}

.hero .skeleton {
	background: linear-gradient(90deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.12));
	background-size: 200% 100%;
}

.sk-title {
	height: 2.75rem;
	width: 70%;
}

.sk-line {
	width: 90%;
}

.sk-row {
	height: 3rem;
	margin: 0.5rem 0;
}

/* Owner bar */
.owner-bar {
	position: sticky;
	top: 0;
	z-index: 5;
	background: var(--accent-soft);
	border-bottom: 1px solid #b7d8cf;
}

.owner-inner {
	max-width: 46rem;
	margin: 0 auto;
	padding: 0.6rem var(--space);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem 1rem;
}

.owner-label {
	font-weight: 700;
	color: var(--accent-deep);
}

/* Toolbar */
.toolbar {
	display: grid;
	gap: 0.75rem;
}

.search {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0 0.9rem;
	min-height: 48px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	color: var(--muted);
}

.search:focus-within {
	border-color: var(--accent);
}

.search-input {
	flex: 1;
	min-width: 0;
	border: 0;
	background: transparent;
	color: var(--fg);
	font: inherit;
	padding: 0.7rem 0;
}

.search-input:focus-visible {
	outline: none;
}

.chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.chip {
	min-height: 40px;
	padding: 0.4rem 0.9rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
	color: var(--fg);
	font: inherit;
	font-weight: 600;
	font-size: 0.95rem;
	cursor: pointer;
}

.chip[aria-pressed="true"] {
	background: var(--fg);
	border-color: var(--fg);
	color: #fff;
}

/* Price list */
.price-list {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 1.25rem var(--space) 0.5rem;
}

.cat-title {
	display: flex;
	align-items: baseline;
	gap: 0.6rem;
	font-family: var(--display);
	font-weight: 500;
	font-size: 1.25rem;
	padding-bottom: 0.75rem;
	border-bottom: 2px solid var(--fg);
}

.cat-count {
	font-family: var(--font);
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}

.items {
	list-style: none;
	margin: 0;
	padding: 0;
}

.item {
	padding: 0.9rem 0;
	border-bottom: 1px solid var(--border);
}

.item:last-child {
	border-bottom: 0;
}

.item-line {
	display: flex;
	align-items: baseline;
	gap: 0.5rem;
}

.item-name {
	font-weight: 700;
	font-size: 1.05rem;
	min-width: 0;
	overflow-wrap: anywhere;
}

.leader {
	flex: 1;
	min-width: 1.5rem;
	border-bottom: 2px dotted #aab4bf;
	transform: translateY(-0.3em);
}

.item-price {
	font-weight: 700;
	font-size: 1.05rem;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
	color: var(--accent-deep);
}

.item-meta {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 0.2rem;
	color: var(--muted);
	font-size: 0.95rem;
}

.item-unit {
	white-space: nowrap;
}

.item-actions {
	display: flex;
	gap: 1rem;
	margin-top: 0.35rem;
}

.link-btn {
	min-height: 36px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--accent);
	font: inherit;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.link-btn.danger {
	color: var(--danger);
}

.footer {
	max-width: 46rem;
	margin: 0 auto;
	padding: 0 var(--space) 2.5rem;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 0.5rem 1rem;
	color: var(--muted);
	font-size: 0.95rem;
}

.footer .link-btn {
	color: var(--muted);
}

.brand {
	color: #fff7ef;
}

.hero {
	border-bottom: 4px solid var(--gold);
}

/* Shopping cart */
.item-buy {
	display: flex;
	justify-content: flex-end;
	margin-top: 0.5rem;
}

.add-btn {
	min-height: 40px;
	padding: 0.4rem 1rem;
	border: 1px solid var(--accent);
	border-radius: 999px;
	background: var(--surface);
	color: var(--accent);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.add-btn:hover {
	background: var(--accent-soft);
}

.stepper {
	display: inline-flex;
	align-items: center;
	border-radius: 999px;
	background: var(--accent);
	color: #fff;
}

.stepper button {
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 1.25rem;
	font-weight: 700;
	cursor: pointer;
}

.stepper button:hover {
	background: rgba(255, 255, 255, 0.15);
}

.stepper span {
	min-width: 1.75rem;
	text-align: center;
	font-weight: 700;
}

.footer {
	padding-bottom: 6rem;
}

.cart-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 20;
	padding: 0.75rem var(--space) calc(0.75rem + env(safe-area-inset-bottom));
	background: linear-gradient(to top, var(--bg) 60%, transparent);
}

.cart-bar-btn {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	width: 100%;
	max-width: 44rem;
	min-height: 52px;
	margin: 0 auto;
	padding: 0.75rem 1.25rem;
	border: 0;
	border-radius: var(--radius-lg);
	background: var(--accent-deep);
	color: #fff;
	font: inherit;
	font-weight: 700;
	box-shadow: var(--shadow);
	cursor: pointer;
}

.cart-bar-btn strong {
	color: var(--gold);
	white-space: nowrap;
}

.cart-empty {
	color: var(--muted);
}

.cart-lines {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.75rem;
}

.cart-line {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.75rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid var(--border);
}

.cart-line-info {
	display: grid;
	min-width: 0;
}

.cart-line-sum {
	color: var(--muted);
	font-size: 0.95rem;
}

.cart-total {
	display: flex;
	justify-content: space-between;
	margin: 1rem 0 0.5rem;
	font-size: 1.15rem;
}

.cart-note {
	margin: 0.35rem 0;
	font-size: 0.95rem;
	color: var(--muted);
}

.cart-note.warn {
	color: var(--danger);
	font-weight: 600;
}

.cart-note.ok {
	color: #1f7a3a;
	font-weight: 600;
}

.wa-btn {
	width: 100%;
	margin-top: 1rem;
	background: #1f8f4e;
	text-decoration: none;
}

.wa-btn:hover {
	background: #176c3b;
}

.cart-hint {
	margin: 0.5rem 0 0;
	color: var(--muted);
	font-size: 0.85rem;
	text-align: center;
}

/* Buttons & forms */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: 44px;
	padding: 0.55rem 1rem;
	border: 1px solid transparent;
	border-radius: var(--radius);
	background: var(--accent);
	color: #fff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	transition: transform 0.1s ease;
}

.btn:hover {
	background: var(--accent-deep);
}

.btn:active {
	transform: scale(0.98);
}

.btn:disabled {
	opacity: 0.55;
	cursor: default;
}

.btn-secondary {
	background: var(--surface);
	color: var(--fg);
	border-color: var(--border);
}

.btn-secondary:hover {
	background: var(--bg);
}

.btn-ghost {
	background: transparent;
	color: var(--accent-deep);
}

.btn-ghost:hover {
	background: rgba(13, 107, 90, 0.08);
}

.icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: var(--radius);
	background: transparent;
	color: var(--muted);
	cursor: pointer;
}

.icon-btn:hover {
	background: var(--bg);
}

.card {
	padding: var(--space);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
}

.input,
.select,
.textarea {
	width: 100%;
	min-height: 44px;
	padding: 0.6rem 0.75rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
	color: var(--fg);
	font: inherit;
}

.textarea {
	resize: vertical;
}

.field {
	display: grid;
	gap: 0.35rem;
	margin-bottom: var(--space);
}

.field > label {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--muted);
}

.form-row {
	display: grid;
	gap: 0 0.75rem;
	grid-template-columns: repeat(auto-fit, minmax(min(10rem, 100%), 1fr));
}

.check {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	min-height: 44px;
	margin-bottom: var(--space);
	font-weight: 600;
	cursor: pointer;
}

.check input {
	width: 1.15rem;
	height: 1.15rem;
	accent-color: var(--accent);
}

/* Sheet dialog */
.overlay {
	position: fixed;
	inset: 0;
	z-index: 20;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	background: rgba(20, 32, 46, 0.45);
	animation: fade 0.15s ease;
}

.sheet {
	width: 100%;
	max-width: 32rem;
	max-height: 92vh;
	overflow-y: auto;
	padding: 1.25rem var(--space) 1.5rem;
	background: var(--surface);
	border-radius: var(--radius-lg) var(--radius-lg) 0 0;
	box-shadow: var(--shadow);
	animation: rise 0.2s ease;
}

.sheet-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1rem;
}

.sheet-head h2 {
	font-family: var(--display);
	font-weight: 500;
	font-size: 1.3rem;
	scroll-margin-top: 1rem;
}

.sheet-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 0.5rem;
	margin-top: var(--space);
}

@media (min-width: 40rem) {
	.overlay {
		align-items: center;
		padding: 1.5rem;
	}

	.sheet {
		border-radius: var(--radius-lg);
		padding: 1.5rem;
	}
}

@keyframes fade {
	from {
		opacity: 0;
	}
}

@keyframes rise {
	from {
		transform: translateY(24px);
		opacity: 0;
	}
}

.hint {
	margin: 0;
	color: var(--muted);
}

.small {
	margin-top: 1rem;
	font-size: 0.9rem;
}

.stack {
	display: grid;
	gap: var(--space);
}

.row {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.grid {
	display: grid;
	gap: var(--space);
	grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
}

.list {
	display: grid;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.list-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	flex-wrap: wrap;
	padding: 0.7rem 0.85rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
}

.table {
	width: 100%;
	border-collapse: collapse;
}

.table th,
.table td {
	padding: 0.6rem 0.5rem;
	text-align: left;
	border-bottom: 1px solid var(--border);
}

.empty {
	padding: 2.5rem var(--space);
	text-align: center;
	color: var(--muted);
	background: var(--surface);
	border: 1px dashed var(--border);
	border-radius: var(--radius-lg);
}

.empty-title {
	margin: 0 0 0.25rem;
	color: var(--fg);
	font-weight: 600;
}

.loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	padding: 1.5rem;
	color: var(--muted);
}

.spinner {
	flex: none;
	width: 1.15rem;
	height: 1.15rem;
	border: 2px solid var(--border);
	border-top-color: var(--accent);
	border-radius: 50%;
	animation: fab-spin 0.7s linear infinite;
}

@keyframes fab-spin {
	to {
		transform: rotate(360deg);
	}
}

.skeleton {
	display: block;
	height: 1rem;
	border-radius: var(--radius);
	background: linear-gradient(90deg, var(--border), transparent, var(--border));
	background-size: 200% 100%;
	animation: fab-shimmer 1.2s linear infinite;
}

@keyframes fab-shimmer {
	to {
		background-position: -200% 0;
	}
}

.alert {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	flex-wrap: wrap;
	padding: 0.7rem 0.85rem;
	background: var(--surface);
	border: 1px solid var(--border);
	border-left: 3px solid var(--muted);
	border-radius: var(--radius);
}

.alert-error {
	border-left-color: var(--danger);
	color: var(--danger);
}

.badge {
	display: inline-block;
	padding: 0.1rem 0.5rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	font-size: 0.8125rem;
	color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
	.spinner,
	.skeleton,
	.overlay,
	.sheet {
		animation: none;
	}

	.btn {
		transition: none;
	}
}

:where(a, button, input, select, textarea):focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

.hero :where(a, button):focus-visible {
	outline-color: #f2f7f5;
}
