/* =====================================================================
   Super Service – Shop Archive | Modern Minimal (WoodMart compatible)
   همه استایل‌ها زیر body.ss-archive هستند و فقط در آرشیو محصولات لود می‌شوند.
   ===================================================================== */

/* اعداد لاتین در نام لاتین محصولات (جلوگیری از نمایش BV700 به صورت B۷۰۰) */
@font-face {
	font-family: "SSA Latin";
	src: local("Segoe UI"), local("SegoeUI"), local("Roboto"), local("Helvetica Neue"), local("Arial"), local("DejaVu Sans");
	unicode-range: U+0021-007E;
	font-display: swap;
}

body.ss-archive {
	--ssa-primary: #f4511e;            /* رنگ برند */
	--ssa-primary-soft: #fff1ec;
	--ssa-ink: #1c2230;
	--ssa-text: #4b5263;
	--ssa-muted: #8b91a0;
	--ssa-line: #eceef2;
	--ssa-surface: #ffffff;
	--ssa-tint: #f6f7f9;
	--ssa-radius: 16px;
	--ssa-radius-sm: 10px;
	--ssa-shadow: 0 1px 2px rgba(16, 24, 40, .04);
	--ssa-shadow-hover: 0 14px 34px -12px rgba(16, 24, 40, .18);
	--ssa-ease: cubic-bezier(.2, .7, .2, 1);
	background: #fafbfc;
}
body.ss-archive .wd-product *,
body.ss-archive .product-grid-item *,
body.ss-archive .wd-product .product-wrapper,
body.ss-archive .shop-loop-head,
body.ss-archive .widget,
body.ss-archive .ssa-seo { box-sizing: border-box; }

/* ---------------------------------------------------------------
   هدر آرشیو (H1)
   --------------------------------------------------------------- */
body.ss-archive .ssa-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 6px 16px;
	margin: 0 0 18px;
}
body.ss-archive .ssa-title {
	margin: 0;
	font-size: clamp(18px, 1.2rem + .5vw, 24px);
	font-weight: 800;
	line-height: 1.5;
	color: var(--ssa-ink);
	letter-spacing: -.2px;
}
body.ss-archive .ssa-meta {
	margin: 0;
	font-size: 13px;
	color: var(--ssa-muted);
}

/* ---------------------------------------------------------------
   نوار ابزار (تعداد نمایش / ستون‌ها / مرتب‌سازی)
   --------------------------------------------------------------- */
body.ss-archive .shop-loop-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 20px;
	padding: 10px 14px;
	background: var(--ssa-surface);
	border: 1px solid var(--ssa-line);
	border-radius: var(--ssa-radius);
	box-shadow: var(--ssa-shadow);
}
body.ss-archive .shop-loop-head .wd-shop-tools {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0;
}
body.ss-archive .woocommerce-result-count {
	margin: 0;
	font-size: 13px;
	color: var(--ssa-muted);
}

/* per page: 9 / 12 / 18 / 24 → قرص */
body.ss-archive .wd-products-per-page {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	padding: 3px;
	background: var(--ssa-tint);
	border-radius: 999px;
	font-size: 13px;
}
body.ss-archive .wd-products-per-page .per-page-title {
	padding: 0 10px 0 6px;
	color: var(--ssa-muted);
}
body.ss-archive .wd-products-per-page .per-page-border { display: none; }
body.ss-archive .wd-products-per-page .per-page-variation {
	min-width: 32px;
	height: 28px;
	padding: 0 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	color: var(--ssa-text);
	transition: background .2s, color .2s;
}
body.ss-archive .wd-products-per-page .per-page-variation:hover { color: var(--ssa-ink); background: #fff; }
body.ss-archive .wd-products-per-page .per-page-variation.current-variation {
	background: #fff;
	color: var(--ssa-primary);
	font-weight: 700;
	box-shadow: 0 1px 3px rgba(16, 24, 40, .1);
}

/* سوئیچ ستون‌ها */
body.ss-archive .wd-products-shop-view,
body.ss-archive .wd-products-per-row { gap: 4px; }
body.ss-archive .wd-products-shop-view a,
body.ss-archive .wd-products-per-row a {
	width: 32px; height: 32px;
	display: inline-flex; align-items: center; justify-content: center;
	border-radius: 8px;
	color: var(--ssa-muted);
	transition: background .2s, color .2s;
}
body.ss-archive .wd-products-shop-view a:hover,
body.ss-archive .wd-products-per-row a:hover,
body.ss-archive .wd-products-shop-view .current-variation,
body.ss-archive .wd-products-per-row .current-variation {
	background: var(--ssa-tint);
	color: var(--ssa-ink);
}

/* مرتب‌سازی */
body.ss-archive .woocommerce-ordering { margin: 0; }
body.ss-archive .woocommerce-ordering select.orderby {
	height: 40px;
	min-width: 190px;
	padding: 0 14px 0 36px;
	border: 1px solid var(--ssa-line);
	border-radius: 999px;
	background-color: #fff;
	font-size: 13px;
	color: var(--ssa-ink);
	box-shadow: none;
	cursor: pointer;
	transition: border-color .2s;
}
body.ss-archive .woocommerce-ordering select.orderby:hover,
body.ss-archive .woocommerce-ordering select.orderby:focus { border-color: #d5d8df; }

/* ---------------------------------------------------------------
   گرید محصولات
   --------------------------------------------------------------- */
body.ss-archive .wd-products,
body.ss-archive .products.elements-grid {
	--wd-gap-lg: 20px;
	--wd-gap-md: 16px;
	--wd-gap-sm: 10px;
	--wd-gap: 20px;
}

/* کارت */
body.ss-archive .wd-product .product-wrapper,
body.ss-archive .product-grid-item .product-wrapper {
	position: relative;
	height: 100%;
	display: flex;
	flex-direction: column;
	padding: 8px 8px 10px;
	background: var(--ssa-surface);
	border: 1px solid var(--ssa-line);
	border-radius: var(--ssa-radius);
	box-shadow: var(--ssa-shadow);
	transition: transform .35s var(--ssa-ease), box-shadow .35s var(--ssa-ease), border-color .35s;
	overflow: hidden;
}
body.ss-archive .wd-product:hover .product-wrapper,
body.ss-archive .product-grid-item:hover .product-wrapper {
	transform: translateY(-3px);
	border-color: #e2e5ea;
	box-shadow: var(--ssa-shadow-hover);
}
body.ss-archive .wd-product,
body.ss-archive .product-grid-item { height: auto; min-width: 0; }

/* تصویر */
body.ss-archive .wd-product .product-element-top,
body.ss-archive .product-grid-item .product-element-top {
	position: relative;
	margin: 0 0 10px;
	aspect-ratio: 6 / 5;
	background: var(--ssa-tint);
	border-radius: 12px;
	overflow: hidden;
}
body.ss-archive .product-element-top .product-image-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: 7%;
	box-sizing: border-box;
}
body.ss-archive .product-element-top .product-image-link img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	mix-blend-mode: multiply;           /* حذف پس‌زمینه سفید عکس‌ها روی زمینه خاکستری */
	transition: transform .5s var(--ssa-ease);
}
body.ss-archive .wd-product:hover .product-image-link img,
body.ss-archive .product-grid-item:hover .product-image-link img { transform: scale(1.05); }

