/* =====================================================================
   Tangsirkala Core — صفحهٔ محصولات (فروشگاه، دسته‌بندی، برند، برچسب)
   قالب المنتوری «آرشیو فروشگاه» (شناسهٔ ۱۴۸۹) با .elementor-1489 محدود شده تا جای دیگری اثر نگذارد.
   رنگ‌های پایه از tkc-front.css (--tkc-yellow, --tkc-ink, ...) می‌آیند.
   ===================================================================== */

.elementor-1489 {
	--tka-line: #EEF0F3;                      /* حاشیهٔ باکس‌ها */
	--tka-pale: #F6F7F9;                      /* زمینهٔ تصویر و دکمه‌های کم‌رنگ */
	--tka-sub: #5B6470;                       /* متن کم‌رنگ */
	--tka-sale: #D6123A;                      /* قرمز تخفیف */
	--tka-radius: 20px;                       /* گوشهٔ باکس‌ها */
}

/* ---------- باکس سرِ صفحه [tk_cat_head] ---------- */
/* ابزارک شورت‌کد در قالب ۱۴۸۹: هم‌عرض ردیف فیلتر و محصولات (حداکثر ۱۴۰۰ پیکسل) */
.elementor-1489 .tkc-cathead-widget { width: 100% !important; max-width: 1400px !important; }   /* !important: قاعدهٔ عمومی المنتور max-width:100% می‌دهد */
.tkc-cathead { display: flex; align-items: center; gap: 14px; margin: 0 0 4px; padding: 18px 20px; border: 1px solid #EEF0F3; border-radius: 20px; background: #FFFFFF; box-shadow: 0 6px 20px rgba(20, 29, 38, .04); direction: rtl; }
.tkc-cathead__ico { flex: 0 0 48px; height: 48px; display: grid; place-items: center; overflow: hidden; border-radius: 12px; background: var(--tkc-yellow); color: var(--tkc-ink); }
.tkc-cathead__ico:has(img) { background: #F6F7F9; }                    /* تصویر دسته روی زمینهٔ روشن */
.tkc-cathead__ico img { width: 40px !important; height: 40px !important; object-fit: contain; mix-blend-mode: multiply; }
.tkc-cathead__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tkc-cathead__title { margin: 0 !important; color: var(--tkc-ink); font-size: 22px !important; line-height: 1.5 !important; font-weight: 900 !important; }
.tkc-cathead__count { color: #5B6470; font-size: 13px; }
.tkc-cathead__chips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; max-width: 60%; }
.tkc-cathead__chips a { padding: 8px 14px; border-radius: 999px; background: #F6F7F9; color: var(--tkc-ink) !important; font-size: 13px; font-weight: 700; white-space: nowrap; text-decoration: none !important; transition: background-color .2s ease; }
.tkc-cathead__chips a:hover { background: #FFF3C4; }
.tkc-cathead__chips a.is-current { background: var(--tkc-yellow); }

/* عنوان و دکمهٔ فیلتر قالب جایشان را به باکس بالا و نوار شناور می‌دهند (دکمه در صفحه می‌ماند تا نوار شناور آن را بزند) */
.elementor-1489 .mehrnoosh-title234234,
.elementor-1489 .woocommerce-result-count { display: none !important; }

/* ---------- مرتب‌سازی (دسکتاپ) ---------- */
.elementor-1489 .mehrnoosh-sorting { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.elementor-1489 .mehrnoosh-sorting::before { content: "مرتب‌سازی:"; color: var(--tkc-ink); font-size: 13px; font-weight: 800; }
.elementor-1489 .mehrnoosh-sorting a.sort-option-mehrnoosh { display: inline-flex; align-items: center; height: 36px; margin: 0 !important; padding: 0 14px !important; border: 0 !important; border-radius: 10px !important; background: var(--tka-pale) !important; color: var(--tkc-ink) !important; font-size: 13px !important; font-weight: 700 !important; box-shadow: none !important; }
.elementor-1489 .mehrnoosh-sorting a.sort-option-mehrnoosh.active { background: var(--tkc-yellow) !important; }

/* ---------- فیلترها: هر بخش یک باکس جدا ---------- */
.elementor-1489 .widget-mehrnoosh-filter { margin: 0 0 12px !important; padding: 16px !important; border: 1px solid var(--tka-line) !important; border-radius: var(--tka-radius) !important; background: #FFFFFF !important; box-shadow: none !important; }
.elementor-1489 .widget-mehrnoosh-filter .mehrnoosh-h3-order-view > i { width: 36px !important; height: 36px !important; display: grid !important; place-items: center; border-radius: 10px !important; background: var(--tkc-yellow) !important; color: var(--tkc-ink) !important; box-shadow: none !important; }
.elementor-1489 .widget-mehrnoosh-filter p:empty { display: none; }
@media (min-width: 1025px) {
	/* قاب کلی ستون فیلتر حذف؛ باکس‌ها جدا از هم */
	.elementor-1489 aside.mehrnoosh-shop-nav-one { padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; }
}

/* ---------- شبکهٔ محصولات: ۴ ستون دسکتاپ، ۳ تبلت، ۲ موبایل ---------- */
.elementor-1489 ul.products { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0 !important; padding: 0 !important; }
.elementor-1489 ul.products::before,
.elementor-1489 ul.products::after { display: none !important; }       /* clearfix ووکامرس در grid خانهٔ خالی می‌سازد */
/* قالب عرض ۲۵٪ را با شناسه (id) و !important می‌دهد؛ برای غلبه، همان شناسه در انتخابگر آمده است */
.elementor-1489 ul.products > .mehrnoosh-offer-five-bix-out-product-accssor-403,
.elementor-1489 ul.products > #mehrnoosh-relatet-irantond-acss-two { float: none !important; width: auto !important; min-width: 0; margin: 0 !important; padding: 0 !important; }

/* کارت محصول */
.elementor-1489 .mehrnoosh-offer-five-bix-inner-product-inner-accssor-403 { position: relative; height: 100%; box-sizing: border-box; display: flex; flex-direction: column; gap: 8px; padding: 12px 12px 64px !important; border: 1px solid var(--tka-line) !important; border-radius: var(--tka-radius) !important; background: #FFFFFF !important; box-shadow: none !important; transition: border-color .2s ease, box-shadow .2s ease; }
.elementor-1489 .mehrnoosh-offer-five-bix-inner-product-inner-accssor-403:hover { border-color: #E2E5EA !important; box-shadow: 0 10px 24px rgba(20, 29, 38, .06) !important; }
.elementor-1489 .mehrnoosh-offer-five-bix-inner-product-inner-accssor-403 > a { display: flex; flex-direction: column; gap: 8px; color: var(--tkc-ink) !important; text-decoration: none !important; }
/* تصویر: مربع، زمینهٔ روشن، گوشهٔ گرد */
.elementor-1489 .mehrnoosh-offer-five-bix-inner-product-img-accssor-403 { aspect-ratio: 1 / 1; display: grid !important; place-items: center; overflow: hidden; margin: 0 !important; border-radius: 14px; background: var(--tka-pale); }
.elementor-1489 .mehrnoosh-offer-five-bix-inner-product-img-accssor-403 img { width: 84% !important; height: 84% !important; max-width: none; object-fit: contain; mix-blend-mode: multiply; }
/* نام: دو خط */
.elementor-1489 .mehrnoosh-offer-slider-five-product-title-accssor-403 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; height: auto !important; min-height: 3.6em; margin: 0 !important; color: var(--tkc-ink) !important; font-size: 13px !important; line-height: 1.8 !important; font-weight: 700 !important; }
/* قیمت: پایین سمت چپ کارت؛ قیمت قبل بالای قیمت فعلی */
/* width:auto لازم است؛ قالب عرض ثابت می‌دهد و left/right نادیده گرفته می‌شد */
.elementor-1489 .mehrnoosh-offer-slider-five-product-price-accssor-403 { position: absolute !important; left: 12px; bottom: 12px; right: 64px; width: auto !important; display: flex !important; flex-direction: column; align-items: flex-end; justify-content: flex-end; min-height: 40px; margin: 0 !important; text-align: left; }
.elementor-1489 .mehrnoosh-offer-slider-five-product-price-accssor-403 del { position: static !important; order: -1; color: #8A9099 !important; font-size: 11px !important; line-height: 1.4; opacity: 1 !important; }
/* قیمت قبل: خاکستری (خط روی قیمت هم رنگ del است، پس خود del هم با انتخابگر قوی‌تر رنگ می‌گیرد) */
.elementor-1489 ul.products .mehrnoosh-offer-five-bix-inner-product-inner-accssor-403 .mehrnoosh-offer-slider-five-product-price-accssor-403 del,
.elementor-1489 ul.products .mehrnoosh-offer-five-bix-inner-product-inner-accssor-403 .mehrnoosh-offer-slider-five-product-price-accssor-403 del * { color: #8A9099 !important; text-decoration-color: #8A9099 !important; }
.elementor-1489 .mehrnoosh-offer-slider-five-product-price-accssor-403 del .woocommerce-Price-currencySymbol { display: none !important; }
.elementor-1489 .mehrnoosh-offer-slider-five-product-price-accssor-403 ins,
.elementor-1489 .mehrnoosh-offer-slider-five-product-price-accssor-403 > .woocommerce-Price-amount { color: var(--tkc-ink) !important; font-size: 15px !important; font-weight: 900 !important; line-height: 1.5; text-decoration: none !important; background: none !important; white-space: nowrap; }
/* «تومان» ساده و کوچک (قالب با انتخابگر قوی‌تر زمینهٔ زرد می‌دهد؛ ul.products برای غلبه آمده) */
.elementor-1489 ul.products .mehrnoosh-offer-slider-five-product-price-accssor-403 .woocommerce-Price-amount .woocommerce-Price-currencySymbol { margin: 0 3px 0 0 !important; padding: 0 !important; border-radius: 0 !important; background: none !important; color: var(--tka-sub) !important; font-size: 11px !important; font-weight: 500 !important; }
/* دکمهٔ افزودن به سبد: مربع زرد پایین سمت راست */
.elementor-1489 .add-to-cart-in-shop-page { position: absolute !important; right: 12px !important; left: auto !important; bottom: 12px !important; top: auto !important; margin: 0 !important; }
.elementor-1489 .add-to-cart-in-shop-page a { width: 40px !important; height: 40px !important; display: grid !important; place-items: center; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 12px !important; background: var(--tkc-yellow) !important; color: var(--tkc-ink) !important; box-shadow: none !important; }
/* آیکون داخل دکمه: مربع تیرهٔ قالب حذف؛ فقط آیکون مشکی روی زرد */
.elementor-1489 ul.products .add-to-cart-in-shop-page a i,
.elementor-1489 ul.products .add-to-cart-in-shop-page a svg { width: auto !important; height: auto !important; margin: 0 !important; padding: 0 !important; border-radius: 0 !important; background: none !important; color: var(--tkc-ink) !important; font-size: 18px !important; line-height: 1 !important; box-shadow: none !important; }
.elementor-1489 ul.products .add-to-cart-in-shop-page a.added i { color: var(--tkc-yellow) !important; }
.elementor-1489 .add-to-cart-in-shop-page a.added { background: var(--tkc-ink) !important; color: var(--tkc-yellow) !important; }
.elementor-1489 .add-to-cart-in-shop-page .added_to_cart { display: none !important; }           /* پیوند «مشاهده سبد» زیر دکمه */
/* نشان درصد تخفیف: گوشهٔ بالای تصویر (قالب bottom:0 می‌دهد و نشان تا پایین کارت کشیده می‌شد) */
.elementor-1489 .price-and-box-mehrnoosh-in-shop-offer-offer-five-product-box-accssor-403 { position: absolute !important; top: 20px !important; right: 20px !important; left: auto !important; bottom: auto !important; width: auto !important; height: auto !important; z-index: 2; margin: 0 !important; padding: 2px 8px !important; border-radius: 999px !important; background: var(--tka-sale) !important; color: #FFFFFF !important; font-size: 11px !important; font-weight: 800 !important; line-height: 1.6 !important; }

/* ---------- تبلت ---------- */
@media (max-width: 1024px) {
	.elementor-1489 ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
	/* مرتب‌سازی به نوار شناور منتقل می‌شود */
	.elementor-1489 .mehrnoosh-sorting { display: none !important; }
	/* قاب خط‌چین ابزارک عنوان قالب که بعد از پنهان شدن عنوان و مرتب‌سازی خالی می‌ماند */
	.elementor-1489 .elementor-element-cc66d9d > .elementor-widget-container { min-height: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; }
}

/* ---------- موبایل ---------- */
@media (max-width: 767px) {
	.tkc-cathead { flex-wrap: wrap; gap: 10px; padding: 12px; border-radius: 16px; }
	.tkc-cathead__ico { flex-basis: 36px; height: 36px; border-radius: 9px; }
	.tkc-cathead__ico .tkc-i { width: 20px; height: 20px; }
	.tkc-cathead__ico img { width: 30px !important; height: 30px !important; }
	.tkc-cathead__text { flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; }
	.tkc-cathead__title { font-size: 17px !important; }
	.tkc-cathead__count { font-size: 12px; white-space: nowrap; }
	/* زیردسته‌ها: یک ردیف افقی قابل کشیدن */
	.tkc-cathead__chips { flex: 1 1 100%; max-width: none; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin: 0 -12px; padding: 0 12px 2px; scrollbar-width: none; }
	.tkc-cathead__chips::-webkit-scrollbar { display: none; }
	.tkc-cathead__chips a { flex: none; padding: 7px 12px; font-size: 12px; }

	/* شبکهٔ دوستونه در یک قاب با خط جداکننده */
	.elementor-1489 ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; overflow: hidden; border: 1px solid var(--tka-line); border-radius: 16px; background: #FFFFFF; }
	.elementor-1489 ul.products > .mehrnoosh-offer-five-bix-out-product-accssor-403 { border-bottom: 1px solid #F1F1F1; }
	.elementor-1489 ul.products > .mehrnoosh-offer-five-bix-out-product-accssor-403:nth-child(odd) { border-left: 1px solid #F1F1F1; }    /* ستون راست (RTL) */
	.elementor-1489 .mehrnoosh-offer-five-bix-inner-product-inner-accssor-403 { gap: 6px; padding: 10px 10px 56px !important; border: 0 !important; border-radius: 0 !important; }
	.elementor-1489 .mehrnoosh-offer-five-bix-inner-product-inner-accssor-403:hover { box-shadow: none !important; }
	.elementor-1489 .mehrnoosh-offer-five-bix-inner-product-img-accssor-403 { border-radius: 12px; }
	.elementor-1489 .mehrnoosh-offer-slider-five-product-title-accssor-403 { font-size: 12px !important; }
	.elementor-1489 .mehrnoosh-offer-slider-five-product-price-accssor-403 { left: 10px; bottom: 10px; right: 50px; min-height: 36px; }
	.elementor-1489 .mehrnoosh-offer-slider-five-product-price-accssor-403 ins,
	.elementor-1489 .mehrnoosh-offer-slider-five-product-price-accssor-403 > .woocommerce-Price-amount { font-size: 13px !important; }
	.elementor-1489 .add-to-cart-in-shop-page { right: 10px !important; bottom: 10px !important; }
	.elementor-1489 .add-to-cart-in-shop-page a { width: 36px !important; height: 36px !important; border-radius: 10px !important; }
	.elementor-1489 .price-and-box-mehrnoosh-in-shop-offer-offer-five-product-box-accssor-403 { top: 16px !important; right: 16px !important; font-size: 10px !important; }
}

/* =====================================================================
   نوار شناور موبایل و تبلت + پنجرهٔ مرتب‌سازی
   ===================================================================== */
.tkc-shopbar[hidden], .tkc-sortsheet[hidden] { display: none !important; }
.tkc-shopbar { display: none; }
@media (max-width: 1024px) {
	.tkc-shopbar {
		position: fixed;
		left: 12px;
		right: 12px;
		bottom: calc(16px + env(safe-area-inset-bottom));
		z-index: 9980;
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
		padding: 8px;
		border-radius: 18px;
		background: var(--tkc-ink);
		box-shadow: 0 12px 30px rgba(20, 29, 38, .25);
		direction: rtl;
	}
	.tkc-shopbar.is-single { grid-template-columns: 1fr; }
	.tkc-shopbar__btn { min-width: 0; height: 46px; display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; padding: 0 10px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .1); color: #FFFFFF; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
	.tkc-shopbar__btn span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
	.tkc-shopbar__btn.is-filter { background: var(--tkc-yellow); color: var(--tkc-ink); }
	.tkc-shopbar__btn:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }
}
@media (max-width: 767px) {
	/* نوار پایین قالب (خانه، سبد …) زیر نوار شناور است؛ نوار شناور بالای آن قرار می‌گیرد */
	.tkc-shopbar { bottom: calc(105px + env(safe-area-inset-bottom)); }
}
/* پنجرهٔ مرتب‌سازی از پایین صفحه */
.tkc-sortsheet { position: fixed; inset: 0; z-index: 1000000;   /* بالاتر از نوار پایین قالب */ display: flex; align-items: flex-end; background: rgba(20, 29, 38, 0); direction: rtl; transition: background-color .2s ease; }
.tkc-sortsheet.is-open { background: rgba(20, 29, 38, .45); }
.tkc-sortsheet__panel { width: 100%; max-height: 80vh; overflow: auto; box-sizing: border-box; padding: 16px 16px calc(20px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; background: #FFFFFF; transform: translateY(100%); transition: transform .2s ease; }
.tkc-sortsheet.is-open .tkc-sortsheet__panel { transform: none; }
.tkc-sortsheet__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; color: var(--tkc-ink); font-size: 15px; }
.tkc-sortsheet__head button { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 12px; background: #F6F7F9; color: var(--tkc-ink); cursor: pointer; }
.tkc-sortsheet__list { display: grid; gap: 6px; }
.tkc-sortsheet__item { display: flex; align-items: center; min-height: 48px; padding: 0 14px; border: 1px solid #EEF0F3; border-radius: 12px; color: var(--tkc-ink) !important; font-size: 14px; font-weight: 700; text-decoration: none !important; }
.tkc-sortsheet__item.is-current { border: 2px solid var(--tkc-yellow-2, #F2C200); background: #FFFBEA; }
@media (prefers-reduced-motion: reduce) {
	.tkc-sortsheet, .tkc-sortsheet__panel { transition: none; }
}
