/* =========================================================
   home-main.css — بدنهٔ صفحهٔ اصلی (هم‌ساختار با سایت نمونه)
   ========================================================= */

.jw-sr {
	position: absolute;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.jw-section { margin-top: 70px; }
.jw-section--center { text-align: center; }
.jw-section__head { margin-bottom: 26px; text-align: center; }

.jw-title { margin: 0; font-size: 30px; font-weight: 800; color: var(--jw-navy); }
.jw-subtitle { margin: 10px 0 0; font-size: 15px; color: var(--jw-gray); }

/* عنوان با خط دورِ کلمهٔ کلیدی */
.jw-headline {
	margin: 0;
	font-size: 44px;
	font-weight: 900;
	line-height: 1.5;
	color: var(--jw-navy);
}
.jw-headline--light { color: #fff; }
.jw-headline__mark { position: relative; display: inline-block; padding: 0 6px; }
.jw-headline__mark svg {
	position: absolute;
	inset-inline: -6%;
	top: 50%;
	width: 112%;
	height: 105%;
	transform: translateY(-50%);
	fill: none;
	stroke: var(--jw-lime);
	stroke-width: 9;
	stroke-linecap: round;
	stroke-dasharray: 1500;
	stroke-dashoffset: 1500;
	animation: jw-draw 1.2s var(--jw-ease) .35s forwards;
}
@keyframes jw-draw { to { stroke-dashoffset: 0; } }

/* =========================================================
   ۱) هیرو
   ========================================================= */
.jw-hero {
	background: linear-gradient(180deg, var(--jw-navy-dark) 18%, var(--jw-navy) 100%);
	padding: 60px 0 170px;
}
.jw-hero__inner {
	display: flex;
	align-items: center;
	gap: 30px;
	min-height: 480px;
}
.jw-hero__text { flex: 1 1 46%; }
.jw-hero__lead { margin: 24px 0 0; font-size: 19px; font-weight: 600; color: #fff; }
.jw-hero__desc { margin: 12px 0 30px; font-size: 16px; line-height: 2; color: rgba(255, 255, 255, .82); max-width: 470px; }

.jw-hero__media { flex: 1 1 48%; text-align: center; }
.jw-hero__media img {
	width: 78%;
	max-width: 520px;
	filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .35));
	animation: jw-float 6s ease-in-out infinite;
}
@keyframes jw-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }

/* =========================================================
   ۲) دربارهٔ ما (کارت سفید روی هیرو)
   ========================================================= */
.jw-about { margin-top: -120px; position: relative; z-index: 2; }
.jw-about__card {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
	padding: 60px 50px;
	border-radius: var(--jw-radius-xl);
	background: #fff;
	box-shadow: var(--jw-shadow);
}
.jw-about__title { margin: 22px 0 14px; font-size: 22px; font-weight: 700; color: var(--jw-navy); }
.jw-about__desc { margin: 0 0 28px; font-size: 14.5px; line-height: 2.2; color: var(--jw-ink); text-align: justify; }

.jw-counters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 28px; }
.jw-counter {
	padding: 18px 10px;
	border-radius: 16px;
	background: var(--jw-lime-tint);
	text-align: center;
}
.jw-counter__num { display: block; font-size: 26px; font-weight: 900; color: var(--jw-navy); }
.jw-counter__label { font-size: 12.5px; color: var(--jw-gray); }

