/**
 * ست پوشاک — استایل‌ها (سازگار با فلت‌سام و راست‌چین)
 * سبک پیش‌فرض: «جمع‌وجور» (طرح ۵). سبک‌های «مینیمال» و «کارتی» از تنظیمات.
 * طراحی و توسعه: @a.alireza.74 — https://www.instagram.com/a.alireza.74/
 */

.setposhak-form,
.setposhak-complete {
	--sp-paper: #fffdf9;
	--sp-sand: #efe5d8;
	--sp-gold: #b08a4f;
	--sp-accent: var(--primary-color, #446084);
	--sp-text: currentColor;
	--sp-line: rgba(0, 0, 0, 0.08);
	--sp-muted: #888;
	--sp-success: #2e7d32;
	--sp-danger: #c62828;
	--sp-radius: 6px;
}

.setposhak-form input[type="checkbox"],
.setposhak-complete input[type="checkbox"] {
	accent-color: var(--sp-accent);
}

.setposhak-visually-hidden {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.setposhak-from {
	font-size: 0.8em;
	font-weight: normal;
	opacity: 0.7;
}

.setposhak-message {
	margin: 8px 0 0;
	font-size: 0.85em;
	color: var(--sp-danger);
}

/* ==================================================================
 * فرم ست
 * ================================================================== */

.setposhak-form {
	margin-bottom: 1.5em;
}

.setposhak-items {
	display: flex;
	flex-direction: column;
	margin-bottom: 0.5em;
}

.setposhak-item {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	padding: 14px 0;
	border-bottom: 1px solid var(--sp-line);
	transition: opacity 0.2s;
}

.setposhak-item:first-child {
	border-top: 1px solid var(--sp-line);
}

.setposhak-item.is-excluded {
	opacity: 0.4;
}

/* قطعهٔ ناموجود: واضح علامت بخورد، ولی متنش کم‌رنگ و ناخوانا نشود */
.setposhak-item.is-out-of-stock,
.setposhak-item.is-out-of-stock.is-excluded {
	opacity: 1;
}

.setposhak-item__media {
	position: relative;
}

.setposhak-item.is-out-of-stock .setposhak-item__media img {
	filter: grayscale(1);
	opacity: 0.45;
}

.setposhak-item.is-out-of-stock .setposhak-item__title a,
.setposhak-item.is-out-of-stock .setposhak-item__price {
	color: var(--sp-muted);
}

.setposhak-item__badge {
	position: absolute;
	inset-inline: 0;
	top: 50%;
	transform: translateY(-50%);
	padding: 2px 0;
	font-size: 0.75em;
	font-weight: bold;
	text-align: center;
	color: #fff;
	background: var(--sp-danger, #c62828);
}

.setposhak-oos-tag {
	display: inline-block;
	margin-inline-start: 6px;
	padding: 0 8px;
	font-size: 0.72em;
	font-weight: bold;
	line-height: 1.8;
	vertical-align: middle;
	color: #fff;
	background: var(--sp-danger, #c62828);
	border-radius: 99px;
}

.setposhak-oos-note {
	margin: 6px 0 0;
	font-size: 0.82em;
	color: var(--sp-danger);
}

.setposhak-set-oos {
	color: var(--sp-danger);
	font-weight: bold;
}

.setposhak-item.is-missing .setposhak-swatch-group__label,
.setposhak-item.is-missing .setposhak-item__select > label {
	color: var(--sp-danger);
}

.setposhak-item__media {
	flex: 0 0 76px;
	display: block;
}

.setposhak-item__media img {
	width: 76px;
	height: auto;
	border-radius: var(--sp-radius);
	display: block;
}

.setposhak-item__body {
	flex: 1 1 auto;
	min-width: 0;
}

.setposhak-item__head {
	display: flex;
	align-items: center;
	gap: 8px;
}

.setposhak-item__head .setposhak-item__title {
	flex: 1 1 auto;
	min-width: 0;
}

.setposhak-item__toggle {
	display: inline-flex;
	margin: 0;
	cursor: pointer;
}

.setposhak-item__toggle input {
	width: 17px;
	height: 17px;
	margin: 0;
	cursor: pointer;
}

.setposhak-item__title {
	margin: 0;
	font-size: 0.95em;
	line-height: 1.5;
}

.setposhak-item__title a {
	color: inherit;
}

.setposhak-item__price {
	flex: 0 0 auto;
	margin: 0;
	font-size: 0.88em;
	white-space: nowrap;
}

.setposhak-item__price del {
	opacity: 0.55;
	font-size: 0.9em;
	margin-inline-end: 4px;
}

.setposhak-item__price ins {
	text-decoration: none;
	font-weight: bold;
}

/* قیمت ثابت: قیمت تک‌تک قطعه‌ها نمایش داده نمی‌شود */
.setposhak-form.is-fixed-price .setposhak-item__price {
	display: none;
}

/* ویژگی‌های کوتاه: هر خط یک نشانه */
.setposhak-form ul.setposhak-item__features {
	margin: 4px 0 0;
	padding: 0;
	list-style: none;
}

.setposhak-form ul.setposhak-item__features li {
	position: relative;
	margin: 0;
	padding-inline-start: 12px;
	font-size: 0.8em;
	line-height: 1.75;
	color: var(--sp-muted);
	list-style: none;
}

.setposhak-form ul.setposhak-item__features li::before {
	content: "";
	position: absolute;
	inset-inline-start: 1px;
	top: 0.8em;
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: currentColor;
}

.setposhak-item__desc {
	margin: 4px 0 0;
	font-size: 0.82em;
	line-height: 1.7;
	color: var(--sp-muted);
}

.setposhak-item__select {
	margin-top: 8px;
}

.setposhak-item__select > label {
	display: block;
	margin-bottom: 4px;
	font-size: 0.82em;
	font-weight: bold;
}

.setposhak-item__select select {
	max-width: 100%;
	margin: 0;
}

.setposhak-item .stock {
	margin: 6px 0 0;
	font-size: 0.82em;
}

.setposhak-item .stock.out-of-stock {
	color: var(--sp-danger);
}

/* ---------- بالای فهرست: توضیح و شمارنده ---------- */

.setposhak-intro {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 10px;
	font-size: 0.85em;
	color: var(--sp-muted);
}

.setposhak-intro__counter {
	flex: 0 0 auto;
	font-weight: bold;
	color: #1f2328;
}

/* ---------- «افزودن به ست» و «سایز ۴۸ · تغییر» ---------- */

.setposhak-item__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 8px;
}

.setposhak-item__actions:empty {
	display: none;
}

.setposhak-pick,
.setposhak-pick-badge,
.setposhak-pick-add,
.setposhak-size-summary {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	min-height: 32px;
	margin: 0;
	padding: 0 14px;
	font-family: inherit;
	font-size: 0.82em;
	line-height: 1;
	text-transform: none;
	letter-spacing: 0;
	border-radius: 99px;
	transition: background 0.15s, color 0.15s;
}

/* در ست: «✓ انتخاب شد» + «× برداشتن از ست» / بیرون از ست: «از ست برداشته شد» + «+ افزودن دوباره» */
.setposhak-pick-state {
	display: none;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.setposhak-item.is-picked .setposhak-pick-state--in,
.setposhak-item:not(.is-picked):not(.is-out-of-stock) .setposhak-pick-state--out {
	display: inline-flex;
}

.setposhak-pick-badge {
	font-weight: bold;
	color: #fff;
	background: var(--sp-accent);
	border: 1px solid var(--sp-accent);
}

.setposhak-pick-remove {
	min-height: 32px;
	margin: 0;
	padding: 0 2px;
	font-family: inherit;
	font-size: 0.8em;
	font-weight: normal;
	line-height: 1;
	text-transform: none;
	letter-spacing: 0;
	color: var(--sp-muted);
	background: transparent;
	border: 0;
	box-shadow: none;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.setposhak-pick-remove:hover {
	color: var(--sp-danger);
}

.setposhak-pick-removed {
	font-size: 0.82em;
	color: var(--sp-muted);
}

.setposhak-pick-add {
	font-weight: bold;
	color: var(--sp-accent);
	background: #fff;
	border: 1px solid var(--sp-accent);
	cursor: pointer;
}

/* «+ افزودن به ست» برای قطعه‌ای که هنوز انتخاب نشده؛ «+ افزودن دوباره» بعد از برداشتن. */
.setposhak-item:not(.is-untouched) .setposhak-pick-add__new,
.setposhak-item.is-untouched .setposhak-pick-add__again,
.setposhak-item.is-untouched .setposhak-pick-removed {
	display: none;
}

.setposhak-pick-add:hover {
	color: #fff;
	background: var(--sp-accent);
}

.setposhak-pick-remove:focus-visible,
.setposhak-pick-add:focus-visible {
	outline: 2px solid var(--sp-accent);
	outline-offset: 2px;
}

.setposhak-pick.is-unavailable {
	font-weight: normal;
	color: #6b7178;
	background: #f1f2f4;
	border: 1px solid #e3e5e8;
	cursor: not-allowed;
}

.setposhak-size-summary {
	color: #1f2328;
	background: #fff;
	border: 1px solid #c9cdd2;
}

.setposhak-size-summary[hidden] {
	display: none;
}

/* سایز انتخاب شد: انتخاب سایز بسته می‌شود تا «تغییر» زده شود */
.setposhak-item.is-size-set .setposhak-item__select {
	display: none;
}

/* قطعه‌ای که در ست نیست: انتخاب سایزش پنهان */
.setposhak-item.is-excluded .setposhak-item__select,
.setposhak-item.is-excluded .setposhak-size-summary,
.setposhak-item.is-excluded .setposhak-low-stock {
	display: none;
}

/* ---------- نوار پایین: قیمت کل و دکمهٔ خرید ---------- */

.setposhak-summary {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: 14px;
	padding: 16px;
	background: #f6f7f9;
	border-radius: 12px;
}

.setposhak-nudge {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 10px 12px;
	font-size: 0.85em;
	line-height: 1.7;
	background: #fff;
	border: 1px dashed var(--sp-accent);
	border-radius: 8px;
}

.setposhak-nudge[hidden] {
	display: none;
}

.setposhak-nudge__button {
	flex: 0 0 auto;
	min-height: 32px;
	margin: 0;
	padding: 0 12px;
	font-family: inherit;
	font-size: 0.95em;
	font-weight: bold;
	line-height: 1;
	text-transform: none;
	color: var(--sp-accent);
	background: #fff;
	border: 1px solid var(--sp-accent);
	border-radius: 99px;
	cursor: pointer;
}

.setposhak-total {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
}

.setposhak-total__info {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.setposhak-total__label {
	font-size: 0.85em;
	color: var(--sp-muted);
}

.setposhak-total__amount {
	font-size: 1.35em;
	font-weight: bold;
}

.setposhak-saving {
	font-size: 0.82em;
	color: var(--sp-success);
}

.setposhak-saving[hidden] {
	display: none;
}

.setposhak-saving__amount {
	font-weight: bold;
}

.setposhak-summary .setposhak-message {
	margin: 0;
}

.setposhak-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.setposhak-actions .quantity {
	margin: 0;
}

.setposhak-actions .single_add_to_cart_button {
	flex: 1 1 auto;
	min-height: 50px;
	margin: 0;
	border-radius: 10px;
}

.setposhak-actions .single_add_to_cart_button.disabled,
.setposhak-actions .single_add_to_cart_button:disabled {
	opacity: 1;
	color: #fff;
	background: #c9cdd2;
	border-color: #c9cdd2;
	cursor: not-allowed;
}

.setposhak-price-label {
	margin-inline-end: 4px;
	font-size: 0.65em;
	font-weight: normal;
	color: var(--sp-muted);
}

/* ==================================================================
 * دکمه‌های سایز / رنگ (Swatch)
 * الگو: Variation Swatches for WooCommerce و Swatches فلت‌سام
 * ================================================================== */

.setposhak-swatches {
	--sp-sw-w: var(--setposhak-sw-w, 30px);
	--sp-sw-h: var(--setposhak-sw-h, 30px);
	--sp-sw-font: var(--setposhak-sw-font, 13px);
	--sp-sw-radius: 6px;
	--sp-sw-border: rgba(0, 0, 0, 0.14);
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.setposhak-swatches--squared {
	--sp-sw-radius: 3px;
}

.setposhak-swatches--rounded {
	--sp-sw-radius: 6px;
}

.setposhak-swatches--circle {
	--sp-sw-radius: 999px;
}

.setposhak-swatch-group__label {
	margin-bottom: 2px;
	font-size: 0.8em;
	color: var(--sp-muted);
}

.setposhak-swatch-group__value {
	font-weight: bold;
	color: #222;
}

.setposhak-swatch-list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

/* دکمه‌های انتخاب، مینیمال. !important فقط برای ویژگی‌هایی که قالب (مثل فلت‌سام) روی همهٔ button ها می‌گذارد. */
.setposhak-swatches .setposhak-swatch {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: var(--sp-sw-w);
	height: var(--sp-sw-h) !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 11px !important;
	font-family: inherit;
	font-size: var(--sp-sw-font) !important;
	font-weight: normal;
	line-height: 1 !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
	color: #333;
	background: #fff;
	border: 1px solid var(--sp-sw-border);
	border-radius: var(--sp-sw-radius) !important;
	box-shadow: none !important;
	cursor: pointer;
	transition: border-color 0.15s, color 0.15s, background 0.15s, opacity 0.15s;
}

.setposhak-swatches .setposhak-swatch:hover {
	border-color: rgba(0, 0, 0, 0.35);
}

.setposhak-swatches .setposhak-swatch:focus-visible {
	outline: 2px solid var(--sp-accent);
	outline-offset: 2px;
}

/* انتخاب‌شده: حاشیهٔ رنگی نازک، متن و زمینهٔ کم‌رنگ هم‌رنگ سایت */
.setposhak-swatches .setposhak-swatch.is-selected {
	color: var(--sp-accent);
	background: rgba(68, 96, 132, 0.06);
	background: color-mix(in srgb, var(--sp-accent) 7%, #fff);
	border-color: var(--sp-accent);
	box-shadow: inset 0 0 0 0.5px var(--sp-accent) !important;
}

/* رنگ و عکس: دایرهٔ کوچک با فاصلهٔ سفید داخلی؛ انتخاب‌شده با حلقهٔ نازک */
.setposhak-swatches .setposhak-swatch--color,
.setposhak-swatches .setposhak-swatch--image {
	width: 26px;
	min-width: 26px;
	height: 26px !important;
	padding: 2px !important;
	border-radius: 999px !important;
	background: #fff;
}

.setposhak-swatches .setposhak-swatch--image {
	border-radius: 6px !important;
}

.setposhak-swatches .setposhak-swatch--color.is-selected,
.setposhak-swatches .setposhak-swatch--image.is-selected {
	background: #fff;
	border-color: var(--sp-accent);
	box-shadow: 0 0 0 1px var(--sp-accent) !important;
}

.setposhak-swatch__color,
.setposhak-swatch__image {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: inherit;
	object-fit: cover;
}

.setposhak-swatch--color .setposhak-swatch__color {
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

/* ناموجود یا با بقیهٔ انتخاب‌ها جور نیست */
.setposhak-swatch.is-disabled {
	opacity: 0.45;
}

.setposhak-swatch.is-out-of-stock {
	opacity: 0.35;
	cursor: not-allowed;
	overflow: hidden;
}

.setposhak-swatch.is-out-of-stock::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top left, transparent calc(50% - 0.5px), rgba(0, 0, 0, 0.55) 50%, transparent calc(50% + 0.5px));
	border-radius: inherit;
	pointer-events: none;
}

.setposhak-low-stock {
	display: inline-block;
	margin-top: 6px;
	font-size: 0.8em;
	color: #e65100;
}

/* ---------- راهنمای سایز ---------- */

.setposhak-size-guide {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	min-height: 32px;
	margin: 0;
	padding: 0 4px;
	font-family: inherit;
	font-size: 0.8em;
	font-weight: normal;
	line-height: 1;
	text-transform: none;
	letter-spacing: 0;
	color: var(--sp-accent);
	background: transparent;
	border: 0;
	box-shadow: none;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.setposhak-size-guide:focus-visible {
	outline: 2px solid var(--sp-accent);
	outline-offset: 2px;
}

.setposhak-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(0, 0, 0, 0.5);
}

.setposhak-modal[hidden] {
	display: none;
}

.setposhak-modal__box {
	max-width: min(720px, 100%);
	max-height: 100%;
	overflow: auto;
	padding: 14px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.setposhak-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 10px;
	font-size: 0.95em;
}

.setposhak-modal__close {
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	font-size: 22px;
	line-height: 1;
	color: #1f2328;
	background: #f1f2f4;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}

.setposhak-modal__image {
	display: block;
	max-width: 100%;
	height: auto;
	border-radius: 8px;
}

body.setposhak-modal-open {
	overflow: hidden;
}

/* ==================================================================
 * باکس «ستش رو هم ببین»
 * ================================================================== */

.setposhak-complete {
	clear: both;
	margin: 1.5em 0;
	padding-top: 1.2em;
	border-top: 1px solid var(--sp-line);
}

.setposhak-complete__title {
	margin: 0 0 12px;
	font-size: 1.05em;
}

/* ---------- ست پیشنهادی: خرید با هم ---------- */

.setposhak-together__rows {
	display: flex;
	flex-direction: column;
}

.setposhak-together__row {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 10px 0;
	transition: opacity 0.2s;
}

.setposhak-together__row + .setposhak-together__row {
	border-top: 1px solid var(--sp-line);
}

.setposhak-together__row.is-excluded {
	opacity: 0.4;
}

.setposhak-together__row.is-missing .setposhak-swatch-group__label,
.setposhak-together__row.is-missing .setposhak-item__select > label {
	color: var(--sp-danger);
}

.setposhak-together__check {
	margin: 0;
	padding-top: 18px;
	cursor: pointer;
}

.setposhak-together__check input {
	width: 17px;
	height: 17px;
	margin: 0;
	cursor: pointer;
}

.setposhak-together__media {
	flex: 0 0 56px;
}

.setposhak-together__media img {
	display: block;
	width: 56px;
	height: 56px;
	object-fit: cover;
	border-radius: var(--sp-radius);
}

.setposhak-together__body {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.setposhak-together__name {
	font-size: 0.9em;
	font-weight: bold;
	color: inherit;
}

.setposhak-together__badge {
	display: inline-block;
	margin-inline-end: 6px;
	font-size: 0.75em;
	font-weight: normal;
	color: var(--sp-accent);
}

.setposhak-together__price {
	font-size: 0.85em;
}

.setposhak-together .setposhak-item__select {
	margin-top: 6px;
}

.setposhak-together__footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: 8px;
	padding-top: 12px;
	border-top: 1px solid var(--sp-line);
}

.setposhak-together__total {
	display: flex;
	align-items: baseline;
	gap: 6px;
}

.setposhak-together__total-label {
	font-weight: bold;
}

.setposhak-together__amount {
	font-size: 1.15em;
	font-weight: bold;
}

.setposhak-together__button {
	margin: 0 !important;
}

.setposhak-together__button.disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* ==================================================================
 * سبک «جمع‌وجور» (پیش‌فرض): همهٔ قطعه‌ها در یک قاب، فشرده
 * ================================================================== */

.setposhak-style--compact .setposhak-items {
	margin-bottom: 0;
	border: 1px solid #e3e5e8;
	border-radius: 12px;
	overflow: hidden;
}

.setposhak-style--compact .setposhak-item,
.setposhak-style--compact .setposhak-item:first-child {
	gap: 12px;
	padding: 16px;
	border-top: 0;
	border-bottom: 1px solid #e9ebee;
	transition: background 0.2s;
}

.setposhak-style--compact .setposhak-item:last-child {
	border-bottom: 0;
}

.setposhak-style--compact .setposhak-item__media {
	flex-basis: 56px;
}

.setposhak-style--compact .setposhak-item__media img {
	width: 56px;
	height: 70px;
	object-fit: cover;
	border-radius: 8px;
}

.setposhak-style--compact .setposhak-item__select {
	margin-top: 10px;
}

.setposhak-style--compact .setposhak-swatches {
	gap: 6px;
}

/* ردیف انتخاب‌شده رنگ می‌گیرد (فقط وقتی مشتری خودش قطعه‌ها را انتخاب می‌کند) */
.setposhak-form.is-pickable .setposhak-item.is-picked {
	background: rgba(68, 96, 132, 0.07);
	background: color-mix(in srgb, var(--sp-accent) 7%, #fff);
}

.setposhak-form.is-pickable .setposhak-item.is-excluded:not(.is-out-of-stock) {
	opacity: 1;
	background: #fff;
}

.setposhak-style--compact .setposhak-item.is-out-of-stock {
	background: #f7f7f8;
}

.setposhak-complete.setposhak-style--compact {
	padding: 14px;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 10px;
}

/* ==================================================================
 * سبک «کارتی» (از تنظیمات)
 * ================================================================== */

.setposhak-style--card .setposhak-items {
	gap: 10px;
}

.setposhak-style--card .setposhak-item,
.setposhak-style--card .setposhak-item:first-child {
	padding: 12px;
	border: 1px solid var(--sp-line);
	border-radius: 8px;
	background: #fff;
}

.setposhak-style--card .setposhak-summary {
	padding: 12px 14px;
	border-radius: 8px;
	background: rgba(0, 0, 0, 0.03);
}

.setposhak-complete.setposhak-style--card {
	padding: 14px;
	border: 1px solid var(--sp-line);
	border-radius: 8px;
}

.setposhak-style--card .setposhak-together__rows {
	gap: 8px;
}

.setposhak-style--card .setposhak-together__row,
.setposhak-style--card .setposhak-together__row + .setposhak-together__row {
	padding: 8px;
	border: 1px solid var(--sp-line);
	border-radius: 8px;
	background: #fff;
}

/* ==================================================================
 * تب «جزئیات اقلام ست»
 * ================================================================== */

.setposhak-detail {
	padding: 1em 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.setposhak-detail:last-child {
	border-bottom: 0;
}

.setposhak-detail__head {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 0.75em;
}

.setposhak-detail__image img {
	display: block;
	width: 64px;
	height: auto;
	border-radius: 6px;
}

.setposhak-detail__title {
	margin: 0;
	font-size: 1.1em;
}

.setposhak-detail__title a {
	color: inherit;
}

.setposhak-detail__sku {
	font-size: 0.85em;
	color: #888;
}

/* ==================================================================
 * برچسب «ست N تکه» در فروشگاه
 * ================================================================== */

.setposhak-loop-badge {
	display: inline-block;
	margin: 2px 0 4px;
	padding: 1px 8px;
	font-size: 0.72em;
	color: var(--primary-color, #446084);
	border: 1px solid currentColor;
	border-radius: 99px;
}

/* ==================================================================
 * موبایل
 * ================================================================== */

@media (max-width: 549px) {
	.setposhak-item__media {
		flex-basis: 64px;
	}

	.setposhak-item__media img {
		width: 64px;
	}

	.setposhak-item__features.hide-on-mobile {
		display: none;
	}

	/* قیمت هر قطعه زیر نامش */
	.setposhak-item__head {
		flex-direction: column;
		align-items: flex-start;
		gap: 2px;
	}

	.setposhak-nudge {
		flex-direction: column;
		align-items: stretch;
	}

	.setposhak-intro {
		flex-direction: column;
		gap: 2px;
	}

	.setposhak-actions .single_add_to_cart_button {
		flex: 1 1 auto;
	}

	.setposhak-together__footer {
		flex-direction: column;
		align-items: stretch;
	}

	.setposhak-together__button {
		width: 100%;
		text-align: center;
	}
}

/* ---------- نوار خرید ثابت در موبایل ---------- */

.setposhak-sticky {
	display: none;
}

@media (max-width: 549px) {
	.setposhak-sticky {
		position: fixed;
		right: 0;
		bottom: 0;
		left: 0;
		z-index: 990;
		display: flex;
		align-items: center;
		gap: 12px;
		padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
		background: #fff;
		border-top: 1px solid var(--sp-line);
		box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
		transform: translateY(110%);
		visibility: hidden;
		transition: transform 0.2s ease, visibility 0.2s;
	}

	.setposhak-sticky.is-visible {
		transform: none;
		visibility: visible;
	}

	.setposhak-sticky[hidden] {
		display: none;
	}

	.setposhak-sticky__info {
		display: flex;
		flex: 1;
		flex-direction: column;
		min-width: 0;
		line-height: 1.4;
	}

	.setposhak-sticky__count {
		font-size: 0.75em;
		color: var(--sp-muted);
	}

	.setposhak-sticky__total {
		font-size: 0.95em;
		font-weight: bold;
		white-space: nowrap;
	}

	.setposhak-sticky__button {
		flex: none;
		min-height: 40px;
		margin: 0 !important;
		padding: 0 16px;
		white-space: nowrap;
	}

	.setposhak-sticky__button[disabled] {
		opacity: 0.45;
		cursor: not-allowed;
	}

	/* تا نوار روی پایین صفحه (مثلاً پانویس) را نپوشاند. */
	body.setposhak-sticky-on {
		padding-bottom: 72px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.setposhak-sticky {
		transition: none;
	}
}

/* ---------- ویرایش ست از سبد خرید ---------- */

.setposhak-edit-note {
	margin: 0 0 12px;
	padding: 8px 12px;
	font-size: 0.85em;
	border: 1px dashed var(--sp-accent);
	border-radius: var(--sp-radius);
	background: rgba(68, 96, 132, 0.06);
	background: color-mix(in srgb, var(--sp-accent) 6%, #fff);
}

.setposhak-edit-note a {
	margin-inline-start: 6px;
	font-weight: bold;
}

.setposhak-edit-link {
	display: inline-block;
	margin-inline-start: 8px;
	font-size: 0.8em;
	font-weight: normal;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ==================================================================
 * باکس‌های «ستش رو هم ببین» (F1 / F2 / F3) و «با این ست کن» (G1 / G2 / G3 / G4)
 * از نسخهٔ 1.11.0 — دو باکس جدا، کوچک و مرتب. اندازه‌ها بر اساس عرض خود باکس
 * تنظیم می‌شوند (container query)، چون باکس معمولاً در ستون باریک کنار عکس محصول است.
 * ================================================================== */

/* مبلغ‌ها: اندازه و رنگ از خود طرح، نه از استایل «قیمت محصول» قالب
   (قالب‌ها قیمت اصلی محصول را درشت می‌کنند و این‌جا از کادرها بیرون می‌زد). */
.setposhak-money {
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.setposhak-money .woocommerce-Price-amount,
.setposhak-money .woocommerce-Price-amount bdi,
.setposhak-money .woocommerce-Price-currencySymbol {
	font-size: inherit !important;
	font-weight: inherit !important;
	line-height: inherit !important;
	color: inherit !important;
}

.setposhak-box {
	container-type: inline-size;
}

.setposhak-box a:not(.button) {
	color: inherit;
	text-decoration: none;
}

.setposhak-complete.has-design {
	margin: 1.2em 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
}

.setposhak-complete.has-design + .setposhak-complete {
	margin-top: 14px;
}

.setposhak-complete.has-design a:focus-visible {
	outline: 2px solid var(--sp-accent);
	outline-offset: 2px;
	border-radius: 10px;
}

.setposhak-box img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
}

/* ---------- اجزای مشترک ---------- */

.setposhak-label {
	display: block;
	font-size: 0.72em;
	line-height: 1.4;
	color: var(--sp-muted);
}

.setposhak-name {
	overflow: hidden;
	font-size: 0.88em;
	font-weight: bold;
	line-height: 1.45;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.setposhak-name small {
	font-weight: normal;
	color: var(--sp-muted);
}

.setposhak-card {
	display: block;
	background: var(--sp-paper);
	border: 1px solid var(--sp-line);
	border-radius: 12px;
	transition: border-color 0.2s;
}

a.setposhak-card:hover,
.setposhak-card:has(> a:hover) {
	border-color: var(--sp-accent);
}

.setposhak-rows {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* برچسب قیمت: حاشیهٔ نازک و گوشهٔ کمی گرد؛ صرفه‌جویی زیر قیمت */
.setposhak-tag {
	display: inline-flex;
	flex-direction: column;
	padding: 3px 9px;
	border: 1px solid var(--sp-line);
	border-radius: 6px;
	line-height: 1.45;
	background: var(--sp-paper);
}

.setposhak-tag b {
	font-size: 0.82em;
	color: var(--sp-accent);
}

.setposhak-tag small {
	font-size: 0.66em;
	font-weight: bold;
	color: var(--sp-gold);
}

.setposhak-tag--soft {
	border-color: transparent;
	background: var(--sp-sand);
}

.setposhak-tag .setposhak-money del {
	font-size: 0.85em;
	opacity: 0.55;
}

.setposhak-tag .setposhak-money ins {
	text-decoration: none;
}

/* دکمهٔ کپسولی توخالی؛ با رفتن موس پر می‌شود */
.setposhak-btn {
	display: inline-block;
	padding: 1px 13px;
	border: 1px solid var(--sp-accent);
	border-radius: 999px;
	font-size: 0.72em;
	font-weight: bold;
	line-height: 1.75;
	color: var(--sp-accent);
	white-space: nowrap;
	transition: background 0.2s, color 0.2s;
}

a:hover .setposhak-btn {
	color: #fff;
	background: var(--sp-accent);
}

/* عکس قطعه‌ها روی هم */
.setposhak-stack {
	display: flex;
	flex: none;
}

.setposhak-stack__img,
.setposhak-stack__more {
	display: block;
	width: 36px;
	height: 36px;
	overflow: hidden;
	border: 2px solid var(--sp-paper);
	border-radius: 8px;
}

.setposhak-stack__img + .setposhak-stack__img,
.setposhak-stack__more {
	margin-inline-start: -12px;
}

.setposhak-stack__more {
	display: grid;
	place-items: center;
	font-size: 0.68em;
	font-weight: bold;
	color: #fff;
	background: var(--sp-accent);
}

/* عکس قطعه‌ها با «+» (F3) */
.setposhak-thumbs {
	display: flex;
	align-items: center;
	gap: 5px;
}

.setposhak-thumbs__img {
	display: block;
	flex: none;
	width: 40px;
	height: 40px;
	overflow: hidden;
	border-radius: 8px;
}

.setposhak-thumbs__img.is-current {
	outline: 1.5px solid var(--sp-accent);
	outline-offset: 2px;
}

.setposhak-thumbs__op {
	font-size: 0.85em;
	font-weight: 300;
	color: var(--sp-muted);
}

/* عکس «جفت»: همین محصول + محصول پیشنهادی */
.setposhak-pair {
	display: flex;
	flex: none;
	align-items: center;
}

.setposhak-pair__img {
	display: block;
	width: 36px;
	height: 36px;
	overflow: hidden;
	border-radius: 9px;
	box-shadow: 0 0 0 2px #fff;
}

.setposhak-pair__plus {
	position: relative;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 16px;
	height: 16px;
	margin-inline: -6px;
	border-radius: 50%;
	font-size: 0.62em;
	line-height: 1;
	color: #fff;
	background: var(--sp-accent);
	box-shadow: 0 0 0 2px #fff;
}

/* ---------- ردیف یک‌خطی: عکس | نام | برچسب قیمت | دکمه (F1، F2، G1، G2، G4) ---------- */

.setposhak-row {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto auto;
	grid-template-areas: "v t g b";
	align-items: center;
	gap: 12px;
	padding: 9px 14px;
}

.setposhak-row__v {
	grid-area: v;
}

.setposhak-row__t {
	display: flex;
	flex-direction: column;
	grid-area: t;
	min-width: 0;
}

.setposhak-row__g {
	grid-area: g;
}

.setposhak-row__b {
	grid-area: b;
}

.setposhak-row:hover .setposhak-name {
	color: var(--sp-accent);
}

/* باکس باریک: برچسب قیمت و دکمه در خط دوم */
@container (max-width: 480px) {
	.setposhak-row {
		grid-template-columns: auto minmax(0, 1fr) auto;
		grid-template-areas: "v t t" "v g b";
		row-gap: 6px;
	}

	.setposhak-row__g {
		justify-self: start;
	}
}

/* F2 / G4 — بدون کادر، فقط خط‌های نازک */
.setposhak-bare {
	border-block: 1px solid var(--sp-line);
}

.setposhak-bare .setposhak-row {
	padding-inline: 0;
}

.setposhak-bare .setposhak-row + .setposhak-row {
	border-top: 1px dashed var(--sp-line);
}

/* G2 — همه در یک کارت */
.setposhak-rows--joined .setposhak-row + .setposhak-row {
	border-top: 1px solid var(--sp-line);
}

/* ---------- F3 — عکس‌ها با «+» (پیش‌فرض) ---------- */

.setposhak-f3 {
	padding: 10px 14px;
}

.setposhak-f3__top {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 8px;
	margin-bottom: 8px;
}

.setposhak-f3__top .setposhak-label {
	display: inline;
}

.setposhak-f3__main {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 12px;
}

.setposhak-f3__end {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-inline-start: auto;
}

@container (max-width: 480px) {
	.setposhak-f3__end {
		width: 100%;
		margin-inline-start: 0;
		justify-content: space-between;
	}
}

/* ---------- G3 — کارت‌های کوچک کنار هم ---------- */

.setposhak-box--g3 .setposhak-label {
	margin-bottom: 6px;
}

.setposhak-g3 {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding-bottom: 2px;
	scroll-snap-type: x mandatory;
}

.setposhak-g3__card {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	scroll-snap-align: start;
}

.setposhak-g3__t {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 3px;
	min-width: 0;
}

.setposhak-g3__t .setposhak-name {
	max-width: 140px;
}

/* ---------- G4 — عنوان کناری ---------- */

.setposhak-g4 {
	display: grid;
	grid-template-columns: 84px minmax(0, 1fr);
	align-items: start;
}

.setposhak-g4 > .setposhak-label {
	padding-top: 16px;
}

@container (max-width: 480px) {
	.setposhak-g4 {
		grid-template-columns: 1fr;
	}

	.setposhak-g4 > .setposhak-label {
		padding: 0 0 4px;
	}
}

[dir="ltr"] .setposhak-pair__plus {
	direction: ltr;
}

@media (prefers-reduced-motion: reduce) {
	.setposhak-card,
	.setposhak-btn {
		transition: none;
	}
}

/* ---------- جایگاه باکس: دسکتاپ / موبایل (از تنظیمات) ---------- */

/* ستون‌های عکس و مشخصات فلت‌سام زیر ۸۵۰ پیکسل زیر هم می‌روند. */
@media (max-width: 849px) {
	.setposhak-place--desktop {
		display: none;
	}
}

@media (min-width: 850px) {
	.setposhak-place--mobile {
		display: none;
	}
}

/* زیر عکس محصول: کمی فاصله از پیام‌ها و عکس */
.setposhak-place--at-under_image {
	margin-top: 14px;
}

.setposhak-place--at-under_image .setposhak-complete.has-design:first-child {
	margin-top: 0;
}

/* بعد از دسته‌ها، داخل ستون مشخصات */
.setposhak-place--at-after_meta {
	margin-top: 12px;
}

.setposhak-place--at-after_meta .setposhak-complete.has-design:first-child {
	margin-top: 0;
}
