/**
 * بخش دسته‌بندی محصولات — Soft UI / گلس نئومورفیسم
 */

.hanel-categories {
	--hanel-cat-ink: #151923;
	--hanel-cat-muted: #8a8f9c;
	--hanel-cat-gold: #c5a073;
	--hanel-cat-gold-hi: #e0c07a;
	--hanel-cat-card: #ffffff;
	--hanel-cat-bg: #ffffff;

	position: relative;
	z-index: 2;
	isolation: isolate;
	padding: clamp(3.25rem, 6vw, 5rem) 0 clamp(3.5rem, 6vw, 5rem);
	background: var(--hanel-cat-bg);
	color: var(--hanel-cat-ink);
}

.hanel-categories__inner {
	position: relative;
	z-index: 1;
	width: 100%;
	/* گرید عریض‌تر */
	max-width: min(100% - 0.75rem, 98rem);
	margin-inline: auto;
	padding-inline: clamp(0.65rem, 1.4vw, 1.35rem);
}

.hanel-categories__head {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.85rem;
	margin-bottom: clamp(2.15rem, 4.2vw, 3.15rem);
	padding: 0.5rem 1rem 0.25rem;
	text-align: center;
}

.hanel-categories__eyebrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.85rem;
	color: var(--hanel-cat-gold);
}

.hanel-categories__eyebrow-line {
	display: block;
	width: clamp(1.75rem, 4vw, 2.75rem);
	height: 1px;
	transform-origin: center;
	background: linear-gradient(
		90deg,
		transparent 0%,
		rgba(197, 160, 115, 0.2) 18%,
		rgba(197, 160, 115, 0.95) 50%,
		rgba(197, 160, 115, 0.2) 82%,
		transparent 100%
	);
}

