/**
 * AtreMahdi Story Reviews - Frontend Styles
 * استایل لاکچری طلایی-مشکی برای نمایش استوری‌های نظرات
 * Version: 1.0.0
 */

/* متغیرها */
:root {
	--asr-gold: #d4af37;
	--asr-gold-light: #f4d03f;
	--asr-gold-dark: #b8941f;
	--asr-gold-grad: linear-gradient(135deg, #d4af37 0%, #f4d03f 50%, #d4af37 100%);
	--asr-gold-grad-shine: linear-gradient(135deg, #b8941f 0%, #f4d03f 25%, #fff8dc 50%, #f4d03f 75%, #b8941f 100%);
	--asr-dark: #0a0a0c;
	--asr-dark-2: #131318;
	--asr-dark-3: #1c1c24;
	--asr-dark-4: #25252f;
	--asr-text: #f5f5f7;
	--asr-text-muted: #a8a8b3;
	--asr-text-dim: #6b6b76;
	--asr-border: rgba(212, 175, 55, 0.18);
	--asr-shadow-gold: 0 4px 30px rgba(212, 175, 55, 0.15);
	--asr-shadow-deep: 0 20px 60px rgba(0, 0, 0, 0.6);
	--asr-radius: 18px;
	--asr-radius-sm: 10px;
	--asr-transition: cubic-bezier(0.4, 0, 0.2, 1);
	--asr-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* فونت فارسی */
.asr-stories-container,
.asr-story-modal {
	font-family: 'Vazirmatn', 'IRANSans', 'IRANYekan', 'Segoe UI', Tahoma, sans-serif;
}

/* ============ Container ============ */
.asr-stories-container {
	position: relative;
	width: 100%;
	margin: 0 0 30px;
	padding: 22px 24px 20px;
	background:
		radial-gradient(ellipse at top right, rgba(212, 175, 55, 0.08) 0%, transparent 50%),
		radial-gradient(ellipse at bottom left, rgba(212, 175, 55, 0.04) 0%, transparent 50%),
		linear-gradient(135deg, #0a0a0c 0%, #131318 50%, #0a0a0c 100%);
	border-radius: var(--asr-radius);
	border: 1px solid var(--asr-border);
	box-shadow:
		var(--asr-shadow-deep),
		inset 0 1px 0 rgba(255, 255, 255, 0.03);
	overflow: hidden;
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}

.asr-stories-container::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent 0%, var(--asr-gold) 50%, transparent 100%);
	opacity: 0.5;
}

/* ============ Header ============ */
.asr-stories-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
	position: relative;
	z-index: 2;
}

.asr-stories-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex: 1;
	flex-wrap: wrap;
}

.asr-stories-title-wrap {
	display: flex;
	align-items: center;
	gap: 10px;
}

.asr-stories-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	background: var(--asr-gold-grad);
	color: var(--asr-dark);
	border-radius: 11px;
	box-shadow: 0 4px 14px rgba(212, 175, 55, 0.4);
}

.asr-stories-title {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	color: var(--asr-text);
	letter-spacing: -0.3px;
	line-height: 1.3;
}

.asr-stories-subtitle {
	font-size: 12px;
	color: var(--asr-gold-light);
	font-weight: 500;
	letter-spacing: 0.2px;
	display: flex;
	align-items: center;
	gap: 6px;
}

.asr-stories-subtitle::before {
	content: '';
	width: 6px;
	height: 6px;
	background: var(--asr-gold);
	border-radius: 50%;
	box-shadow: 0 0 8px var(--asr-gold);
	animation: asr-pulse 2s ease-in-out infinite;
}

@keyframes asr-pulse {
	0%, 100% { opacity: 1; transform: scale(1); }
	50% { opacity: 0.5; transform: scale(1.2); }
}

.asr-stories-decoration {
	display: flex;
	gap: 4px;
	align-items: center;
}

.asr-stories-decoration span {
	display: block;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: var(--asr-gold);
	opacity: 0.4;
}

.asr-stories-decoration span:nth-child(2) { opacity: 0.7; }
.asr-stories-decoration span:nth-child(3) { opacity: 1; }

/* ============ Stories Bar ============ */
.asr-stories-bar {
	display: flex;
	align-items: center;
	gap: 12px;
	position: relative;
}

.asr-stories-track {
	display: flex;
	gap: 18px;
	overflow-x: auto;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-ms-overflow-style: none;
	flex: 1;
	padding: 8px 4px;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
}

.asr-stories-track::-webkit-scrollbar { display: none; }

/* دکمه‌های ناوبری */
.asr-nav-btn {
	flex-shrink: 0;
	width: 34px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(212, 175, 55, 0.04));
	border: 1px solid var(--asr-border);
	color: var(--asr-gold);
	border-radius: 50%;
	cursor: pointer;
	transition: all 0.3s var(--asr-transition);
	z-index: 3;
}

.asr-nav-btn:hover {
	background: var(--asr-gold-grad);
	color: var(--asr-dark);
	transform: scale(1.08);
	box-shadow: 0 4px 16px rgba(212, 175, 55, 0.4);
}

.asr-nav-btn:active { transform: scale(0.95); }
.asr-nav-btn:disabled,
.asr-nav-btn.asr-hidden {
	opacity: 0;
	pointer-events: none;
}

