/* ==========================================================================
   Tarhee — home.css (front page only)
   Hero · Stats · Categories · Product lists · Steps · Features ·
   Testimonials · FAQ · CTA. Same tokens, radius and shadows as the product page.
   ========================================================================== */

/* ---------- Section frame ---------- */
.hsec {
	padding-block: clamp(40px, 6vw, 80px);
	background: var(--sec-bg, transparent);
}
/* Skip rendering work for sections far below the fold. */
.hsec--cats,
.hsec--pa,
.hsec--pb,
.hsec--steps,
.hsec--feat,
.hsec--testi,
.hsec--faq,
.hsec--cta {
	content-visibility: auto;
	contain-intrinsic-size: auto 520px;
}

.hsec__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 10px 24px;
	margin-bottom: clamp(20px, 3vw, 32px);
}
.hsec__titles { min-width: 0; }
.hsec__title {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: clamp(1.2rem, 2.6vw, 1.55rem);
	font-weight: var(--fw-heading);
	line-height: 1.5;
	color: var(--navy);
}
.hsec__title::before {
	content: '';
	flex: none;
	width: 6px;
	height: 26px;
	border-radius: 3px;
	background: linear-gradient(180deg, var(--gold), var(--gold-light));
}
.hsec__text { margin-top: 6px; font-size: .92rem; color: var(--muted); }
.hsec__more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 4px;
	font-size: .88rem;
	font-weight: var(--fw-strong);
	color: var(--navy);
	transition: color .2s, gap .2s;
}
.hsec__more:hover { color: var(--gold-dark); gap: 10px; }

.hl {
	background: linear-gradient(135deg, var(--gold), var(--gold-light));
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: var(--gold);
}

/* ---------- Hero ---------- */
.hero {
	position: relative;
	overflow: hidden;
	padding-block: clamp(36px, 7vw, 88px) clamp(64px, 9vw, 120px);
	isolation: isolate;
}
.hero__inner {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
	align-items: center;
	gap: clamp(28px, 5vw, 64px);
}
.hero--solo .hero__inner { grid-template-columns: minmax(0, 1fr); }
.hero--solo .hero__body { max-width: 760px; margin-inline: auto; text-align: center; }
.hero--solo .hero__actions,
.hero--solo .hero__badges { justify-content: center; }
.hero--solo .hero__search { margin-inline: auto; }

.hero__body { min-width: 0; }

.hero__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 18px;
	padding: 6px 14px;
	border: 1px solid color-mix(in srgb, var(--gold) 38%, transparent);
	border-radius: 999px;
	background: color-mix(in srgb, var(--gold) 14%, transparent);
	font-size: .8rem;
	font-weight: var(--fw-strong);
}
.hero__eyebrow::before {
	content: '';
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--gold);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 25%, transparent);
}
.hero__title {
	font-size: clamp(1.75rem, 4.6vw, 3.1rem);
	font-weight: var(--fw-heading);
	line-height: 1.45;
	letter-spacing: -.015em;
	text-wrap: balance;
}
.hero__text {
	max-width: 56ch;
	margin-top: 16px;
	font-size: clamp(.95rem, 1.6vw, 1.08rem);
	line-height: 1.95;
}
.hero--solo .hero__text { margin-inline: auto; }

