/* =========================================================
   WP InstaStory — Public Styles
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700&display=swap');

:root {
	--wstory-bg: #000;
	--wstory-ring-default: linear-gradient(45deg, #f9ce34, #ee2a7b, #6228d7);
	--wstory-accent: #ee2a7b;
	--wstory-radius: 14px;
	--wstory-font: "Vazirmatn", -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, sans-serif;
}

.wstory-bar, .wstory-viewer {
	font-family: var(--wstory-font);
	box-sizing: border-box;
}

/* هنگام باز بودن استوری، ویجت‌های شناور خود سایت (مثل دکمه واتساپ) مخفی شوند
   تا روی استوری نیفتند. پترن‌های رایج افزونه‌ها/المنتور را پوشش می‌دهد. */
body.wstory-open .elementor-whatsapp-widget,
body.wstory-open .elementor-whatsapp-button,
body.wstory-open [class*="whatsapp-chat"],
body.wstory-open [class*="whatsapp-widget"],
body.wstory-open [class*="whatsapp-float"],
body.wstory-open [id*="whatsapp-chat"],
body.wstory-open [id*="whatsapp-widget"],
body.wstory-open [id*="whatsapp-float"],
body.wstory-open [class*="wa-float"],
body.wstory-open [class*="wa-chat"],
body.wstory-open .wpwhatsapp-btn,
body.wstory-open .float-wp-btn {
	display: none !important;
	visibility: hidden !important;
}
.wstory-bar *, .wstory-viewer *,
.wstory-bar *::placeholder, .wstory-viewer *::placeholder {
	box-sizing: border-box;
	font-family: inherit;
}

/* ریست اجباری: بعضی قالب‌ها/افزونه‌های ووکامرس روی همه دکمه‌ها و اینپوت‌های سایت
   یک استایل عمومی (پس‌زمینه سفید، حاشیه، پدینگ و...) اعمال می‌کنند که ظاهر استوری را
   خراب می‌کند. این بخش با !important آن استایل عمومی را خنثی می‌کند تا طراحی ما
   همیشه درست دیده شود، مهم نیست قالب سایت چه CSSای داشته باشد. */
.wstory-bar button,
.wstory-viewer button {
	all: unset !important;
	box-sizing: border-box !important;
	cursor: pointer !important;
	font-family: inherit !important;
	-webkit-tap-highlight-color: transparent !important;
}
.wstory-viewer input[type="text"] {
	all: unset !important;
	box-sizing: border-box !important;
	font-family: inherit !important;
}
.wstory-viewer a {
	text-decoration: none !important;
}

/* ---------------- Story Bar (avatar row) ---------------- */

.wstory-bar {
	width: 100%;
	overflow: hidden;
	padding: var(--wstory-bar-padding, 6px) 0;
	background: transparent;
}