/* ============ Story Item ============ */
.asr-story-item {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	transition: transform 0.35s var(--asr-spring);
	scroll-snap-align: start;
	position: relative;
	min-width: 90px;
	max-width: 110px;
}

.asr-story-item:hover {
	transform: translateY(-4px);
}

.asr-story-item:hover .asr-story-ring-svg {
	filter: drop-shadow(0 0 14px rgba(212, 175, 55, 0.7));
}

.asr-story-item:hover .asr-story-avatar {
	transform: scale(1.05);
}

.asr-story-ring {
	position: relative;
	width: 76px;
	height: 76px;
	border-radius: 50%;
	background: var(--asr-dark-2);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 3px;
	overflow: hidden;
}

.asr-story-ring-svg {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	transition: filter 0.4s var(--asr-transition);
	z-index: 1;
	pointer-events: none;
}

.asr-ring-bg { opacity: 0.4; }
.asr-ring-progress {
	transition: stroke-dashoffset 0.5s linear;
}

.asr-story-active .asr-ring-progress {
	stroke-dashoffset: 0 !important;
	transition: stroke-dashoffset 5s linear !important;
}

.asr-story-avatar {
	position: relative;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background: var(--asr-dark-3);
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2;
	transition: transform 0.35s var(--asr-spring);
	border: 2px solid var(--asr-dark);
}

.asr-story-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
}

.asr-avatar-initials {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-weight: 700;
	font-size: 22px;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* نشان تایید خرید */
.asr-verified-badge {
	position: absolute;
	bottom: 2px;
	right: 2px;
	width: 20px;
	height: 20px;
	background: var(--asr-gold-grad);
	color: var(--asr-dark);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 2px solid var(--asr-dark);
	z-index: 3;
	box-shadow: 0 2px 8px rgba(212, 175, 55, 0.5);
}

/* اطلاعات استوری */
.asr-story-info {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
	text-align: center;
	max-width: 100px;
}

.asr-story-name {
	font-size: 12px;
	font-weight: 600;
	color: var(--asr-text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
}

.asr-story-rating {
	display: flex;
	align-items: center;
	gap: 1px;
	color: var(--asr-gold);
}

.asr-story-rating .asr-star { width: 11px; height: 11px; }

.asr-story-date {
	font-size: 10px;
	color: var(--asr-text-dim);
	font-weight: 500;
}

/* ============ Stars ============ */
.asr-stars {
	display: inline-flex;
	align-items: center;
	gap: 1px;
	direction: ltr;
}

.asr-star { color: var(--asr-gold); }
.asr-star-full path { fill: currentColor; }
.asr-star-half path { fill: url(#asr-half); color: rgba(212, 175, 55, 0.3); }
.asr-star-empty { color: rgba(212, 175, 55, 0.25); }
.asr-star-empty path { fill: currentColor; }

/* ============ Footer ============ */
.asr-stories-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px solid rgba(255, 255, 255, 0.05);
	gap: 12px;
	flex-wrap: wrap;
}

.asr-progress-dots {
	display: flex;
	gap: 5px;
	align-items: center;
}

.asr-dot {
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.15);
	transition: all 0.3s var(--asr-transition);
}

.asr-dot-active {
	background: var(--asr-gold-grad);
	width: 18px;
	border-radius: 3px;
	box-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
}

.asr-stories-hint {
	font-size: 11px;
	color: var(--asr-text-dim);
	font-weight: 500;
}

/* ============ MODAL ============ */
.asr-story-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.35s var(--asr-transition), visibility 0.35s;
}

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

.asr-story-modal.asr-modal-open {
	opacity: 1;
	visibility: visible;
}

.asr-modal-overlay {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse at center, rgba(20, 20, 25, 0.85) 0%, rgba(0, 0, 0, 0.95) 100%);
	-webkit-backdrop-filter: blur(20px);
	backdrop-filter: blur(20px);
}

.asr-modal-content {
	position: relative;
	width: min(440px, 92vw);
	height: min(760px, 92vh);
	background:
		radial-gradient(ellipse at top, rgba(212, 175, 55, 0.08) 0%, transparent 50%),
		linear-gradient(180deg, #0e0e12 0%, #0a0a0c 100%);
	border-radius: 24px;
	overflow: hidden;
	box-shadow:
		0 30px 80px rgba(0, 0, 0, 0.7),
		0 0 0 1px var(--asr-border),
		inset 0 1px 0 rgba(255, 255, 255, 0.05);
	transform: scale(0.92) translateY(20px);
	transition: transform 0.4s var(--asr-spring);
	display: flex;
	flex-direction: column;
}

.asr-story-modal.asr-modal-open .asr-modal-content {
	transform: scale(1) translateY(0);
}

/* ============ Progress Bars ============ */
.asr-modal-progress-bars {
	position: absolute;
	top: 12px;
	left: 12px;
	right: 12px;
	z-index: 10;
	display: flex;
	gap: 4px;
}

.asr-progress-bar {
	flex: 1;
	height: 2.5px;
	background: rgba(255, 255, 255, 0.15);
	border-radius: 2px;
	overflow: hidden;
}

.asr-progress-bar-fill {
	width: 0;
	height: 100%;
	background: var(--asr-gold-grad);
	border-radius: 2px;
	transition: width 0.1s linear;
	box-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
}

.asr-progress-bar.asr-completed .asr-progress-bar-fill { width: 100% !important; }
.asr-progress-bar.asr-current .asr-progress-bar-fill { animation-play-state: running; }
.asr-progress-bar.asr-paused .asr-progress-bar-fill { animation-play-state: paused; transition: none; }

/* ============ Modal Header ============ */
.asr-modal-header {
	position: absolute;
	top: 26px;
	left: 16px;
	right: 16px;
	z-index: 9;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.asr-modal-user {
	display: flex;
	align-items: center;
	gap: 10px;
	background: rgba(10, 10, 12, 0.7);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	padding: 6px 12px 6px 6px;
	border-radius: 30px;
	border: 1px solid rgba(255, 255, 255, 0.05);
}

.asr-modal-avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--asr-dark-3);
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	border: 2px solid var(--asr-gold);
}

