/* =========================================================
   Woodmart Smart Badges - Frontend Styles
   سازگار با ساختار پوسته Woodmart (position: relative روی والد تصویر)
   ========================================================= */

.wsb-badges-wrap {
	position: absolute;
	z-index: 9;
	display: flex;
	flex-direction: column;
	gap: 6px;
	pointer-events: none;
	--wsb-primary: #7b2ff7;
	--wsb-secondary: #f107a3;
	--wsb-text-color: #fff;
	--wsb-font: inherit;
	--wsb-font-size: 13px;
}

/* موقعیت‌ها - سازگار با wrapper تصویر Woodmart که position:relative دارد */
.wsb-pos-top-right   { top: 10px; right: 10px; align-items: flex-end; }
.wsb-pos-top-left    { top: 10px; left: 10px; align-items: flex-start; }
.wsb-pos-bottom-right{ bottom: 10px; right: 10px; align-items: flex-end; }
.wsb-pos-bottom-left { bottom: 10px; left: 10px; align-items: flex-start; }

.wsb-badge {
	font-family: var(--wsb-font);
	font-size: var(--wsb-font-size);
	font-weight: 600;
	line-height: 1;
	padding: 7px 12px;
	color: var(--wsb-text-color);
	white-space: nowrap;
	display: inline-block;
	position: relative;
	direction: rtl;
}

/* ---------- انیمیشن پایه (فعال/غیرفعال از پنل تنظیمات) ---------- */
.wsb-badge.wsb-animated { animation: wsb-fade-in 0.5s ease both; }