.wstory-bar-track {
	display: flex;
	gap: 10px;
	overflow-x: auto;
	overflow-y: hidden;
	padding: 4px 14px;
	scroll-behavior: smooth;
	-ms-overflow-style: none;
	scrollbar-width: none;
	mask-image: linear-gradient(to left, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
	-webkit-mask-image: linear-gradient(to left, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
}
.wstory-bar-track::-webkit-scrollbar { display: none; }

.wstory-avatar {
	flex: 0 0 auto !important;
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	gap: 5px !important;
	width: 70px !important;
	background: none !important;
	border: none !important;
	cursor: pointer !important;
	padding: 0 !important;
}

.wstory-ring {
	width: 58px;
	height: 58px;
	border-radius: 50%;
	background: var(--ring-color, var(--wstory-ring-default));
	background: linear-gradient(45deg, var(--ring-color, #f9ce34), var(--ring-color, #ee2a7b));
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2.5px;
	transition: transform .15s ease;
}
.wstory-avatar:active .wstory-ring { transform: scale(0.94); }

.wstory-ring.wstory-seen {
	background: #dbdbdb;
}

.wstory-ring-inner {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background: #fff;
	padding: 2px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.wstory-ring-inner img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
}

.wstory-avatar-fallback {
	font-size: 19px;
	font-weight: 600;
	color: #555;
}

.wstory-avatar-title {
	font-size: 11px;
	color: #262626;
	max-width: 70px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.35;
	text-align: center;
}

/* ---------------- Fullscreen Viewer ---------------- */

.wstory-viewer {
	position: fixed !important;
	inset: 0 !important;
	z-index: 999999 !important;
	background: var(--wstory-bg) !important;
	display: none;
	opacity: 0;
	transition: opacity .18s ease;
}
.wstory-viewer.is-open {
	display: block !important;
	opacity: 1 !important;
}

.wstory-viewer-inner {
	position: relative !important;
	max-width: 460px !important;
	height: 100% !important;
	margin: 0 auto !important;
	background: #000 !important;
	overflow: hidden !important;
	touch-action: none;
	transform: translateY(0);
	transition: transform .25s ease;
}
.wstory-viewer-inner.wstory-dragging {
	transition: none;
}

@media (min-width: 700px) {
	.wstory-viewer-inner {
		height: 92vh;
		margin-top: 4vh;
		border-radius: var(--wstory-radius);
	}
}

/* progress bars */
.wstory-progress-row {
	position: absolute !important;
	top: 8px !important;
	left: 8px !important;
	right: 8px !important;
	display: flex !important;
	gap: 4px;
	z-index: 30 !important;
}
.wstory-progress-bar {
	flex: 1;
	height: 2.5px;
	background: rgba(255,255,255,.35);
	border-radius: 2px;
	overflow: hidden;
}
.wstory-progress-fill {
	height: 100%;
	width: 0%;
	background: #fff;
	border-radius: 2px;
}
.wstory-progress-bar.done .wstory-progress-fill { width: 100% !important; }

/* top bar */
.wstory-topbar {
	position: absolute !important;
	top: 20px !important;
	left: 12px !important;
	right: 12px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	z-index: 30 !important;
	color: #fff;
}
.wstory-user-info {
	display: flex;
	align-items: center;
	gap: 8px;
}
.wstory-user-avatar {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	overflow: hidden;
	background: #444;
	display: block;
}
.wstory-user-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.wstory-user-name {
	font-size: 14px;
	font-weight: 600;
	text-shadow: 0 1px 3px rgba(0,0,0,.5);
}
.wstory-user-time {
	font-size: 12px;
	opacity: .75;
}
.wstory-user-views {
	display: none;
	align-items: center;
	font-size: 12px;
	font-weight: 600;
	color: #fff;
	opacity: .9;
	background: rgba(255,255,255,.16);
	padding: 3px 9px;
	border-radius: 999px;
}
.wstory-actions-top {
	display: flex;
	gap: 14px;
}
.wstory-btn-mute, .wstory-btn-close, .wstory-btn-playpause {
	background: none !important;
	border: none !important;
	color: #fff !important;
	cursor: pointer !important;
	padding: 4px !important;
	line-height: 0 !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	filter: drop-shadow(0 1px 2px rgba(0,0,0,.5));
}

/* slide stage */
.wstory-slide-stage {
	position: absolute !important;
	inset: 0 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	background: #111 !important;
}
.wstory-media-holder {
	width: 100% !important;
	height: 100% !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	position: relative !important;
	overflow: hidden !important;
	background: #000 !important;
}
.wstory-media-bg {
	position: absolute !important;
	inset: 0 !important;
	background-size: cover !important;
	background-position: center !important;
	background-repeat: no-repeat !important;
	filter: blur(28px) brightness(0.55) !important;
	transform: scale(1.15) !important;
	z-index: 1 !important;
}
/* اسلایدهای دارای «سوال بپرس» یا «سوال و جواب آماده»: چون خودِ عکس صرفاً تزئینیه و مهم نیست دقیقاً چی باشه،
   عکس اصلی (نه فقط پس‌زمینه‌ی محو دورش) هم کمی محو می‌شود تا تمرکز بیننده روی باکس سوال/جواب باشد */
#wstory-media-holder.wstory-qa-slide-blur img,
#wstory-media-holder.wstory-qa-slide-blur video {
	filter: blur(5px) brightness(.9) !important;
}
.wstory-text-slide {
	position: relative;
	z-index: 2;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 40px 28px;
	color: #fff;
	font-size: 30px;
	font-weight: 800;
	line-height: 1.5;
	white-space: pre-wrap;
	word-break: break-word;
	text-shadow: 0 2px 10px rgba(0,0,0,.35);
}
.wstory-media-holder img,
.wstory-media-holder video {
	position: relative !important;
	z-index: 2 !important;
	max-width: 100% !important;
	max-height: 100% !important;
	width: auto !important;
	height: auto !important;
	display: block !important;
	margin: 0 auto !important;
	object-fit: contain !important;
	user-select: none;
	-webkit-user-drag: none;
	box-shadow: 0 0 40px rgba(0,0,0,.35);
}

.wstory-nav-zone {
	position: absolute !important;
	top: 0 !important;
	bottom: 0 !important;
	width: 30% !important;
	z-index: 25 !important;
	cursor: pointer !important;
}
.wstory-nav-prev { right: 0; left: auto; }
.wstory-nav-next { left: 0; right: auto; }

/* نشان گوشه‌ی تصویر: مثل «پرفروش» یا «اورجینال» که ادمین برای هر اسلاید انتخاب می‌کند */
.wstory-corner-badge {
	display: none;
	position: absolute;
	top: 76px;
	left: 14px;
	z-index: 6;
	align-items: center;
	font-size: 12px;
	font-weight: 800;
	color: #fff;
	padding: 6px 13px;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0,0,0,.35);
	text-shadow: 0 1px 2px rgba(0,0,0,.3);
}
.wstory-corner-badge-bestseller { background: linear-gradient(135deg, #ff5722, #d6362f); }
.wstory-corner-badge-original { background: linear-gradient(135deg, #00a35a, #00843f); }
.wstory-corner-badge-discount { background: linear-gradient(135deg, #ee2a7b, #c2185b); }
.wstory-corner-badge-limited { background: linear-gradient(135deg, #6228d7, #4a1ba8); }
.wstory-corner-badge-new_arrival { background: linear-gradient(135deg, #2271b1, #1a5a8c); }

/* ستون هوشمند پایین استوری: کد تخفیف، محصول/لینک‌ها، کپشن -
   با flex به‌جای پیکسل ثابت خودشان زیر هم می‌چینند و هیچ‌وقت روی هم نمی‌افتند */
.wstory-bottom-stack {
	position: absolute !important;
	bottom: 68px !important;
	left: 16px !important;
	right: 62px !important;
	z-index: 27 !important;
	display: flex !important;
	flex-direction: column-reverse !important;
	align-items: center !important;
	gap: 8px !important;
}

.wstory-caption-card {
	width: 100%;
	display: none;
}
.wstory-caption-card.wstory-caption-card-plain {
	background: rgba(0,0,0,.45);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	border: 1px solid rgba(255,255,255,.15);
	border-radius: 16px;
	padding: 12px 16px;
	box-shadow: 0 6px 18px rgba(0,0,0,.3);
	box-sizing: border-box;
}
.wstory-caption-label {
	display: none;
	font-size: 12px;
	font-weight: 800;
	color: #ffca28;
	margin-bottom: 6px;
	text-align: center;
}
.wstory-caption {
	width: 100%;
	color: #fff;
	font-size: 15px;
	line-height: 1.6;
	text-align: center;
	text-shadow: 0 1px 4px rgba(0,0,0,.6);
	pointer-events: none;
}

/* استوری‌های خودکار: کپشن با جلوه بصری و انرژی، به‌جای متن ثابت روی عکس */
.wstory-caption.wstory-badge-urgent,
.wstory-caption.wstory-badge-new,
.wstory-caption.wstory-badge-good,
.wstory-caption.wstory-badge-sale {
	display: inline-block;
	max-width: 92%;
	margin: 0 auto;
	padding: 10px 18px;
	border-radius: 14px;
	font-weight: 800;
	font-size: 16px;
	backdrop-filter: blur(4px);
}
.wstory-caption.wstory-badge-urgent {
	background: rgba(214,54,56,.35);
	border: 1.5px solid rgba(255,255,255,.5);
	animation: wstory-badge-pulse 1.1s ease-in-out infinite;
}
.wstory-caption.wstory-badge-sale {
	background: rgba(225,48,108,.35);
	border: 1.5px solid rgba(255,255,255,.5);
	animation: wstory-badge-pulse 1.4s ease-in-out infinite;
}
.wstory-caption.wstory-badge-new {
	background: rgba(34,113,177,.35);
	border: 1.5px solid rgba(255,255,255,.5);
	animation: wstory-badge-shimmer 2s ease-in-out infinite;
}
.wstory-caption.wstory-badge-good {
	background: rgba(0,163,42,.35);
	border: 1.5px solid rgba(255,255,255,.5);
	animation: wstory-badge-shimmer 2s ease-in-out infinite;
}
@keyframes wstory-badge-pulse {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.045); }
}
@keyframes wstory-badge-shimmer {
	0%, 100% { opacity: 1; }
	50% { opacity: .85; }
}

/* product tag */
.wstory-tags-row {
	width: 100%;
	touch-action: pan-x !important;
	display: flex !important;
	flex-wrap: nowrap !important;
	justify-content: flex-start !important;
	align-items: center !important;
	gap: 8px !important;
	overflow-x: auto !important;
	overflow-y: hidden !important;
	-webkit-overflow-scrolling: touch !important;
	scrollbar-width: none !important;
	padding: 2px !important;
	mask-image: linear-gradient(to left, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
	-webkit-mask-image: linear-gradient(to left, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}
.wstory-tags-row.wstory-hidden { display: none !important; }
.wstory-tags-row::-webkit-scrollbar { display: none !important; }
.wstory-tags-row > * {
	flex-shrink: 0 !important;
}

.wstory-secondary-row {
	width: 100%;
	touch-action: pan-x !important;
	display: flex !important;
	flex-wrap: nowrap !important;
	justify-content: flex-start !important;
	align-items: center !important;
	gap: 6px !important;
	overflow-x: auto !important;
	overflow-y: hidden !important;
	-webkit-overflow-scrolling: touch !important;
	scrollbar-width: none !important;
	padding: 2px !important;
	mask-image: linear-gradient(to left, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
	-webkit-mask-image: linear-gradient(to left, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}
.wstory-secondary-row::-webkit-scrollbar { display: none !important; }
.wstory-secondary-row > * { flex-shrink: 0 !important; }


.wstory-product-tag {
	display: flex !important;
	justify-content: center !important;
}
.wstory-product-tag.wstory-hidden {
	display: none !important;
}
.wstory-product-link {
	display: flex;
	align-items: center;
	gap: 7px;
	background: rgba(255,255,255,.96);
	border-radius: 999px;
	padding: 5px 12px 5px 5px;
	text-decoration: none;
	color: #111;
	max-width: 92%;
	box-shadow: 0 4px 18px rgba(0,0,0,.25);
	animation: wstory-tag-in .35s ease;
}
@keyframes wstory-tag-in {
	from { opacity: 0; transform: translateY(6px) scale(.96); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}
.wstory-product-link img {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}
.wstory-product-info {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.wstory-product-name {
	font-size: 11px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 150px;
}
.wstory-product-price {
	font-size: 10px;
	color: var(--wstory-accent);
	font-weight: 700;
	display: flex;
	align-items: center;
	gap: 5px;
}
.wstory-price-old {
	color: #888;
	text-decoration: line-through;
	font-weight: 400;
	font-size: 10.5px;
}
.wstory-price-new {
	color: var(--wstory-accent);
	font-weight: 700;
}
.wstory-price-badge {
	background: var(--wstory-accent);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	padding: 1px 6px;
	border-radius: 999px;
}
.wstory-product-cta {
	font-size: 10.5px;
	font-weight: 700;
	color: #fff;
	background: var(--wstory-accent);
	padding: 6px 12px;
	border-radius: 999px;
	white-space: nowrap;
	margin-right: auto;
	display: flex;
	align-items: center;
	gap: 3px;
}
.wstory-product-cta::before {
	content: "←";
	font-size: 12px;
}

/* Question Box: باکس «سوال بپرس» شبیه استیکر Question اینستاگرام */
.wstory-question-box {
	display: none;
	direction: rtl;
	width: fit-content;
	max-width: 88%;
	margin: 0 auto;
}
.wstory-question-closed {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	background: linear-gradient(135deg, #fff8ee, #fff);
	color: #262626;
	border-radius: 22px;
	padding: 3px;
	padding-inline-end: 18px;
	box-shadow: 0 8px 22px rgba(0,0,0,.28);
	cursor: pointer;
	font-size: 14px;
	font-weight: 700;
	text-align: center;
	position: relative;
	border: 2px solid transparent;
	background-image: linear-gradient(135deg, #fff8ee, #fff), linear-gradient(90deg, #f9ce34, #ee2a7b, #6228d7, #f9ce34);
	background-origin: border-box;
	background-clip: padding-box, border-box;
	background-size: 100% 100%, 300% 100%;
	animation: wstory-question-pop .35s ease, wstory-question-gradient 6s linear infinite, wstory-question-breathe 2.6s ease-in-out .6s infinite;
}
.wstory-question-icon-badge {
	flex-shrink: 0;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	background: linear-gradient(135deg, #f9ce34, #ee2a7b, #6228d7);
	box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
@keyframes wstory-question-pop {
	0% { transform: scale(.85); opacity: 0; }
	100% { transform: scale(1); opacity: 1; }
}
@keyframes wstory-question-gradient {
	0% { background-position: 0 0, 0% 0; }
	100% { background-position: 0 0, 300% 0; }
}
@keyframes wstory-question-breathe {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.035); }
}
.wstory-question-box.is-open .wstory-question-closed { display: none; }
.wstory-question-form {
	display: flex !important;
	align-items: center;
	gap: 8px;
	background: #fff;
	border: 2px solid transparent;
	background-image: linear-gradient(#fff, #fff), linear-gradient(90deg, #f9ce34, #ee2a7b, #6228d7);
	background-origin: border-box;
	background-clip: padding-box, border-box;
	border-radius: 999px;
	padding: 6px 6px 6px 16px;
	width: min(88vw, 380px);
	box-shadow: 0 8px 22px rgba(0,0,0,.28);
	animation: wstory-question-pop .2s ease;
}
.wstory-question-input {
	flex: 1 1 auto;
	min-width: 0;
	background: transparent !important;
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
	color: #262626 !important;
	font-size: 14px !important;
	font-weight: 600 !important;
}
.wstory-question-input::placeholder { color: #8e8e8e; opacity: 1; }
.wstory-question-send {
	flex-shrink: 0;
	background: linear-gradient(135deg, #f9ce34, #ee2a7b, #6228d7) !important;
	color: #fff !important;
	border: none !important;
	border-radius: 999px !important;
	font-size: 12.5px !important;
	font-weight: 700 !important;
	padding: 8px 16px !important;
	cursor: pointer !important;
}

/* Q&A box: چند سوال/جواب آماده که خود ادمین می‌نویسد، به‌صورت آکاردئون قابل باز/بسته شدن */
.wstory-qa-box {
	display: none;
	direction: rtl;
	width: min(92vw, 340px);
	max-width: 92%;
	margin: 0 auto;
	background: rgba(20,20,20,.62);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	border: 1px solid rgba(255,255,255,.18);
	border-radius: 16px;
	padding: 10px;
	box-shadow: 0 8px 22px rgba(0,0,0,.3);
}
.wstory-qa-title {
	color: #fff;
	font-size: 12.5px;
	font-weight: 700;
	margin-bottom: 6px;
	padding: 0 4px;
}
.wstory-qa-list {
	display: flex;
	flex-direction: column;
	gap: 5px;
	max-height: 34vh;
	overflow-y: auto;
}
.wstory-qa-item {
	background: rgba(255,255,255,.92);
	border-radius: 10px;
	overflow: hidden;
	border-right: 3px solid #6228d7;
}
.wstory-qa-item.wstory-qa-item-customer {
	border-right-color: #ee2a7b;
}
.wstory-qa-question {
	display: flex;
	direction: rtl;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 9px 11px;
	cursor: pointer;
	font-size: 12.5px;
	font-weight: 700;
	color: #262626;
}
.wstory-qa-question-text {
	display: block;
	min-width: 0;
}
.wstory-qa-subtitle {
	color: #fff;
	font-size: 11.5px;
	font-weight: 700;
	margin: 10px 0 5px;
	padding: 0 4px;
	opacity: .9;
}
.wstory-qa-customer-section {
	border-top: 1px dashed rgba(255,255,255,.25);
	margin-top: 8px;
}
.wstory-qa-chevron {
	flex-shrink: 0;
	transition: transform .2s ease;
	color: var(--wstory-accent);
	font-size: 11px;
}
.wstory-qa-item.is-open .wstory-qa-chevron { transform: rotate(180deg); }
.wstory-qa-answer {
	max-height: 0;
	overflow: hidden;
	transition: max-height .25s ease;
	font-size: 12px;
	color: #444;
	line-height: 1.55;
}
.wstory-qa-answer-inner { padding: 0 11px 10px; }
.wstory-qa-item.is-open .wstory-qa-answer { max-height: 200px; }

/* coupon box */
.wstory-coupon-box {
	display: none;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: repeating-linear-gradient(135deg, #fff8e1, #fff8e1 6px, #fffdf5 6px, #fffdf5 12px);
	border: 1.5px dashed #e1306c;
	border-radius: 12px;
	padding: 8px 14px;
	max-width: 88%;
	margin: 0 auto;
	width: fit-content;
	box-shadow: 0 4px 14px rgba(0,0,0,.2);
}
.wstory-coupon-icon { font-size: 15px; }
.wstory-coupon-code {
	font-family: monospace;
	font-weight: 700;
	font-size: 14px;
	letter-spacing: 1px;
	color: #b3245a;
}
.wstory-coupon-copy {
	background: var(--wstory-accent) !important;
	color: #fff !important;
	border: none !important;
	border-radius: 999px !important;
	font-size: 11.5px !important;
	font-weight: 700 !important;
	padding: 5px 12px !important;
	cursor: pointer !important;
}

/* socials row */
.wstory-socials-row {
	position: absolute;
	top: 76px;
	left: 16px;
	z-index: 27;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.wstory-social-btn {
	display: flex;
	align-items: center;
	gap: 6px;
	height: 34px;
	padding: 0 12px 0 6px;
	border-radius: 999px;
	background: rgba(255,255,255,.94);
	text-decoration: none;
	box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.wstory-social-btn svg { flex-shrink: 0; }
.wstory-social-label {
	font-size: 12px;
	font-weight: 700;
	color: #222;
	white-space: nowrap;
}

/* nav arrows: always visible on both mobile and desktop */
.wstory-arrow {
	position: absolute !important;
	top: 50% !important;
	transform: translateY(-50%) !important;
	z-index: 33 !important;
	width: 40px !important;
	height: 40px !important;
	border-radius: 50% !important;
	background: rgba(0,0,0,.55) !important;
	color: #fff !important;
	border: 1.5px solid rgba(255,255,255,.55) !important;
	cursor: pointer !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	opacity: 1 !important;
	box-shadow: 0 2px 10px rgba(0,0,0,.4) !important;
	transition: opacity .15s ease, background .15s ease;
}
.wstory-arrow-prev { right: 12px !important; }
.wstory-arrow-next { left: 12px !important; }
.wstory-arrow:hover { background: rgba(0,0,0,.75) !important; }
.wstory-arrow:active { transform: translateY(-50%) scale(.9) !important; }

@media (min-width: 700px) {
	.wstory-arrow {
		width: 42px !important;
		height: 42px !important;
	}
}

/* bottom bar */
.wstory-bottombar {
	position: absolute !important;
	bottom: 14px !important;
	left: 12px !important;
	right: 70px !important;
	z-index: 30 !important;
}

/* ردیف عمودی اکشن‌ها کنار تصویر (شبیه ریلز) */
.wstory-side-actions {
	position: absolute;
	bottom: 70px;
	right: 10px;
	z-index: 30;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 18px;
}
.wstory-side-btn {
	background: none !important;
	border: none !important;
	color: #fff !important;
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 3px !important;
	cursor: pointer !important;
	padding: 0 !important;
}
.wstory-side-icon-bg {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: rgba(0,0,0,.4);
}
.wstory-side-count {
	font-size: 11px;
	font-weight: 700;
	min-height: 13px;
	background: rgba(0,0,0,.4);
	padding: 1px 7px;
	border-radius: 8px;
}
.wstory-like-btn.liked svg path {
	fill: #ff3040;
	stroke: #ff3040;
}
.wstory-like-btn.pulse svg { animation: wstory-pulse .35s ease; }
@keyframes wstory-pulse {
	0% { transform: scale(1); }
	40% { transform: scale(1.35); }
	100% { transform: scale(1); }
}
.wstory-reaction-toggle.active svg { color: var(--wstory-accent) !important; }

.wstory-reactions-popup {
	position: absolute;
	bottom: 0;
	right: calc(100% + 10px);
	transform: translateX(10px);
	opacity: 0;
	pointer-events: none;
	transition: opacity .18s ease, transform .18s ease;
	z-index: 5;
}
.wstory-reactions-popup.is-open {
	opacity: 1;
	pointer-events: auto;
	transform: translateX(0);
}

.wstory-reactions-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	max-width: 220px;
	background: rgba(20,20,20,.55);
	backdrop-filter: blur(10px);
	padding: 8px 10px;
	border-radius: 20px;
	box-shadow: 0 6px 20px rgba(0,0,0,.3);
}
.wstory-reaction-btn {
	background: rgba(255,255,255,.12) !important;
	border: 1px solid rgba(255,255,255,.25) !important;
	border-radius: 999px !important;
	font-size: 19px !important;
	width: 38px !important;
	height: 38px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	cursor: pointer !important;
	transition: transform .12s ease, background .12s ease;
	flex-shrink: 0 !important;
}
.wstory-reaction-btn:hover,
.wstory-reaction-btn.active {
	transform: scale(1.18) !important;
	background: rgba(255,255,255,.25) !important;
}

/* لینک‌های متنی سفارشی روی استوری */
.wstory-links-row {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	gap: 6px;
	align-items: center;
	justify-content: center;
}
.wstory-extra-products-row {
	display: contents;
}
.wstory-extra-product-link {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	gap: 6px;
	background: rgba(255,255,255,.92);
	border-radius: 999px;
	padding: 4px 10px 4px 4px;
	text-decoration: none;
	color: #111;
}
.wstory-extra-product-link img {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}
.wstory-extra-product-link .wstory-extra-product-name {
	font-size: 10px;
	font-weight: 600;
	white-space: nowrap;
	max-width: 70px;
	overflow: hidden;
	text-overflow: ellipsis;
}
.wstory-extra-product-link .wstory-extra-product-price {
	font-size: 9.5px;
	color: var(--wstory-accent);
	font-weight: 700;
	white-space: nowrap;
}
.wstory-text-link {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	gap: 4px;
	background: rgba(255,255,255,.95);
	color: #111;
	font-size: 11px;
	font-weight: 600;
	padding: 6px 12px;
	border-radius: 999px;
	text-decoration: underline;
	text-decoration-color: var(--wstory-accent);
	text-underline-offset: 2px;
	box-shadow: 0 4px 14px rgba(0,0,0,.2);
}
.wstory-text-link::after {
	content: '↗';
	text-decoration: none;
	font-size: 12px;
	color: var(--wstory-accent);
}

.wstory-comment-form {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: nowrap;
	width: 100%;
}
.wstory-name-input,
.wstory-comment-input {
	flex: 1 1 auto !important;
	min-width: 0 !important;
	background: rgba(255,255,255,.14) !important;
	border: 1px solid rgba(255,255,255,.3) !important;
	border-radius: 999px !important;
	padding: 10px 16px !important;
	color: #fff !important;
	font-size: 14px !important;
	outline: none !important;
	backdrop-filter: blur(6px);
	min-height: 20px;
}
.wstory-name-input { flex: 0 0 82px !important; min-width: 0 !important; }
.wstory-name-input::placeholder,
.wstory-comment-input::placeholder {
	color: rgba(255,255,255,.75) !important;
	opacity: 1 !important;
}

.wstory-send-btn {
	background: none !important;
	border: none !important;
	color: var(--wstory-accent) !important;
	font-weight: 700 !important;
	font-size: 14px !important;
	cursor: pointer !important;
	flex-shrink: 0 !important;
	padding: 4px 6px !important;
}

/* comments drawer */
.wstory-comments-drawer {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	max-height: 55%;
	background: #1c1c1e;
	border-radius: 18px 18px 0 0;
	transform: translateY(100%);
	transition: transform .25s ease;
	z-index: 40;
	display: flex;
	flex-direction: column;
}
.wstory-comments-drawer.is-open { transform: translateY(0); }
.wstory-comments-header {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 10px 14px 8px;
	flex-shrink: 0;
	cursor: pointer;
}
.wstory-comments-handle {
	position: absolute;
	top: 6px;
	left: 50%;
	transform: translateX(-50%);
	width: 40px;
	height: 4px;
	background: #555;
	border-radius: 4px;
}
.wstory-comments-title {
	color: #fff;
	font-size: 13.5px;
	font-weight: 600;
	margin-top: 6px;
}
.wstory-comments-close {
	position: absolute;
	left: 12px;
	top: 8px;
	background: rgba(255,255,255,.1) !important;
	border: none !important;
	color: #fff !important;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}
.wstory-comments-list {
	overflow-y: auto;
	touch-action: pan-y;
	padding: 0 16px 16px;
	color: #fff;
}
.wstory-comment-item {
	display: flex;
	gap: 10px;
	padding: 8px 0;
	border-bottom: 1px solid rgba(255,255,255,.06);
	font-size: 13.5px;
}
.wstory-comment-avatar {
	width: 28px !important;
	height: 28px !important;
	min-width: 28px !important;
	border-radius: 50% !important;
	background: linear-gradient(45deg, #f9ce34, #ee2a7b);
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 700;
	overflow: hidden;
}
.wstory-comment-avatar-img {
	object-fit: cover !important;
	background: #333;
	display: block !important;
}
.wstory-comment-admin {
	background: rgba(238,42,123,.08);
	border-radius: 10px;
	padding-left: 6px;
	padding-right: 6px;
}
.wstory-comment-admin .wstory-comment-name::after {
	content: " 👑";
}
.wstory-comment-name {
	font-weight: 600 !important;
	margin-left: 6px !important;
	margin-right: 0 !important;
}
.wstory-comment-time {
	color: #888;
	font-size: 11.5px;
	display: block;
	margin-top: 2px;
}
.wstory-comment-empty {
	text-align: center;
	color: #888;
	padding: 24px 0;
	font-size: 13px;
}

/* pause indicator */
.wstory-viewer.is-paused .wstory-media-holder video { }
.wstory-hold-hint {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: rgba(255,255,255,.6);
	font-size: 12px;
	pointer-events: none;
	opacity: 0;
	transition: opacity .15s;
}
.wstory-viewer.is-paused .wstory-hold-hint { opacity: 1; }

/* loading spinner */
.wstory-loading {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 34px;
	height: 34px;
	margin: -17px 0 0 -17px;
	border: 3px solid rgba(255,255,255,.25);
	border-top-color: #fff;
	border-radius: 50%;
	animation: wstory-spin .7s linear infinite;
	z-index: 20;
}
@keyframes wstory-spin { to { transform: rotate(360deg); } }

/* toast */
.wstory-toast {
	position: absolute;
	bottom: 100px;
	left: 50%;
	transform: translateX(-50%);
	background: rgba(0,0,0,.8);
	color: #fff;
	font-size: 12.5px;
	padding: 8px 16px;
	border-radius: 999px;
	z-index: 50;
	opacity: 0;
	transition: opacity .2s ease;
	pointer-events: none;
	white-space: nowrap;
}
.wstory-toast.show { opacity: 1; }

/* floating emoji burst */
.wstory-emoji-burst {
	position: absolute;
	font-size: 26px;
	pointer-events: none;
	z-index: 45;
	animation: wstory-float-up 1.1s ease forwards;
}

/* دکمه «استوری بگذار» */
.wstory-add-story-ring {
	background: none !important;
	border: 2px dashed #bbb;
}
.wstory-add-story-plus {
	font-size: 26px;
	color: #888;
	font-weight: 300;
	line-height: 1;
}

/* ردیف بالای نوار استوری: دکمه «مشاهده همه» همیشه ثابت و بدون نیاز به اسکرول */
.wstory-bar-topline {
	display: flex !important;
	justify-content: flex-start !important;
	padding: 0 16px !important;
	margin-bottom: 2px !important;
}
.wstory-view-all-btn {
	display: flex !important;
	align-items: center !important;
	gap: 4px !important;
	background: none !important;
	border: none !important;
	color: #666 !important;
	font-size: 12.5px !important;
	font-weight: 600 !important;
	cursor: pointer !important;
	padding: 4px 2px !important;
}
.wstory-view-all-icon {
	font-size: 13px;
	color: #999;
}

/* گرید تمام‌صفحه همه استوری‌ها */
.wstory-all-grid {
	position: fixed !important;
	inset: 0 !important;
	z-index: 999998 !important;
	background: #fff !important;
	display: none !important;
	flex-direction: column !important;
	font-family: var(--wstory-font);
}
.wstory-all-grid.is-open { display: flex !important; }
.wstory-all-grid-header {
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	justify-content: space-between !important;
	padding: 16px 18px !important;
	font-weight: 700 !important;
	font-size: 16px !important;
	color: #111 !important;
	border-bottom: 1px solid #eee !important;
	flex-shrink: 0 !important;
	width: 100% !important;
	box-sizing: border-box !important;
}
.wstory-all-grid-close {
	background: #f0f0f1 !important;
	border: none !important;
	border-radius: 50% !important;
	width: 34px !important;
	height: 34px !important;
	min-width: 34px !important;
	flex-shrink: 0 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	cursor: pointer !important;
	color: #333 !important;
	padding: 0 !important;
}
.wstory-all-grid-close svg {
	display: block !important;
	width: 18px !important;
	height: 18px !important;
	pointer-events: none !important;
}
.wstory-all-grid-items {
	flex: 1 !important;
	overflow-y: auto !important;
	display: grid !important;
	grid-template-columns: repeat(4, 1fr) !important;
	grid-auto-rows: min-content !important;
	gap: 18px 6px !important;
	padding: 18px 10px !important;
	width: 100% !important;
	box-sizing: border-box !important;
	justify-items: center !important;
}
.wstory-all-grid-item {
	position: static !important;
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	gap: 7px !important;
	background: none !important;
	border: none !important;
	cursor: pointer !important;
	padding: 0 !important;
	margin: 0 !important;
	width: 100% !important;
	max-width: 84px !important;
}
.wstory-all-grid-ring {
	width: 66px !important;
	height: 66px !important;
	min-width: 66px !important;
	border-radius: 50% !important;
	background: linear-gradient(45deg, var(--ring-color, #f9ce34), var(--ring-color, #ee2a7b)) !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 3px !important;
	box-sizing: border-box !important;
	transition: transform .15s ease !important;
}
.wstory-all-grid-item:active .wstory-all-grid-ring { transform: scale(0.94) !important; }
.wstory-all-grid-ring-inner {
	width: 100% !important;
	height: 100% !important;
	border-radius: 50% !important;
	background: #fff !important;
	padding: 2px !important;
	overflow: hidden !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	box-sizing: border-box !important;
}
.wstory-all-grid-item img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	border-radius: 50% !important;
	display: block !important;
}
.wstory-all-grid-fallback {
	font-size: 20px !important;
	font-weight: 600 !important;
	color: #555 !important;
}
.wstory-all-grid-title {
	position: static !important;
	background: none !important;
	color: #262626 !important;
	font-size: 11.5px !important;
	font-weight: 600 !important;
	text-align: center !important;
	max-width: 82px !important;
	display: -webkit-box !important;
	-webkit-line-clamp: 2 !important;
	-webkit-box-orient: vertical !important;
	overflow: hidden !important;
	text-overflow: ellipsis !important;
	line-height: 1.35 !important;
	padding: 0 !important;
	white-space: normal !important;
}

@media (min-width: 480px) {
	.wstory-all-grid-items { grid-template-columns: repeat(5, 1fr) !important; }
}
@media (min-width: 700px) {
	.wstory-all-grid-items { grid-template-columns: repeat(7, 1fr) !important; max-width: 900px !important; margin: 0 auto !important; width: 100% !important; }
}

/* مودال ارسال استوری مشتری */
.wstory-ugc-modal {
	position: fixed !important;
	inset: 0 !important;
	z-index: 1000000 !important;
	background: rgba(0,0,0,.6) !important;
	display: none !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 16px !important;
	font-family: var(--wstory-font);
}
.wstory-ugc-modal.is-open { display: flex !important; }
.wstory-ugc-modal-inner {
	background: #fff !important;
	border-radius: 16px !important;
	width: 100% !important;
	max-width: 420px !important;
	max-height: 90vh !important;
	overflow-y: auto !important;
	padding: 18px !important;
	box-sizing: border-box !important;
}
.wstory-ugc-modal-header {
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	justify-content: space-between !important;
	font-weight: 700 !important;
	font-size: 15px !important;
	margin: 0 0 14px !important;
	color: #111 !important;
	width: 100% !important;
}
.wstory-ugc-modal-close {
	background: #f0f0f1 !important;
	border: none !important;
	border-radius: 50% !important;
	width: 30px !important;
	height: 30px !important;
	min-width: 30px !important;
	flex-shrink: 0 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	cursor: pointer !important;
	color: #333 !important;
	padding: 0 !important;
}
.wstory-ugc-modal-close svg {
	display: block !important;
	width: 18px !important;
	height: 18px !important;
}
.wstory-ugc-field { margin-bottom: 14px !important; }
.wstory-ugc-field label {
	display: block !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	color: #333 !important;
	margin-bottom: 6px !important;
}
.wstory-ugc-field input[type="text"],
.wstory-ugc-field textarea {
	width: 100% !important;
	border: 1px solid #ddd !important;
	border-radius: 8px !important;
	padding: 9px 12px !important;
	font-size: 14px !important;
	font-family: inherit !important;
	box-sizing: border-box !important;
	background: #fff !important;
	color: #111 !important;
}
.wstory-ugc-field input[type="file"] {
	width: 100% !important;
	font-size: 12.5px !important;
}
.wstory-ugc-preview {
	margin-top: 8px;
}
.wstory-ugc-preview img {
	max-width: 100%;
	max-height: 160px;
	border-radius: 8px;
	display: block;
}
.wstory-ugc-note {
	font-size: 11.5px;
	color: #888;
	margin: 0 0 12px;
}
.wstory-ugc-msg {
	font-size: 13px;
	margin-bottom: 10px;
	display: none;
	padding: 8px 12px;
	border-radius: 8px;
}
.wstory-ugc-msg.show { display: block; }
.wstory-ugc-msg.error { background: #fde8e8; color: #b32d2e; }
.wstory-ugc-msg.success { background: #e6f7ea; color: #007017; }
.wstory-ugc-submit {
	width: 100% !important;
	background: var(--wstory-accent) !important;
	color: #fff !important;
	border: none !important;
	border-radius: 999px !important;
	padding: 12px !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	cursor: pointer !important;
}
.wstory-ugc-submit:disabled {
	opacity: .6;
	cursor: default;
}

.wstory-big-heart {
	position: absolute;
	top: 50%;
	left: 50%;
	font-size: 110px;
	pointer-events: none;
	z-index: 46;
	transform: translate(-50%, -50%) scale(0.3);
	opacity: 0;
	filter: drop-shadow(0 4px 18px rgba(0,0,0,.35));
	animation: wstory-big-heart-pop .8s cubic-bezier(.17,.89,.32,1.49) forwards;
}
@keyframes wstory-big-heart-pop {
	0%   { transform: translate(-50%, -50%) scale(0.3); opacity: 0; }
	25%  { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
	40%  { transform: translate(-50%, -50%) scale(0.95); opacity: 1; }
	75%  { transform: translate(-50%, -50%) scale(1); opacity: 1; }
	100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}
@keyframes wstory-float-up {
	0% { opacity: 1; transform: translateY(0) scale(.8); }
	100% { opacity: 0; transform: translateY(-120px) scale(1.3); }
}

/* ---------------- Responsive ---------------- */

@media (max-width: 480px) {
	.wstory-ring { width: 52px; height: 52px; }
	.wstory-avatar { width: 62px; }
	.wstory-avatar-title { max-width: 62px; font-size: 10px; }
	.wstory-product-name { max-width: 110px; }
	.wstory-name-input { flex: 0 0 72px !important; min-width: 0 !important; }
}

@media (min-width: 700px) {
	.wstory-viewer-inner { box-shadow: 0 20px 60px rgba(0,0,0,.5); }
	.wstory-nav-zone { cursor: pointer; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
	.wstory-viewer, .wstory-product-link, .wstory-emoji-burst, .wstory-like-btn.pulse svg, .wstory-big-heart, .wstory-caption[class*="wstory-badge-"] {
		animation: none !important;
		transition: none !important;
	}
}

/* focus visibility for accessibility */
.wstory-avatar:focus-visible,
.wstory-btn-close:focus-visible,
.wstory-btn-mute:focus-visible,
.wstory-like-btn:focus-visible,
.wstory-reaction-btn:focus-visible,
.wstory-send-btn:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}