.asr-modal-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.asr-modal-user-info {
	display: flex;
	flex-direction: column;
	gap: 1px;
}

.asr-modal-name {
	font-size: 13px;
	font-weight: 600;
	color: var(--asr-text);
	line-height: 1.2;
}

.asr-modal-date {
	font-size: 11px;
	color: var(--asr-text-dim);
}

.asr-modal-close {
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(10, 10, 12, 0.7);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	color: var(--asr-text);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 50%;
	cursor: pointer;
	transition: all 0.3s var(--asr-transition);
	flex-shrink: 0;
}

.asr-modal-close:hover {
	background: rgba(220, 38, 38, 0.2);
	border-color: rgba(220, 38, 38, 0.4);
	color: #fff;
	transform: rotate(90deg);
}

/* ============ Modal Body ============ */
.asr-modal-body {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 80px 26px 30px;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: rgba(212, 175, 55, 0.3) transparent;
}

.asr-modal-body::-webkit-scrollbar { width: 4px; }
.asr-modal-body::-webkit-scrollbar-track { background: transparent; }
.asr-modal-body::-webkit-scrollbar-thumb {
	background: rgba(212, 175, 55, 0.3);
	border-radius: 2px;
}

.asr-modal-body-inner {
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 16px;
	animation: asr-fade-in 0.5s var(--asr-transition);
}

@keyframes asr-fade-in {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: translateY(0); }
}

.asr-modal-rating {
	display: flex;
	align-items: center;
	gap: 2px;
	justify-content: center;
	padding: 4px;
}

.asr-modal-rating .asr-star { width: 18px; height: 18px; }

.asr-modal-text {
	font-size: 15px;
	line-height: 1.9;
	color: var(--asr-text);
	text-align: justify;
	font-weight: 400;
	letter-spacing: 0.1px;
	background: rgba(255, 255, 255, 0.02);
	border-left: 2px solid var(--asr-gold);
	padding: 14px 16px;
	border-radius: 8px;
	position: relative;
}

.asr-modal-text::before {
	content: '"';
	position: absolute;
	top: -10px;
	right: 12px;
	font-size: 40px;
	color: var(--asr-gold);
	opacity: 0.4;
	font-family: Georgia, serif;
	line-height: 1;
}

.asr-modal-text p { margin: 0 0 8px; }
.asr-modal-text p:last-child { margin-bottom: 0; }

/* تصویر محصول در مودال */
.asr-modal-product {
	display: flex;
	align-items: center;
	gap: 12px;
	background: rgba(212, 175, 55, 0.06);
	border: 1px solid var(--asr-border);
	border-radius: 12px;
	padding: 10px;
}

.asr-modal-product-image {
	width: 50px;
	height: 50px;
	border-radius: 8px;
	overflow: hidden;
	background: var(--asr-dark-3);
	flex-shrink: 0;
}

.asr-modal-product-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.asr-modal-product-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	flex: 1;
}

.asr-modal-product-label {
	font-size: 10px;
	color: var(--asr-gold);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.asr-modal-product-title {
	font-size: 13px;
	color: var(--asr-text);
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* نشان خریدار تایید شده */
.asr-modal-verified {
	display: flex;
	align-items: center;
	gap: 8px;
	justify-content: center;
	padding: 8px 14px;
	background: linear-gradient(135deg, rgba(212, 175, 55, 0.12), rgba(212, 175, 55, 0.04));
	border: 1px solid var(--asr-border);
	border-radius: 30px;
	color: var(--asr-gold);
	font-size: 12px;
	font-weight: 600;
	align-self: center;
}

/* ============ Modal Navigation ============ */
.asr-modal-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 42px;
	height: 42px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(10, 10, 12, 0.7);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	color: var(--asr-text);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 50%;
	cursor: pointer;
	transition: all 0.3s var(--asr-transition);
	z-index: 8;
}

.asr-modal-nav:hover {
	background: var(--asr-gold-grad);
	color: var(--asr-dark);
	border-color: var(--asr-gold);
	transform: translateY(-50%) scale(1.1);
	box-shadow: 0 4px 20px rgba(212, 175, 55, 0.4);
}

.asr-modal-nav-prev { right: 12px; }
.asr-modal-nav-next { left: 12px; }

/* نواحی لمس */
.asr-modal-touch {
	position: absolute;
	top: 70px;
	bottom: 0;
	width: 30%;
	z-index: 7;
}

.asr-modal-touch-prev { right: 0; }
.asr-modal-touch-next { left: 0; }

/* ============ Loading ============ */
.asr-modal-body.asr-loading::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 32px;
	height: 32px;
	margin: -16px 0 0 -16px;
	border: 2.5px solid rgba(212, 175, 55, 0.2);
	border-top-color: var(--asr-gold);
	border-radius: 50%;
	animation: asr-spin 0.8s linear infinite;
}