@keyframes wsb-fade-in {
	from { opacity: 0; transform: translateY(-6px) scale(0.9); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* =========================================================
   ۱. Glass Circle
   ========================================================= */
.wsb-style-glass-circle {
	width: 52px; height: 52px;
	border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	background: rgba(255,255,255,0.15);
	backdrop-filter: blur(10px) saturate(180%);
	-webkit-backdrop-filter: blur(10px) saturate(180%);
	border: 1px solid rgba(255,255,255,0.3);
	box-shadow: 0 4px 20px rgba(0,0,0,0.15);
	text-align: center;
	padding: 0;
}

/* =========================================================
   ۲. Glass Rounded
   ========================================================= */
.wsb-style-glass-rounded {
	border-radius: 14px;
	background: linear-gradient(135deg, color-mix(in srgb, var(--wsb-primary) 55%, transparent), color-mix(in srgb, var(--wsb-secondary) 55%, transparent));
	backdrop-filter: blur(12px) saturate(160%);
	-webkit-backdrop-filter: blur(12px) saturate(160%);
	border: 1px solid rgba(255,255,255,0.35);
	box-shadow: 0 6px 24px rgba(0,0,0,0.18);
}

/* =========================================================
   ۳. Glass Frost
   ========================================================= */
.wsb-style-glass-frost {
	border-radius: 10px;
	background: rgba(255,255,255,0.12);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: 1px solid rgba(255,255,255,0.4);
	color: var(--wsb-text-color);
	box-shadow: inset 0 0 12px rgba(255,255,255,0.15), 0 4px 14px rgba(0,0,0,0.12);
}

/* =========================================================
   ۴. Gradient Sunset
   ========================================================= */
.wsb-style-gradient-sunset {
	border-radius: 8px;
	background: linear-gradient(120deg, #ff512f, #f09819);
	box-shadow: 0 6px 16px rgba(255,81,47,0.35);
}

/* =========================================================
   ۵. Gradient Ocean
   ========================================================= */
.wsb-style-gradient-ocean {
	border-radius: 8px;
	background: linear-gradient(120deg, #2193b0, #6dd5ed);
	box-shadow: 0 6px 16px rgba(33,147,176,0.35);
}

/* =========================================================
   ۶. Gradient Purple
   ========================================================= */
.wsb-style-gradient-purple {
	border-radius: 8px;
	background: linear-gradient(120deg, var(--wsb-primary), var(--wsb-secondary));
	box-shadow: 0 6px 16px rgba(123,47,247,0.35);
}

/* =========================================================
   ۷. Gradient Fire
   ========================================================= */
.wsb-style-gradient-fire {
	border-radius: 6px 6px 6px 0;
	background: linear-gradient(135deg, #f83600, #f9d423);
	box-shadow: 0 6px 16px rgba(248,54,0,0.35);
}

/* =========================================================
   ۸. Gradient Candy
   ========================================================= */
.wsb-style-gradient-candy {
	border-radius: 20px;
	background: linear-gradient(120deg, #ff9a9e, #fad0c4, #fbc2eb);
	color: #4a2545;
	box-shadow: 0 6px 16px rgba(255,154,158,0.4);
}

/* =========================================================
   ۹. Neon Glow
   ========================================================= */
.wsb-style-neon-glow {
	border-radius: 6px;
	background: #0d0d1a;
	border: 1px solid var(--wsb-primary);
	color: var(--wsb-primary);
	box-shadow: 0 0 8px var(--wsb-primary), 0 0 18px var(--wsb-primary), inset 0 0 6px var(--wsb-primary);
	animation: wsb-neon-pulse 1.8s ease-in-out infinite;
}
@keyframes wsb-neon-pulse {
	0%, 100% { box-shadow: 0 0 6px var(--wsb-primary), 0 0 14px var(--wsb-primary); }
	50%      { box-shadow: 0 0 14px var(--wsb-primary), 0 0 28px var(--wsb-primary); }
}

/* =========================================================
   ۱۰. Neomorphism
   ========================================================= */
.wsb-style-neomorphism {
	border-radius: 12px;
	background: #e0e5ec;
	color: #555;
	box-shadow: 6px 6px 12px #b8bcc2, -6px -6px 12px #ffffff;
}

/* =========================================================
   ۱۱. Ribbon Classic
   ========================================================= */
.wsb-style-ribbon-classic {
	border-radius: 4px;
	background: var(--wsb-primary);
	padding: 6px 14px;
	box-shadow: 0 3px 8px rgba(0,0,0,0.25);
}
.wsb-style-ribbon-classic::after {
	content: '';
	position: absolute;
	bottom: -6px; right: 6px;
	border: 6px solid transparent;
	border-top-color: color-mix(in srgb, var(--wsb-primary) 60%, black);
}

/* =========================================================
   ۱۲. Ribbon Corner
   ========================================================= */
.wsb-style-ribbon-corner {
	background: var(--wsb-secondary);
	padding: 6px 22px;
	transform: rotate(-8deg);
	box-shadow: 0 4px 10px rgba(0,0,0,0.25);
	border-radius: 3px;
}

/* =========================================================
   ۱۳. Outline Minimal
   ========================================================= */
.wsb-style-outline-minimal {
	background: transparent;
	border: 2px solid var(--wsb-primary);
	color: var(--wsb-primary);
	border-radius: 20px;
	font-weight: 700;
}

/* =========================================================
   ۱۴. Solid Bold
   ========================================================= */
.wsb-style-solid-bold {
	background: var(--wsb-primary);
	border-radius: 4px;
	font-weight: 800;
	letter-spacing: 0.5px;
}

/* =========================================================
   ۱۵. Pulse Animated
   ========================================================= */
.wsb-style-pulse-animated {
	background: var(--wsb-secondary);
	border-radius: 50px;
	animation: wsb-pulse-scale 1.4s ease-in-out infinite;
}
@keyframes wsb-pulse-scale {
	0%, 100% { transform: scale(1); }
	50%      { transform: scale(1.08); }
}

/* =========================================================
   ۱۶. Shine Sweep
   ========================================================= */
.wsb-style-shine-sweep {
	background: linear-gradient(120deg, var(--wsb-primary), var(--wsb-secondary));
	border-radius: 6px;
	overflow: hidden;
}
.wsb-style-shine-sweep::before {
	content: '';
	position: absolute;
	top: 0; left: -75%;
	width: 50%; height: 100%;
	background: linear-gradient(120deg, transparent, rgba(255,255,255,0.6), transparent);
	transform: skewX(-20deg);
	animation: wsb-shine 2.2s ease-in-out infinite;
}
@keyframes wsb-shine {
	0%   { left: -75%; }
	100% { left: 130%; }
}

/* =========================================================
   ۱۷. Bounce In
   ========================================================= */
.wsb-style-bounce-in {
	background: var(--wsb-primary);
	border-radius: 8px;
	animation: wsb-bounce 1.6s ease infinite;
}
@keyframes wsb-bounce {
	0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
	40% { transform: translateY(-6px); }
	60% { transform: translateY(-3px); }
}

/* =========================================================
   ۱۸. Rotate 3D
   ========================================================= */
.wsb-style-rotate-3d {
	background: linear-gradient(135deg, var(--wsb-primary), var(--wsb-secondary));
	border-radius: 6px;
	transform-style: preserve-3d;
	animation: wsb-rotate3d 3s linear infinite;
}
@keyframes wsb-rotate3d {
	0%   { transform: rotateY(0deg); }
	50%  { transform: rotateY(180deg); }
	100% { transform: rotateY(360deg); }
}

/* =========================================================
   ۱۹. Flip Card
   ========================================================= */
.wsb-style-flip-card {
	background: var(--wsb-secondary);
	border-radius: 6px;
	animation: wsb-flip 2.6s ease infinite;
}
@keyframes wsb-flip {
	0%, 40%, 100% { transform: rotateX(0deg); }
	20%           { transform: rotateX(180deg); }
}

/* =========================================================
   ۲۰. Badge Stack
   ========================================================= */
.wsb-style-badge-stack {
	background: var(--wsb-primary);
	border-radius: 6px;
	box-shadow:
		3px 3px 0 color-mix(in srgb, var(--wsb-primary) 70%, black),
		6px 6px 0 color-mix(in srgb, var(--wsb-secondary) 70%, black);
}

/* =========================================================
   ۲۱. Hexagon
   ========================================================= */
.wsb-style-hexagon {
	background: var(--wsb-primary);
	clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
	padding: 10px 16px;
}

/* =========================================================
   ۲۲. Diamond
   ========================================================= */
.wsb-style-diamond {
	background: var(--wsb-secondary);
	clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
	width: 56px; height: 56px;
	display: flex; align-items: center; justify-content: center;
	padding: 0;
}

/* =========================================================
   ۲۳. Torn Paper
   ========================================================= */
.wsb-style-torn-paper {
	background: var(--wsb-primary);
	clip-path: polygon(0% 5%, 10% 0%, 20% 8%, 30% 2%, 40% 9%, 50% 1%, 60% 8%, 70% 2%, 80% 9%, 90% 1%, 100% 6%, 100% 95%, 90% 100%, 80% 93%, 70% 100%, 60% 92%, 50% 100%, 40% 93%, 30% 100%, 20% 92%, 10% 100%, 0% 94%);
	padding: 10px 14px;
}

/* =========================================================
   ۲۴. Stamp
   ========================================================= */
.wsb-style-stamp {
	background: transparent;
	border: 2px dashed var(--wsb-primary);
	color: var(--wsb-primary);
	border-radius: 4px;
	transform: rotate(-6deg);
	font-weight: 700;
	text-transform: uppercase;
}

/* =========================================================
   ۲۵. Gradient Border Glow
   ========================================================= */
.wsb-style-gradient-border {
	background: #10101a;
	border-radius: 8px;
	position: relative;
	z-index: 0;
}
.wsb-style-gradient-border::before {
	content: '';
	position: absolute;
	inset: -2px;
	border-radius: 10px;
	background: linear-gradient(135deg, var(--wsb-primary), var(--wsb-secondary));
	z-index: -1;
	filter: blur(4px);
	opacity: 0.85;
}

/* =========================================================
   ۲۶. Liquid Blob
   ========================================================= */
.wsb-style-liquid-blob {
	background: linear-gradient(135deg, var(--wsb-primary), var(--wsb-secondary));
	border-radius: 63% 37% 54% 46% / 45% 51% 49% 55%;
	padding: 12px 18px;
	animation: wsb-blob-morph 5s ease-in-out infinite;
}
@keyframes wsb-blob-morph {
	0%, 100% { border-radius: 63% 37% 54% 46% / 45% 51% 49% 55%; }
	50%      { border-radius: 40% 60% 35% 65% / 60% 40% 60% 40%; }
}

/* =========================================================
   رنگ‌بندی بر اساس نوع نشان (قابل بازنویسی توسط استایل انتخابی)
   ========================================================= */
.wsb-type-discount    { }
.wsb-type-new         { }
.wsb-type-bestseller  { }
.wsb-type-lowstock    { }
.wsb-type-outofstock  { opacity: 0.85; }

/* =========================================================
   حذف اجباری نشان‌های پیش‌فرض Woodmart / WooCommerce
   Woodmart علاوه بر فیلتر woocommerce_sale_flash، ماژول اختصاصی
   "Product Labels" خودش را هم دارد که با کلاس‌های زیر رندر می‌شود.
   ========================================================= */
span.onsale,
.onsale.product-label,
.woodmart-sale-badge,
.product-labels,
.product-labels-list,
ul.labels,
li.onsale,
.wd-labels,
.wd-product-labels,
.wd-product-lbl,
.sale-percentage,
.woodmart-product-labels-group {
	display: none !important;
	visibility: hidden !important;
	opacity: 0 !important;
}

/* واکنش‌گرا برای موبایل */
@media (max-width: 480px) {
	.wsb-badge { font-size: calc(var(--wsb-font-size) - 2px); padding: 5px 9px; }
	.wsb-style-glass-circle,
	.wsb-style-diamond { width: 42px; height: 42px; }
}
