/* ============================================================
   Valabi Smart Offers — storefront UI
   Aesthetic: refined commerce. Theme-blending typography (we lean on
   weight / spacing / colour, never a font swap that would break Persian),
   a magenta primary on warm white, soft layered shadows, spring motion.
   Everything is scoped under .vso-* and resets its own box model so it
   survives inside arbitrary third-party themes.
   ============================================================ */

.vso-fbt,
.vso-bump,
.vso-progress,
.vso-modal-backdrop {
	--vso-accent: #d6336c;
	--vso-accent-deep: #a61e4d;
	--vso-accent-soft: #fdeef4;
	--vso-accent-line: #f6d3e1;
	--vso-accent-track: #f6dbe6;
	--vso-accent-mid: #f06595;
	--vso-ink: #181219;
	--vso-mute: #5f5764;
	--vso-line: #efe6ea;
	--vso-paper: #ffffff;
	--vso-ok: #1f9d57;
	--vso-radius: 16px;
	--vso-shadow: 0 1px 2px rgba(29, 22, 32, .04), 0 18px 40px -16px rgba(20, 12, 18, .22);
	--vso-ring: 0 0 0 3px color-mix(in srgb, var(--vso-accent) 35%, transparent);

	font-family: inherit;
	line-height: 1.5;
	color: var(--vso-ink);
}
.vso-fbt *,
.vso-bump *,
.vso-progress *,
.vso-modal-backdrop * { box-sizing: border-box; }

/* Shared bits ------------------------------------------------ */
.vso-free { color: var(--vso-ok); font-weight: 800; }
.vso-badge {
	display: inline-block;
	background: var(--vso-accent-soft);
	color: var(--vso-accent-deep);
	font-size: 11.5px;
	font-weight: 800;
	border-radius: 999px;
	padding: 3px 10px;
	letter-spacing: .01em;
}
.vso-accept,
.vso-fbt__add,
.vso-modal__accept,
.vso-modal__continue {
	cursor: pointer;
	font-family: inherit;
	transition: transform .12s ease, box-shadow .2s ease, background-color .2s ease, opacity .2s ease;
}
.vso-accept:focus-visible,
.vso-fbt__add:focus-visible,
.vso-modal__accept:focus-visible,
.vso-modal__continue:focus-visible,
.vso-choice:focus-within { outline: none; box-shadow: var(--vso-ring); }
.loading { opacity: .6; pointer-events: none; }