@keyframes asr-spin {
	to { transform: rotate(360deg); }
}

/* ============ Animations ============ */
@keyframes asr-shimmer {
	0% { background-position: -200% 0; }
	100% { background-position: 200% 0; }
}

.asr-story-item.asr-loading .asr-story-avatar {
	background: linear-gradient(
		90deg,
		var(--asr-dark-3) 25%,
		var(--asr-dark-4) 50%,
		var(--asr-dark-3) 75%
	);
	background-size: 200% 100%;
	animation: asr-shimmer 1.5s infinite;
}

/* ============ Responsive ============ */
@media (max-width: 768px) {
	.asr-stories-container {
		padding: 16px 14px 14px;
		margin: 0 0 20px;
		border-radius: 14px;
	}

	.asr-stories-header { margin-bottom: 14px; }

	.asr-stories-title { font-size: 14px; }
	.asr-stories-subtitle { font-size: 11px; }
	.asr-stories-icon { width: 32px; height: 32px; border-radius: 9px; }

	.asr-stories-track { gap: 12px; }
	.asr-story-item { min-width: 78px; max-width: 90px; }
	.asr-story-ring { width: 64px; height: 64px; }
	.asr-story-name { font-size: 11px; }
	.asr-story-date { font-size: 9px; }
	.asr-story-rating .asr-star { width: 9px; height: 9px; }

	.asr-nav-btn {
		width: 30px;
		height: 30px;
		display: none; /* در موبایل اسکرول طبیعی استفاده می‌شود */
	}

	.asr-stories-footer { margin-top: 12px; padding-top: 10px; }
	.asr-stories-hint { font-size: 10px; }

	.asr-modal-content {
		width: 100vw;
		height: 100vh;
		border-radius: 0;
	}

	.asr-modal-body { padding: 70px 18px 24px; }
	.asr-modal-text { font-size: 14px; padding: 12px 14px; }

	.asr-modal-nav { display: none; }
	.asr-modal-touch { width: 40%; }
}

@media (max-width: 480px) {
	.asr-stories-title { font-size: 13px; }
	.asr-stories-subtitle { display: none; }
	.asr-story-item { min-width: 70px; max-width: 80px; }
	.asr-story-ring { width: 58px; height: 58px; }
	.asr-avatar-initials { font-size: 18px; }
}

/* ============ Accessibility ============ */
.asr-story-item:focus-visible,
.asr-nav-btn:focus-visible,
.asr-modal-close:focus-visible,
.asr-modal-nav:focus-visible {
	outline: 2px solid var(--asr-gold);
	outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

/* ============ Print ============ */
@media print {
	.asr-stories-container,
	.asr-story-modal { display: none !important; }
}

/* ============ WoodMart Compatibility ============ */
.single-product .asr-stories-container {
	margin-left: auto;
	margin-right: auto;
}

.woodmart-related-products .asr-stories-container,
.related.products .asr-stories-container {
	display: none;
}

/* رفع تداخل با استایل وودمارت */
.asr-stories-container * {
	box-sizing: border-box;
}

.asr-stories-container img { max-width: 100%; }


/* WoodMart compatibility: prevent global button padding from collapsing ASR SVG icons. */
.asr-stories-container .asr-nav-btn {
	width: 34px !important;
	height: 34px !important;
	min-width: 34px !important;
	padding: 0 !important;
}

.asr-stories-container .asr-nav-btn > svg {
	width: 18px !important;
	height: 18px !important;
	min-width: 18px !important;
	flex: 0 0 18px !important;
}

.asr-story-modal .asr-modal-nav {
	width: 42px !important;
	height: 42px !important;
	min-width: 42px !important;
	padding: 0 !important;
}

.asr-story-modal .asr-modal-nav > svg {
	width: 22px !important;
	height: 22px !important;
	min-width: 22px !important;
	flex: 0 0 22px !important;
}


/* Keep the desktop navigation controls perfectly circular with WoodMart's 42px control sizing. */
.asr-stories-container .asr-nav-btn {
	width: 42px !important;
	height: 42px !important;
	min-width: 42px !important;
	min-height: 42px !important;
	max-width: 42px !important;
	max-height: 42px !important;
}


/* ==========================================================
   ASR Premium Stories — Visual System 1.1.0
   Scoped exclusively to AtreMahdi Story Reviews.
   ========================================================== */

.asr-stories-container {
	--asr-v2-gold: #f2c94c;
	--asr-v2-gold-bright: #ffe083;
	--asr-v2-gold-deep: #b9851b;
	--asr-v2-ink: #08090d;
	--asr-v2-surface: #111219;
	--asr-v2-line: rgba(242, 201, 76, 0.18);
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding: 0 0 18px !important;
	border: 1px solid rgba(242, 201, 76, 0.22) !important;
	border-radius: 24px !important;
	background:
		radial-gradient(circle at 92% -8%, rgba(242, 201, 76, 0.16), transparent 31%),
		radial-gradient(circle at -5% 115%, rgba(111, 72, 180, 0.10), transparent 35%),
		linear-gradient(145deg, #15161d 0%, #08090d 56%, #111118 100%) !important;
	box-shadow:
		0 26px 64px rgba(8, 9, 13, 0.28),
		0 8px 22px rgba(8, 9, 13, 0.18),
		inset 0 1px 0 rgba(255, 255, 255, 0.055) !important;
}

.asr-stories-container::before {
	content: '';
	position: absolute;
	inset: 0 0 auto;
	height: 2px;
	z-index: 2;
	background: linear-gradient(90deg, transparent 3%, #b9851b 24%, #ffe083 50%, #b9851b 76%, transparent 97%);
	opacity: 0.9;
}

.asr-stories-container::after {
	content: '';
	position: absolute;
	z-index: 0;
	width: 210px;
	height: 210px;
	top: -145px;
	right: 20%;
	border-radius: 50%;
	background: rgba(242, 201, 76, 0.12);
	filter: blur(58px);
	pointer-events: none;
}

.asr-stories-container > * {
	position: relative;
	z-index: 1;
}

.asr-stories-header {
	padding: 18px 22px 14px !important;
	margin: 0 !important;
	border-bottom: 1px solid rgba(255, 255, 255, 0.065);
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.028), transparent);
}

.asr-stories-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
}

