/* ---- Price ---- */
.wsw-price del { opacity: .7; margin-inline-end: .4em; }
.wsw-price ins { text-decoration: none; background: transparent; }

/* ---- Swatches ---- */
.wsw-attr { margin-bottom: 14px; }
.wsw-attr-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; font-weight: 600; }
.wsw-selected { font-weight: 400; opacity: .8; }
.wsw-reset { margin-inline-start: auto; font-size: .85em; text-decoration: underline; font-weight: 400; }
.wsw-options { display: flex; flex-wrap: wrap; gap: 10px; }

.wsw-opt { cursor: pointer; transition: all .15s ease; line-height: 1.2; }
.wsw-opt--color {
	width: 32px; height: 32px; padding: 0;
	border: 2px solid #ddd; border-radius: 50%;
	box-shadow: inset 0 0 0 2px #fff;
}
.wsw-opt--button {
	padding: 8px 16px; background: #fff; color: #222;
	border: 1px solid #ccc; border-radius: 4px;
}
.wsw-opt--button.is-active { background: #111; color: #fff; border-color: #111; }
.wsw-opt.is-disabled { opacity: .35; cursor: not-allowed; }
.wsw-opt.is-disabled.wsw-opt--button { text-decoration: line-through; }
.wsw-select { width: 100%; padding: 8px 12px; }

.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wsw-swatches .screen-reader-text { clip-path: inset(50%); }

/* ---- Button ---- */
.wsw-btn-wrap { display: flex; align-items: stretch; gap: 10px; }
.wsw-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 14px 28px; background: #111; color: #fff;
	border: 1px solid transparent; border-radius: 4px;
	cursor: pointer; transition: all .2s ease;
}
.wsw-btn.is-unavailable { opacity: .6; cursor: not-allowed; }
.wsw-btn.is-busy { opacity: .7; pointer-events: none; }
.wsw-btn-icon svg, .wsw-btn-icon i { width: 1em; height: 1em; fill: currentColor; }
/* ---- Quantity widget: − [ عدد ] + ---- */
.wsw-qtyw { display: flex; }
.wsw-qtyw .wsw-qty-box {
	display: inline-flex !important; flex-direction: row !important; flex-wrap: nowrap !important;
	align-items: stretch; direction: ltr; /* دکمه‌ها همیشه چپ و راست عدد */
	height: 48px; overflow: hidden; box-sizing: border-box;
	border: 1px solid #ccc; border-radius: 4px; background: #fff;
}
.wsw-qtyw .wsw-qty-box .wsw-qty-btn {
	display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
	width: 42px; height: auto; min-width: 0; margin: 0; padding: 0;
	background: #f3f3f3; color: #222; border: 0; border-radius: 0; box-shadow: none;
	font-size: 14px; line-height: 1; cursor: pointer; transition: background .15s ease, color .15s ease;
}
.wsw-qtyw .wsw-qty-box .wsw-qty-btn:hover { background: #e4e4e4; }
.wsw-qtyw .wsw-qty-btn svg { width: 1em; height: 1em; fill: currentColor; }
.wsw-qtyw .wsw-qty-box .wsw-qty {
	display: block; flex: 0 0 auto; width: 56px; height: auto; min-height: 0; margin: 0; padding: 0;
	text-align: center; background: transparent; color: inherit;
	border: 0; border-radius: 0; box-shadow: none; outline: 0;
	-moz-appearance: textfield; appearance: textfield;
}
.wsw-qty::-webkit-outer-spin-button,
.wsw-qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.wsw-msg { margin-top: 6px; font-size: .9em; min-height: 0; }

@keyframes wsw-shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.wsw-shake { animation: wsw-shake .4s; }

/* ---- Price prefix ---- */
.wsw-price-prefix { font-weight: 600; }
.wsw-price-prefix.is-block { display: block; }

.wsw-price-prefix.is-empty { display: none !important; }

/* ---- View cart link ---- */
.wsw-viewcart { display: none; text-decoration: underline; cursor: pointer; }
.wsw-viewcart.is-visible { display: inline-block; }

/* ---- Layout: دکمه، پیام و لینک سبد همیشه زیر هم ---- */
.wsw-button { display: flex !important; flex-direction: column; align-items: stretch; width: 100%; }
.wsw-button > .wsw-btn-wrap { display: flex; flex: 0 0 auto; width: 100%; box-sizing: border-box; }
.wsw-button > .wsw-msg,
.wsw-button > .wsw-viewcart-wrap { display: block; flex: 0 0 auto; width: 100%; box-sizing: border-box; clear: both; }
.wsw-button > .wsw-msg:empty { display: none; }

/* ---- Gallery ---- */
.wsw-gallery { display: flex; direction: ltr; gap: 10px; width: 100%; }
.wsw-gallery.pos-bottom, .wsw-gallery.pos-none { flex-direction: column; }
.wsw-gallery.pos-left { flex-direction: row-reverse; }   /* تصاویر کوچک سمت چپ */
.wsw-gallery.pos-right { flex-direction: row; }          /* تصاویر کوچک سمت راست */
.wsw-gallery .wsw-main { position: relative; overflow: hidden; flex: 1 1 auto; min-width: 0; }
.wsw-gallery .wsw-main-link { display: block; }
.wsw-gallery .wsw-main-img { display: block; width: 100%; height: auto; max-width: 100%; }
.wsw-gallery.has-fade .wsw-main-img { transition: opacity .18s ease; }
.wsw-gallery .wsw-thumbs { display: flex; gap: 8px; flex: 0 0 auto; position: relative; }
.wsw-gallery.pos-bottom .wsw-thumbs { flex-direction: row; overflow-x: auto; }
.wsw-gallery.pos-left .wsw-thumbs, .wsw-gallery.pos-right .wsw-thumbs { flex-direction: column; overflow-y: auto; }
.wsw-gallery .wsw-thumb {
	flex: 0 0 auto; width: 72px; height: 72px; padding: 0; margin: 0;
	background: #fff; border: 2px solid transparent; border-radius: 4px;
	cursor: pointer; overflow: hidden; transition: opacity .15s ease, border-color .15s ease;
}
.wsw-gallery .wsw-thumb:not(.is-active) { opacity: .7; }
.wsw-gallery .wsw-thumb:hover { opacity: 1; }
.wsw-gallery .wsw-thumb.is-active { border-color: #111; }
.wsw-gallery .wsw-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---- Gallery: slider ---- */
.wsw-gallery .wsw-main-link { touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.wsw-gallery.is-zoom .wsw-main-link { cursor: zoom-in; }
.wsw-gallery .wsw-main-img { -webkit-user-drag: none; }
.wsw-gallery .wsw-main .wsw-nav {
	position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
	display: flex; align-items: center; justify-content: center;
	width: 40px; height: 40px; padding: 0; margin: 0;
	background: rgba(255,255,255,.85); color: #111; border: 0; border-radius: 50%;
	box-shadow: 0 1px 6px rgba(0,0,0,.2); font-size: 18px; line-height: 1; cursor: pointer;
	transition: background .15s ease, color .15s ease;
}
.wsw-gallery .wsw-main .wsw-nav:hover { background: #fff; }
.wsw-gallery .wsw-main .wsw-prev { left: 10px; }
.wsw-gallery .wsw-main .wsw-next { right: 10px; }
.wsw-gallery .wsw-dots { position: absolute; left: 0; right: 0; bottom: 10px; z-index: 2; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.wsw-gallery .wsw-dot { width: 8px; height: 8px; padding: 0; margin: 0; border: 0; border-radius: 50%; background: rgba(0,0,0,.35); cursor: pointer; pointer-events: auto; }
.wsw-gallery .wsw-dot.is-active { background: #111; }

/* ---- Lightbox ---- */
.wsw-lb { position: fixed; inset: 0; z-index: 999999; display: none; align-items: center; justify-content: center; direction: ltr; background: rgba(0,0,0,.92); }
.wsw-lb.is-open { display: flex; }
html.wsw-lb-lock { overflow: hidden; }
.wsw-lb-stage { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 56px 64px; box-sizing: border-box; touch-action: pan-y; }
.wsw-lb-img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.wsw-lb button { cursor: pointer; }
.wsw-lb-close, .wsw-lb-nav {
	position: absolute; z-index: 2; display: flex; align-items: center; justify-content: center;
	width: 44px; height: 44px; padding: 0; margin: 0;
	background: rgba(255,255,255,.14); color: #fff; border: 0; border-radius: 50%;
	font-size: 22px; line-height: 1; transition: background .15s ease;
}
.wsw-lb-close:hover, .wsw-lb-nav:hover { background: rgba(255,255,255,.3); }
.wsw-lb-close { top: 14px; right: 14px; }
.wsw-lb-nav { top: 50%; transform: translateY(-50%); }
.wsw-lb-prev { left: 14px; }
.wsw-lb-next { right: 14px; }
.wsw-lb-count { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; color: #fff; font-size: 14px; opacity: .85; pointer-events: none; }
@media (max-width: 600px) {
	.wsw-lb-stage { padding: 56px 8px; }
	.wsw-lb-nav { width: 38px; height: 38px; }
}

/* ---- جلوگیری از لینک «مشاهده سبد» خود ووکامرس کنار دکمه ---- */
.wsw-button .added_to_cart { display: none !important; }