/* ---------- Progress bar ----------------------------------- */
.vso-progress {
	background: linear-gradient(180deg, var(--vso-accent-soft), #fff);
	border: 1px solid var(--vso-accent-line);
	border-radius: var(--vso-radius);
	padding: 14px 18px;
	margin: 0 0 18px;
	box-shadow: var(--vso-shadow);
}
.vso-progress.is-unlocked {
	background: linear-gradient(180deg, #e9faf0, #fff);
	border-color: #bfead0;
}
.vso-progress__msg { font-weight: 700; font-size: 14.5px; margin-bottom: 9px; }
.vso-progress__track {
	height: 10px;
	background: var(--vso-accent-track);
	border-radius: 999px;
	overflow: hidden;
}
.vso-progress.is-unlocked .vso-progress__track { background: #cdeed9; }
.vso-progress__fill {
	height: 100%;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--vso-accent), var(--vso-accent-deep));
	background-size: 200% 100%;
	transition: width .5s cubic-bezier(.22,.9,.3,1);
	animation: vso-shimmer 2.4s linear infinite;
}
.vso-progress.is-unlocked .vso-progress__fill {
	background: linear-gradient(90deg, #2fb96a, #178a4c);
	animation: none;
}
@keyframes vso-shimmer { to { background-position: -200% 0; } }

/* ---------- Checkout bump ---------------------------------- */
.vso-bump {
	border: 1.5px solid var(--vso-accent-line);
	background: linear-gradient(180deg, var(--vso-accent-soft), #fff);
	border-radius: var(--vso-radius);
	padding: 14px 16px;
	margin: 0 0 18px;
	box-shadow: var(--vso-shadow);
}
.vso-bump__headline {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 800;
	font-size: 15px;
	margin-bottom: 12px;
}
.vso-bump__tag {
	background: var(--vso-accent);
	color: #fff;
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: .04em;
	border-radius: 6px;
	padding: 3px 8px;
	text-transform: uppercase;
}
.vso-bump__row { display: flex; align-items: center; gap: 14px; }
.vso-bump__media img {
	width: 60px; height: 60px;
	object-fit: cover;
	border-radius: 12px;
	border: 1px solid var(--vso-line);
}
.vso-bump__body { flex: 1; min-width: 0; }
.vso-bump__name { font-weight: 700; }
.vso-bump__qty { color: var(--vso-accent-deep); font-weight: 800; margin-inline-start: 4px; }
.vso-bump__price { margin-top: 2px; }
.vso-bump__price del { color: var(--vso-mute); margin-inline-end: 8px; opacity: .85; }
.vso-bump__price ins { text-decoration: none; font-weight: 800; color: var(--vso-accent-deep); }
.vso-bump__subtext { font-size: 12.5px; color: var(--vso-mute); margin-top: 2px; }
.vso-bump__hint { font-size: 12.5px; color: var(--vso-mute); margin: 0 0 8px; font-weight: 600; }
.vso-bump__choices { display: grid; gap: 8px; }
.vso-bump .vso-accept,
.vso-bump button.vso-accept {
	margin-top: 14px;
	width: 100%;
	background: var(--vso-accent) !important;
	border: none !important;
	color: #fff !important;
	border-radius: 12px;
	padding: 13px 18px;
	font-weight: 800;
	font-size: 15px;
}
.vso-bump .vso-accept:hover { background: var(--vso-accent-deep) !important; transform: translateY(-1px); }

/* ---------- Choice rows (bump + modal share this) ---------- */
.vso-choice {
	display: flex;
	align-items: center;
	gap: 12px;
	border: 1.5px solid var(--vso-line);
	border-radius: 14px;
	padding: 10px 12px;
	cursor: pointer;
	background: #fff;
	transition: border-color .15s ease, box-shadow .15s ease, transform .12s ease;
	position: relative;
}
.vso-choice:hover { transform: translateY(-1px); border-color: var(--vso-accent-line); }
.vso-choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.vso-choice__check {
	width: 20px; height: 20px; flex: none;
	border: 2px solid var(--vso-line);
	border-radius: 50%;
	position: relative;
	transition: border-color .15s ease, background .15s ease;
}
.vso-choice input:checked ~ .vso-choice__check {
	border-color: var(--vso-accent);
	background: var(--vso-accent);
}
.vso-choice input:checked ~ .vso-choice__check::after {
	content: "";
	position: absolute;
	inset: 5px;
	border-radius: 50%;
	background: #fff;
}
.vso-choice:has(input:checked) {
	border-color: var(--vso-accent);
	box-shadow: 0 0 0 1px var(--vso-accent), var(--vso-shadow);
}
.vso-choice__thumb img {
	width: 46px; height: 46px;
	object-fit: cover;
	border-radius: 10px;
	border: 1px solid var(--vso-line);
}
.vso-choice__name { flex: 1; font-weight: 600; min-width: 0; }
.vso-choice__price { font-weight: 800; color: var(--vso-accent-deep); white-space: nowrap; }

/* ---------- FBT widget ------------------------------------- */
.vso-fbt {
	border: 1px solid var(--vso-line);
	border-radius: var(--vso-radius);
	padding: 18px 20px;
	margin: 24px 0;
	background: var(--vso-paper);
	box-shadow: var(--vso-shadow);
}
.vso-fbt__title { margin: 0 0 14px; font-size: 18px; font-weight: 800; }
.vso-fbt__row {
	display: flex; align-items: center; gap: 12px;
	padding: 11px 0;
	border-top: 1px solid var(--vso-line);
	cursor: pointer;
}
.vso-fbt__row:first-of-type { border-top: none; }
.vso-fbt__check { width: 18px; height: 18px; accent-color: var(--vso-accent); flex: none; }
.vso-fbt__thumb img { width: 50px; height: 50px; object-fit: cover; border-radius: 10px; border: 1px solid var(--vso-line); }
.vso-fbt__info { flex: 1; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.vso-fbt__name { font-weight: 600; }
.vso-fbt__name em { color: var(--vso-mute); font-style: normal; font-size: 12px; }
.vso-fbt__price del { color: var(--vso-mute); margin-inline-end: 6px; }
.vso-fbt__price ins { text-decoration: none; font-weight: 800; color: var(--vso-accent-deep); }
.vso-fbt__footer {
	display: flex; align-items: center; justify-content: space-between;
	gap: 12px; margin-top: 16px; padding-top: 16px;
	border-top: 2px solid var(--vso-line); flex-wrap: wrap;
}
.vso-fbt__total { font-size: 15px; }
.vso-fbt__total strong { color: var(--vso-accent-deep); font-size: 19px; }
.vso-fbt__add.button,
.vso-fbt button.vso-fbt__add {
	background: var(--vso-accent) !important;
	border: none !important;
	color: #fff !important;
	border-radius: 12px;
	padding: 12px 22px;
	font-weight: 800;
}
.vso-fbt__add:hover { background: var(--vso-accent-deep) !important; transform: translateY(-1px); }

/* Cart: locked gift quantity */
.vso-gift-qty {
	display: inline-block;
	min-width: 2.2em;
	text-align: center;
	font-weight: 700;
	color: var(--vso-mute);
}

/* ---------- Popup modal ------------------------------------ */
.vso-modal-backdrop {
	position: fixed; inset: 0;
	background: rgba(24, 14, 20, .5);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	display: flex; align-items: center; justify-content: center;
	z-index: 99999; padding: 20px;
	animation: vso-fade .22s ease;
}
@keyframes vso-fade { from { opacity: 0; } to { opacity: 1; } }
.vso-modal {
	background: var(--vso-paper);
	border-radius: 24px;
	max-width: 520px; width: 100%;
	max-height: 92vh; overflow: auto;
	padding: 38px 32px 26px;
	position: relative; text-align: center;
	border: 1px solid rgba(20, 12, 18, .06);
	box-shadow: 0 28px 70px -28px rgba(20, 10, 16, .45), 0 2px 8px rgba(20, 10, 16, .06);
	animation: vso-pop .32s cubic-bezier(.18,.9,.28,1.2);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}
.vso-modal::before {
	content: ""; position: absolute; inset: 0 0 auto; height: 5px;
	border-radius: 24px 24px 0 0;
	background: linear-gradient(90deg, var(--vso-accent), var(--vso-accent-mid), var(--vso-accent-deep));
}
@keyframes vso-pop { from { transform: scale(.92) translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.vso-modal__close {
	position: absolute; top: 12px; inset-inline-end: 14px;
	width: 32px; height: 32px;
	background: transparent; border: none; border-radius: 10px;
	display: flex; align-items: center; justify-content: center;
	color: var(--vso-mute); cursor: pointer;
	transition: background .15s ease, color .15s ease, transform .15s ease;
}
.vso-modal__close svg { width: 18px; height: 18px; display: block; }
.vso-modal__close:hover { background: color-mix(in srgb, var(--vso-ink) 7%, transparent); color: var(--vso-ink); }
.vso-modal__close:focus-visible { outline: none; box-shadow: var(--vso-ring); }
.vso-modal__check {
	width: 76px; height: 76px; margin: 0 auto 16px;
	border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	background: radial-gradient(circle at 50% 40%, #e8faef, #d6f3e0);
	color: var(--vso-ok);
	box-shadow: 0 0 0 8px rgba(47, 185, 106, .12);
	animation: vso-check-pop .4s .12s both cubic-bezier(.18,.9,.28,1.4);
}
@keyframes vso-check-pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.vso-modal__title { margin: 0 0 6px; font-size: 28px; font-weight: 800; letter-spacing: -.01em; }
.vso-modal__headline { color: var(--vso-accent); font-weight: 700; margin-bottom: 18px; }
.vso-modal__hint { font-size: 13px; color: var(--vso-mute); margin-bottom: 12px; text-align: start; }
.vso-modal__timer {
	display: inline-block;
	margin: 0 0 16px;
	padding: 6px 14px;
	border-radius: 999px;
	background: var(--vso-accent-soft);
	color: var(--vso-accent-deep);
	font-size: 13px;
	font-weight: 700;
}
.vso-modal__timer strong { font-variant-numeric: tabular-nums; }
.vso-modal__timer.is-expired { background: #f3f0f1; color: var(--vso-mute); }

.vso-modal__product {
	display: flex; align-items: center; gap: 14px; text-align: start;
	border: 1px solid var(--vso-accent-line); border-radius: 16px;
	padding: 14px; margin-bottom: 20px;
	background: var(--vso-accent-soft);
}
.vso-modal__thumb img {
	width: 84px; height: 84px; object-fit: cover; border-radius: 14px;
	border: 1px solid rgba(20, 12, 18, .08);
	background: #fff;
}
.vso-modal__info { flex: 1; min-width: 0; }
.vso-modal__name { font-weight: 800; font-size: 18px; }
.vso-modal__qty { color: var(--vso-accent-deep); margin-inline-start: 6px; }
.vso-modal__price { margin-top: 4px; }
.vso-modal__price del { color: var(--vso-mute); margin-inline-end: 8px; }
.vso-modal__price ins { text-decoration: none; font-weight: 800; color: var(--vso-accent-deep); font-size: 18px; }
.vso-modal__subtext { font-size: 13px; color: var(--vso-mute); margin-top: 4px; }

.vso-modal__choices {
	display: grid; gap: 10px; margin-bottom: 20px;
	grid-template-columns: 1fr;
	text-align: start;
}
@media (min-width: 420px) { .vso-modal__choices { grid-template-columns: 1fr 1fr; } }

.vso-modal__actions { display: flex; gap: 12px; }
.vso-modal__actions button {
	flex: 1; border-radius: 14px; padding: 14px 18px;
	font-weight: 800; font-size: 15px; border: 2px solid var(--vso-accent);
}
.vso-modal__continue { background: #fff; color: var(--vso-accent-deep); }
.vso-modal__continue:hover { background: var(--vso-accent-soft); }
.vso-modal__accept { background: var(--vso-accent); color: #fff; }
.vso-modal__accept:hover { background: var(--vso-accent-deep); border-color: var(--vso-accent-deep); transform: translateY(-1px); }

.vso-shake { animation: vso-shake .4s; }
@keyframes vso-shake { 0%,100%{transform:translateX(0)} 20%,60%{transform:translateX(-5px)} 40%,80%{transform:translateX(5px)} }

@media (max-width: 480px) {
	.vso-modal { padding: 30px 20px 20px; border-radius: 22px; }
	.vso-modal__title { font-size: 23px; }
	.vso-modal__actions { flex-direction: column; }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
	.vso-modal, .vso-modal__check, .vso-modal-backdrop,
	.vso-progress__fill, .vso-choice, .vso-accept,
	.vso-fbt__add, .vso-shake {
		animation: none !important;
		transition: none !important;
	}
}