.asr-stories-title-wrap {
	display: flex;
	align-items: center;
	gap: 12px !important;
	min-width: 0;
}

.asr-stories-icon {
	width: 40px !important;
	height: 40px !important;
	min-width: 40px;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	padding: 0 !important;
	color: #17130a !important;
	border: 1px solid rgba(255, 229, 139, 0.82) !important;
	border-radius: 13px !important;
	background: linear-gradient(145deg, #ffe28a 0%, #f2c94c 46%, #c99120 100%) !important;
	box-shadow:
		0 8px 22px rgba(242, 201, 76, 0.24),
		inset 0 1px 0 rgba(255, 255, 255, 0.58) !important;
	transform: none !important;
}

.asr-stories-icon > svg {
	width: 20px !important;
	height: 20px !important;
	min-width: 20px;
	stroke-width: 2.2;
	filter: none;
}

.asr-stories-title {
	margin: 0 !important;
	color: #fff !important;
	font-size: 17px !important;
	font-weight: 800 !important;
	line-height: 1.35 !important;
	letter-spacing: -0.25px;
	text-shadow: 0 1px 12px rgba(0, 0, 0, 0.25);
}

.asr-stories-subtitle {
	display: inline-flex !important;
	align-items: center;
	gap: 7px;
	flex-shrink: 0;
	padding: 7px 10px !important;
	color: #ecd88f !important;
	font-size: 10.5px !important;
	font-weight: 650 !important;
	line-height: 1;
	border: 1px solid rgba(242, 201, 76, 0.16);
	border-radius: 999px;
	background: rgba(242, 201, 76, 0.07);
}

.asr-stories-subtitle::before {
	content: '';
	width: 6px;
	height: 6px;
	flex: 0 0 6px;
	border-radius: 50%;
	background: #f2c94c;
	box-shadow: 0 0 0 4px rgba(242, 201, 76, 0.10), 0 0 12px rgba(242, 201, 76, 0.55);
}

.asr-stories-decoration {
	display: none !important;
}

.asr-stories-bar {
	display: flex;
	align-items: center;
	gap: 10px !important;
	padding: 14px 14px 0 !important;
	margin: 0 !important;
}

.asr-stories-track {
	display: flex;
	align-items: flex-start;
	gap: 8px !important;
	padding: 4px 2px 8px !important;
	scroll-padding-inline: 6px;
	-ms-overflow-style: none;
	scrollbar-width: none;
}

.asr-stories-track::-webkit-scrollbar {
	display: none;
}

.asr-stories-container .asr-nav-btn {
	width: 42px !important;
	height: 42px !important;
	min-width: 42px !important;
	min-height: 42px !important;
	max-width: 42px !important;
	max-height: 42px !important;
	padding: 0 !important;
	color: #f6d66c !important;
	border: 1px solid rgba(242, 201, 76, 0.25) !important;
	border-radius: 50% !important;
	background: linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(242, 201, 76, 0.045)) !important;
	box-shadow:
		0 8px 18px rgba(0, 0, 0, 0.26),
		inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	transition: transform 0.25s ease, color 0.25s ease, background 0.25s ease, border-color 0.25s ease !important;
}

.asr-stories-container .asr-nav-btn > svg {
	width: 18px !important;
	height: 18px !important;
	min-width: 18px !important;
	flex: 0 0 18px !important;
	stroke-width: 2.3;
}

