/* اجزای نمایشی افزونه مستقل از شبکه محصولات وودمارت هستند. */
.wcsc-sections,
.wcsc-sections *,
.wcsc-sections *::before,
.wcsc-sections *::after { box-sizing: border-box; }
.wcsc-purchase,
.wcsc-purchase * { box-sizing: border-box; }

.wcsc-sections {
	position: relative; display: grid; gap: 34px;
	width: 100%; max-width: 100%; min-width: 0;
	margin: 24px 0 40px; overflow: hidden;
	transition: opacity .2s ease;
	--wcsc-gap: 20px;
}
.wcsc-sections.is-filtering { pointer-events: none; opacity: .48; }
.wcsc-sections.is-filtering::after {
	position: absolute; top: 150px; left: 50%; z-index: 20;
	width: 36px; height: 36px; margin-left: -18px;
	border: 3px solid rgba(0,0,0,.14); border-top-color: var(--wd-primary-color,#111);
	border-radius: 50%; content: ""; animation: wcsc-spin .7s linear infinite;
}
.wcsc-sectioned-category .maoa { display: none !important; }

.wcsc-category-nav,
.wcsc-section {
	width: 100%; max-width: 100%; min-width: 0; overflow: hidden;
	border: 1px solid rgba(0,0,0,.08); border-radius: 16px;
	background: var(--bgcolor-white,#fff); box-shadow: 0 8px 28px rgba(0,0,0,.035);
}
.wcsc-category-nav { padding: 20px 20px 17px; background: linear-gradient(135deg,rgba(0,0,0,.018),rgba(0,0,0,.045)); }
.wcsc-category-nav__top { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; min-width: 0; margin-bottom: 16px; }
.wcsc-category-nav__top strong { font-size: 18px; line-height: 1.5; }
.wcsc-category-nav__top span { color: var(--color-gray-500,#777); font-size: 12px; }
.wcsc-category-nav__track {
	display: flex; gap: 14px; width: 100%; max-width: 100%; min-width: 0;
	padding: 2px 1px 13px; overflow-x: auto; overflow-y: hidden;
	scroll-behavior: smooth; scroll-snap-type: x proximity;
	scrollbar-color: var(--wd-primary-color,#777) rgba(0,0,0,.07); scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
}
.wcsc-category-nav__track::-webkit-scrollbar { height: 5px; }
.wcsc-category-nav__track::-webkit-scrollbar-track { border-radius: 20px; background: rgba(0,0,0,.07); }
.wcsc-category-nav__track::-webkit-scrollbar-thumb { border-radius: 20px; background: var(--wd-primary-color,#777); }
.wcsc-category-nav__item {
	display: flex; flex: 0 0 auto; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
	min-height: 118px; padding: 10px; border: 1px solid rgba(0,0,0,.08); border-radius: 14px;
	background: var(--bgcolor-white,#fff); color: var(--color-gray-800,#242424);
	box-shadow: 0 5px 18px rgba(0,0,0,.045); scroll-snap-align: start;
	text-align: center; text-decoration: none; transition: transform .2s ease,border-color .2s ease;
}
.wcsc-category-nav__item.has-image { width: 116px; }
.wcsc-category-nav__item.is-text-only { min-width: 150px; max-width: 210px; padding: 16px 22px; }
.wcsc-category-nav__item:hover { border-color: var(--wd-primary-color,#777); color: var(--wd-primary-color,#111); transform: translateY(-2px); }
.wcsc-category-nav__image { display: block; width: 76px; height: 76px; overflow: hidden; border-radius: 12px; background: rgba(0,0,0,.04); }
.wcsc-category-nav__thumbnail { display: block; width: 100% !important; height: 100% !important; object-fit: cover; }
.wcsc-category-nav__name { display: -webkit-box; overflow: hidden; font-size: 13px; font-weight: 700; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }

.wcsc-section { position: relative; padding: 24px; scroll-margin-top: 120px; }
.wcsc-section__header {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	width: 100%; min-width: 0; margin-bottom: 22px; padding-bottom: 14px;
	border-bottom: 1px solid rgba(0,0,0,.07);
}
.wcsc-section__title { min-width: 0; margin: 0; font-size: clamp(20px,2vw,26px); line-height: 1.5; overflow-wrap: anywhere; }
.wcsc-section__count { white-space: nowrap; color: var(--color-gray-500,#777); font-size: .72em; font-weight: 500; }
.wcsc-section__actions,
.wcsc-carousel-controls { display: flex; flex: 0 0 auto; align-items: center; gap: 9px; }
.wcsc-section__category-link { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 7px; white-space: nowrap; font-size: 14px; font-weight: 600; text-decoration: none; }
.wcsc-carousel-button {
	display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px;
	padding: 0; border: 1px solid rgba(0,0,0,.1); border-radius: 50%;
	background: #fff; color: #242424; font-size: 18px; line-height: 1; cursor: pointer;
}
.wcsc-carousel-button:hover { border-color: var(--wcsc-purchase-color,#1f7a4d); background: var(--wcsc-purchase-color,#1f7a4d); color: #fff; }
.wcsc-carousel-button:disabled { cursor: default; opacity: .32; }

.wcsc-products-wrap { width: 100%; max-width: 100%; min-width: 0; overflow: hidden; }
.wcsc-products-wrap > .wcsc-products {
	display: flex !important; flex-flow: row nowrap !important; align-items: stretch;
	gap: var(--wcsc-gap) !important; width: 100% !important; max-width: 100% !important; min-width: 0 !important;
	margin: 0 !important; padding: 3px 2px 12px !important; list-style: none !important;
	direction: rtl; overflow-x: auto !important; overflow-y: hidden !important;
	overscroll-behavior-x: contain; scroll-behavior: smooth; scroll-snap-type: x mandatory;
	scrollbar-width: none; touch-action: pan-y; -webkit-overflow-scrolling: touch;
	user-select: none; -webkit-user-select: none; cursor: grab;
}
.wcsc-products-wrap > .wcsc-products::-webkit-scrollbar { display: none; }
.wcsc-products-wrap > .wcsc-products.is-dragging { cursor: grabbing; scroll-behavior: auto; scroll-snap-type: none; }
.wcsc-products-wrap > .wcsc-products > .wcsc-product-card {
	display: flex !important; float: none !important; clear: none !important;
	flex: 0 0 calc((100% - 100px)/6) !important;
	flex-direction: column;
	width: calc((100% - 100px)/6) !important;
	max-width: calc((100% - 100px)/6) !important;
	min-width: 0 !important; height: auto; margin: 0 !important; padding: 0 !important;
	overflow: hidden !important; border: 1px solid rgba(20,30,25,.09) !important;
	border-radius: 16px !important; background: #fff !important;
	box-shadow: 0 6px 22px rgba(20,30,25,.055) !important;
	direction: rtl; scroll-snap-align: start; scroll-snap-stop: always;
	transition: transform .22s ease,box-shadow .22s ease,border-color .22s ease;
}
.wcsc-product-card__image { position: relative; display: block; width: 100%; aspect-ratio: 1/1; overflow: hidden; background: #f6f6f6; }
.wcsc-product-card__image img { display: block !important; width: 100% !important; max-width: 100% !important; height: 100% !important; margin: 0 !important; object-fit: cover; pointer-events: none; }
.wcsc-product-card__body { display: flex; flex: 1; flex-direction: column; min-width: 0; padding: 11px 12px 12px; }
.wcsc-product-card__title { display: -webkit-box; min-height: 44px; margin: 0 0 7px; overflow: hidden; font-size: 13px; line-height: 1.7; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.wcsc-product-card__title a { color: inherit; text-decoration: none; }
.wcsc-product-card__price { min-height: 26px; margin-bottom: 9px; font-size: 13px; font-weight: 700; }
.wcsc-product-card .wd-buttons,.wcsc-product-card .woodmart-buttons,.wcsc-product-card .wd-add-btn,
.wcsc-product-card .wd-bottom-actions,.wcsc-product-card .product-actions,.wcsc-product-card .wd-action-btn,
.wcsc-product-card .quick-view,.wcsc-product-card .wd-wishlist-btn,.wcsc-product-card .wd-compare-btn,
.wcsc-product-card .yith-wcwl-add-to-wishlist,.wcsc-product-card .tinv-wraper,.wcsc-product-card .woosw-btn,
.wcsc-product-card .woosc-btn { display: none !important; visibility: hidden !important; }

.wcsc-purchase { width: 100%; margin-top: auto; direction: ltr; }
.wcsc-purchase--loop { margin-top: 10px; }
.product-element-bottom > .wcsc-purchase--woodmart,
.wd-product-content > .wcsc-purchase--woodmart,
.wcsc-purchase--elementor {
	position: relative !important;
	z-index: 2;
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
	transform: none !important;
}
.wcsc-purchase-hydrated .add_to_cart_button,
.wcsc-purchase-hydrated .added_to_cart,
.wcsc-purchase-hydrated .wd-add-btn,
.wcsc-purchase-hydrated a[class*="product_type_"]:not(.wcsc-product-link-button) {
	display: none !important;
}
.wcsc-buy-button,.wcsc-live-quantity,.wcsc-product-link-button {
	width: 100%; height: 34px !important; min-height: 34px !important; margin: 0 !important;
	border: 0 !important; border-radius: 9px !important; box-shadow: none !important;
}
.wcsc-buy-button,.wcsc-product-link-button {
	display: inline-flex !important; align-items: center; justify-content: center; padding: 0 9px !important;
	background: var(--wcsc-purchase-color,#1f7a4d) !important; color: #fff !important;
	font-size: 12px !important; font-weight: 700 !important; text-align: center; text-decoration: none !important; cursor: pointer;
}
.wcsc-buy-button[hidden],.wcsc-live-quantity[hidden] { display: none !important; }
.wcsc-purchase.is-loading { opacity: .65; }
.wcsc-purchase.is-syncing .wcsc-live-quantity {
	box-shadow: inset 0 0 0 1px rgba(31,122,77,.28) !important;
}
.wcsc-live-quantity { display: grid; grid-template-columns: 34px minmax(0,1fr) 34px; overflow: hidden; border: 1px solid var(--wcsc-purchase-color,#1f7a4d) !important; background: #fff; }
.wcsc-quantity__button { height: 32px !important; min-height: 32px !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: var(--wcsc-purchase-color,#1f7a4d) !important; color: #fff !important; font-size: 18px !important; line-height: 1 !important; cursor: pointer; }
.wcsc-quantity__value { display: flex; align-items: center; justify-content: center; min-width: 0; border-right: 1px solid rgba(0,0,0,.08); border-left: 1px solid rgba(0,0,0,.08); background: #fff; font-size: 12px; font-weight: 700; }

/* کنترل تعداد یکپارچه در صفحه محصول، سبد خرید و سبد خرید کناری وودمارت. */
.wcsc-native-quantity {
	display: grid !important; grid-template-columns: 34px minmax(0,44px) 34px !important;
	width: 112px !important; min-width: 112px !important; max-width: 100% !important;
	height: 34px !important; min-height: 34px !important; margin: 0 !important; padding: 0 !important;
	overflow: hidden !important; border: 1px solid rgba(0,0,0,.12) !important;
	border-radius: 9px !important; background: #fff !important; box-shadow: none !important;
	direction: ltr !important; isolation: isolate;
}
.wcsc-native-quantity .wcsc-native-quantity__minus,
.wcsc-native-quantity .wcsc-native-quantity__plus {
	position: static !important; display: flex !important; align-items: center !important; justify-content: center !important;
	width: 34px !important; min-width: 34px !important; height: 32px !important; min-height: 32px !important;
	margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important;
	background: var(--wcsc-purchase-color,#1f7a4d) !important; color: #fff !important; box-shadow: none !important;
	font-size: 18px !important; font-weight: 500 !important; line-height: 1 !important; cursor: pointer !important;
	transform: none !important; opacity: 1 !important;
}
.wcsc-native-quantity .wcsc-native-quantity__minus { grid-column: 1 !important; grid-row: 1 !important; }
.wcsc-native-quantity .wcsc-native-quantity__plus { grid-column: 3 !important; grid-row: 1 !important; }
.wcsc-native-quantity .wcsc-native-quantity__input {
	grid-column: 2 !important; grid-row: 1 !important; align-self: stretch !important;
	width: 44px !important; min-width: 0 !important; max-width: 44px !important; height: 32px !important; min-height: 32px !important;
	margin: 0 !important; padding: 0 2px !important; border: 0 !important;
	border-right: 1px solid rgba(0,0,0,.08) !important; border-left: 1px solid rgba(0,0,0,.08) !important;
	border-radius: 0 !important; background: #fff !important; color: #333 !important; box-shadow: none !important;
	font-size: 12px !important; font-weight: 700 !important; line-height: 32px !important; text-align: center !important;
	-moz-appearance: textfield;
}
.wcsc-native-quantity .wcsc-native-quantity__input::-webkit-inner-spin-button,
.wcsc-native-quantity .wcsc-native-quantity__input::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.wcsc-native-quantity .wcsc-native-quantity__minus:hover,
.wcsc-native-quantity .wcsc-native-quantity__plus:hover { background: var(--wcsc-purchase-color,#1f7a4d) !important; color: #fff !important; filter: brightness(.92); }
.wcsc-native-quantity .wcsc-native-quantity__minus:disabled,
.wcsc-native-quantity .wcsc-native-quantity__plus:disabled { cursor: default !important; opacity: .35 !important; }
.cart-widget-side .wcsc-native-quantity,
.woocommerce-mini-cart .wcsc-native-quantity { width: 104px !important; min-width: 104px !important; grid-template-columns: 32px minmax(0,40px) 32px !important; }
.cart-widget-side .wcsc-native-quantity .wcsc-native-quantity__minus,
.cart-widget-side .wcsc-native-quantity .wcsc-native-quantity__plus,
.woocommerce-mini-cart .wcsc-native-quantity .wcsc-native-quantity__minus,
.woocommerce-mini-cart .wcsc-native-quantity .wcsc-native-quantity__plus { width: 32px !important; min-width: 32px !important; }
.cart-widget-side .wcsc-native-quantity .wcsc-native-quantity__input,
.woocommerce-mini-cart .wcsc-native-quantity .wcsc-native-quantity__input { width: 40px !important; max-width: 40px !important; }

@keyframes wcsc-spin { to { transform: rotate(360deg); } }
@media (min-width:768px) and (max-width:1024px) {
	.wcsc-sections { --wcsc-gap: 14px; }
	.wcsc-products-wrap > .wcsc-products > .wcsc-product-card {
		flex-basis: calc((100% - 28px)/3) !important;
		width: calc((100% - 28px)/3) !important;
		max-width: calc((100% - 28px)/3) !important;
	}
}
@media (max-width:767px) {
	.wcsc-sections { gap: 22px; width: 100% !important; max-width: 100% !important; margin-top: 16px; --wcsc-gap: 10px; }
	.wcsc-products-wrap > .wcsc-products > .wcsc-product-card {
		flex-basis: calc((100% - 10px)/2) !important;
		width: calc((100% - 10px)/2) !important;
		max-width: calc((100% - 10px)/2) !important;
	}
	.wcsc-category-nav { padding: 15px 12px 12px; border-radius: 12px; }
	.wcsc-category-nav__top { display: block; margin-bottom: 12px; }
	.wcsc-category-nav__top strong { display: block; font-size: 15px; }
	.wcsc-category-nav__top span { display: block; margin-top: 2px; font-size: 11px; }
	.wcsc-category-nav__track { gap: 10px; padding-bottom: 10px; }
	.wcsc-category-nav__item { min-height: 102px; border-radius: 11px; }
	.wcsc-category-nav__item.has-image { width: 98px; }
	.wcsc-category-nav__item.is-text-only { min-width: 128px; max-width: 170px; padding: 12px 15px; }
	.wcsc-category-nav__image { width: 62px; height: 62px; border-radius: 10px; }
	.wcsc-category-nav__name { font-size: 12px; }
	.wcsc-section { padding: 14px 10px; border-radius: 12px; }
	.wcsc-section__header { flex-wrap: wrap; align-items: flex-start; gap: 9px 12px; margin-bottom: 16px; }
	.wcsc-section__title { flex: 1 1 100%; width: 100%; font-size: 18px; }
	.wcsc-section__actions { width: 100%; justify-content: space-between; }
	.wcsc-section__category-link { margin-inline-start: auto; font-size: 12px; }
	.wcsc-carousel-button { width: 32px; height: 32px; }
	.wcsc-product-card__body { padding: 9px 8px 10px; }
	.wcsc-product-card__title { min-height: 41px; font-size: 12px; }
	.wcsc-product-card__price { overflow-wrap: anywhere; font-size: 11px; }
	.wcsc-buy-button,.wcsc-product-link-button { font-size: 11px !important; }
}
@media (max-width:360px) {
	.wcsc-sections { --wcsc-gap: 8px; }
	.wcsc-products-wrap > .wcsc-products > .wcsc-product-card {
		flex-basis: calc((100% - 8px)/2) !important;
		width: calc((100% - 8px)/2) !important;
		max-width: calc((100% - 8px)/2) !important;
	}
	.wcsc-section { padding-inline: 8px; }
	.wcsc-live-quantity { grid-template-columns: 29px minmax(0,1fr) 29px; }
}