/* لوگوی برند روی عکس */
body.ss-archive .product-element-top .wd-product-brands,
body.ss-archive .product-element-top .wd-product-brands-img,
body.ss-archive .product-element-top .woodmart-product-brands {
	position: absolute;
	top: 8px;
	inset-inline-start: 8px;
	z-index: 3;
	margin: 0;
}
body.ss-archive .product-element-top .wd-product-brands img,
body.ss-archive .product-element-top .wd-product-brands-img img,
body.ss-archive .product-element-top .woodmart-product-brands img {
	width: 34px !important;
	height: 34px !important;
	max-width: none;
	object-fit: contain;
	padding: 3px;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 1px 4px rgba(16, 24, 40, .12);
	mix-blend-mode: normal;
}

/* لیبل‌ها (ناموجود، تخفیف، جدید) */
body.ss-archive .product-labels {
	top: 8px;
	inset-inline-end: 8px;
	inset-inline-start: auto;
	gap: 4px;
}
body.ss-archive .product-labels .product-label {
	min-width: 0;
	min-height: 0;
	padding: 4px 9px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.4;
	box-shadow: none;
}
body.ss-archive .product-labels .onsale { background: var(--ssa-primary); color: #fff; }
body.ss-archive .product-labels .out-of-stock { background: #1c2230; color: #fff; }

/* دکمه‌های شناور (علاقه‌مندی/مقایسه/مشاهده سریع) */
body.ss-archive .product-element-top .wd-buttons {
	border-radius: 12px;
	box-shadow: 0 6px 18px -6px rgba(16, 24, 40, .2);
}

/* بدنه کارت */
body.ss-archive .wd-product .product-element-bottom,
body.ss-archive .product-grid-item .product-element-bottom {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: 0 4px;
	text-align: start;
}

/* عنوان */
body.ss-archive .wd-product .wd-entities-title,
body.ss-archive .product-grid-item .product-title {
	margin: 0 0 6px;
	font-family: "SSA Latin", var(--wd-entities-title-font, var(--wd-title-font, var(--wd-text-font, sans-serif)));
	font-size: 14px;
	font-weight: 600;
	line-height: 1.6;
	color: var(--ssa-ink);
	text-align: right;
	unicode-bidi: plaintext;            /* نام لاتین درست نمایش داده شود */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
body.ss-archive .wd-product .wd-entities-title a,
body.ss-archive .product-grid-item .product-title a { color: inherit; }
body.ss-archive .wd-product .wd-entities-title a:hover,
body.ss-archive .product-grid-item .product-title a:hover { color: var(--ssa-primary); }

/* متا: دسته + برند در یک خط */
body.ss-archive .wd-product .wd-product-cats,
body.ss-archive .wd-product .wd-product-brands-links,
body.ss-archive .product-grid-item .wd-product-cats,
body.ss-archive .product-grid-item .wd-product-brands-links {
	margin: 0 0 2px;
	font-size: 12px;
	line-height: 1.7;
	color: var(--ssa-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
body.ss-archive .wd-product-cats a,
body.ss-archive .wd-product-brands-links a { color: inherit; }
body.ss-archive .wd-product-cats a:hover,
body.ss-archive .wd-product-brands-links a:hover { color: var(--ssa-ink); }
/* برند روی عکس (لوگو) دیده می‌شود → خط متنی برند تکراری است */
body.ss-archive .wd-product .wd-product-brands-links,
body.ss-archive .product-grid-item .wd-product-brands-links { display: none; }

/* قیمت */
body.ss-archive .wd-product .price,
body.ss-archive .product-grid-item .price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: flex-start;
	gap: 0 6px;
	width: 100%;
	margin: auto 0 10px;                 /* قیمت و دکمه همیشه پایین کارت */
	padding-top: 8px;
	font-size: 16px;
	font-weight: 800;
	line-height: 1.4;
	color: var(--ssa-ink);
}
body.ss-archive .wd-product .wrap-price { margin-top: auto; }
body.ss-archive .wd-product .price:empty { display: none; }

/* زنجیره flex تا دکمه، تا دکمه همیشه کف کارت بنشیند (بدون فضای خالی زیر دکمه) */
body.ss-archive .wd-product .product-wrapper div:not(.product-element-top):has(.wd-add-btn),
body.ss-archive .product-grid-item .product-wrapper div:not(.product-element-top):has(.wd-add-btn) {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
}
body.ss-archive .wd-product .wd-add-btn,
body.ss-archive .product-grid-item .wd-add-btn { margin-top: auto !important; }
body.ss-archive .wd-product :is(.price, .wrap-price) ~ .wd-add-btn,
body.ss-archive .product-grid-item :is(.price, .wrap-price) ~ .wd-add-btn { margin-top: 0 !important; }
body.ss-archive .wd-product .wrap-price .price { margin-top: 0; }
body.ss-archive .price .woocommerce-Price-amount { color: var(--ssa-ink); }
body.ss-archive .price .woocommerce-Price-currencySymbol {
	margin-inline-start: 3px;
	font-size: 11px;
	font-weight: 500;
	color: var(--ssa-muted);
}
body.ss-archive .price del,
body.ss-archive .price del .woocommerce-Price-amount {
	font-size: 12px;
	font-weight: 400;
	color: var(--ssa-muted);
	opacity: 1;
}
body.ss-archive .price ins { text-decoration: none; }
body.ss-archive .price ins .woocommerce-Price-amount { color: var(--ssa-primary); }

/* دکمه افزودن به سبد */
body.ss-archive .wd-product .wd-add-btn,
body.ss-archive .product-grid-item .wd-add-btn { margin: 0; width: 100%; }
body.ss-archive .wd-product .wd-add-btn > a,
body.ss-archive .product-grid-item .wd-add-btn > a,
body.ss-archive .wd-product a.add_to_cart_button,
body.ss-archive .wd-product a.product_type_simple {
	display: flex !important;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 40px;
	padding: 0 14px;
	background: var(--ssa-primary-soft);
	color: var(--ssa-primary);
	border: 0;
	border-radius: var(--ssa-radius-sm);
	font-size: 13px;
	font-weight: 700;
	text-transform: none;
	box-shadow: none;
	transition: background .25s, color .25s, transform .15s;
}
body.ss-archive .wd-product .wd-add-btn > a:hover,
body.ss-archive .product-grid-item .wd-add-btn > a:hover,
body.ss-archive .wd-product a.add_to_cart_button:hover {
	background: var(--ssa-primary);
	color: #fff;
}
body.ss-archive .wd-product .wd-add-btn > a:active { transform: scale(.98); }
body.ss-archive .wd-product a.add_to_cart_button.loading { opacity: .7; }
body.ss-archive .wd-product .added_to_cart {
	display: block;
	margin-top: 8px;
	font-size: 12px;
	text-align: center;
	color: var(--ssa-primary);
}

/* ناموجود */
body.ss-archive .wd-product.outofstock .product-image-link img,
body.ss-archive .product-grid-item.outofstock .product-image-link img {
	filter: grayscale(1);
	opacity: .55;
}
body.ss-archive .wd-product.outofstock .wd-add-btn > a {
	background: var(--ssa-tint);
	color: var(--ssa-text);
}

/* دسترس‌پذیری */
body.ss-archive .wd-product a:focus-visible,
body.ss-archive .shop-loop-head a:focus-visible,
body.ss-archive .woocommerce-pagination a:focus-visible,
body.ss-archive .ssa-seo__toggle:focus-visible {
	outline: 2px solid var(--ssa-primary);
	outline-offset: 2px;
	border-radius: 8px;
}

/* رندر سریع‌تر محصولات پایین صفحه */
body.ss-archive .wd-product:nth-child(n+9) {
	content-visibility: auto;
	contain-intrinsic-size: auto 420px;
}

/* ---------------------------------------------------------------
   سایدبار و فیلترها
   --------------------------------------------------------------- */
body.ss-archive .main-page-wrapper .widget,
body.ss-archive .sidebar-container .widget,
body.ss-archive .wd-sidebar .widget,
body.ss-archive .ssa-drawer .widget {
	margin-bottom: 16px;
	padding: 16px;
	background: var(--ssa-surface);
	border: 1px solid var(--ssa-line);
	border-radius: var(--ssa-radius);
	box-shadow: var(--ssa-shadow);
}

body.ss-archive .main-page-wrapper .widget .widget-title,
body.ss-archive .sidebar-container .widget-title,
body.ss-archive .wd-sidebar .widget-title {
	margin: 0 0 14px;
	padding: 0;
	background: none;
	border: 0;
	font-size: 14px;
	font-weight: 800;
	color: var(--ssa-ink);
	text-transform: none;
}

/* جستجو داخل فیلتر */
body.ss-archive .widget .wd-filter-search input,
body.ss-archive .widget input[type="search"],
body.ss-archive .widget input[type="text"] {
	height: 40px;
	padding: 0 12px;
	background: var(--ssa-tint);
	border: 1px solid transparent;
	border-radius: var(--ssa-radius-sm);
	font-size: 13px;
	transition: border-color .2s, background .2s;
}
body.ss-archive .widget .wd-filter-search input:focus,
body.ss-archive .widget input[type="search"]:focus,
body.ss-archive .widget input[type="text"]:focus {
	background: #fff;
	border-color: #d5d8df;
}

/* لیست فیلترها */
body.ss-archive .woocommerce-widget-layered-nav-list,
body.ss-archive .wd-filter-list {
	max-height: 260px;
	margin: 10px 0 0;
	padding-inline-end: 4px;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: #dfe2e8 transparent;
}
body.ss-archive .wd-scroll-content .woocommerce-widget-layered-nav-list,
body.ss-archive .wd-scroll-content .wd-filter-list,
body.ss-archive .woocommerce-widget-layered-nav-list.wd-scroll-content { max-height: 280px; overflow-y: auto; }
body.ss-archive .widget .wd-scroll-content { max-height: 280px; }
body.ss-archive .woocommerce-widget-layered-nav-list .wc-layered-nav-term,
body.ss-archive .wd-filter-list li {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 6px 8px;
	border-radius: 8px;
	font-size: 13px;
	transition: background .2s;
}
body.ss-archive .woocommerce-widget-layered-nav-list .wc-layered-nav-term:hover,
body.ss-archive .wd-filter-list li:hover { background: var(--ssa-tint); }
body.ss-archive .woocommerce-widget-layered-nav-list .wc-layered-nav-term > a,
body.ss-archive .wd-filter-list li > a {
	flex: 1;
	color: var(--ssa-text);
	unicode-bidi: plaintext;
	text-align: right;
}
body.ss-archive .woocommerce-widget-layered-nav-list .chosen > a,
body.ss-archive .wd-filter-list .chosen > a { color: var(--ssa-ink); font-weight: 700; }
body.ss-archive .woocommerce-widget-layered-nav-list .count,
body.ss-archive .wd-filter-list .count {
	min-width: 26px;
	padding: 1px 7px;
	background: var(--ssa-tint);
	border: 0;
	border-radius: 999px;
	font-size: 11px;
	line-height: 18px;
	text-align: center;
	color: var(--ssa-muted);
}
body.ss-archive .woocommerce-widget-layered-nav-list img,
body.ss-archive .wd-filter-list img { max-height: 18px; width: auto; }

/* فیلتر قیمت */
body.ss-archive .widget_price_filter .ui-slider {
	height: 4px;
	margin: 18px 6px 16px;
	background: var(--ssa-line);
	border: 0;
	border-radius: 4px;
}
body.ss-archive .widget_price_filter .ui-slider .ui-slider-range { background: var(--ssa-primary); }
body.ss-archive .widget_price_filter .ui-slider .ui-slider-handle {
	top: -7px;
	width: 18px;
	height: 18px;
	background: #fff;
	border: 2px solid var(--ssa-primary);
	border-radius: 50%;
	box-shadow: 0 2px 6px rgba(16, 24, 40, .15);
	cursor: grab;
}
body.ss-archive .widget_price_filter .price_slider_amount {
	display: flex;
	flex-direction: column-reverse;
	gap: 10px;
	font-size: 12px;
	color: var(--ssa-text);
}
body.ss-archive .widget_price_filter .price_slider_amount .button {
	width: 100%;
	height: 38px;
	background: var(--ssa-ink);
	color: #fff;
	border-radius: var(--ssa-radius-sm);
	font-size: 13px;
	font-weight: 700;
}
body.ss-archive .widget_price_filter .price_slider_amount .button:hover { background: var(--ssa-primary); }

/* select دسته‌بندی */
body.ss-archive .widget select:not(.select2-hidden-accessible) {
	height: 40px;
	line-height: normal;
	background-color: var(--ssa-tint);
	border: 1px solid transparent;
	border-radius: var(--ssa-radius-sm);
	font-size: 13px;
}


/* ---------------------------------------------------------------
   صفحه‌بندی
   --------------------------------------------------------------- */
body.ss-archive .woocommerce-pagination,
body.ss-archive nav.wd-pagination { margin-top: 32px; text-align: center; }
body.ss-archive .woocommerce-pagination ul.page-numbers,
body.ss-archive .woocommerce-pagination > ul {
	display: inline-flex !important;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 4px;
	margin: 0;
	padding: 6px !important;
	list-style: none;
	background: var(--ssa-surface);
	border: 1px solid var(--ssa-line) !important;
	border-radius: 999px;
	box-shadow: var(--ssa-shadow);
}
body.ss-archive .woocommerce-pagination li { margin: 0 !important; border: 0 !important; padding: 0 !important; }
body.ss-archive .woocommerce-pagination li > .page-numbers {
	box-sizing: border-box;
	position: relative;
	min-width: 40px;
	height: 40px;
	padding: 0 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 0 !important;
	border-radius: 999px;
	box-shadow: none;
	font-size: 14px;
	font-weight: 600;
	color: var(--ssa-text);
	transition: background .2s, color .2s;
}
body.ss-archive .woocommerce-pagination a.page-numbers:hover { background: var(--ssa-tint); color: var(--ssa-ink); }
body.ss-archive .woocommerce-pagination li > .page-numbers.current {
	background: var(--ssa-primary);
	color: #fff;
	box-shadow: 0 4px 12px -4px rgba(244, 81, 30, .55);
}
body.ss-archive .woocommerce-pagination li > .page-numbers.dots {
	min-width: 22px;
	padding: 0;
	color: var(--ssa-muted);
	letter-spacing: 1px;
}
/* قبلی / بعدی: آیکن خود قالب حذف و فلش تمیز جایگزین می‌شود */
body.ss-archive .woocommerce-pagination li > .page-numbers.prev,
body.ss-archive .woocommerce-pagination li > .page-numbers.next {
	width: 40px;
	min-width: 40px;
	padding: 0;
	font-size: 0 !important;
	color: var(--ssa-ink);
	background: var(--ssa-tint);
}
body.ss-archive .woocommerce-pagination .page-numbers.prev > *,
body.ss-archive .woocommerce-pagination .page-numbers.next > * {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
body.ss-archive .woocommerce-pagination .page-numbers.prev::before,
body.ss-archive .woocommerce-pagination .page-numbers.next::before { content: none !important; display: none !important; }
body.ss-archive .woocommerce-pagination .page-numbers.prev::after,
body.ss-archive .woocommerce-pagination .page-numbers.next::after {
	content: "" !important;
	display: block;
	width: 8px;
	height: 8px;
	border-top: 2px solid currentColor;
	border-right: 2px solid currentColor;
	font-family: inherit !important;
}
/* راست‌چین: «قبلی» سمت راست است و به راست اشاره می‌کند */
body.ss-archive .woocommerce-pagination .page-numbers.prev::after { transform: rotate(45deg); margin-right: 3px; }
body.ss-archive .woocommerce-pagination .page-numbers.next::after { transform: rotate(-135deg); margin-left: 3px; }
html[dir="ltr"] body.ss-archive .woocommerce-pagination .page-numbers.prev::after { transform: rotate(-135deg); }
html[dir="ltr"] body.ss-archive .woocommerce-pagination .page-numbers.next::after { transform: rotate(45deg); }
body.ss-archive .woocommerce-pagination a.page-numbers.prev:hover,
body.ss-archive .woocommerce-pagination a.page-numbers.next:hover { background: var(--ssa-primary); color: #fff; }

/* ---------------------------------------------------------------
   متن سئو پایین صفحه
   --------------------------------------------------------------- */
body.ss-archive .ssa-seo {
	position: relative;
	margin: 40px 0 10px;
	padding: 24px 26px;
	background: var(--ssa-surface);
	border: 1px solid var(--ssa-line);
	border-radius: var(--ssa-radius);
	color: var(--ssa-text);
	font-size: 14px;
	line-height: 2;
}
body.ss-archive .ssa-seo__body {
	max-height: 200px;
	overflow: hidden;
	transition: max-height .5s var(--ssa-ease);
	-webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
	mask-image: linear-gradient(to bottom, #000 55%, transparent);
}
body.ss-archive .ssa-seo.is-open .ssa-seo__body {
	max-height: none;
	-webkit-mask-image: none;
	mask-image: none;
}
body.ss-archive .ssa-seo h2,
body.ss-archive .ssa-seo h3 {
	margin: 0 0 8px;
	font-size: 16px;
	font-weight: 800;
	color: var(--ssa-ink);
}
body.ss-archive .ssa-seo p { margin: 0 0 16px; }
body.ss-archive .ssa-seo a { color: var(--ssa-primary); }
body.ss-archive .ssa-seo__toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 8px;
	padding: 8px 16px;
	background: var(--ssa-tint);
	border: 0;
	border-radius: 999px;
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	color: var(--ssa-ink);
	cursor: pointer;
}
body.ss-archive .ssa-seo__toggle[hidden] { display: none; }
body.ss-archive .ssa-seo__toggle:hover { background: var(--ssa-primary-soft); color: var(--ssa-primary); }

/* ---------------------------------------------------------------
   موبایل و تبلت
   --------------------------------------------------------------- */
@media (max-width: 1024px) {
	body.ss-archive .wd-products-per-row,
	body.ss-archive .wd-products-shop-view { display: none !important; }

	/* دکمه نمایش فیلترها (Off-canvas وودمارت) */
	body.ss-archive .wd-show-sidebar-btn > a {
		display: inline-flex;
		align-items: center;
		gap: 6px;
		height: 40px;
		padding: 0 16px;
		background: var(--ssa-ink);
		color: #fff;
		border-radius: 999px;
		font-size: 13px;
		font-weight: 700;
	}
}

@media (max-width: 768px) {
	body.ss-archive .shop-loop-head {
		padding: 8px;
		gap: 8px;
		border-radius: 14px;
	}
	body.ss-archive .wd-products-per-page { display: none; }
	body.ss-archive .woocommerce-ordering select.orderby { min-width: 0; height: 38px; }

	body.ss-archive .wd-products,
	body.ss-archive .products.elements-grid { --wd-gap-sm: 10px; --wd-gap: 10px; }

	body.ss-archive .wd-product .product-wrapper,
	body.ss-archive .product-grid-item .product-wrapper {
		padding: 6px 6px 10px;
		border-radius: 14px;
	}
	body.ss-archive .wd-product .product-element-top { margin-bottom: 10px; border-radius: 10px; }
	body.ss-archive .product-element-top .wd-product-brands img,
	body.ss-archive .product-element-top .wd-product-brands-img img { width: 28px !important; height: 28px !important; }

	body.ss-archive .wd-product .wd-entities-title,
	body.ss-archive .product-grid-item .product-title { font-size: 13px; }
	body.ss-archive .wd-product .wd-product-brands-links { display: none; }
	body.ss-archive .wd-product .price { font-size: 14px; margin-bottom: 10px; }
	body.ss-archive .wd-product .wd-add-btn > a,
	body.ss-archive .wd-product a.add_to_cart_button { min-height: 38px; font-size: 12px; padding: 0 8px; }

	body.ss-archive .woocommerce-pagination ul.page-numbers,
	body.ss-archive .woocommerce-pagination > ul { gap: 2px; padding: 4px !important; }
	body.ss-archive .woocommerce-pagination li > .page-numbers { min-width: 34px; height: 34px; font-size: 13px; padding: 0 6px; }
	body.ss-archive .woocommerce-pagination li > .page-numbers.prev,
	body.ss-archive .woocommerce-pagination li > .page-numbers.next { width: 34px; min-width: 34px; }
	body.ss-archive .ssa-seo { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
	body.ss-archive .wd-product .product-wrapper,
	body.ss-archive .product-element-top .product-image-link img,
	body.ss-archive .ssa-seo__body { transition: none !important; }
	body.ss-archive .wd-product:hover .product-wrapper { transform: none; }
	body.ss-archive .wd-product:hover .product-image-link img { transform: none; }
}

/* =====================================================================
   v1.2 — نوار مرتب‌سازی، کشوی فیلتر موبایل، فیلترهای بازوبسته‌شونده
   ===================================================================== */

/* مرتب‌سازی قالب پنهان می‌شود (نوار جدید جایگزین است) */
body.ss-archive .ssa-hide-sort { display: none !important; }
/* اگر جایی مرتب‌سازی قالب دیده شد، متنش سفید نماند */
body.ss-archive .woocommerce-ordering select,
body.ss-archive .woocommerce-ordering select option {
	color: var(--ssa-ink) !important;
	-webkit-text-fill-color: var(--ssa-ink);
	background-color: #fff !important;
}

/* عنوان ویجت‌های فیلتر: بدون جعبه خاکستری */
body.ss-archive .widget .widget-title,
body.ss-archive .widget .widgettitle,
body.ss-archive .widget .wd-widget-title {
	position: relative;
	margin: 0 0 12px !important;
	padding: 0 !important;
	background: none !important;
	border: 0 !important;
	box-shadow: none !important;
	font-size: 14px !important;
	font-weight: 800 !important;
	color: var(--ssa-ink) !important;
	line-height: 1.6;
}
body.ss-archive .widget.ssa-acc > .widget-title,
body.ss-archive .widget.ssa-acc .widget-title,
body.ss-archive .widget.ssa-acc .widgettitle,
body.ss-archive .widget.ssa-acc .wd-widget-title {
	cursor: pointer;
	user-select: none;
	padding-inline-end: 26px !important;
}
body.ss-archive .widget.ssa-acc .widget-title::after,
body.ss-archive .widget.ssa-acc .widgettitle::after,
body.ss-archive .widget.ssa-acc .wd-widget-title::after {
	content: "";
	position: absolute;
	top: 50%;
	inset-inline-end: 4px;
	width: 8px;
	height: 8px;
	margin-top: -2px;
	border-right: 2px solid var(--ssa-muted);
	border-bottom: 2px solid var(--ssa-muted);
	transform: rotate(-135deg);
	transition: transform .25s var(--ssa-ease), margin .25s;
}
body.ss-archive .widget.ssa-collapsed .widget-title::after,
body.ss-archive .widget.ssa-collapsed .widgettitle::after,
body.ss-archive .widget.ssa-collapsed .wd-widget-title::after {
	transform: rotate(45deg);
	margin-top: -6px;
}
body.ss-archive .widget.ssa-collapsed .ssa-wbody { display: none !important; }
body.ss-archive .widget.ssa-collapsed .widget-title,
body.ss-archive .widget.ssa-collapsed .widgettitle,
body.ss-archive .widget.ssa-collapsed .wd-widget-title { margin-bottom: 0 !important; }

/* چک‌باکس‌های فیلتر */
body.ss-archive .widget input[type="checkbox"] {
	accent-color: var(--ssa-primary);
	width: 16px;
	height: 16px;
}

/* ---------------- نوار ابزار ---------------- */
body.ss-archive .ssa-toolbar {
	grid-column: 1 / -1;
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 16px;
	padding: 6px 14px;
	min-height: 52px;
	background: var(--ssa-surface);
	border: 1px solid var(--ssa-line);
	border-radius: var(--ssa-radius);
	box-shadow: var(--ssa-shadow);
}
body.ss-archive .ssa-toolbar svg,
body.ss-archive .ssa-fab svg,
body.ss-archive .ssa-sheet svg,
body.ss-archive .ssa-drawer-head svg { width: 18px; height: 18px; flex: none; }

body.ss-archive .ssa-sort-tabs {
	display: flex;
	align-items: center;
	gap: 2px;
	flex-wrap: wrap;
	min-width: 0;
}
body.ss-archive .ssa-sort-title {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-inline-end: 6px;
	font-size: 13px;
	font-weight: 700;
	color: var(--ssa-ink);
}
body.ss-archive .ssa-tab {
	position: relative;
	padding: 8px 10px;
	border-radius: 8px;
	font-size: 13px;
	color: var(--ssa-muted);
	white-space: nowrap;
	transition: color .2s, background .2s;
}
body.ss-archive .ssa-tab:hover { color: var(--ssa-ink); background: var(--ssa-tint); }
body.ss-archive .ssa-tab.is-active { color: var(--ssa-primary); font-weight: 700; }
body.ss-archive .ssa-tab.is-active::after {
	content: "";
	position: absolute;
	right: 10px;
	left: 10px;
	bottom: 1px;
	height: 2px;
	border-radius: 2px;
	background: var(--ssa-primary);
}
body.ss-archive .ssa-count {
	margin-inline-start: auto;
	font-size: 13px;
	color: var(--ssa-muted);
	white-space: nowrap;
}

/* دکمه‌های موبایل (روی دسکتاپ مخفی) */
body.ss-archive .ssa-chip {
	display: none;
	align-items: center;
	gap: 6px;
	height: 38px;
	padding: 0 14px;
	background: #fff;
	border: 1px solid var(--ssa-line);
	border-radius: 999px;
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	color: var(--ssa-ink);
	cursor: pointer;
	white-space: nowrap;
}
body.ss-archive .ssa-badge {
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--ssa-primary);
	color: #fff;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
}

/* دکمه شناور، کشو و برگه‌ها فقط موبایل/تبلت */
body.ss-archive .ssa-fab,
body.ss-archive .ssa-backdrop,
body.ss-archive .ssa-drawer-head,
body.ss-archive .ssa-drawer-foot,
body.ss-archive .ssa-sheet { display: none; }

@media (max-width: 1024px) {
	html.ssa-lock, html.ssa-lock body { overflow: hidden !important; }

	/* قبل از اجرای اسکریپت، فیلترها بالای صفحه نیایند */
	body.ss-archive:not(.ssa-ready) .main-page-wrapper :is(.elementor-column, .e-con, .elementor-element, .sidebar-container):has(.widget):not(:has(.products, .wd-products)) {
		display: none !important;
	}

	/* نوار ابزار موبایل */
	body.ss-archive .ssa-toolbar {
		gap: 8px;
		padding: 0;
		min-height: 0;
		background: none;
		border: 0;
		box-shadow: none;
		margin-bottom: 12px;
	}
	body.ss-archive .ssa-sort-tabs { display: none; }
	body.ss-archive .ssa-chip { display: inline-flex; }
	body.ss-archive .ssa-chip--sort span { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
	body.ss-archive .ssa-count { font-size: 12px; }

	/* دکمه شناور هنگام اسکرول */
	body.ss-archive .ssa-fab {
		position: fixed;
		z-index: 9990;
		left: 50%;
		bottom: calc(72px + env(safe-area-inset-bottom));
		display: flex;
		align-items: center;
		padding: 4px;
		background: var(--ssa-ink);
		border-radius: 999px;
		box-shadow: 0 10px 30px -8px rgba(16, 24, 40, .45);
		transform: translate(-50%, 140%);
		opacity: 0;
		pointer-events: none;
		transition: transform .3s var(--ssa-ease), opacity .3s;
	}
	body.ss-archive.ssa-fab-on:not(.ssa-open-filter):not(.ssa-open-sort) .ssa-fab {
		transform: translate(-50%, 0);
		opacity: 1;
		pointer-events: auto;
	}
	body.ss-archive .ssa-fab button {
		display: inline-flex;
		align-items: center;
		gap: 6px;
		height: 40px;
		padding: 0 16px;
		background: none;
		border: 0;
		color: #fff;
		font: inherit;
		font-size: 13px;
		font-weight: 700;
		white-space: nowrap;
		cursor: pointer;
	}
	body.ss-archive .ssa-fab i { width: 1px; height: 20px; background: rgba(255, 255, 255, .25); }

	/* پس‌زمینه تیره */
	body.ss-archive .ssa-backdrop {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 99990;
		background: rgba(16, 24, 40, .45);
		opacity: 0;
		visibility: hidden;
		transition: opacity .3s, visibility 0s .3s;
	}
	body.ss-archive.ssa-open-filter .ssa-backdrop,
	body.ss-archive.ssa-open-sort .ssa-backdrop {
		opacity: 1;
		visibility: visible;
		transition: opacity .3s;
	}

	/* کشوی فیلتر (همان ستون سایدبار) */
	body.ss-archive .ssa-drawer {
		box-sizing: border-box !important;
		position: fixed !important;
		top: 8vh !important;
		right: 0 !important;
		left: 0 !important;
		bottom: 0 !important;
		z-index: 99991 !important;
		width: 100% !important;
		max-width: 100% !important;
		height: auto !important;
		margin: 0 !important;
		padding: 66px 12px calc(96px + env(safe-area-inset-bottom)) !important;
		background: var(--ssa-tint) !important;
		border-radius: 20px 20px 0 0;
		overflow-y: auto !important;
		overscroll-behavior: contain;
		-webkit-overflow-scrolling: touch;
		transform: translateY(105%);
		visibility: hidden;
		transition: transform .35s var(--ssa-ease), visibility 0s .35s;
	}
	body.ss-archive.ssa-open-filter .ssa-drawer {
		transform: none;
		visibility: visible;
		transition: transform .35s var(--ssa-ease);
	}
	body.ss-archive .ssa-drawer .elementor-widget-wrap,
	body.ss-archive .ssa-drawer .e-con-inner { padding: 0 !important; }
	body.ss-archive .ssa-drawer .widget { margin-bottom: 10px; padding: 14px; }

	body.ss-archive .ssa-drawer-head {
		display: flex;
		align-items: center;
		gap: 12px;
		position: fixed;
		z-index: 99992;
		top: 8vh;
		right: 0;
		left: 0;
		height: 58px;
		padding: 0 16px;
		background: #fff;
		border-radius: 20px 20px 0 0;
		border-bottom: 1px solid var(--ssa-line);
		font-size: 15px;
		color: var(--ssa-ink);
	}
	body.ss-archive .ssa-drawer-head strong { font-weight: 800; }
	body.ss-archive .ssa-clear { margin-inline-start: auto; font-size: 13px; font-weight: 700; color: var(--ssa-primary); }
	body.ss-archive .ssa-x {
		width: 36px;
		height: 36px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		padding: 0;
		background: var(--ssa-tint);
		border: 0;
		border-radius: 50%;
		color: var(--ssa-ink);
		cursor: pointer;
	}
	body.ss-archive .ssa-drawer-head .ssa-x { margin-inline-start: auto; }
	body.ss-archive .ssa-drawer-head .ssa-clear + .ssa-x { margin-inline-start: 0; }

	body.ss-archive .ssa-drawer-foot {
		display: block;
		position: fixed;
		z-index: 99992;
		right: 0;
		left: 0;
		bottom: 0;
		padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
		background: #fff;
		border-top: 1px solid var(--ssa-line);
		box-shadow: 0 -8px 24px -12px rgba(16, 24, 40, .15);
	}
	body.ss-archive .ssa-apply {
		width: 100%;
		height: 48px;
		background: var(--ssa-primary);
		border: 0;
		border-radius: 12px;
		color: #fff;
		font: inherit;
		font-size: 15px;
		font-weight: 800;
		cursor: pointer;
	}
	body.ss-archive .ssa-drawer-head,
	body.ss-archive .ssa-drawer-foot {
		transform: translateY(100vh);
		visibility: hidden;
		transition: transform .35s var(--ssa-ease), visibility 0s .35s;
	}
	body.ss-archive.ssa-open-filter .ssa-drawer-head,
	body.ss-archive.ssa-open-filter .ssa-drawer-foot {
		transform: none;
		visibility: visible;
		transition: transform .35s var(--ssa-ease);
	}

	/* برگه مرتب‌سازی */
	body.ss-archive .ssa-sort-sheet {
		display: block;
		position: fixed;
		z-index: 99993;
		right: 0;
		left: 0;
		bottom: 0;
		padding: 0 0 env(safe-area-inset-bottom);
		background: #fff;
		border-radius: 20px 20px 0 0;
		transform: translateY(105%);
		visibility: hidden;
		transition: transform .3s var(--ssa-ease), visibility 0s .3s;
	}
	body.ss-archive.ssa-open-sort .ssa-sort-sheet {
		transform: none;
		visibility: visible;
		transition: transform .3s var(--ssa-ease);
	}
	body.ss-archive .ssa-sheet-head {
		display: flex;
		align-items: center;
		justify-content: space-between;
		height: 58px;
		padding: 0 16px;
		border-bottom: 1px solid var(--ssa-line);
		font-size: 15px;
		color: var(--ssa-ink);
	}
	body.ss-archive .ssa-sheet-head strong { font-weight: 800; }
	body.ss-archive .ssa-sort-sheet ul { margin: 0; padding: 6px 0 10px; list-style: none; }
	body.ss-archive .ssa-sort-sheet li { margin: 0; }
	body.ss-archive .ssa-sort-sheet a {
		display: flex;
		align-items: center;
		justify-content: space-between;
		height: 52px;
		padding: 0 20px;
		font-size: 14px;
		color: var(--ssa-text);
		border-bottom: 1px solid #f3f4f6;
	}
	body.ss-archive .ssa-sort-sheet li:last-child a { border-bottom: 0; }
	body.ss-archive .ssa-sort-sheet a.is-active { color: var(--ssa-primary); font-weight: 800; }
}

@media (prefers-reduced-motion: reduce) {
	body.ss-archive .ssa-drawer,
	body.ss-archive .ssa-sort-sheet,
	body.ss-archive .ssa-fab,
	body.ss-archive .ssa-drawer-head,
	body.ss-archive .ssa-drawer-foot { transition: none !important; }
}

/* =====================================================================
   v1.3 — فیلتر قیمت کاربردی (بازه‌های آماده + ورود عدد)
   ===================================================================== */
body.ss-archive .ssa-price-on .price_slider,
body.ss-archive .ssa-price-on .ui-slider,
body.ss-archive .ssa-price-on .price_label,
body.ss-archive .ssa-price-on .price_slider_amount > .button,
body.ss-archive .ssa-price-on .price_slider_amount button[type="submit"] { display: none !important; }
body.ss-archive .ssa-price-on .price_slider_amount { margin: 0; }

body.ss-archive .ssa-price { display: flex; flex-direction: column; gap: 12px; }
body.ss-archive .ssa-pchips { display: flex; flex-wrap: wrap; gap: 6px; }
body.ss-archive .ssa-pchip {
	height: 34px;
	padding: 0 12px;
	background: #fff;
	border: 1px solid var(--ssa-line);
	border-radius: 999px;
	font: inherit;
	font-size: 12px;
	font-weight: 600;
	color: var(--ssa-text);
	cursor: pointer;
	transition: border-color .2s, color .2s, background .2s;
}
body.ss-archive .ssa-pchip:hover { border-color: #d5d8df; color: var(--ssa-ink); }
body.ss-archive .ssa-pchip.is-active {
	background: var(--ssa-primary-soft);
	border-color: var(--ssa-primary);
	color: var(--ssa-primary);
}
body.ss-archive .ssa-prange { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
body.ss-archive .ssa-prange label { display: flex; flex-direction: column; gap: 4px; margin: 0; min-width: 0; }
body.ss-archive .ssa-prange label > span { font-size: 12px; color: var(--ssa-muted); }
body.ss-archive .ssa-prange input {
	width: 100%;
	height: 42px;
	padding: 0 10px;
	background: var(--ssa-tint);
	border: 1px solid transparent;
	border-radius: var(--ssa-radius-sm);
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	color: var(--ssa-ink);
	direction: ltr;
	text-align: right;
	box-sizing: border-box;
}
body.ss-archive .ssa-prange input:focus { outline: 0; background: #fff; border-color: var(--ssa-primary); }
body.ss-archive .ssa-prange small { min-height: 16px; font-size: 11px; color: var(--ssa-muted); }
body.ss-archive .ssa-pactions { display: flex; gap: 8px; }
body.ss-archive .ssa-papply {
	flex: 1;
	height: 40px;
	background: var(--ssa-ink);
	border: 0;
	border-radius: var(--ssa-radius-sm);
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	color: #fff;
	cursor: pointer;
	transition: background .2s;
}
body.ss-archive .ssa-papply:hover { background: var(--ssa-primary); }
body.ss-archive .ssa-preset {
	height: 40px;
	padding: 0 14px;
	background: var(--ssa-tint);
	border: 0;
	border-radius: var(--ssa-radius-sm);
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	color: var(--ssa-text);
	cursor: pointer;
}

@media (max-width: 1024px) {
	body.ss-archive .ssa-empty-m { display: none !important; }
	body.ss-archive .wd-products-per-page { display: none !important; }
}

/* متن سئو: تیتر و لیست */
body.ss-archive .ssa-seo h2 { margin: 18px 0 8px !important; font-size: 17px !important; font-weight: 800 !important; line-height: 1.7; color: var(--ssa-ink) !important; }
body.ss-archive .ssa-seo h2:first-child { margin-top: 0 !important; }
body.ss-archive .ssa-seo ul { margin: 0 0 14px !important; padding: 0 20px 0 0 !important; list-style: none !important; }
body.ss-archive .ssa-seo li { position: relative; margin: 0 0 4px !important; padding: 0 16px 0 0; }
body.ss-archive .ssa-seo li::before {
	content: ""; position: absolute; top: .85em; right: 0; width: 6px; height: 6px;
	border-radius: 50%; background: var(--ssa-primary);
}
body.ss-archive .ssa-seo p:empty, body.ss-archive .ssa-seo br + br { display: none; }