.asr-stories-container .asr-nav-btn:hover {
	color: #17130a !important;
	border-color: #ffe083 !important;
	background: linear-gradient(145deg, #ffe083, #d9a82f) !important;
	box-shadow: 0 10px 24px rgba(242, 201, 76, 0.25) !important;
	transform: translateY(-2px) scale(1.02) !important;
}

.asr-stories-container .asr-nav-btn:active {
	transform: translateY(0) scale(0.96) !important;
}

.asr-stories-container .asr-nav-btn.asr-hidden,
.asr-stories-container .asr-nav-btn:disabled {
	opacity: 0 !important;
	pointer-events: none !important;
	transform: scale(0.86) !important;
}

.asr-story-item {
	flex: 0 0 78px !important;
	min-width: 78px !important;
	max-width: 78px !important;
	gap: 7px !important;
	padding: 7px 3px 9px !important;
	border: 1px solid transparent;
	border-radius: 18px;
	background: transparent;
	transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s ease, border-color 0.3s ease !important;
}

.asr-story-item:hover {
	transform: translateY(-4px) !important;
	background: rgba(255, 255, 255, 0.035);
	border-color: rgba(242, 201, 76, 0.10);
}

.asr-story-item.asr-story-active {
	background: linear-gradient(180deg, rgba(242, 201, 76, 0.095), rgba(242, 201, 76, 0.025));
	border-color: rgba(242, 201, 76, 0.18);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.asr-story-ring {
	width: 70px !important;
	height: 70px !important;
	filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.24));
}

.asr-story-ring-svg {
	inset: 0;
	filter: drop-shadow(0 0 5px rgba(242, 201, 76, 0.22));
}

.asr-ring-bg {
	stroke: rgba(255, 255, 255, 0.105) !important;
	stroke-width: 3.2 !important;
}

.asr-ring-progress {
	stroke-width: 4 !important;
	filter: drop-shadow(0 0 3px rgba(242, 201, 76, 0.52));
}

.asr-story-avatar {
	inset: 6px !important;
	border: 1px solid rgba(255, 255, 255, 0.08) !important;
	background: #171820 !important;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.06),
		0 0 0 2px #0c0d12 !important;
}

.asr-story-avatar img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
}

.asr-avatar-initials {
	width: 100% !important;
	height: 100% !important;
	color: #f8f5ed !important;
	font-size: 21px !important;
	font-weight: 850 !important;
	letter-spacing: -0.6px;
	background:
		radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.16), transparent 28%),
		linear-gradient(145deg, #2b2c36, #15161d) !important;
}

.asr-story-item.asr-story-active .asr-avatar-initials {
	color: #17130a !important;
	background:
		radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.55), transparent 25%),
		linear-gradient(145deg, #ffe083, #d59f23) !important;
}