.hero__search {
	display: flex;
	gap: 8px;
	max-width: 520px;
	margin-top: 26px;
	padding: 6px;
	border-radius: 16px;
	background: #fff;
	box-shadow: var(--shadow-lg);
}
.hero__search input[type='search'] {
	flex: 1;
	min-width: 0;
	padding: 10px 14px;
	border: 0;
	border-radius: 12px;
	background: transparent;
	color: var(--text);
}
.hero__search input[type='search']:focus { box-shadow: none; }
.hero__search:focus-within { box-shadow: var(--shadow-lg), 0 0 0 3px color-mix(in srgb, var(--gold) 35%, transparent); }
.hero__search .btn { padding: 10px 18px; box-shadow: none; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero__badges { margin-top: 24px; }

.hero__media { position: relative; padding: 14px; }
.hero__frame {
	position: absolute;
	inset: 0;
	border: 2px solid var(--gold);
	border-radius: calc(var(--radius) + 8px);
	transform: rotate(-2deg);
	opacity: .45;
	pointer-events: none;
	transition: transform .4s var(--ease), opacity .4s;
}
.hero__media:hover .hero__frame { transform: none; opacity: .75; }
.hero__img {
	position: relative;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: var(--radius);
	box-shadow: var(--shadow-lg);
}
.hero__media .tarhee-top-badge { position: absolute; top: 28px; inset-inline-end: 28px; z-index: 2; }

/* Dark hero */
.hero--dark {
	--hero-base: var(--hero-bg, var(--navy));
	background:
		radial-gradient(60% 90% at 88% 0%, color-mix(in srgb, var(--gold) 26%, transparent), transparent 62%),
		linear-gradient(135deg, var(--hero-base) 0%, color-mix(in srgb, var(--hero-base) 78%, #000) 100%);
	color: #fff;
}
.hero--dark::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	background: radial-gradient(circle, rgba(255, 255, 255, .07) 1px, transparent 1px) 0 0 / 24px 24px;
	-webkit-mask-image: linear-gradient(180deg, #000, transparent 85%);
	mask-image: linear-gradient(180deg, #000, transparent 85%);
}
.hero--dark .hero__eyebrow { color: var(--gold-light); }
.hero--dark .hero__text { color: rgba(255, 255, 255, .8); }
.hero--dark .tarhee-badge { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); color: #fff; }
.hero--dark .tarhee-badge.is-success { background: rgba(5, 150, 105, .22); border-color: rgba(52, 211, 153, .45); color: #d1fae5; }
.hero--dark .btn--ghost { color: #fff; border-color: rgba(255, 255, 255, .45); }
.hero--dark .btn--ghost:hover { border-color: #fff; }

/* Browsers without color-mix(): the gradient above is invalid there, so the hero lost its background. */
@supports not (color: color-mix(in srgb, red 50%, white)) {
	.hero--dark { background: var(--hero-base); }
}

/* Light hero */
.hero--light { background: var(--hero-bg, transparent); color: var(--navy); }
.hero--light .hero__eyebrow { color: var(--gold-dark); }
.hero--light .hero__text { color: var(--muted); }
.hero--light .hero__search { border: 1px solid var(--border); box-shadow: var(--shadow); }
.hero--light .btn--ghost { color: var(--navy); border-color: var(--border); background: #fff; }
.hero--light .btn--ghost:hover { border-color: var(--gold); }

/* ---------- Stats ---------- */
.hsec--stats { padding-block: clamp(32px, 5vw, 56px) clamp(8px, 2vw, 24px); }
.hero + .hsec--stats { margin-top: calc(-1 * clamp(36px, 5vw, 56px)); padding-top: 0; position: relative; z-index: 2; }
.stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 1px;
	margin: 0;
	padding: 0;
	overflow: hidden;
	list-style: none;
	background: var(--border);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-lg);
}
.stat {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	padding: 22px 12px;
	background: #fff;
	text-align: center;
}
.stat__num { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: var(--fw-heading); line-height: 1.4; color: var(--navy); }
.stat__label { font-size: .82rem; color: var(--muted); }

/* ---------- Categories ---------- */
.cats {
	--cols: var(--cols-d, 4);
	display: grid;
	grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.cat {
	position: relative;
	display: block;
	overflow: hidden;
	height: 100%;
	background: #fff;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.cat:hover { transform: translateY(-6px); box-shadow: 0 20px 44px rgba(13, 26, 56, .14); border-color: var(--gold); }
.cat__media {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: linear-gradient(135deg, var(--gold-soft), #fff);
	color: var(--gold);
}
.cat__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.cat:hover .cat__media img { transform: scale(1.08); }
.cat__body { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; padding: 14px 16px; }
.cat__name { font-size: .95rem; font-weight: var(--fw-strong); line-height: 1.5; color: var(--text); }
.cat__count {
	padding: 2px 10px;
	border-radius: 999px;
	background: var(--gold-soft);
	font-size: .72rem;
	font-weight: var(--fw-label);
	color: var(--gold-dark);
}

/* ---------- Product lists (WooCommerce cards, styled in woocommerce.css) ---------- */
.hproducts .woocommerce { margin: 0; }

/* ---------- Amazing offers («شگفت‌انگیز») ---------- */
.hamz__box {
	position: relative;
	padding: clamp(14px, 2.4vw, 26px);
	border-radius: calc(var(--radius) + 8px);
	background: var(--amz, #ef394e);
	color: #fff;
	box-shadow: var(--shadow-lg);
}
.hamz__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 20px;
	margin-bottom: clamp(14px, 2vw, 22px);
}
.hamz__titles { min-width: 0; }
.hamz__title { margin: 0; font-size: clamp(1.25rem, 3vw, 1.7rem); font-weight: var(--fw-heading); line-height: 1.4; color: #fff; }
.hamz__text { margin: 4px 0 0; font-size: .9rem; line-height: 1.7; color: #fff; opacity: .92; }
.hamz__timer { display: inline-flex; gap: 6px; direction: ltr; }
.hamz__unit {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 46px;
	padding: 5px 6px 4px;
	border-radius: 10px;
	background: #fff;
	color: var(--amz-ink, #c8102e);
	line-height: 1.25;
}
.hamz__unit[hidden] { display: none; }
.hamz__unit b { font-size: 1.05rem; font-weight: var(--fw-heading); font-variant-numeric: tabular-nums; }
.hamz__unit small { font-size: .62rem; font-weight: var(--fw-label); color: var(--muted); }
.hamz__more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-inline-start: auto;
	padding: 8px 4px;
	font-size: .88rem;
	font-weight: var(--fw-strong);
	color: #fff;
	transition: gap .2s;
}
.hamz__more:hover { gap: 10px; color: #fff; }

.hamz__list { position: relative; }
.hamz__list .woocommerce { margin: 0; }
.hamz__list ul.products {
	display: flex;
	gap: 12px;
	padding: 8px 2px 10px;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x proximity;
	scrollbar-width: none;
}
.hamz__list ul.products::-webkit-scrollbar { display: none; }
.hamz__list ul.products li.product { flex: 0 0 clamp(150px, 21vw, 216px); width: auto; scroll-snap-align: start; }
.hamz__list ul.products li.product:hover { transform: translateY(-3px); }
.hamz li.product .price del { display: block; font-size: .78rem; font-weight: var(--fw-medium); color: #5b6472; }
.hamz li.product .price del .woocommerce-Price-currencySymbol { color: inherit; }
.hamz li.product .price ins { text-decoration: none; color: var(--amz, #ef394e); }
.hamz .onsale { background: var(--amz, #ef394e); }
.hamz__nav {
	position: absolute;
	top: 42%;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: var(--navy);
	box-shadow: var(--shadow-sm);
	cursor: pointer;
	transition: transform .2s;
}
.hamz__nav:hover { transform: scale(1.08); }
.hamz__nav--prev { inset-inline-start: -10px; }
.hamz__nav--next { inset-inline-end: -10px; }
.hamz__nav--prev .tarhee-icon { transform: scaleX(-1); }

/* ---------- Steps ---------- */
.steps {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.step {
	position: relative;
	overflow: hidden;
	padding: 28px 24px;
	background: #fff;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-sm);
	transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.step__icon,
.feat__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	margin-bottom: 16px;
	border-radius: 16px;
	background: linear-gradient(135deg, var(--gold-soft), #fff);
	border: 1px solid color-mix(in srgb, var(--gold) 25%, transparent);
	color: var(--gold-dark);
}
.step__no {
	position: absolute;
	top: 14px;
	inset-inline-end: 18px;
	font-size: 2.6rem;
	font-weight: var(--fw-heading);
	line-height: 1;
	color: color-mix(in srgb, var(--gold) 20%, transparent);
}
.step__title,
.feat__title { margin-bottom: 6px; font-size: 1.02rem; font-weight: var(--fw-strong); color: var(--navy); }
.step__text,
.feat__text { font-size: .9rem; color: var(--muted); }

/* ---------- Features ---------- */
.feats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.feat {
	padding: 24px 22px;
	background: linear-gradient(135deg, #fff, #fafbfd);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	transition: border-color .25s, box-shadow .25s, transform .25s;
}
.feat:hover { border-color: var(--gold); box-shadow: var(--shadow); transform: translateY(-3px); }

/* ---------- Testimonials ---------- */
.testis {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.testi {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 24px;
	background: #fff;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-sm);
}
.stars {
	--dir: to left;
	display: inline-block;
	font-size: 1.1rem;
	letter-spacing: 2px;
	line-height: 1;
	background: linear-gradient(var(--dir), var(--gold) calc(var(--r, 5) / 5 * 100%), #d9dce5 0);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}
.stars::before { content: '\2605\2605\2605\2605\2605'; }
html:not([dir='rtl']) .stars { --dir: to right; }
.testi__text { flex: 1; font-size: .93rem; line-height: 1.95; color: #3a4256; }
.testi__who { display: flex; align-items: center; gap: 12px; }
.testi__who strong { display: block; font-size: .9rem; color: var(--navy); }
.testi__who small { font-size: .76rem; color: var(--muted); }
.testi__avatar {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--gold), var(--gold-light));
	font-weight: var(--fw-heading);
	color: var(--navy);
}

/* ---------- FAQ ---------- */
.faq-wrap { max-width: 860px; margin-inline: auto; }
.faq { display: grid; gap: 12px; }
.faq__item {
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	transition: border-color .2s, box-shadow .2s;
}
.faq__item[open] { border-color: color-mix(in srgb, var(--gold) 55%, transparent); box-shadow: var(--shadow-sm); }
.faq__item summary {
	position: relative;
	padding: 16px 20px;
	padding-inline-end: 54px;
	font-size: .96rem;
	font-weight: var(--fw-strong);
	line-height: 1.7;
	color: var(--navy);
	cursor: pointer;
	list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::before,
.faq__item summary::after {
	content: '';
	position: absolute;
	top: 50%;
	inset-inline-end: 22px;
	width: 14px;
	height: 2px;
	border-radius: 2px;
	background: var(--gold-dark);
	transition: transform .25s var(--ease);
}
.faq__item summary::after { transform: rotate(90deg); }
.faq__item[open] summary::after { transform: rotate(0); }
.faq__a { padding: 0 20px 18px; font-size: .92rem; color: #3a4256; }
.faq__a p + p { margin-top: 8px; }

/* ---------- CTA ---------- */
.cta {
	position: relative;
	overflow: hidden;
	padding: clamp(32px, 6vw, 60px) clamp(20px, 5vw, 56px);
	border-radius: calc(var(--radius) + 8px);
	background:
		radial-gradient(70% 120% at 100% 0%, color-mix(in srgb, var(--gold) 30%, transparent), transparent 60%),
		linear-gradient(135deg, var(--navy), var(--navy-2));
	color: #fff;
	text-align: center;
	box-shadow: var(--shadow-lg);
}
.cta__title { font-size: clamp(1.3rem, 3.4vw, 2rem); font-weight: var(--fw-heading); line-height: 1.55; }
.cta__text { max-width: 56ch; margin: 12px auto 0; color: rgba(255, 255, 255, .8); }
.cta .btn { margin-top: 24px; }

/* ---------- Content from the editor ---------- */
.hsec--content { padding-block: clamp(24px, 4vw, 48px); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
	.hproducts ul.products.columns-4,
	.hproducts ul.products.columns-5 { --cols: 3; }
}

@media (max-width: 1024px) {
	.cats { --cols: min(var(--cols-d, 4), 3); }
}

@media (max-width: 900px) {
	.hero__inner { grid-template-columns: minmax(0, 1fr); }
	.hero__media { width: min(100%, 560px); margin-inline: auto; }
}

@media (max-width: 720px) {
	.hamz__nav { display: none; }
	.cats { --cols: 2; gap: 14px; }
	.cat__body { flex-direction: column; align-items: flex-start; padding: 12px; }
	.cat__name { font-size: .88rem; }
}

@media (max-width: 560px) {
	.hero__actions .btn { flex: 1 1 100%; }
	.hero__search .btn span { display: none; }
	.hero__search .btn { padding-inline: 14px; }
	.hproducts ul.products { --cols: 2 !important; gap: 12px; }
	.hproducts .woocommerce-loop-product__title { padding: 10px 12px; font-size: .8rem; }
	.stat { padding: 16px 8px; }
	.stats { grid-template-columns: repeat(2, 1fr); }
	.step,
	.feat,
	.testi { padding: 20px 18px; }
	.faq__item summary { padding: 14px 16px; padding-inline-end: 46px; font-size: .9rem; }
	.faq__item summary::before,
	.faq__item summary::after { inset-inline-end: 18px; }
	.faq__a { padding: 0 16px 16px; }
}

@media (prefers-reduced-motion: reduce) {
	.tarhee-top-badge { animation: none; }
}
