/*
Theme Name: Hooria Zamani
Author: Hooria Zamani
Description: A single-page service menu. Lists published WooCommerce products whose type is Services, grouped by the tik4_service_cat taxonomy.
Version: 1.0.0
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: hooriazamani
*/

:root {
	--paper: #f4efe8;
	--ink: #221e1b;
	--muted: #8a8178;
	--line: #e3dad0;
	--accent: #a48462;
	--sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
	--serif: "Cormorant Garamond", Palatino, "Palatino Linotype", Georgia, serif;
	--mast: 7.75rem;
	--scroll-pad: 8rem;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	direction: ltr;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	direction: ltr;
	text-align: left;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

.skip {
	position: absolute;
	inset-inline-start: 1rem;
	top: -4rem;
	z-index: 50;
	padding: 0.5rem 0.8rem;
	background: var(--ink);
	color: var(--paper);
	border-radius: 999px;
	text-decoration: none;
}

.skip:focus {
	top: 0.75rem;
}

.page {
	width: min(40rem, calc(100% - 2.5rem));
	margin-inline: auto;
	padding-bottom: 5rem;
}

.mast {
	position: sticky;
	top: 0;
	z-index: 30;
	margin-inline: -0.25rem;
	padding: 1.35rem 0.25rem 0;
	background: color-mix(in srgb, var(--paper) 88%, transparent);
	backdrop-filter: blur(16px);
	box-shadow: inset 0 -1px 0 var(--line);
}

body.admin-bar .mast {
	top: 32px;
}

.brand {
	display: block;
	margin: 0;
	color: inherit;
	font-family: var(--serif);
	font-size: clamp(1.7rem, 5vw, 2.25rem);
	font-weight: 500;
	font-style: normal;
	letter-spacing: 0.12em;
	line-height: 1.1;
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
}

.brand:hover {
	color: inherit;
}

.cats {
	position: relative;
	margin-top: 1rem;
}

.cats__track {
	display: flex;
	width: max-content;
	max-width: 100%;
	margin-inline: auto;
	gap: 0.35rem;
	overflow-x: auto;
	padding: 0.15rem 0.15rem 0.85rem;
	scrollbar-width: none;
}

.cats__track::-webkit-scrollbar {
	display: none;
}

.cats a {
	flex: none;
	padding: 0.38rem 0.85rem;
	border-radius: 999px;
	color: var(--muted);
	font-size: 0.92rem;
	font-weight: 500;
	line-height: 1.4;
	text-decoration: none;
}

.cats a:hover {
	color: var(--ink);
	background: rgba(255, 255, 255, 0.7);
}

.cats a.is-active {
	background: var(--ink);
	color: var(--paper);
}

.cats a:focus-visible,
.brand:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

.cats::before,
.cats::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0.85rem;
	width: 1rem;
	pointer-events: none;
}

.cats::before {
	left: 0;
	background: linear-gradient(90deg, var(--paper), transparent);
}

.cats::after {
	right: 0;
	background: linear-gradient(270deg, var(--paper), transparent);
}

.menu {
	padding-top: 0.5rem;
}

.group {
	padding-top: 2.75rem;
	scroll-margin-top: var(--scroll-pad);
}

.group--nested {
	padding-top: 1.85rem;
	scroll-margin-top: var(--scroll-pad);
}

h2.group__title {
	margin: 0;
	font-family: var(--serif);
	font-size: clamp(2.15rem, 5vw, 2.75rem);
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1;
}

.group--nested .group__title {
	margin: 0;
	font-family: var(--sans);
	font-size: 1.05rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	line-height: 1.3;
	color: #4a433d;
}

.group__title::before {
	content: "";
	display: block;
	width: 1.4rem;
	height: 1px;
	margin-bottom: 0.7rem;
	background: var(--accent);
}

.group--nested .group__title::before {
	width: 0.9rem;
	margin-bottom: 0.5rem;
}

.group__desc {
	max-width: 36em;
	margin: 0.45rem 0 0;
	color: var(--muted);
	font-size: 0.92rem;
	font-weight: 300;
}

.services {
	margin: 1rem 0 0;
	padding: 0;
	list-style: none;
}

.service {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	column-gap: 1.25rem;
	align-items: start;
	padding: 0.95rem 0.2rem;
}

.service + .service {
	border-top: 1px solid var(--line);
}

.service__name {
	margin: 0;
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.45;
}

.service__note {
	margin: 0.2rem 0 0;
	color: var(--muted);
	font-size: 0.86rem;
	font-weight: 300;
	line-height: 1.55;
}

.service__meta {
	display: flex;
	flex-direction: column;
	align-items: end;
	gap: 0.15rem;
	padding-top: 0.1rem;
	text-align: end;
}

.service__price {
	font-size: 0.95rem;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
	line-height: 1.45;
}

.service__price del,
.service__price ins,
.service__price .woocommerce-Price-amount {
	white-space: nowrap;
}

.service__price del,
.service__price ins {
	display: block;
}

.service__price .amount,
.service__price bdi {
	font-weight: inherit;
}

.service__price del {
	margin-inline-end: 0.35rem;
	color: var(--muted);
	font-weight: 400;
}

.service__price ins {
	text-decoration: none;
}

.service__time {
	color: var(--muted);
	font-size: 0.78rem;
	font-weight: 400;
}

.empty {
	margin: 0;
	padding: 4.5rem 0 2rem;
	color: var(--muted);
	text-align: center;
	font-weight: 300;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (max-width: 782px) {
	body.admin-bar .mast {
		top: 46px;
	}
}

@media (max-width: 520px) {
	.page {
		width: min(40rem, calc(100% - 1.75rem));
	}

	.brand {
		letter-spacing: 0.06em;
	}

	.service {
		grid-template-columns: 1fr;
		row-gap: 0.35rem;
	}

	.service__meta {
		flex-direction: column;
		align-items: start;
		gap: 0.15rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}