.hanel-categories__eyebrow-text {
	font-size: 0.8rem;
	font-weight: 750;
	letter-spacing: 0.34em;
	line-height: 1;
	text-transform: uppercase;
	background: linear-gradient(120deg, #b8903a 0%, #d4b48a 45%, #c5a073 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.hanel-categories__title {
	position: relative;
	margin: 0;
	color: var(--hanel-cat-ink);
	font-size: clamp(1.9rem, 3.8vw, 2.65rem);
	font-weight: 800;
	line-height: 1.28;
	letter-spacing: -0.01em;
}

.hanel-categories__word {
	display: inline-block;
	overflow: hidden;
	padding-block-end: 0.08em;
	margin-block-end: -0.08em;
	vertical-align: bottom;
}

.hanel-categories__word-inner {
	display: inline-block;
}

.hanel-categories__title::after {
	content: "";
	display: block;
	width: 2.75rem;
	height: 3px;
	margin: 0.85rem auto 0;
	border-radius: 999px;
	background: linear-gradient(90deg, transparent, #e0c07a 20%, #c5a073 50%, #e0c07a 80%, transparent);
	transform-origin: center;
	transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.hanel-categories__subtitle {
	margin: 0;
	max-width: 30rem;
	color: var(--hanel-cat-muted);
	font-size: clamp(0.98rem, 1.5vw, 1.08rem);
	font-weight: 500;
	line-height: 1.8;
}

.hanel-categories__ornament {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.7rem;
	margin-top: 0.15rem;
	color: var(--hanel-cat-gold);
}

.hanel-categories__ornament-line {
	display: block;
	width: 2.1rem;
	height: 1px;
	transform-origin: center;
	background: linear-gradient(90deg, transparent, rgba(197, 160, 115, 0.75), transparent);
}

.hanel-categories__ornament-mark {
	display: grid;
	place-items: center;
	width: 1.85rem;
	height: 1.85rem;
	border-radius: 50%;
	border: 1px solid rgba(197, 160, 115, 0.28);
	background:
		radial-gradient(circle at 35% 30%, #fff9ef 0%, #f7edd8 100%);
	box-shadow:
		0 4px 10px rgba(197, 160, 115, 0.16),
		inset 0 1px 0 rgba(255, 255, 255, 0.9);
	color: #c5a073;
}

.hanel-categories__ornament-mark .hanel-icon {
	width: 0.95rem;
	height: 0.95rem;
	stroke-width: 1.7;
}

.hanel-categories__grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: clamp(1rem, 2vw, 1.55rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

.hanel-categories__item {
	min-width: 0;
}

/* کارت سفید گلس نئومورفیسم */
.hanel-categories__card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
	height: 100%;
	padding: 1.55rem 1.1rem 1.35rem;
	overflow: hidden;
	isolation: isolate;
	border-radius: 1.6rem;
	border: 1px solid rgba(255, 255, 255, 1);
	background: var(--hanel-cat-card);
	backdrop-filter: blur(16px) saturate(1.2);
	-webkit-backdrop-filter: blur(16px) saturate(1.2);
	box-shadow:
		14px 18px 34px rgba(163, 177, 198, 0.3),
		-9px -9px 24px rgba(255, 255, 255, 1),
		inset 0 1px 0 rgba(255, 255, 255, 1),
		inset 0 -1px 0 rgba(21, 25, 35, 0.015);
	color: inherit;
	text-decoration: none;
	transition:
		transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
		box-shadow 0.32s ease,
		border-color 0.32s ease;
}

.hanel-categories__card::before {
	content: "";
	position: absolute;
	inset: 0.5rem;
	z-index: 0;
	border-radius: 1.25rem;
	background: radial-gradient(120% 70% at 50% 0%, rgba(197, 160, 115, 0.06), transparent 58%);
	pointer-events: none;
}

.hanel-categories__card:hover,
.hanel-categories__card:focus-visible {
	outline: none;
	border-color: rgba(197, 160, 115, 0.35);
	transform: translateY(-6px);
	box-shadow:
		16px 22px 40px rgba(163, 177, 198, 0.34),
		-8px -8px 24px rgba(255, 255, 255, 1),
		0 0 0 1px rgba(197, 160, 115, 0.1),
		inset 0 1px 0 rgba(255, 255, 255, 1);
}

.hanel-categories__card-num {
	position: absolute;
	top: 0.95rem;
	left: 0.95rem;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	border: 1px solid rgba(197, 160, 115, 0.22);
	background:
		linear-gradient(145deg, #ffffff 0%, #f7f1e7 100%);
	box-shadow:
		4px 5px 10px rgba(163, 177, 198, 0.22),
		-2px -2px 6px rgba(255, 255, 255, 0.9),
		inset 0 1px 0 rgba(255, 255, 255, 0.9);
	color: var(--hanel-cat-gold);
	font-size: 0.74rem;
	font-weight: 750;
	letter-spacing: 0.02em;
	line-height: 1;
}

.hanel-categories__card-media {
	position: relative;
	width: 100%;
	max-width: 10.5rem;
	aspect-ratio: 4 / 5.05;
	overflow: hidden;
	border-radius: 999px 999px 1.2rem 1.2rem;
	background: #f3f4f6;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.85),
		8px 12px 20px rgba(163, 177, 198, 0.18),
		-4px -4px 12px rgba(255, 255, 255, 0.8);
}

.hanel-categories__card-image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.hanel-categories__card:hover .hanel-categories__card-image,
.hanel-categories__card:focus-visible .hanel-categories__card-image {
	transform: scale(1.07);
}

.hanel-categories__card-placeholder {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	color: rgba(197, 160, 115, 0.62);
	background:
		radial-gradient(circle at 50% 32%, rgba(255, 255, 255, 0.9), transparent 58%),
		linear-gradient(180deg, #faf8f4 0%, #ebe4d8 100%);
}

.hanel-categories__card-placeholder .hanel-icon {
	width: 2.25rem;
	height: 2.25rem;
	stroke-width: 1.45;
}

.hanel-categories__card-title {
	display: block;
	max-width: 100%;
	color: var(--hanel-cat-ink);
	font-size: 1.02rem;
	font-weight: 750;
	line-height: 1.45;
	text-align: center;
}

.hanel-categories__card-icon {
	display: grid;
	place-items: center;
	width: 2.5rem;
	height: 2.5rem;
	margin-top: auto;
	border-radius: 50%;
	border: 1px solid rgba(197, 160, 115, 0.4);
	background: transparent;
	box-shadow: none;
	color: var(--hanel-cat-gold);
	transition:
		color 0.22s ease,
		border-color 0.22s ease,
		background 0.22s ease;
}

.hanel-categories__card-icon .hanel-icon {
	width: 1.15rem;
	height: 1.15rem;
	stroke-width: 1.75;
}

.hanel-categories__card:hover .hanel-categories__card-icon,
.hanel-categories__card:focus-visible .hanel-categories__card-icon {
	color: #a8844f;
	border-color: rgba(197, 160, 115, 0.7);
	background: rgba(197, 160, 115, 0.08);
	transform: none;
	box-shadow: none;
}

.hanel-categories__footer {
	display: flex;
	justify-content: center;
	margin-top: clamp(2rem, 4vw, 2.75rem);
}

.hanel-categories__more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.65rem;
	min-height: 3.15rem;
	padding: 0.85rem 1.75rem;
	border: 1.5px solid rgba(197, 160, 115, 0.55);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.88);
	box-shadow:
		8px 10px 20px rgba(163, 177, 198, 0.18),
		-4px -4px 12px rgba(255, 255, 255, 0.9);
	color: var(--hanel-cat-gold);
	font-size: 0.98rem;
	font-weight: 700;
	text-decoration: none;
	transition:
		transform 0.25s ease,
		background 0.25s ease,
		border-color 0.25s ease,
		color 0.25s ease,
		box-shadow 0.25s ease;
}

.hanel-categories__more-icon {
	display: grid;
	place-items: center;
}

.hanel-categories__more-icon .hanel-icon {
	width: 1.05rem;
	height: 1.05rem;
	stroke-width: 2;
}

.hanel-categories__more:hover,
.hanel-categories__more:focus-visible {
	outline: none;
	color: #16110a;
	border-color: rgba(197, 160, 115, 0.95);
	background: linear-gradient(160deg, #f0d060 0%, #c5a073 100%);
	box-shadow: 0 14px 28px rgba(21, 25, 35, 0.12);
	transform: translateY(-2px);
}

@media (max-width: 1200px) {
	.hanel-categories__inner {
		max-width: min(100% - 0.75rem, 90rem);
	}
}

@media (max-width: 1100px) {
	.hanel-categories__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 1.15rem;
	}

	.hanel-categories__card-media {
		max-width: 10.5rem;
	}
}

@media (max-width: 700px) {
	.hanel-categories {
		padding-top: clamp(2.75rem, 8vw, 3.75rem);
	}

	.hanel-categories__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.8rem;
	}

	.hanel-categories__card {
		gap: 0.5rem;
		padding: 0.85rem 0.65rem 0.7rem;
		border-radius: 1.15rem;
	}

	.hanel-categories__card-num {
		top: 0.55rem;
		left: 0.55rem;
		width: 1.6rem;
		height: 1.6rem;
		font-size: 0.62rem;
	}

	.hanel-categories__card-media {
		max-width: 6.35rem;
		aspect-ratio: 1 / 1.04;
		border-radius: 999px 999px 0.9rem 0.9rem;
	}

	.hanel-categories__card-title {
		font-size: 0.86rem;
		line-height: 1.3;
	}

	.hanel-categories__card-icon {
		width: 1.85rem;
		height: 1.85rem;
		margin-top: 0.05rem;
	}

	.hanel-categories__card-icon .hanel-icon {
		width: 0.9rem;
		height: 0.9rem;
	}
}

@media (max-width: 420px) {
	.hanel-categories__grid {
		grid-template-columns: 1fr 1fr;
		gap: 0.65rem;
	}

	.hanel-categories__card {
		gap: 0.38rem;
		padding: 0.68rem 0.48rem 0.55rem;
		border-radius: 1.05rem;
	}

	.hanel-categories__card-num {
		top: 0.42rem;
		left: 0.42rem;
		width: 1.45rem;
		height: 1.45rem;
		font-size: 0.58rem;
	}

	.hanel-categories__card-media {
		max-width: 5.35rem;
		aspect-ratio: 1 / 1;
	}

	.hanel-categories__card-title {
		font-size: 0.8rem;
	}

	.hanel-categories__card-icon {
		width: 1.6rem;
		height: 1.6rem;
	}

	.hanel-categories__card-icon .hanel-icon {
		width: 0.82rem;
		height: 0.82rem;
	}

	.hanel-categories__more {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hanel-categories__card,
	.hanel-categories__card-image,
	.hanel-categories__card-icon,
	.hanel-categories__more,
	.hanel-categories--await .hanel-categories__eyebrow,
	.hanel-categories--await .hanel-categories__title,
	.hanel-categories--await .hanel-categories__subtitle,
	.hanel-categories--await .hanel-categories__ornament,
	.hanel-categories--await .hanel-categories__item,
	.hanel-categories--await .hanel-categories__footer,
	.hanel-categories--await .hanel-categories__title::after {
		animation: none !important;
		transition: none !important;
		opacity: 1 !important;
		transform: none !important;
	}
}

.hanel-categories--await .hanel-categories__eyebrow,
.hanel-categories--await .hanel-categories__title,
.hanel-categories--await .hanel-categories__subtitle,
.hanel-categories--await .hanel-categories__ornament,
.hanel-categories--await .hanel-categories__item,
.hanel-categories--await .hanel-categories__footer {
	opacity: 0;
}

.hanel-categories--await .hanel-categories__title::after {
	transform: scaleX(0);
}

.hanel-categories.is-title-in .hanel-categories__title::after,
.hanel-categories.is-categories-animated .hanel-categories__title::after,
.hanel-categories.is-ready .hanel-categories__title::after {
	transform: scaleX(1);
}

.hanel-categories.is-ready .hanel-categories__eyebrow,
.hanel-categories.is-ready .hanel-categories__title,
.hanel-categories.is-ready .hanel-categories__subtitle,
.hanel-categories.is-ready .hanel-categories__ornament,
.hanel-categories.is-ready .hanel-categories__item,
.hanel-categories.is-ready .hanel-categories__footer {
	opacity: 1;
}

.hanel-categories.is-animating .hanel-categories__item {
	will-change: transform, opacity;
}

.hanel-categories.is-animating .hanel-categories__card {
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
}