.jw-about__media { display: flex; flex-direction: column; gap: 22px; }
.jw-about__video {
	position: relative;
	display: block;
	border-radius: var(--jw-radius-lg);
	overflow: hidden;
	background: #eef0f3;
}
.jw-about__video img { width: 100%; height: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.jw-about__play {
	position: absolute;
	inset: 0;
	margin: auto;
	width: 70px;
	height: 70px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: rgba(255, 255, 255, .92);
	transition: transform .25s var(--jw-ease);
}
.jw-about__play svg { width: 22px; height: 22px; fill: var(--jw-navy); margin-inline-start: -3px; transform: scaleX(-1); }
.jw-about__video:hover .jw-about__play,
.jw-guide__media a:hover .jw-about__play { transform: scale(1.1); }

.jw-licences { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.jw-licences__title { font-size: 14px; font-weight: 700; color: var(--jw-navy); }
.jw-licences img { width: 70px; height: 70px; object-fit: contain; }

/* =========================================================
   ۳) دسته‌بندی‌ها (گرید ۳×۲)
   ========================================================= */
.jw-cats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
	margin-top: 34px;
}
.jw-cat {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 26px 30px;
	border-radius: var(--jw-radius-lg);
	background: var(--jw-lime-tint);
	transition: background 1s var(--jw-ease), transform .25s var(--jw-ease);
}
.jw-cat:hover { background: rgba(135, 160, 0, .28); transform: translateY(-4px); }
.jw-cat__img {
	flex: 0 0 96px;
	width: 96px;
	height: 96px;
	display: grid;
	place-items: center;
	border-radius: 12px;
	overflow: hidden;
}
.jw-cat__img img { width: 100%; height: 100%; object-fit: contain; border-radius: 9px; }
.jw-cat__img svg { stroke: var(--jw-navy); }
.jw-cat__body strong { display: block; font-size: 18px; font-weight: 700; color: var(--jw-navy); margin-bottom: 8px; }
.jw-cat__body small { font-size: 12.5px; color: var(--jw-ink); }

/* =========================================================
   کارت محصول
   ========================================================= */
.jw-pcard { display: flex; flex-direction: column; height: 100%; background: #fff; border-radius: 18px; overflow: hidden; }
.jw-pcard__img { position: relative; display: block; background: #f6f7f9; }
.jw-pcard__img img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; transition: transform .4s var(--jw-ease); }
.jw-pcard:hover .jw-pcard__img img { transform: scale(1.06); }
.jw-pcard__out {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	background: rgba(255, 255, 255, .72);
	font-size: 13px;
	font-weight: 700;
	color: var(--jw-gray);
}

.jw-pcard__body { display: flex; flex-direction: column; gap: 10px; padding: 14px; flex: 1; }
.jw-pcard__body--center { align-items: center; text-align: center; }
.jw-pcard__title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 44px;
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.8;
	color: var(--jw-ink);
	transition: color .2s;
}
.jw-pcard__title:hover { color: var(--jw-navy); }

.jw-price { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; margin-top: auto; }
.jw-pcard__body--center .jw-price { justify-content: center; gap: 12px; }
.jw-price__now { font-size: 17px; font-weight: 800; color: var(--jw-navy); }
.jw-price__side { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.5; }
.jw-price__side del { font-size: 12px; color: #a0a4ae; }
.jw-price__side i { font-style: normal; font-size: 11.5px; color: var(--jw-gray); }

.jw-pcard__inquiry {
	display: block;
	width: 100%;
	padding: 9px 12px;
	border-radius: 10px;
	background: #e4f1ff;
	color: #1354b5;
	font-size: 12.5px;
	font-weight: 600;
	text-align: center;
}

/* کارت کروسل */
.jw-pcard--wide { box-shadow: var(--jw-shadow-sm); }
.jw-pcard__btns { display: flex; align-items: center; gap: 8px; }
.jw-pcard__cart {
	flex: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	height: 42px;
	padding: 0 12px;
	border-radius: 12px;
	background: var(--jw-lime);
	color: var(--jw-navy);
	font-size: 12.5px;
	font-weight: 700;
	transition: background .2s;
}
.jw-pcard__cart svg { stroke: var(--jw-navy); }
.jw-pcard__cart:hover { background: var(--jw-lime-dark); }
.jw-pcard__cart[disabled] { opacity: .6; pointer-events: none; }
.jw-pcard__view {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	height: 42px;
	padding: 0 12px;
	border-radius: 12px;
	background: #f2f3f6;
	font-size: 11.5px;
	color: var(--jw-gray);
	white-space: nowrap;
}
.jw-pcard__view svg { stroke: var(--jw-gray); }
.jw-pcard__view span { display: none; }

/* کارت گرید */
.jw-pcard--grid { border: 1px solid var(--jw-line); transition: box-shadow .25s, transform .25s var(--jw-ease); }
.jw-pcard--grid:hover { box-shadow: var(--jw-shadow-sm); transform: translateY(-3px); }
.jw-pcard__overlay {
	position: absolute;
	inset-block-start: 10px;
	inset-inline-end: 10px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	opacity: 0;
	transform: translateX(-8px);
	transition: opacity .25s var(--jw-ease), transform .25s var(--jw-ease);
}
.jw-pcard--grid:hover .jw-pcard__overlay { opacity: 1; transform: none; }
.jw-pcard__overlay > * {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 4px 14px rgba(17, 32, 122, .12);
	transition: background .18s;
}
.jw-pcard__overlay > *:hover { background: var(--jw-lime); }
.jw-pcard__overlay svg { stroke: var(--jw-navy); }

/* =========================================================
   ریل افقی مشترک
   ========================================================= */
.jw-rail {
	display: flex;
	gap: 14px;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	padding-bottom: 8px;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.jw-rail::-webkit-scrollbar { display: none; }
.jw-rail__cell { flex: 0 0 260px; scroll-snap-align: start; }
.jw-rail__cell--post { flex-basis: 360px; }
.jw-rail.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.jw-rail.is-dragging a, .jw-rail.is-dragging button { pointer-events: none; }

.jw-rail__nav { display: flex; gap: 10px; margin-top: 16px; }
.jw-rail__btn {
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	border-radius: 12px;
	background: rgba(255, 255, 255, .18);
	transition: background .2s;
}
.jw-rail__btn svg { stroke: #fff; }
.jw-rail__btn:hover { background: var(--jw-lime); }
.jw-rail__btn:hover svg { stroke: var(--jw-navy); }

/* =========================================================
   ۴) نوار سرمه‌ای محصولات
   ========================================================= */
.jw-strip { margin-top: 70px; background: var(--jw-navy); padding: 55px 0; }
.jw-strip__inner { display: flex; align-items: center; gap: 34px; }
.jw-strip__aside { flex: 0 0 250px; color: #fff; text-align: center; }
.jw-strip__aside h2 { margin: 0; font-size: 26px; font-weight: 800; }
.jw-strip__aside p { margin: 10px 0 20px; font-size: 15px; color: var(--jw-lime); }
.jw-strip__aside img { width: 190px; max-width: 100%; object-fit: contain; }
.jw-strip__rail { flex: 1; min-width: 0; }

/* =========================================================
   ۵) تب‌های پرفروش
   ========================================================= */
.jw-tabs__nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }
.jw-tabs__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	min-width: 130px;
	padding: 18px 20px;
	border-radius: 18px;
	border: 1.5px solid var(--jw-line);
	font-size: 13.5px;
	font-weight: 600;
	color: var(--jw-gray);
	transition: border-color .2s, color .2s, background .2s;
}
.jw-tabs__item svg { stroke: currentColor; }
.jw-tabs__item:hover { border-color: var(--jw-lime); color: var(--jw-navy); }
.jw-tabs__item.is-active { background: var(--jw-lime-tint); border-color: var(--jw-lime); color: var(--jw-navy); }

.jw-tabs__pane { display: none; }
.jw-tabs__pane.is-active { display: block; animation: jw-fade .3s var(--jw-ease); }
@keyframes jw-fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.jw-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.jw-tabs__more { margin-top: 26px; text-align: center; }

/* =========================================================
   ۶) آموزش خرید
   ========================================================= */
.jw-guide { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.jw-guide__title { margin: 20px 0 14px; font-size: 22px; font-weight: 700; color: var(--jw-navy); }
.jw-guide__desc { margin: 0 0 26px; font-size: 14.5px; line-height: 2.2; color: var(--jw-ink); text-align: justify; }
.jw-guide__media a { position: relative; display: block; border-radius: var(--jw-radius-lg); overflow: hidden; }
.jw-guide__media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }

/* =========================================================
   ۷) بنرها
   ========================================================= */
.jw-banners { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.jw-banners__item { display: block; border-radius: var(--jw-radius-lg); overflow: hidden; background: #eef0f3; transition: transform .25s var(--jw-ease); }
.jw-banners__item:hover { transform: translateY(-4px); }
.jw-banners__item img { width: 100%; display: block; }

/* =========================================================
   ۸) اخبار و مطالب
   ========================================================= */
.jw-news { margin-top: 70px; padding: 60px 0; background: linear-gradient(180deg, #f7f8fb 0%, #eef1f9 100%); }
.jw-post { background: #fff; border-radius: 20px; overflow: hidden; box-shadow: var(--jw-shadow-sm); height: 100%; display: flex; flex-direction: column; }
.jw-post__img { position: relative; }
.jw-post__img img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.jw-post__cat {
	position: absolute;
	inset-inline-end: 12px;
	bottom: 12px;
	padding: 5px 14px;
	border-radius: 999px;
	background: var(--jw-lime);
	color: var(--jw-navy);
	font-size: 11.5px;
	font-weight: 700;
}
.jw-post__body { display: flex; flex-direction: column; gap: 14px; padding: 16px; flex: 1; }
.jw-post__title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.9;
	color: var(--jw-navy);
}
.jw-post__foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; font-size: 12px; color: var(--jw-gray); }
.jw-post__date { display: inline-flex; align-items: center; gap: 5px; }
.jw-post__date svg, .jw-post__more svg { stroke: currentColor; }
.jw-post__more { display: inline-flex; align-items: center; gap: 5px; color: var(--jw-navy); font-weight: 600; }
.jw-news .jw-rail__btn { background: rgba(43, 57, 146, .1); }
.jw-news .jw-rail__btn svg { stroke: var(--jw-navy); }

/* =========================================================
   ۹) مشاوره و ثبت سفارش
   ========================================================= */
.jw-contact { margin-top: 70px; padding: 70px 0; background: #f7f8fb; }
.jw-contact__inner { display: flex; align-items: stretch; justify-content: center; gap: 0; }
.jw-contact__form {
	flex: 1 1 60%;
	max-width: 620px;
	padding: 38px;
	border-radius: 0 20px 20px 0;
	background: var(--jw-navy);
	color: #fff;
}
.jw-contact__form p { margin: 14px 0 22px; font-size: 14px; color: rgba(255, 255, 255, .8); }

.jw-form { display: flex; flex-direction: column; gap: 12px; }
.jw-form input {
	height: 50px;
	padding: 0 16px;
	border: 0;
	border-radius: 12px;
	background: #fff;
	font-size: 14px;
	outline: 0;
}
.jw-form__msg { margin: 6px 0 0 !important; min-height: 18px; font-size: 12.5px; }
.jw-form__msg.is-ok { color: var(--jw-lime); }
.jw-form__msg.is-err { color: #ff8f8f; }

.jw-contact__call {
	flex: 0 0 270px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	padding: 38px 24px;
	border-radius: 20px 0 0 20px;
	background: var(--jw-navy-dark);
	color: #fff;
	text-align: center;
}
.jw-contact__icon {
	display: grid;
	place-items: center;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: var(--jw-lime);
	transition: transform .25s var(--jw-ease);
}
.jw-contact__icon:hover { transform: scale(1.08); }
.jw-contact__icon svg { stroke: var(--jw-navy); }
.jw-contact__number { font-size: 22px; font-weight: 800; }
.jw-contact__note { font-size: 13.5px; color: var(--jw-lime); }

/* =========================================================
   Toast
   ========================================================= */
.jw-toast {
	position: fixed;
	bottom: 26px;
	inset-inline-start: 50%;
	transform: translate(50%, 20px);
	z-index: 1500;
	max-width: calc(100vw - 32px);
	padding: 13px 22px;
	border-radius: 12px;
	background: var(--jw-navy);
	color: #fff;
	font-size: 13.5px;
	font-weight: 600;
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s var(--jw-ease), transform .25s var(--jw-ease), visibility .25s;
}
.jw-toast.is-show { opacity: 1; visibility: visible; transform: translate(50%, 0); }
.jw-toast.is-error { background: #ff3b3b; }

/* =========================================================
   واکنش‌گرایی
   ========================================================= */
@media (max-width: 1200px) {
	.jw-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 992px) {
	.jw-headline { font-size: 34px; }
	.jw-hero { padding: 40px 0 150px; }
	.jw-hero__inner { flex-direction: column-reverse; text-align: center; min-height: auto; }
	.jw-hero__desc { margin-inline: auto; }
	.jw-hero__media img { width: 62%; }
	.jw-about__card { grid-template-columns: 1fr; padding: 40px 26px; border-radius: 30px; gap: 30px; }
	.jw-cats { grid-template-columns: repeat(2, 1fr); }
	.jw-strip__inner { flex-direction: column; }
	.jw-strip__aside { flex: none; }
	.jw-strip__aside img { width: 140px; }
	.jw-strip__rail { width: 100%; }
	.jw-guide { grid-template-columns: 1fr; }
	.jw-grid { grid-template-columns: repeat(3, 1fr); }
	.jw-contact__inner { flex-direction: column; }
	.jw-contact__form { max-width: none; border-radius: 20px 20px 0 0; }
	.jw-contact__call { flex: none; border-radius: 0 0 20px 20px; }
}

@media (max-width: 640px) {
	.jw-section, .jw-strip, .jw-news, .jw-contact { margin-top: 46px; }
	.jw-title { font-size: 22px; }
	.jw-headline { font-size: 28px; }
	.jw-hero { padding: 26px 0 130px; }
	.jw-hero__lead { font-size: 16px; }
	.jw-hero__desc { font-size: 14px; }
	.jw-cats { grid-template-columns: 1fr; }
	.jw-cat { padding: 18px; }
	.jw-cat__img { flex-basis: 76px; width: 76px; height: 76px; }
	.jw-counters { grid-template-columns: repeat(3, 1fr); gap: 8px; }
	.jw-counter { padding: 14px 6px; }
	.jw-counter__num { font-size: 20px; }
	.jw-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
	.jw-rail__cell { flex-basis: 220px; }
	.jw-rail__cell--post { flex-basis: 280px; }
	.jw-banners { grid-template-columns: 1fr; }
	.jw-btn--lg { padding: 14px 30px; font-size: 15px; }
	.jw-contact__form { padding: 26px 20px; }
}

@media (prefers-reduced-motion: reduce) {
	.jw * { animation: none !important; transition: none !important; }
}