.asr-verified-badge {
	right: auto !important;
	left: -1px !important;
	bottom: 0 !important;
	width: 19px !important;
	height: 19px !important;
	padding: 0 !important;
	color: #151109 !important;
	border: 2px solid #0c0d12 !important;
	background: linear-gradient(145deg, #ffe083, #d9a52a) !important;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.38), 0 0 10px rgba(242, 201, 76, 0.28) !important;
}

.asr-verified-badge > svg {
	width: 10px !important;
	height: 10px !important;
	min-width: 10px !important;
	stroke-width: 3.3;
}

.asr-story-info {
	width: 100%;
	gap: 3px !important;
}

.asr-story-name {
	width: 100%;
	overflow: hidden;
	color: #f5f4f1 !important;
	font-size: 11.5px !important;
	font-weight: 750 !important;
	line-height: 1.4 !important;
	text-align: center;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.asr-story-rating {
	min-height: 12px;
}

.asr-story-rating .asr-stars {
	gap: 0 !important;
}

.asr-story-rating .asr-star {
	width: 10px !important;
	height: 10px !important;
	fill: #e7b936 !important;
	filter: drop-shadow(0 1px 3px rgba(231, 185, 54, 0.22));
}

.asr-story-date {
	color: #8f909b !important;
	font-size: 9.5px !important;
	font-weight: 500 !important;
	line-height: 1.35;
}

.asr-stories-footer {
	margin: 8px 20px 0 !important;
	padding: 10px 0 0 !important;
	border-top: 1px solid rgba(255, 255, 255, 0.055) !important;
}

.asr-stories-hint {
	color: #8d8e99 !important;
	font-size: 9.5px !important;
	letter-spacing: 0 !important;
}

/* Premium story viewer */
.asr-story-modal.asr-modal-open {
	display: flex;
	align-items: center;
	justify-content: center;
}

.asr-modal-overlay {
	background:
		radial-gradient(circle at 50% 25%, rgba(242, 201, 76, 0.07), transparent 34%),
		rgba(4, 5, 9, 0.88) !important;
	-webkit-backdrop-filter: blur(16px) saturate(0.86);
	backdrop-filter: blur(16px) saturate(0.86);
}

.asr-modal-content {
	width: min(420px, calc(100vw - 34px)) !important;
	height: min(720px, calc(100vh - 34px)) !important;
	max-height: 720px;
	overflow: hidden;
	border: 1px solid rgba(242, 201, 76, 0.22) !important;
	border-radius: 28px !important;
	background:
		radial-gradient(circle at 92% -4%, rgba(242, 201, 76, 0.15), transparent 29%),
		radial-gradient(circle at 5% 105%, rgba(100, 70, 170, 0.11), transparent 32%),
		linear-gradient(155deg, #15161e 0%, #08090d 57%, #111117 100%) !important;
	box-shadow:
		0 44px 110px rgba(0, 0, 0, 0.66),
		0 10px 34px rgba(0, 0, 0, 0.36),
		inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

.asr-modal-progress-bars {
	top: 0 !important;
	gap: 5px !important;
	padding: 14px 16px 8px !important;
	background: linear-gradient(180deg, rgba(8, 9, 13, 0.58), transparent);
}

.asr-progress-bar {
	height: 3px !important;
	overflow: hidden;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.12) !important;
}

.asr-progress-bar-fill {
	border-radius: inherit;
	background: linear-gradient(90deg, #b9851b, #ffe083) !important;
	box-shadow: 0 0 8px rgba(242, 201, 76, 0.38);
}

.asr-modal-header {
	padding: 14px 18px 13px !important;
	border-bottom: 1px solid rgba(255, 255, 255, 0.065);
	background: rgba(255, 255, 255, 0.018);
}

.asr-modal-user {
	gap: 10px !important;
}

.asr-modal-avatar {
	width: 42px !important;
	height: 42px !important;
	border: 2px solid rgba(242, 201, 76, 0.70) !important;
	box-shadow: 0 0 0 3px rgba(242, 201, 76, 0.08), 0 8px 16px rgba(0, 0, 0, 0.25);
}

.asr-modal-avatar .asr-avatar-initials {
	font-size: 16px !important;
}

.asr-modal-name {
	color: #fff !important;
	font-size: 13px !important;
	font-weight: 800 !important;
}

.asr-modal-date {
	margin-top: 2px;
	color: #9697a2 !important;
	font-size: 10px !important;
}

.asr-modal-close {
	width: 38px !important;
	height: 38px !important;
	min-width: 38px !important;
	min-height: 38px !important;
	padding: 0 !important;
	color: #d8d8dd !important;
	border: 1px solid rgba(255, 255, 255, 0.09) !important;
	border-radius: 50% !important;
	background: rgba(255, 255, 255, 0.045) !important;
}

.asr-modal-close > svg {
	width: 18px !important;
	height: 18px !important;
	min-width: 18px !important;
}

.asr-modal-close:hover {
	color: #17130a !important;
	border-color: #f2c94c !important;
	background: #f2c94c !important;
	transform: rotate(90deg);
}

.asr-modal-body {
	padding: 24px 34px 30px !important;
}

.asr-modal-body-inner {
	width: 100%;
	max-width: 330px;
	margin: auto;
}

.asr-modal-rating {
	margin-bottom: 16px !important;
}

.asr-modal-rating .asr-stars {
	justify-content: center;
	gap: 3px !important;
}

.asr-modal-rating .asr-star {
	width: 19px !important;
	height: 19px !important;
	fill: #f2c94c !important;
	filter: drop-shadow(0 3px 5px rgba(242, 201, 76, 0.23));
}

.asr-modal-text {
	position: relative;
	margin: 0 0 14px !important;
	padding: 30px 20px 20px !important;
	color: #f5f3ed !important;
	font-size: 14px !important;
	font-weight: 550;
	line-height: 2 !important;
	text-align: right;
	border: 1px solid rgba(255, 255, 255, 0.075) !important;
	border-right-color: rgba(242, 201, 76, 0.58) !important;
	border-radius: 18px !important;
	background:
		linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)) !important;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 10px 28px rgba(0, 0, 0, 0.14);
}

.asr-modal-text::before {
	content: '“';
	position: absolute;
	top: 4px;
	right: 17px;
	color: #f2c94c;
	font-family: Georgia, serif;
	font-size: 34px;
	font-weight: 800;
	line-height: 1;
	opacity: 0.8;
}

.asr-modal-text p {
	margin: 0 !important;
}

.asr-modal-product {
	gap: 11px !important;
	padding: 10px !important;
	border: 1px solid rgba(242, 201, 76, 0.14) !important;
	border-radius: 16px !important;
	background: linear-gradient(135deg, rgba(242, 201, 76, 0.07), rgba(255, 255, 255, 0.025)) !important;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.asr-modal-product-image {
	width: 54px !important;
	height: 54px !important;
	flex: 0 0 54px;
	padding: 3px;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.10);
	border-radius: 13px !important;
	background: #fff;
}

.asr-modal-product-image img {
	width: 100% !important;
	height: 100% !important;
	border-radius: 9px !important;
	object-fit: cover;
}

.asr-modal-product-label {
	color: #dcb544 !important;
	font-size: 9px !important;
	font-weight: 750 !important;
	letter-spacing: 0;
}

.asr-modal-product-title {
	margin-top: 3px;
	color: #f4f3ee !important;
	font-size: 11.5px !important;
	font-weight: 700 !important;
	line-height: 1.65 !important;
}

.asr-modal-verified {
	width: fit-content;
	margin: 14px auto 0 !important;
	padding: 8px 13px !important;
	color: #efd477 !important;
	font-size: 10.5px !important;
	font-weight: 700;
	border: 1px solid rgba(242, 201, 76, 0.18) !important;
	border-radius: 999px !important;
	background: rgba(242, 201, 76, 0.065) !important;
}

.asr-modal-verified > svg {
	width: 15px !important;
	height: 15px !important;
	min-width: 15px;
}

.asr-story-modal .asr-modal-nav {
	width: 42px !important;
	height: 42px !important;
	min-width: 42px !important;
	min-height: 42px !important;
	padding: 0 !important;
	color: #f4d366 !important;
	border: 1px solid rgba(242, 201, 76, 0.24) !important;
	border-radius: 50% !important;
	background: rgba(10, 11, 16, 0.76) !important;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.055) !important;
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
}

.asr-story-modal .asr-modal-nav > svg {
	width: 20px !important;
	height: 20px !important;
	min-width: 20px !important;
	flex: 0 0 20px !important;
	stroke-width: 2.3;
}

.asr-story-modal .asr-modal-nav:hover {
	color: #17130a !important;
	border-color: #ffe083 !important;
	background: linear-gradient(145deg, #ffe083, #d9a82f) !important;
	transform: translateY(-50%) scale(1.06) !important;
	box-shadow: 0 12px 28px rgba(242, 201, 76, 0.24) !important;
}

.asr-modal-nav-prev {
	right: 14px !important;
}

.asr-modal-nav-next {
	left: 14px !important;
}

@media (max-width: 768px) {
	.asr-stories-container {
		padding-bottom: 14px !important;
		border-radius: 20px !important;
	}

	.asr-stories-header {
		padding: 15px 16px 12px !important;
	}

	.asr-stories-icon {
		width: 37px !important;
		height: 37px !important;
		min-width: 37px;
		border-radius: 12px !important;
	}

	.asr-stories-title {
		font-size: 15px !important;
	}

	.asr-stories-subtitle {
		padding: 6px 8px !important;
		font-size: 9.5px !important;
	}

	.asr-stories-bar {
		padding: 11px 8px 0 !important;
	}

	.asr-stories-container .asr-nav-btn {
		display: none !important;
	}

	.asr-stories-track {
		gap: 6px !important;
		padding-inline: 6px !important;
	}

	.asr-story-item {
		flex-basis: 74px !important;
		min-width: 74px !important;
		max-width: 74px !important;
		padding-inline: 2px !important;
	}

	.asr-story-ring {
		width: 68px !important;
		height: 68px !important;
	}

	.asr-modal-content {
		width: min(420px, calc(100vw - 18px)) !important;
		height: min(760px, calc(100dvh - 18px)) !important;
		max-height: calc(100dvh - 18px) !important;
		border-radius: 24px !important;
	}

	.asr-modal-body {
		padding: 22px 24px 26px !important;
	}

	.asr-story-modal .asr-modal-nav {
		display: none !important;
	}

	.asr-modal-touch {
		display: block;
		width: 28% !important;
	}
}

@media (max-width: 480px) {
	.asr-stories-header-inner {
		gap: 8px;
	}

	.asr-stories-title-wrap {
		gap: 9px !important;
	}

	.asr-stories-title {
		font-size: 14px !important;
	}

	.asr-stories-subtitle {
		max-width: 112px;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.asr-stories-track {
		gap: 4px !important;
	}

	.asr-story-item {
		flex-basis: 71px !important;
		min-width: 71px !important;
		max-width: 71px !important;
	}

	.asr-story-ring {
		width: 65px !important;
		height: 65px !important;
	}

	.asr-avatar-initials {
		font-size: 19px !important;
	}

	.asr-modal-content {
		width: 100vw !important;
		height: 100dvh !important;
		max-height: none !important;
		border: 0 !important;
		border-radius: 0 !important;
	}

	.asr-modal-header {
		padding-inline: 15px !important;
	}

	.asr-modal-body {
		padding: 20px 18px 24px !important;
	}

	.asr-modal-text {
		padding: 29px 17px 18px !important;
		font-size: 13.5px !important;
	}
}


/* Keep the story viewer above WoodMart's sticky header and mobile navigation. */
.asr-story-modal {
	position: fixed !important;
	inset: 0 !important;
	z-index: 2147483000 !important;
}
.asr-story-modal .asr-modal-overlay { z-index: 0 !important; }
.asr-story-modal .asr-modal-content { z-index: 2 !important; }


/* The gold story ring is the active indicator; keep the card itself visually quiet. */
.asr-story-item.asr-story-active {
	background: transparent !important;
	border-color: transparent !important;
	box-shadow: none !important;
}
.asr-story-item.asr-story-active .asr-story-ring {
	filter: drop-shadow(0 8px 15px rgba(0,0,0,.24)) drop-shadow(0 0 9px rgba(242,201,76,.16));
}


/* Geometry fix: concentric story rings, unclipped verification badge, RTL modal arrows. */
.asr-story-ring {
	overflow: visible !important;
}
.asr-story-ring .asr-story-ring-svg {
	position: absolute !important;
	inset: 0 !important;
	z-index: 1 !important;
}
.asr-story-ring .asr-story-avatar {
	position: absolute !important;
	inset: 6px !important;
	width: auto !important;
	height: auto !important;
	overflow: visible !important;
	z-index: 2 !important;
}
.asr-story-avatar > img,
.asr-story-avatar > .asr-avatar-initials {
	border-radius: 50% !important;
	overflow: hidden !important;
}
.asr-story-ring .asr-verified-badge {
	left: -4px !important;
	bottom: -3px !important;
	right: auto !important;
	top: auto !important;
	z-index: 6 !important;
}
.asr-story-modal .asr-modal-nav-prev > svg,
.asr-story-modal .asr-modal-nav-next > svg {
	transform: scaleX(-1) !important;
	transform-origin: center !important;
}


/* SVG paths now carry the correct RTL direction; no CSS mirroring needed. */
.asr-story-modal .asr-modal-nav-prev > svg,
.asr-story-modal .asr-modal-nav-next > svg {
	transform: none !important;
}
