/**
 * WebTaz Product Widgets — استایل فرانت‌اند
 *
 * همه کلاس‌ها و شناسه‌ها با پیشوند اختصاصی «webtaz-» هستند تا با افزونه‌ها و
 * قالب‌های دیگر تداخل پیدا نکنند. همه رنگ‌ها و اندازه‌ها از متغیرهای CSS
 * تنظیمات افزونه می‌آیند.
 */

/* ------------------------------------------------------------------ */
/* پایه                                                                */
/* ------------------------------------------------------------------ */

.webtaz-widget {
	--webtaz-gap: 10px;
	--webtaz-ease: cubic-bezier(.22, 1, .36, 1);
	--webtaz-img-radius: 8px;
	--webtaz-img-shadow: 0 1px 4px rgba(16, 24, 40, .07);
	box-sizing: border-box;
	background: var(--webtaz-widget-bg, transparent);
	font-family: inherit;
	max-width: 100%;
}

.webtaz-widget *,
.webtaz-widget *::before,
.webtaz-widget *::after,
#webtaz-popup *,
#webtaz-popup *::before,
#webtaz-popup *::after,
#webtaz-lightbox *,
#webtaz-lightbox *::before,
#webtaz-lightbox *::after {
	box-sizing: border-box;
}

/*
 * اندازه آیکن‌ها. این قانون باید پاپ‌آپ و لایت‌باکس را هم پوشش دهد، وگرنه
 * SVGهای بدون width/height به اندازه پیش‌فرض مرورگر رندر می‌شوند و عملاً
 * دیده نمی‌شوند.
 */
.webtaz-widget svg,
#webtaz-popup svg,
#webtaz-lightbox svg {
	width: 1em;
	height: 1em;
	display: block;
	flex: none;
	fill: none;
	vertical-align: middle;
}

/* خنثی‌سازی استایل دکمه‌ها و ورودی‌های قالب داخل عناصر افزونه. */
.webtaz-widget button,
#webtaz-popup button,
#webtaz-lightbox button,
#webtaz-popup input {
	font-family: inherit;
	-webkit-appearance: none;
	appearance: none;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	text-shadow: none;
	min-width: 0;
	-webkit-tap-highlight-color: transparent;
}

/*
 * حلقه فوکوس و هایلایت لمسی پیش‌فرض مرورگر آبی است و با رنگ سازمانی قرمز
 * جور درنمی‌آید؛ فقط :focus-visible با رنگ خود افزونه نمایش داده می‌شود.
 */
.webtaz-widget button:focus,
.webtaz-widget a:focus,
#webtaz-popup button:focus,
#webtaz-popup a:focus,
#webtaz-popup input:focus,
#webtaz-lightbox button:focus {
	outline: none;
	box-shadow: none;
}

.webtaz-notice {
	padding: 12px 14px;
	border: 1px dashed #cfd6e6;
	border-radius: var(--webtaz-radius, 12px);
	color: #6b7391;
	font-size: 13px;
	line-height: 1.7;
	background: #fafbff;
}

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

.webtaz-spin {
	animation: webtaz-spin .8s linear infinite;
}

@keyframes webtaz-price-in {
	0%   { opacity: 0; transform: translateY(8px) scale(.96); filter: blur(2px); }
	100% { opacity: 1; transform: none; filter: blur(0); }
}

@keyframes webtaz-pop {
	0%   { opacity: 0; transform: translateY(24px) scale(.96); }
	100% { opacity: 1; transform: none; }
}

@keyframes webtaz-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes webtaz-shake {
	0%, 100% { transform: translateX(0); }
	20%      { transform: translateX(-5px); }
	40%      { transform: translateX(5px); }
	60%      { transform: translateX(-3px); }
	80%      { transform: translateX(3px); }
}

@keyframes webtaz-img-in {
	from { opacity: 0; transform: scale(1.04); }
	to   { opacity: 1; transform: scale(1); }
}

/* ------------------------------------------------------------------ */
/* ۱) ویجت قیمت                                                        */
/* ------------------------------------------------------------------ */

.webtaz-price__inner {
	display: flex;
	width: 100%;
	line-height: 1.6;
}

/*
 * چیدمان پیش‌فرض: باکس درصد تخفیف بالا، قیمت خط‌خورده وسط و قیمت نهایی
 * پایین — هر کدام در یک سطر جدا (نه در یک خط).
 */
.webtaz-price__stack {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	min-width: 0;
}

/*
 * تراز از تنظیمات افزونه می‌آید و چپ/راست آن فیزیکی است. در صفحه راست‌چین
 * flex-start سمت راست است، پس مقادیر برعکس نوشته و برای LTR بازنویسی می‌شوند.
 */
