/* فروشگاه ویوان: سبد خرید، تسویه، سفارش، کارت خرید محصول و پیام‌ها. تیره، RTL، سبک (فقط transform/opacity). */
:root { --vs-bg: rgba(255,255,255,.045); --vs-line: rgba(255,255,255,.11); --vs-ink: #e9e7f5; --vs-dim: #b9b4d4; --vs-acc: #7b5cff; --vs-acc2: #22d3ee; --vs-ok: #34d399; --vs-bad: #f87171; }

/* ---- شمارنده‌ی سبد در هدر ---- */
.card___btn { position: relative; }
.vv-cart-badge { position: absolute; top: -6px; inset-inline-end: -8px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: linear-gradient(135deg, var(--vs-acc), var(--vs-acc2)); color: #fff; font: 800 11px/20px inherit; text-align: center; box-shadow: 0 4px 12px rgba(123,92,255,.55); }
.vv-cart-badge[hidden] { display: none; }
.vv-cart-badge.bump { animation: vs-bump .45s cubic-bezier(.2,.9,.3,1.4); }
@keyframes vs-bump { 0% { transform: scale(.4); } 60% { transform: scale(1.35); } 100% { transform: scale(1); } }

/* ---- پیام‌های کوتاه ---- */
.vv-toasts { position: fixed; z-index: 99999; inset-inline: 0; bottom: 22px; display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 12px; }
.vv-toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: 460px; background: #17152a; color: #fff; border: 1px solid var(--vs-line); border-radius: 14px; padding: 12px 16px; font-size: 15px; box-shadow: 0 18px 50px rgba(0,0,0,.5); text-decoration: none; transform: translateY(14px); opacity: 0; transition: transform .28s cubic-bezier(.2,.9,.3,1), opacity .28s; }
.vv-toast.in { transform: none; opacity: 1; }
.vv-toast i { color: var(--vs-ok); font-size: 18px; }
.vv-toast--err i { color: var(--vs-bad); }
.vv-toast b { margin-inline-start: 6px; color: #ad99ff; font-size: 13px; white-space: nowrap; }

/* ---- دکمه‌ها ---- */
.vs-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; font-weight: 800; font-size: 16px; padding: 13px 24px; border-radius: 13px; color: #fff !important; background: linear-gradient(135deg, var(--vs-acc), #6696ff); box-shadow: 0 10px 28px rgba(123,92,255,.35); transition: transform .18s, box-shadow .18s, opacity .18s; text-decoration: none; }
.vs-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(123,92,255,.5); }
.vs-btn:active { transform: translateY(0); }
.vs-btn[disabled], .vs-btn.is-busy { opacity: .6; pointer-events: none; }
.vs-btn--ghost { background: transparent; border: 1px solid rgba(255,255,255,.28); box-shadow: none; }
.vs-btn--ghost:hover { background: rgba(255,255,255,.07); box-shadow: none; }
.vs-btn--ok { background: linear-gradient(135deg, #10b981, #34d399); box-shadow: 0 10px 28px rgba(16,185,129,.3); }
.vs-btn--block { width: 100%; }
.vs-btn.is-added { background: linear-gradient(135deg, #10b981, #34d399); }

/* ---- صفحه‌ی سبد ---- */
.vs { color: var(--vs-ink); padding: 130px 0 80px; line-height: 1.9; }
.vs a { text-decoration: none; }
.vs__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.vs__head h1 { font-size: clamp(26px, 4vw, 38px); font-weight: 800; color: #fff; margin: 0; }
.vs__head small { color: var(--vs-dim); }
.vs__grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.vs__card { background: var(--vs-bg); border: 1px solid var(--vs-line); border-radius: 22px; padding: 20px; backdrop-filter: blur(6px); }
.vs__sum { position: sticky; top: 100px; }
.vs-row { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--vs-line); animation: vs-in .45s both; }
.vs-row:last-child { border-bottom: 0; }
@keyframes vs-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.vs-row.is-out { opacity: 0; transform: translateX(30px); transition: opacity .22s, transform .22s; }
.vs-img { width: 84px; height: 84px; border-radius: 16px; object-fit: cover; background: #1d1a33; border: 1px solid var(--vs-line); }
.vs-title { color: #fff; font-weight: 800; font-size: 17px; margin: 0 0 4px; display: block; }
.vs-title:hover { color: #ad99ff; }
.vs-meta { color: var(--vs-dim); font-size: 14px; }
.vs-meta s { opacity: .6; margin-inline-start: 6px; }
.vs-meta b { color: #7ee2b8; }
.vs-end { display: grid; justify-items: end; gap: 8px; text-align: end; }
.vs-total { font-weight: 800; color: #fff; font-size: 18px; white-space: nowrap; }
.vs-total small { color: var(--vs-dim); font-weight: 500; margin-inline-start: 4px; }
.vs-qty { display: inline-flex; align-items: center; border: 1px solid var(--vs-line); border-radius: 12px; overflow: hidden; background: rgba(0,0,0,.18); }
.vs-qty button { width: 36px; height: 36px; border: 0; background: transparent; color: #fff; font-size: 18px; cursor: pointer; transition: background .15s; }
.vs-qty button:hover { background: rgba(123,92,255,.35); }
.vs-qty button:disabled { opacity: .35; cursor: not-allowed; }
.vs-qty input { width: 44px; text-align: center; border: 0; background: transparent; color: #fff; font-weight: 800; font-size: 16px; -moz-appearance: textfield; }
.vs-qty input::-webkit-outer-spin-button, .vs-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.vs-rm { border: 0; background: transparent; color: var(--vs-dim); cursor: pointer; font-size: 13px; padding: 4px 6px; border-radius: 8px; }
.vs-rm:hover { color: var(--vs-bad); background: rgba(248,113,113,.1); }
.vs-warn { color: #fbbf24; font-size: 13px; }
.vs-line { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; color: var(--vs-dim); }
.vs-line b { color: #fff; }
.vs-line--disc b { color: var(--vs-ok); }
.vs-line--tot { border-top: 1px dashed var(--vs-line); margin-top: 8px; padding-top: 14px; font-size: 19px; color: #fff; }
.vs-line--tot b { font-size: 22px; background: linear-gradient(90deg, #fff, #ad99ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.vs-coupon { display: flex; gap: 8px; margin: 14px 0 6px; }
.vs-coupon input { flex: 1; min-width: 0; background: rgba(0,0,0,.25); border: 1px solid var(--vs-line); border-radius: 12px; color: #fff; padding: 11px 14px; direction: ltr; text-align: center; letter-spacing: 1px; }
.vs-coupon button { border: 1px solid rgba(255,255,255,.25); background: transparent; color: #fff; border-radius: 12px; padding: 0 16px; font-weight: 700; cursor: pointer; }
.vs-coupon button:hover { background: rgba(255,255,255,.08); }
.vs-msg { font-size: 13.5px; min-height: 22px; }
.vs-msg.ok { color: var(--vs-ok); } .vs-msg.err { color: var(--vs-bad); }
.vs-empty { text-align: center; padding: 56px 16px; }
.vs-empty i { font-size: 54px; color: #8f7bff; margin-bottom: 14px; display: block; animation: vs-float 3s ease-in-out infinite; }
@keyframes vs-float { 50% { transform: translateY(-8px); } }
.vs-empty h2 { color: #fff; font-weight: 800; font-size: 24px; }
.vs-empty p { color: var(--vs-dim); }
.vs-alert { border-radius: 14px; padding: 13px 16px; margin-bottom: 18px; font-size: 15px; }
.vs-alert--err { background: rgba(248,113,113,.12); border: 1px solid rgba(248,113,113,.4); color: #fca5a5; }
.vs-alert--ok { background: rgba(52,211,153,.12); border: 1px solid rgba(52,211,153,.4); color: #6ee7b7; }
.vs-secure { display: flex; gap: 8px; align-items: center; justify-content: center; color: var(--vs-dim); font-size: 13px; margin-top: 12px; }
.vs-steps { display: flex; gap: 8px; align-items: center; color: var(--vs-dim); font-size: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.vs-steps span { padding: 5px 14px; border-radius: 99px; border: 1px solid var(--vs-line); }
.vs-steps span.on { background: rgba(123,92,255,.28); border-color: var(--vs-acc); color: #fff; }

/* ---- فرم ---- */
.vs-form { display: grid; gap: 14px; }
.vs-form label { color: var(--vs-dim); font-size: 14px; display: block; margin-bottom: 6px; }
.vs-form input, .vs-form textarea { width: 100%; background: rgba(0,0,0,.25); border: 1px solid var(--vs-line); border-radius: 12px; color: #fff; padding: 12px 14px; font: inherit; transition: border-color .15s, box-shadow .15s; }
.vs-form input:focus, .vs-form textarea:focus { outline: 0; border-color: var(--vs-acc); box-shadow: 0 0 0 3px rgba(123,92,255,.25); }
.vs-form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.vs-mini { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--vs-line); }
.vs-mini img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; }

/* ---- سفارش ---- */
.vs-badge { display: inline-block; padding: 3px 12px; border-radius: 99px; font-size: 13px; font-weight: 800; }
.vs-badge--0 { background: rgba(251,191,36,.18); color: #fbbf24; } .vs-badge--1, .vs-badge--3 { background: rgba(52,211,153,.18); color: #6ee7b7; }
.vs-badge--2 { background: rgba(56,189,248,.18); color: #7dd3fc; } .vs-badge--4, .vs-badge--5 { background: rgba(248,113,113,.18); color: #fca5a5; }
.vs-hero { text-align: center; padding: 34px 18px; border-radius: 24px; margin-bottom: 22px; border: 1px solid var(--vs-line); background: linear-gradient(135deg, rgba(123,92,255,.2), rgba(34,211,238,.1)); }
.vs-hero .ic { width: 74px; height: 74px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 34px; margin-bottom: 12px; }
.vs-hero--ok .ic { background: rgba(52,211,153,.2); color: var(--vs-ok); animation: vs-pop .6s cubic-bezier(.2,.9,.3,1.4); }
.vs-hero--bad .ic { background: rgba(248,113,113,.2); color: var(--vs-bad); }
@keyframes vs-pop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
.vs-hero h2 { color: #fff; font-weight: 800; font-size: 26px; margin: 0 0 6px; }
.vs-hero p { color: var(--vs-dim); margin: 0; }
.vs-ol { display: grid; gap: 12px; }
.vs-ol a.vs-order { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; background: var(--vs-bg); border: 1px solid var(--vs-line); border-radius: 18px; padding: 16px 18px; color: var(--vs-ink); transition: border-color .2s, transform .2s; }
.vs-ol a.vs-order:hover { border-color: var(--vs-acc); transform: translateY(-2px); }

/* ---- کارت خرید در صفحه‌ی محصول ---- */
.vs-buy { margin: 14px 0 18px; padding: 18px; border-radius: 20px; border: 1px solid var(--vs-line); background: linear-gradient(135deg, rgba(123,92,255,.18), rgba(34,211,238,.07)); }
.vs-buy .price { font-size: 28px; font-weight: 800; color: #fff; }
.vs-buy .price small { font-size: 14px; color: var(--vs-dim); font-weight: 500; margin-inline-start: 6px; }
.vs-buy .old { color: var(--vs-dim); text-decoration: line-through; margin-inline-start: 10px; font-size: 16px; }
.vs-buy .row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; align-items: center; }
.vs-buy .stock { font-size: 13px; margin-top: 10px; }
.vs-buy .stock.ok { color: var(--vs-ok); } .vs-buy .stock.low { color: #fbbf24; } .vs-buy .stock.out { color: var(--vs-bad); }

@media (max-width: 900px) { .vs__grid { grid-template-columns: 1fr; } .vs__sum { position: static; } }
@media (max-width: 575px) { .vs { padding-top: 104px; } .vs-row { grid-template-columns: 64px 1fr; } .vs-img { width: 64px; height: 64px; } .vs-end { grid-column: 1 / -1; grid-template-columns: auto 1fr auto; justify-items: stretch; align-items: center; } .vs-form .two { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .vs-row, .vs-empty i, .vs-hero--ok .ic, .vv-cart-badge.bump { animation: none !important; } .vv-toast { transition: none; } }

/* sticky درست کار کند: overflow-x:hidden روی html/body آن‌ها را اسکرول‌کانتینر می‌کند و position:sticky را از کار می‌اندازد؛ clip همان ظاهر را بدون این عارضه می‌دهد */
@supports (overflow-x: clip) { html, body { overflow-x: clip !important; } }