.webtaz-price--align-left .webtaz-price__inner    { justify-content: flex-end; }
.webtaz-price--align-left .webtaz-price__stack    { align-items: flex-end; }
.webtaz-price--align-center .webtaz-price__inner  { justify-content: center; }
.webtaz-price--align-center .webtaz-price__stack  { align-items: center; }
.webtaz-price--align-right .webtaz-price__inner   { justify-content: flex-start; }
.webtaz-price--align-right .webtaz-price__stack   { align-items: flex-start; }

[dir="ltr"] .webtaz-price--align-left .webtaz-price__inner  { justify-content: flex-start; }
[dir="ltr"] .webtaz-price--align-left .webtaz-price__stack  { align-items: flex-start; }
[dir="ltr"] .webtaz-price--align-right .webtaz-price__inner { justify-content: flex-end; }
[dir="ltr"] .webtaz-price--align-right .webtaz-price__stack { align-items: flex-end; }

/* حالت تک‌سطری (اختیاری، با direction="row"). */
.webtaz-price--row .webtaz-price__stack {
	flex-direction: row;
	align-items: center;
	flex-wrap: wrap;
	gap: var(--webtaz-gap);
}

.webtaz-price__current {
	font-size: var(--webtaz-price-size, 22px);
	font-weight: var(--webtaz-price-weight, 700);
	color: var(--webtaz-price, #0e7a3e);
	white-space: nowrap;
	line-height: 1.4;
}

.webtaz-price__current--sale {
	color: var(--webtaz-sale, #0e7a3e);
}

/* واحد پول کمی کوچک‌تر از خودِ عدد قیمت. */
.webtaz-price__current .woocommerce-Price-currencySymbol,
.webtaz-price__regular .woocommerce-Price-currencySymbol,
.webtaz-popup__price .woocommerce-Price-currencySymbol {
	font-size: .6em;
	font-weight: 500;
	margin-inline-start: 4px;
	opacity: .9;
}

.webtaz-price__regular {
	font-size: var(--webtaz-regular-size, 15px);
	color: var(--webtaz-regular, #9aa2b8);
	line-height: 1.4;
}

/*
 * line-through پیش‌فرض مرورگر ضخامت و ارتفاع ناهماهنگی دارد و روی عدد و
 * واحد پول بد می‌نشیند؛ خط با یک شبه‌عنصر دقیق و با سرهای گرد کشیده می‌شود.
 */
.webtaz-price__regular del {
	position: relative;
	display: inline-block;
	text-decoration: none;
	color: inherit;
	background: none;
}

.webtaz-price__regular del::after {
	content: "";
	position: absolute;
	inset-inline: -3px;
	top: 50%;
	height: 1.5px;
	border-radius: 2px;
	background: currentColor;
	opacity: .65;
	transform: translateY(-50%);
	pointer-events: none;
}

.webtaz-price__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: var(--webtaz-badge-size, 12px);
	font-weight: 700;
	line-height: 1;
	padding: 6px 10px;
	border-radius: calc(var(--webtaz-radius, 12px) * .6);
	background: var(--webtaz-badge-bg, #f90005);
	color: var(--webtaz-badge-color, #fff);
	white-space: nowrap;
}

.webtaz-price--no-badge .webtaz-price__badge { display: none; }

.webtaz-price__unavailable {
	font-size: var(--webtaz-regular-size, 15px);
	color: var(--webtaz-regular, #9aa2b8);
}

.webtaz-price__inner.is-updating {
	opacity: .35;
	transition: opacity .18s var(--webtaz-ease);
}

.webtaz-price__inner.is-updated .webtaz-price__stack > * {
	animation: webtaz-price-in .45s var(--webtaz-ease) both;
}

.webtaz-price__inner.is-updated .webtaz-price__stack > *:nth-child(2) { animation-delay: .05s; }
.webtaz-price__inner.is-updated .webtaz-price__stack > *:nth-child(3) { animation-delay: .1s; }

/* ------------------------------------------------------------------ */
/* ۲) دکمه افزودن به سبد خرید + انتخابگر تعداد                          */
/* ------------------------------------------------------------------ */

.webtaz-atc {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	position: relative;
	width: 100%;
}

.webtaz-atc--full { width: 100%; }

/*
 * دکمه همیشه تمام‌عرض است؛ وقتی انتخابگر تعداد نمایش داده می‌شود، دکمه
 * فضای باقی‌مانده را پر می‌کند.
 */
.webtaz-atc__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	position: relative;
	flex: 1 1 0;
	width: 100%;
	min-width: 160px;
	min-height: 48px;
	padding: 12px 22px;
	border: 0;
	border-radius: var(--webtaz-radius, 12px);
	background: var(--webtaz-btn-bg, #f90005);
	color: var(--webtaz-btn-color, #fff);
	font-size: var(--webtaz-btn-size, 15px);
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	text-decoration: none;
	transition: background-color .22s var(--webtaz-ease), transform .18s var(--webtaz-ease), box-shadow .22s var(--webtaz-ease);
}

.webtaz-atc__button:hover:not(:disabled) {
	background: var(--webtaz-btn-hover, #c40004);
	color: var(--webtaz-btn-color, #fff);
	transform: translateY(-1px);
	box-shadow: 0 8px 20px -10px var(--webtaz-btn-bg, #f90005);
}

.webtaz-atc__button:active:not(:disabled) { transform: translateY(0); }

.webtaz-atc__button:focus-visible {
	outline: 2px solid var(--webtaz-primary, #f90005);
	outline-offset: 3px;
}

.webtaz-atc__button:disabled {
	opacity: .5;
	cursor: not-allowed;
}

.webtaz-atc__icon {
	font-size: 1.35em;
	display: inline-flex;
}

.webtaz-atc__loader {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.4em;
	background: inherit;
	border-radius: inherit;
	opacity: 0;
	visibility: hidden;
	transition: opacity .2s var(--webtaz-ease);
}

.webtaz-atc.is-loading .webtaz-atc__loader { opacity: 1; visibility: visible; }
.webtaz-atc.is-loading .webtaz-atc__button { pointer-events: none; }
.webtaz-atc.is-invalid .webtaz-atc__button { animation: webtaz-shake .4s var(--webtaz-ease); }

/* انتخابگر تعداد */
.webtaz-stepper {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	position: relative;
	flex: none;
	padding: 4px;
	border-radius: var(--webtaz-radius, 12px);
	background: var(--webtaz-stepper-bg, #f3f5fb);
	color: var(--webtaz-stepper-color, #000a32);
	min-height: 48px;
	animation: webtaz-pop .3s var(--webtaz-ease) both;
}

.webtaz-stepper[hidden] { display: none; }

.webtaz-stepper__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	position: relative;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: calc(var(--webtaz-radius, 12px) * .7);
	background: transparent;
	color: inherit;
	font-size: 18px;
	cursor: pointer;
	transition: background-color .18s var(--webtaz-ease), color .18s var(--webtaz-ease);
}

.webtaz-stepper__btn:hover {
	background: var(--webtaz-primary, #f90005);
	color: #fff;
}

.webtaz-stepper__btn:focus-visible {
	outline: 2px solid var(--webtaz-primary, #f90005);
	outline-offset: 2px;
}

.webtaz-stepper__btn:disabled {
	opacity: .35;
	cursor: not-allowed;
	background: transparent;
	color: inherit;
}

.webtaz-stepper__value {
	min-width: 34px;
	text-align: center;
	font-size: var(--webtaz-btn-size, 15px);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.webtaz-stepper__value.is-bumped {
	animation: webtaz-price-in .3s var(--webtaz-ease);
}

.webtaz-stepper__minus { display: inline-flex; }
.webtaz-stepper__trash { display: none; }
.webtaz-stepper.is-removable .webtaz-stepper__minus { display: none; }
.webtaz-stepper.is-removable .webtaz-stepper__trash { display: inline-flex; }
.webtaz-stepper.is-removable .webtaz-stepper__btn--minus:hover { background: #e11d48; }

/*
 * وضعیت «در حال ارسال»: به‌جای پوشاندن کل انتخابگر با یک لایه، آیکن همان
 * دکمه‌ای که کلیک شده جای خود را به اسپینر می‌دهد و عدد تعداد خوانا می‌ماند.
 */
.webtaz-stepper__ico {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: opacity .18s var(--webtaz-ease), transform .18s var(--webtaz-ease);
}

.webtaz-stepper__spin {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transform: scale(.55);
	pointer-events: none;
	transition: opacity .18s var(--webtaz-ease), transform .18s var(--webtaz-ease);
}

.webtaz-stepper__spin svg { width: .82em; height: .82em; }

.webtaz-stepper__btn.is-busy { cursor: default; }
.webtaz-stepper__btn.is-busy:hover { background: transparent; color: inherit; }

.webtaz-stepper__btn.is-busy .webtaz-stepper__ico {
	opacity: 0;
	transform: scale(.55);
}

.webtaz-stepper__btn.is-busy .webtaz-stepper__spin {
	opacity: 1;
	transform: none;
}

/* عدد تعداد کمی کم‌رنگ می‌شود تا حس «در حال به‌روزرسانی» منتقل شود. */
.webtaz-stepper.is-pending .webtaz-stepper__value,
.webtaz-stepper.is-pending .webtaz-stepper__input {
	opacity: .5;
	transition: opacity .18s var(--webtaz-ease);
}

.webtaz-atc__message {
	flex-basis: 100%;
	margin: 0;
	font-size: 13px;
	line-height: 1.7;
	color: #e11d48;
	min-height: 0;
}

.webtaz-atc__message:empty { display: none; }
.webtaz-atc__message.is-success { color: #0f9d58; }

/* ------------------------------------------------------------------ */
/* ۳) ویژگی‌های محصول متغیر                                            */
/* ------------------------------------------------------------------ */

.webtaz-attrs {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.webtaz-attrs__head {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin-bottom: 10px;
}

.webtaz-attrs__label {
	font-size: var(--webtaz-attr-label-size, 14px);
	font-weight: 700;
	color: var(--webtaz-attr-color, #000a32);
}

.webtaz-attrs__selected {
	font-size: calc(var(--webtaz-attr-label-size, 14px) - 1px);
	color: var(--webtaz-regular, #9aa2b8);
}

.webtaz-attrs__options {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.webtaz-attrs__option {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	min-height: 44px;
	padding: 10px 16px;
	border: 1.5px solid var(--webtaz-attr-border, #e2e6f0);
	border-radius: var(--webtaz-radius, 12px);
	background: var(--webtaz-attr-bg, #fff);
	color: var(--webtaz-attr-color, #000a32);
	font-size: var(--webtaz-attr-size, 14px);
	font-weight: 500;
	line-height: 1;
	cursor: pointer;
	position: relative;
	transition: border-color .2s var(--webtaz-ease), background-color .2s var(--webtaz-ease), color .2s var(--webtaz-ease), transform .16s var(--webtaz-ease);
}

.webtaz-attrs--pill .webtaz-attrs__option { border-radius: 999px; }

.webtaz-attrs__option:hover:not(.is-disabled) {
	border-color: var(--webtaz-primary, #f90005);
	transform: translateY(-1px);
}

.webtaz-attrs__option:focus-visible {
	outline: 2px solid var(--webtaz-primary, #f90005);
	outline-offset: 2px;
}

.webtaz-attrs__option.is-selected {
	background: var(--webtaz-attr-active-bg, #f90005);
	border-color: var(--webtaz-attr-active-bg, #f90005);
	color: var(--webtaz-attr-active-col, #fff);
	font-weight: 700;
}

.webtaz-attrs__option.is-disabled {
	opacity: .4;
	cursor: not-allowed;
	text-decoration: line-through;
	text-decoration-thickness: 1px;
}

.webtaz-attrs__option--swatch { padding-inline-start: 10px; }

.webtaz-attrs__dot {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--webtaz-swatch, #ccc);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
	flex: none;
}

.webtaz-attrs__reset {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 8px 14px;
	border: 1px solid #e3e7f2;
	border-radius: 999px;
	background: #f7f8fc;
	color: #5b6480;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	transition: color .2s var(--webtaz-ease), background-color .2s var(--webtaz-ease), border-color .2s var(--webtaz-ease);
}

.webtaz-attrs__reset-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	flex: none;
	border-radius: 50%;
	background: #e4e8f2;
	color: #5b6480;
	font-size: 10px;
	transition: background-color .2s var(--webtaz-ease), color .2s var(--webtaz-ease);
}

.webtaz-attrs__reset-icon svg { stroke-width: 3; }

.webtaz-attrs__reset-text { white-space: nowrap; }

.webtaz-attrs__reset:hover {
	background: var(--webtaz-primary, #f90005);
	border-color: var(--webtaz-primary, #f90005);
	color: #fff;
}

.webtaz-attrs__reset:hover .webtaz-attrs__reset-icon {
	background: rgba(255, 255, 255, .25);
	color: #fff;
}

.webtaz-attrs__reset:focus-visible {
	outline: 2px solid var(--webtaz-primary, #f90005);
	outline-offset: 2px;
}

.webtaz-attrs__reset[hidden] { display: none; }

.webtaz-attrs__notice {
	margin: 0;
	font-size: 13px;
	line-height: 1.7;
	color: #e11d48;
}

.webtaz-attrs__notice:empty { display: none; }

/* ------------------------------------------------------------------ */
/* ۴) گالری تصاویر                                                     */
/* ------------------------------------------------------------------ */

.webtaz-gallery {
	--webtaz-thumb-size: 88px;
	--webtaz-thumb-gap: 8px;
	--webtaz-stage-h: 324px;
	--webtaz-thumb-count: 4;
	display: flex;
	gap: 12px;
	position: relative;
}

/* پس‌زمینه قابل تنظیم، گوشه ۸ پیکسل و سایه بسیار کم‌رنگ برای تصویر شاخص. */
.webtaz-gallery__stage {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
	border-radius: var(--webtaz-img-radius, 8px);
	overflow: hidden;
	background: var(--webtaz-product-image-bg, #fff);
	box-shadow: var(--webtaz-img-shadow, 0 1px 4px rgba(16, 24, 40, .07));
}

.webtaz-gallery__track {
	position: relative;
	width: 100%;
	height: 100%;
}

.webtaz-gallery--ratio-1-1 .webtaz-gallery__track  { aspect-ratio: 1 / 1; }
.webtaz-gallery--ratio-4-3 .webtaz-gallery__track  { aspect-ratio: 4 / 3; }
.webtaz-gallery--ratio-3-4 .webtaz-gallery__track  { aspect-ratio: 3 / 4; }
.webtaz-gallery--ratio-16-9 .webtaz-gallery__track { aspect-ratio: 16 / 9; }

.webtaz-gallery__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity .45s var(--webtaz-ease);
}

.webtaz-gallery--ratio-auto .webtaz-gallery__slide { position: absolute; }
.webtaz-gallery--ratio-auto .webtaz-gallery__slide.is-active { position: relative; }

.webtaz-gallery__slide.is-active {
	opacity: 1;
	visibility: visible;
	z-index: 2;
}

.webtaz-gallery__slide.is-entering .webtaz-gallery__img {
	animation: webtaz-img-in .5s var(--webtaz-ease) both;
}

/* تصویر هرگز کات نمی‌خورد؛ کامل داخل باکس جا می‌گیرد. */
.webtaz-gallery__img,
.webtaz-gallery__slide img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
	display: block;
	background: var(--webtaz-product-image-bg, #fff);
}

.webtaz-gallery--ratio-auto .webtaz-gallery__img { height: auto; }

.webtaz-gallery__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	display: none;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .92);
	color: #0f172a;
	box-shadow: 0 4px 14px -6px rgba(0, 10, 50, .35);
	font-size: 20px;
	cursor: pointer;
	transition: background-color .2s var(--webtaz-ease), opacity .2s var(--webtaz-ease);
}

.webtaz-gallery__nav:hover { background: #fff; }
.webtaz-gallery__nav--prev { inset-inline-start: 10px; }
.webtaz-gallery__nav--next { inset-inline-end: 10px; }
.webtaz-gallery__nav--prev svg { transform: scaleX(1); }
.webtaz-gallery__nav--next svg { transform: scaleX(-1); }

[dir="ltr"] .webtaz-gallery__nav--prev svg { transform: scaleX(-1); }
[dir="ltr"] .webtaz-gallery__nav--next svg { transform: scaleX(1); }

.webtaz-gallery__zoom {
	position: absolute;
	inset-block-start: 10px;
	inset-inline-end: 10px;
	z-index: 5;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .9);
	box-shadow: 0 2px 10px -4px rgba(0, 10, 50, .3);
	color: #0f172a;
	font-size: 18px;
	cursor: pointer;
	opacity: 0;
	transition: opacity .25s var(--webtaz-ease), background-color .2s var(--webtaz-ease);
}

.webtaz-gallery__stage:hover .webtaz-gallery__zoom { opacity: 1; }

.webtaz-gallery__dots {
	position: absolute;
	inset-block-end: 10px;
	inset-inline: 0;
	z-index: 5;
	display: none;
	justify-content: center;
	gap: 6px;
}

.webtaz-gallery__dot {
	width: 6px;
	height: 6px;
	border-radius: 999px;
	background: rgba(0, 10, 50, .25);
	transition: width .25s var(--webtaz-ease), background-color .25s var(--webtaz-ease);
}

.webtaz-gallery__dot.is-active {
	width: 18px;
	background: var(--webtaz-primary, #f90005);
}

.webtaz-gallery__thumbs {
	display: flex;
	gap: var(--webtaz-thumb-gap, 8px);
	flex: none;
}

.webtaz-gallery__thumb {
	position: relative;
	padding: 4px;
	border: 1.5px solid transparent;
	border-radius: var(--webtaz-img-radius, 8px);
	background: var(--webtaz-product-image-bg, #fff);
	box-shadow: var(--webtaz-img-shadow, 0 1px 4px rgba(16, 24, 40, .07));
	overflow: hidden;
	cursor: pointer;
	transition: border-color .22s var(--webtaz-ease), transform .2s var(--webtaz-ease), opacity .2s var(--webtaz-ease);
	opacity: .85;
}

/* تصویر بندانگشتی هم کات نمی‌خورد. */
.webtaz-gallery__thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
	display: block;
	background: var(--webtaz-product-image-bg, #fff);
}

.webtaz-gallery__thumb:hover { opacity: 1; transform: translateY(-2px); }

.webtaz-gallery__thumb.is-active {
	border-color: var(--webtaz-primary, #f90005);
	opacity: 1;
}

.webtaz-gallery__thumb:focus-visible {
	outline: 2px solid var(--webtaz-primary, #f90005);
	outline-offset: 2px;
}

/* --- طرح ۱: بندانگشتی عمودی --- */
.webtaz-gallery--vertical {
	flex-direction: row;
	align-items: flex-start;
}

/*
 * جای ستون بندانگشتی‌ها با «order» تعیین می‌شود تا در سایت راست‌چین،
 * حالت start در سمت راست و حالت end در سمت چپ قرار بگیرد.
 */
.webtaz-gallery--vertical.webtaz-gallery--thumbs-start .webtaz-gallery__thumbs { order: -1; }
.webtaz-gallery--vertical.webtaz-gallery--thumbs-end .webtaz-gallery__thumbs   { order: 1; }

.webtaz-gallery--vertical .webtaz-gallery__thumbs {
	flex-direction: column;
	width: var(--webtaz-thumb-size);
}

.webtaz-gallery--vertical .webtaz-gallery__thumb {
	width: var(--webtaz-thumb-size);
	height: var(--webtaz-thumb-size);
	flex: none;
}

/* --- طرح ۲: ویترین (نوار افقی + زوم روی هاور) --- */
.webtaz-gallery--showcase {
	flex-direction: column;
}

.webtaz-gallery--showcase .webtaz-gallery__thumbs {
	flex-direction: row;
	overflow-x: auto;
	padding-block-end: 4px;
	scroll-snap-type: x proximity;
	scrollbar-width: thin;
}

.webtaz-gallery--showcase .webtaz-gallery__thumb {
	width: 88px;
	height: 88px;
	flex: none;
	scroll-snap-align: start;
}

.webtaz-gallery--showcase .webtaz-gallery__slide.is-active .webtaz-gallery__img {
	transition: transform .6s var(--webtaz-ease);
}

.webtaz-gallery--showcase .webtaz-gallery__stage:hover .webtaz-gallery__slide.is-active .webtaz-gallery__img {
	transform: scale(1.12);
}

/* --- طرح ۳: موزاییک --- */
.webtaz-gallery--mosaic {
	flex-direction: column;
}

.webtaz-gallery--mosaic .webtaz-gallery__thumbs {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;
}

.webtaz-gallery--mosaic .webtaz-gallery__thumb {
	width: 100%;
	aspect-ratio: 1 / 1;
	height: auto;
}

.webtaz-gallery--mosaic .webtaz-gallery__thumb:first-child {
	grid-column: span 2;
	grid-row: span 2;
	aspect-ratio: auto;
}

/*
 * دسکتاپ، طرح ۱: ارتفاع تصویر شاخص حداکثر ۳۲۴ پیکسل و ستون بندانگشتی
 * دقیقاً هم‌ارتفاع با آن. ارتفاع هر باکس به‌صورت داینامیک از تقسیم همین
 * ارتفاع بر تعداد باکس‌ها (حداکثر ۴) به‌دست می‌آید.
 */
@media (min-width: 768px) {
	.webtaz-gallery--vertical .webtaz-gallery__stage {
		height: var(--webtaz-stage-h, 324px);
		max-height: var(--webtaz-stage-h, 324px);
	}

	.webtaz-gallery--vertical .webtaz-gallery__track {
		height: 100%;
		aspect-ratio: auto;
	}

	.webtaz-gallery--vertical .webtaz-gallery__thumbs {
		display: grid;
		grid-template-rows: repeat(var(--webtaz-thumb-count, 4), 1fr);
		height: var(--webtaz-stage-h, 324px);
		max-height: var(--webtaz-stage-h, 324px);
		width: var(--webtaz-thumb-size);
	}

	.webtaz-gallery--vertical .webtaz-gallery__thumb {
		width: 100%;
		height: 100%;
		min-height: 0;
	}
}

/* --- حالت موبایل: اسلایدر --- */
@media (max-width: 767px) {
	.webtaz-gallery {
		flex-direction: column !important;
		gap: 10px;
	}

	.webtaz-gallery__stage {
		height: auto !important;
		max-height: none !important;
	}

	.webtaz-gallery__track {
		display: flex;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}

	.webtaz-gallery__track::-webkit-scrollbar { display: none; }

	.webtaz-gallery__slide {
		position: relative;
		inset: auto;
		min-width: 100%;
		width: 100%;
		opacity: 1;
		visibility: visible;
		scroll-snap-align: center;
	}

	.webtaz-gallery__nav { display: inline-flex; }
	.webtaz-gallery__dots { display: flex; }
	.webtaz-gallery__zoom { opacity: 1; }

	.webtaz-gallery__thumbs {
		flex-direction: row !important;
		width: 100% !important;
		height: auto !important;
		max-height: none !important;
		overflow-x: auto;
		overflow-y: hidden;
		display: flex !important;
		grid-template-columns: none !important;
		grid-template-rows: none !important;
		order: 1 !important;
		padding-block-end: 4px;
	}

	.webtaz-gallery__thumb,
	.webtaz-gallery--mosaic .webtaz-gallery__thumb,
	.webtaz-gallery--mosaic .webtaz-gallery__thumb:first-child {
		width: 68px !important;
		height: 68px !important;
		aspect-ratio: auto !important;
		grid-column: auto !important;
		grid-row: auto !important;
		flex: none;
	}
}

@media (min-width: 768px) and (max-width: 1024px) {
	.webtaz-gallery { --webtaz-thumb-size: 74px; --webtaz-stage-h: 300px; }
}

/* ------------------------------------------------------------------ */
/* پاپ‌آپ سبد خرید                                                     */
/* ------------------------------------------------------------------ */

#webtaz-popup {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	font-family: inherit;
	line-height: 1.6;
}

#webtaz-popup[hidden] { display: none; }

#webtaz-popup .webtaz-popup__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 10, 50, .55);
	backdrop-filter: blur(3px);
	animation: webtaz-fade .3s cubic-bezier(.22, 1, .36, 1) both;
}

#webtaz-popup .webtaz-popup__box {
	position: relative;
	z-index: 2;
	width: min(520px, 100%);
	max-height: 92vh;
	overflow-y: auto;
	background: #fff;
	border-radius: calc(var(--webtaz-radius, 12px) + 6px);
	box-shadow: 0 30px 70px -30px rgba(0, 10, 50, .6);
	animation: webtaz-pop .38s cubic-bezier(.22, 1, .36, 1) both;
}

#webtaz-popup .webtaz-popup__header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 16px 20px;
	border-bottom: 1px solid #eef0f7;
}

#webtaz-popup .webtaz-popup__check {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: rgba(15, 157, 88, .12);
	color: #0f9d58;
	font-size: 16px;
	flex: none;
}

#webtaz-popup .webtaz-popup__title {
	margin: 0;
	padding: 0;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.6;
	color: #0f172a;
	flex: 1;
}

/* دکمه بستن: آیکن با اندازه مشخص و کنتراست کافی. */
#webtaz-popup .webtaz-popup__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	flex: none;
	border: 1px solid #e3e7f2;
	border-radius: 50%;
	background: #f3f5fb;
	color: #46506e;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

#webtaz-popup .webtaz-popup__close svg {
	width: 15px;
	height: 15px;
	stroke-width: 2.4;
}

#webtaz-popup .webtaz-popup__close:hover,
#webtaz-popup .webtaz-popup__close:focus-visible {
	background: var(--webtaz-primary, #f90005);
	border-color: var(--webtaz-primary, #f90005);
	color: #fff;
	outline: none;
}

#webtaz-popup .webtaz-popup__body {
	display: flex;
	gap: 14px;
	padding: 18px 20px;
}

/* تصویر محصول کامل و بدون کات، داخل همان باکس. */
#webtaz-popup .webtaz-popup__media {
	width: 104px;
	height: 104px;
	flex: none;
	padding: 6px;
	border-radius: var(--webtaz-img-radius, 8px);
	background: #fff;
	box-shadow: var(--webtaz-img-shadow, 0 1px 4px rgba(16, 24, 40, .07));
	overflow: hidden;
}

#webtaz-popup .webtaz-popup__media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
	display: block;
	background: #fff;
}

#webtaz-popup .webtaz-popup__info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

#webtaz-popup .webtaz-popup__name {
	margin: 0;
	padding: 0;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.7;
	color: #0f172a;
}

#webtaz-popup .webtaz-popup__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	font-size: 12px;
	color: #6b7391;
}

#webtaz-popup .webtaz-popup__meta span {
	background: #f3f5fb;
	border-radius: 999px;
	padding: 3px 9px;
}

#webtaz-popup .webtaz-popup__meta:empty { display: none; }

#webtaz-popup .webtaz-popup__price {
	font-size: calc(var(--webtaz-price-size, 22px) * .8);
	font-weight: 700;
	color: var(--webtaz-sale, #0e7a3e);
}

/* ردیف تعداد: جمع‌وجور، بدون اشغال فضای اضافه. */
#webtaz-popup .webtaz-popup__qty {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 2px;
}

#webtaz-popup .webtaz-popup__qty-label {
	font-size: 13px;
	color: #6b7391;
	flex: none;
}

#webtaz-popup .webtaz-stepper--popup {
	min-height: 0;
	gap: 0;
	padding: 3px;
	border-radius: 10px;
	background: var(--webtaz-stepper-bg, #f3f5fb);
	color: var(--webtaz-stepper-color, #0f172a);
}

#webtaz-popup .webtaz-stepper--popup .webtaz-stepper__btn {
	width: 30px;
	height: 30px;
	border-radius: 8px;
	color: var(--webtaz-stepper-color, #0f172a);
}

/* نشانگرهای کم/زیاد کردن باید همیشه دیده شوند. */
#webtaz-popup .webtaz-stepper--popup .webtaz-stepper__btn svg {
	width: 16px;
	height: 16px;
	stroke-width: 2.4;
	opacity: 1;
}

#webtaz-popup .webtaz-stepper--popup .webtaz-stepper__btn:hover {
	background: var(--webtaz-primary, #f90005);
	color: #fff;
}

#webtaz-popup .webtaz-stepper__input {
	width: 44px;
	height: 30px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 8px;
	background: #fff;
	text-align: center;
	font-size: 14px;
	font-weight: 700;
	line-height: 30px;
	color: #0f172a;
	-moz-appearance: textfield;
	appearance: textfield;
}

#webtaz-popup .webtaz-stepper__input::-webkit-outer-spin-button,
#webtaz-popup .webtaz-stepper__input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

#webtaz-popup .webtaz-popup__note {
	margin: 0;
	font-size: 12.5px;
	line-height: 1.7;
	color: #e11d48;
}

#webtaz-popup .webtaz-popup__note:empty { display: none; }
#webtaz-popup .webtaz-popup__note.is-info { color: #6b7391; }

#webtaz-popup .webtaz-popup__footer {
	display: flex;
	gap: 10px;
	padding: 0 20px 18px;
}

#webtaz-popup .webtaz-popup__btn {
	flex: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 12px 18px;
	border: 0;
	border-radius: var(--webtaz-radius, 12px);
	font-size: var(--webtaz-btn-size, 15px);
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	text-decoration: none;
	transition: background-color .2s ease, transform .18s ease;
}

#webtaz-popup .webtaz-popup__btn--primary {
	background: var(--webtaz-btn-bg, #f90005);
	color: var(--webtaz-btn-color, #fff);
}

#webtaz-popup .webtaz-popup__btn--primary:hover {
	background: var(--webtaz-btn-hover, #c40004);
	color: var(--webtaz-btn-color, #fff);
	transform: translateY(-1px);
}

#webtaz-popup .webtaz-popup__btn--ghost {
	background: #f3f5fb;
	color: #46506e;
}

#webtaz-popup .webtaz-popup__btn--ghost:hover { background: #e6eaf5; }

#webtaz-popup .webtaz-popup__total {
	padding: 0 20px 18px;
	font-size: 13px;
	color: #6b7391;
	text-align: center;
}

#webtaz-popup .webtaz-popup__total:empty { display: none; }

@media (max-width: 480px) {
	#webtaz-popup { align-items: flex-end; padding: 0; }

	#webtaz-popup .webtaz-popup__box {
		width: 100%;
		border-radius: 20px 20px 0 0;
		max-height: 88vh;
	}

	#webtaz-popup .webtaz-popup__body { flex-direction: row; }
	#webtaz-popup .webtaz-popup__media { width: 84px; height: 84px; }
	#webtaz-popup .webtaz-popup__footer { flex-direction: column; }
}

/* ------------------------------------------------------------------ */
/* لایت‌باکس                                                            */
/* ------------------------------------------------------------------ */

#webtaz-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999998;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 24px;
	background: rgba(0, 10, 50, .92);
	animation: webtaz-fade .25s ease both;
}

#webtaz-lightbox[hidden] { display: none; }

#webtaz-lightbox img {
	max-width: min(1100px, 92vw);
	max-height: 88vh;
	object-fit: contain;
	border-radius: var(--webtaz-img-radius, 8px);
	background: #fff;
	animation: webtaz-img-in .4s cubic-bezier(.22, 1, .36, 1) both;
}

#webtaz-lightbox .webtaz-lightbox__close,
#webtaz-lightbox .webtaz-lightbox__nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .16);
	color: #fff;
	font-size: 20px;
	cursor: pointer;
	flex: none;
	transition: background-color .2s ease;
}

#webtaz-lightbox .webtaz-lightbox__close:hover,
#webtaz-lightbox .webtaz-lightbox__nav:hover { background: rgba(255, 255, 255, .32); }

#webtaz-lightbox .webtaz-lightbox__close {
	position: absolute;
	inset-block-start: 18px;
	inset-inline-end: 18px;
}

#webtaz-lightbox .webtaz-lightbox__close svg { width: 18px; height: 18px; }

#webtaz-lightbox .webtaz-lightbox__nav--prev svg { transform: scaleX(1); }
#webtaz-lightbox .webtaz-lightbox__nav--next svg { transform: scaleX(-1); }

[dir="ltr"] #webtaz-lightbox .webtaz-lightbox__nav--prev svg { transform: scaleX(-1); }
[dir="ltr"] #webtaz-lightbox .webtaz-lightbox__nav--next svg { transform: scaleX(1); }

body.webtaz-locked { overflow: hidden; }

@media (max-width: 600px) {
	#webtaz-lightbox { padding: 12px; gap: 6px; }

	#webtaz-lightbox .webtaz-lightbox__close,
	#webtaz-lightbox .webtaz-lightbox__nav { width: 38px; height: 38px; font-size: 17px; }
}

/* ------------------------------------------------------------------ */
/* دسترسی‌پذیری                                                        */
/* ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
	.webtaz-widget *,
	#webtaz-popup *,
	#webtaz-lightbox * {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
	}
}

/* فلش‌های ناوبری در دسکتاپ روی هاور */
@media (min-width: 768px) {
	.webtaz-gallery__stage:hover .webtaz-gallery__nav,
	.webtaz-gallery__nav:focus-visible {
		display: inline-flex;
	}

	.webtaz-gallery__nav {
		opacity: 0;
		transition: opacity .25s var(--webtaz-ease), background-color .2s var(--webtaz-ease);
	}

	.webtaz-gallery__stage:hover .webtaz-gallery__nav { opacity: 1; }
}
