/* ==========================================================
   لندینگ روز مادر ۱۴۰۵ — خانه سکه ایران
   پالت: جوهر سرمه‌ای برند + طلای ورق + صدفی (مروارید) + انار خاکی
   ========================================================== */
@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-var.woff2") format("woff2-variations"), url("../fonts/Vazirmatn-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
/* فونت‌های خود سایت برای صفحات سبد/پرداخت که داخل Shadow DOM بارگذاری می‌شوند */
@font-face { font-family: "IRANYekan"; src: url("/Content/theme/fonts/ShemsheTalaIcon.woff2") format("woff2"), url("/Content/theme/fonts/ShemsheTalaIcon.woff") format("woff"); font-display: swap; }
@font-face { font-family: "IRANYekan-medium"; src: url("/Content/theme/fonts/ShemsheTalaTITR.woff2") format("woff2"), url("/Content/theme/fonts/ShemsheTalaTITR.woff") format("woff"); font-display: swap; }

:root {
    --ink: #0F1A3A;          /* سرمه‌ای برند */
    --ink-2: #1A2A5C;
    --lapis: #24397A;
    --gold: #C8A04A;         /* طلای ورق */
    --gold-hi: #EED896;
    --gold-lo: #8C6A22;
    --nacre: #F4EEF0;        /* صدفی */
    --nacre-2: #E9DFE3;
    --rose: #A9545F;         /* انار خاکی — فقط برای تاریخ و هشدار */
    --text: #1B2240;
    --muted: #5D6585;
    --line: rgba(15, 26, 58, .14);
    --line-on-ink: rgba(238, 216, 150, .22);
    --r-sm: 10px;
    --r-lg: 22px;
    --display: "Vazirmatn", Tahoma, sans-serif;
    --body: "Vazirmatn", Tahoma, sans-serif;
    --step--1: clamp(.82rem, .8rem + .1vw, .9rem);
    --step-0: clamp(1rem, .96rem + .2vw, 1.1rem);
    --step-1: clamp(1.25rem, 1.1rem + .6vw, 1.55rem);
    --step-2: clamp(1.6rem, 1.3rem + 1.4vw, 2.4rem);
    --step-3: clamp(2.6rem, 1.6rem + 5vw, 6.2rem);
    --gutter: clamp(16px, 4vw, 56px);
    --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body.md { margin: 0; background: var(--nacre); color: var(--text); font-family: var(--body); font-size: var(--step-0); line-height: 1.85; font-feature-settings: "ss01"; overflow-x: hidden; }
body.md.md-lock { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.md-skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--gold); color: var(--ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.md-skip:focus { top: 12px; }

.md-h2 { font-family: var(--display); font-weight: 800; font-size: var(--step-2); line-height: 1.35; margin: 0 0 .6em; letter-spacing: 0; }

/* ---------- buttons ---------- */
.md-btn { --b: transparent; display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: .55em 1.4em; border-radius: 999px; border: 1px solid var(--b); text-decoration: none; cursor: pointer; font-weight: 600; font-size: var(--step-0); transition: transform .25s var(--ease), background-color .25s, color .25s, box-shadow .25s; -webkit-tap-highlight-color: transparent; }
.md-btn:active { transform: scale(.97); }
.md-btn[disabled] { opacity: .55; cursor: progress; }
.md-btn--gold { background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, #B28A36); color: var(--ink); --b: #E6CC80; box-shadow: 0 10px 30px -12px rgba(200, 160, 74, .7), inset 0 1px 0 rgba(255,255,255,.55); }
.md-btn--gold:hover { box-shadow: 0 14px 34px -10px rgba(200, 160, 74, .85), inset 0 1px 0 rgba(255,255,255,.6); }
.md-btn--line { background: transparent; color: var(--gold-hi); --b: var(--line-on-ink); }
.md-btn--line:hover { --b: var(--gold); }
.md-btn--ghost { background: transparent; --b: transparent; min-height: 42px; padding-inline: .9em; font-weight: 500; }
.md-btn--ink { background: var(--ink); color: var(--gold-hi); }
.md-btn--ink:hover { background: var(--ink-2); }
.md-btn--soft { background: transparent; color: var(--ink); --b: var(--line); min-height: 42px; font-size: var(--step--1); width: 100%; }
.md-btn--soft:hover { background: var(--ink); color: var(--gold-hi); --b: var(--ink); }
.md-btn--wide { width: 100%; }
.md-round { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: transparent; cursor: pointer; font-size: 1.4rem; line-height: 1; display: inline-grid; place-items: center; }

/* ---------- topbar ---------- */
.md-top { position: fixed; inset-inline: 0; top: 0; z-index: 40; display: flex; align-items: center; gap: 24px; padding: 10px var(--gutter); color: var(--nacre); transition: background-color .35s, box-shadow .35s, padding .35s; }
.md-top.is-solid { background: rgba(15, 26, 58, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line-on-ink); padding-block: 6px; }
.md-top__logo img { width: 104px; height: auto; filter: brightness(0) invert(1) sepia(.35) saturate(1.4); }
.md-top__nav { display: flex; gap: 22px; margin-inline-end: auto; font-size: var(--step--1); }
.md-top__nav a { text-decoration: none; opacity: .82; padding-block: 6px; border-bottom: 1px solid transparent; }
.md-top__nav a:hover { opacity: 1; border-color: var(--gold); }
.md-top__actions { display: flex; align-items: center; gap: 6px; }
.md-top svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.md-cartbtn { position: relative; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-on-ink); background: transparent; display: grid; place-items: center; cursor: pointer; }
.md-cartbtn__num { position: absolute; top: -4px; inset-inline-start: -4px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; background: var(--gold); color: var(--ink); font-size: .75rem; font-weight: 700; line-height: 22px; text-align: center; transition: transform .3s var(--ease); }
.md-cartbtn.is-bump .md-cartbtn__num { transform: scale(1.35); }

/* ---------- hero ---------- */
.md-hero { position: relative; min-height: 100svh; display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 0 var(--gutter); padding: 110px var(--gutter) 70px; background:
    radial-gradient(60% 70% at 25% 45%, rgba(36, 57, 122, .9), transparent 70%),
    radial-gradient(40% 40% at 85% 20%, rgba(169, 84, 95, .18), transparent 70%),
    var(--ink); color: var(--nacre); overflow: hidden; isolation: isolate; }
.md-hero::after { /* engraved guilloche lines */ content: ""; position: absolute; inset: 0; z-index: -1; opacity: .09; background: repeating-radial-gradient(circle at 22% 50%, transparent 0 14px, var(--gold) 14px 15px); mask-image: radial-gradient(55% 60% at 22% 50%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(55% 60% at 22% 50%, #000 20%, transparent 75%); }
.md-hero__copy { grid-column: 1; grid-row: 1; max-width: 34rem; }
.md-hero__stage { grid-column: 2; grid-row: 1; position: relative; height: min(78vh, 680px); }
.md-hero__stage canvas { position: absolute; inset: -10% -14%; width: 128%; height: 120%; display: block; touch-action: pan-y; }
.md-hero__fallback { position: absolute; inset: 15% 10%; width: 80%; height: 70%; object-fit: contain; border-radius: var(--r-lg); opacity: 0; transition: opacity .6s; }
.md-hero.no-webgl .md-hero__fallback { opacity: 1; }
.md-hero__date { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 18px; font-size: var(--step--1); color: rgba(244, 238, 240, .78); }
.md-count { display: inline-flex; align-items: baseline; gap: .35em; padding: .2em .9em; border-radius: 999px; background: rgba(169, 84, 95, .22); border: 1px solid rgba(169, 84, 95, .5); color: #F3C9CD; font-weight: 600; }
.md-count b { font-size: 1.25em; color: #FFE3E5; }
.md-hero__title { font-family: var(--display); font-weight: 900; letter-spacing: -.01em; font-size: var(--step-3); line-height: 1.12; margin: 0 0 .35em; }
.md-line { display: block; overflow: hidden; padding-bottom: .08em; background: linear-gradient(100deg, #F9EDC4 0%, var(--gold-hi) 30%, #B88E3A 55%, #F6E2A6 75%, #C9A24B 100%); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: md-sheen 9s linear infinite; }
.md-line + .md-line { padding-inline-start: .9em; }
@keyframes md-sheen { to { background-position: -220% 0; } }
.md-hero__lead { font-size: var(--step-1); line-height: 1.85; color: rgba(244, 238, 240, .86); margin: 0 0 30px; max-width: 30em; font-weight: 300; }
.md-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.md-hero__scroll { position: absolute; bottom: 24px; inset-inline-start: 50%; width: 22px; height: 36px; border: 1px solid var(--line-on-ink); border-radius: 12px; transform: translateX(50%); }
.md-hero__scroll span { position: absolute; top: 7px; inset-inline-start: 50%; width: 3px; height: 7px; border-radius: 2px; background: var(--gold); transform: translateX(50%); animation: md-scroll 2s var(--ease) infinite; }
@keyframes md-scroll { 0% { opacity: 0; transform: translate(50%, 0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translate(50%, 12px); } }

/* ---------- featured gift ---------- */
.md-gift { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(28px, 5vw, 80px); align-items: center; padding: clamp(70px, 10vw, 140px) var(--gutter); max-width: 1320px; margin: 0 auto; }
.md-gift__media { position: relative; margin: 0; aspect-ratio: 1; border-radius: 50% 50% var(--r-lg) var(--r-lg); background: radial-gradient(70% 60% at 50% 45%, #fff, #F3ECEE 70%, var(--nacre-2)); box-shadow: 0 40px 80px -40px rgba(15, 26, 58, .45), inset 0 0 0 1px rgba(200,160,74,.35); transform-style: preserve-3d; }
.md-gift__media { overflow: visible; }
.md-gift__media img { position: absolute; inset: 6%; width: 88%; height: 88%; object-fit: contain; transform: translateZ(40px); mix-blend-mode: multiply; border-radius: inherit; }
.md-gift__halo { position: absolute; inset: 0; border-radius: inherit; background: conic-gradient(from 200deg, transparent, rgba(200,160,74,.35), transparent 40%); filter: blur(24px); transform: translateZ(-30px); }
.md-gift__media figcaption { position: absolute; bottom: 18px; inset-inline-start: 18px; padding: .25em .9em; border-radius: 999px; background: var(--ink); color: var(--gold-hi); font-size: var(--step--1); transform: translateZ(60px); }
.md-gift__desc { color: var(--muted); max-width: 36em; margin: 0 0 28px; }
.md-pack__title { margin: 0 0 10px; font-family: var(--display); font-weight: 800; font-size: var(--step-0); color: var(--ink); }
.md-pack { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 8px; max-width: 36em; color: var(--muted); }
.md-pack li { position: relative; padding-inline-start: 22px; line-height: 1.8; }
.md-pack li::before { content: ""; position: absolute; inset-inline-start: 0; top: .8em; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.md-specs { list-style: none; margin: 0 0 34px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line); }
.md-specs li { padding: 16px 0; display: grid; gap: 2px; }
.md-specs li + li { padding-inline-start: 16px; border-inline-start: 1px solid var(--line); }
.md-specs b { font-family: var(--display); font-weight: 800; font-size: var(--step-1); color: var(--ink); line-height: 1.4; }
.md-specs span { font-size: var(--step--1); color: var(--muted); line-height: 1.6; }
.md-buy { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; }
.md-buy .md-btn--wide { grid-column: 1 / -1; min-height: 56px; font-size: var(--step-1); }
.md-buy__price strong { font-family: var(--display); font-weight: 800; font-size: var(--step-2); color: var(--ink); }
.md-buy__price small { color: var(--muted); }
.md-buy__price del { display: block; color: var(--muted); font-size: var(--step--1); }
.md-buy__note { font-size: var(--step--1); color: var(--muted); margin: 12px 0 0; }
.md-alert { padding: 14px 18px; border-radius: var(--r-sm); background: rgba(169, 84, 95, .1); border: 1px solid rgba(169, 84, 95, .35); color: #7A2E38; }

.md-qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.md-qty__btn { width: 36px; height: 36px; border: 0; background: transparent; cursor: pointer; font-size: 1.15rem; }
.md-qty__btn:hover { background: var(--nacre-2); }
.md-qty__btn--del { color: var(--rose); }
.md-qty__val { min-width: 28px; text-align: center; font-weight: 700; }
.md-qty--lg .md-qty__btn { width: 48px; height: 48px; }

/* tilt */
[data-md-tilt] { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s var(--ease); will-change: transform; }
[data-md-tilt].is-tilting { transition: transform .08s linear; }

/* ---------- nafis rail ---------- */
.md-nafis { padding: clamp(60px, 8vw, 100px) 0 clamp(30px, 4vw, 60px); background: linear-gradient(180deg, var(--nacre), #fff 60%); border-block: 1px solid var(--line); }
.md-nafis__head { display: grid; grid-template-columns: 1fr auto; gap: 0 24px; align-items: end; padding: 0 var(--gutter); max-width: 1320px; margin: 0 auto 28px; }
.md-nafis__head p { grid-column: 1; margin: 0; color: var(--muted); max-width: 40em; }
.md-nafis__head .md-h2 { grid-column: 1; margin-bottom: .2em; }
.md-rail-nav { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 8px; }
.md-rail { list-style: none; margin: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 270px); gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 18px var(--gutter) 34px; scrollbar-width: thin; scrollbar-color: var(--gold) transparent; overscroll-behavior-x: contain; }
.md-card { scroll-snap-align: start; display: grid; grid-template-rows: auto 1fr auto auto; gap: 8px; padding: 14px 14px 16px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line); }
.md-card__img { display: block; aspect-ratio: 1; border-radius: calc(var(--r-lg) - 8px); background: var(--nacre); overflow: hidden; }
.md-card__img img { width: 100%; height: 100%; object-fit: contain; transition: transform .6s var(--ease); }
.md-card:hover .md-card__img img { transform: scale(1.06); }
.md-card__title { font-size: var(--step-0); font-weight: 600; line-height: 1.6; margin: 6px 0 0; }
.md-card__title a { text-decoration: none; }
.md-card__price, .md-card__state { margin: 0; color: var(--ink); font-weight: 700; font-size: var(--step--1); }
.md-card__price del { display: block; color: var(--muted); font-weight: 400; text-decoration: line-through; }
.md-card__state { color: var(--muted); font-weight: 500; }

/* ---------- brand ---------- */
.md-brand { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(30px, 6vw, 90px); padding: clamp(70px, 10vw, 140px) var(--gutter); max-width: 1320px; margin: 0 auto; align-items: start; }
.md-brand__text p { color: var(--muted); max-width: 36em; }
.md-ledger { margin: 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 2px solid var(--ink); }
.md-ledger div { padding: 22px 0 22px 14px; border-bottom: 1px solid var(--line); }
.md-ledger div:nth-child(even) { padding-inline-start: 18px; border-inline-start: 1px solid var(--line); }
.md-ledger dt { font-family: var(--display); font-size: var(--step-1); color: var(--ink); line-height: 1.4; }
.md-ledger dd { margin: 4px 0 0; color: var(--muted); font-size: var(--step--1); }

/* ---------- ID / شناسنامه ---------- */
.md-id { position: relative; display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(30px, 6vw, 90px); align-items: center; padding: clamp(70px, 10vw, 140px) var(--gutter); background: var(--ink); color: var(--nacre); overflow: hidden; }
.md-id__text { max-width: 32rem; justify-self: end; }
.md-id__text .md-h2 { color: var(--gold-hi); }
.md-id__text p { color: rgba(244, 238, 240, .8); margin: 0 0 28px; }
.md-id .md-btn--ink { background: var(--gold); color: var(--ink); }
.md-id .md-btn--ink:hover { background: var(--gold-hi); }
.md-doc { position: relative; max-width: 520px; padding: 30px 30px 26px; border-radius: 6px; color: var(--ink); background:
    repeating-linear-gradient(45deg, rgba(36,57,122,.035) 0 2px, transparent 2px 7px),
    repeating-linear-gradient(-45deg, rgba(200,160,74,.06) 0 1px, transparent 1px 9px),
    linear-gradient(180deg, #FBF8F4, #F1E9E6); box-shadow: 0 50px 90px -40px rgba(0,0,0,.6), 0 0 0 1px rgba(200,160,74,.6), 0 0 0 7px #FBF8F4, 0 0 0 8px rgba(200,160,74,.5); transform: rotate(-2deg); }
.md-doc__head { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; margin-bottom: 8px; border-bottom: 1px dashed rgba(15,26,58,.3); }
.md-doc__head img { width: 72px; }
.md-doc__head strong { display: block; font-family: var(--display); font-weight: 800; font-size: var(--step-1); line-height: 1.3; }
.md-doc__head span { font-size: var(--step--1); color: var(--muted); }
.md-doc__rows { margin: 0; }
.md-doc__rows div { display: grid; grid-template-columns: 9.5em 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(15,26,58,.1); font-size: var(--step--1); }
.md-doc__rows dt { color: var(--muted); }
.md-doc__rows dd { margin: 0; font-weight: 600; }
.md-doc__rows small { font-weight: 400; color: var(--muted); }
.md-doc__mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; direction: ltr; unicode-bidi: isolate; letter-spacing: .04em; }
.md-seal { position: absolute; inset-inline-end: -38px; top: -46px; width: 136px; height: 136px; color: var(--rose); }
.md-seal svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; opacity: .9; }
.md-seal text { fill: currentColor; stroke: none; font-family: var(--body); font-size: 10.5px; font-weight: 700; }
.md-seal .md-seal__mark { font-family: ui-monospace, Consolas, monospace; font-size: 20px; letter-spacing: .06em; }

/* ---------- CTA ---------- */
.md-cta { display: grid; grid-template-columns: 1fr minmax(0, 440px); gap: clamp(28px, 6vw, 90px); align-items: center; padding: clamp(70px, 10vw, 130px) var(--gutter); max-width: 1320px; margin: 0 auto; }
.md-cta__text p { color: var(--muted); max-width: 34em; }
.md-cta__tel a { color: var(--ink); font-weight: 700; text-decoration: none; border-bottom: 1px solid var(--gold); }
.md-cta__form { display: grid; gap: 14px; padding: 28px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line); box-shadow: 0 30px 60px -40px rgba(15,26,58,.4); }
.md-field { display: grid; gap: 6px; font-size: var(--step--1); color: var(--muted); }
.md-field input, .md-field select, .md-field textarea { width: 100%; min-height: 50px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; color: var(--text); font: inherit; font-size: 1rem; }
.md-field textarea { min-height: 88px; resize: vertical; }
.md-field input:focus, .md-field select:focus, .md-field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200,160,74,.2); }
.md-field input[readonly] { background: var(--nacre); }
.md-form-msg { margin: 0; min-height: 1.5em; font-size: var(--step--1); }
.md-form-msg.is-ok { color: #2F6B45; }
.md-form-msg.is-err { color: var(--rose); }

.md-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 26px var(--gutter); background: var(--ink); color: rgba(244,238,240,.7); font-size: var(--step--1); }
.md-foot p { margin: 0; }
.md-foot a { text-decoration: none; color: var(--gold-hi); }

/* ---------- drawer ---------- */
.md-scrim { position: fixed; inset: 0; z-index: 60; background: rgba(15, 26, 58, .45); backdrop-filter: blur(3px); opacity: 0; transition: opacity .35s; }
.md-scrim.is-on { opacity: 1; }
.md-drawer { position: fixed; z-index: 61; top: 0; bottom: 0; left: 0; width: min(560px, 100vw); display: grid; grid-template-rows: auto auto 1fr; background: #fff; box-shadow: 30px 0 80px -30px rgba(15,26,58,.5); transform: translateX(-104%); transition: transform .5s var(--ease); }
.md-drawer.is-open { transform: none; }
.md-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 22px; border-bottom: 1px solid var(--line); }
.md-drawer__head h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: var(--step-1); }
.md-steps { list-style: none; margin: 0; padding: 12px 22px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; counter-reset: s; border-bottom: 1px solid var(--line); }
.md-steps li { counter-increment: s; position: relative; display: grid; justify-items: center; gap: 2px; font-size: .74rem; color: var(--muted); }
.md-steps li::before { content: counter(s, persian); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); font-weight: 700; background: #fff; transition: background-color .3s, color .3s, border-color .3s; }
.md-steps li.is-done::before { content: "✓"; background: var(--nacre-2); border-color: transparent; color: var(--ink); }
.md-steps li.is-now { color: var(--ink); font-weight: 700; }
.md-steps li.is-now::before { background: var(--ink); color: var(--gold-hi); border-color: var(--ink); }
.md-steps li.is-skip { display: none; }
.md-drawer__body { overflow-y: auto; padding: 22px; overscroll-behavior: contain; }
.md-drawer__body:focus { outline: none; }
.md-drawer__busy { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; background: rgba(255,255,255,.6); }
.md-drawer__busy span { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--nacre-2); border-top-color: var(--gold); animation: md-spin .8s linear infinite; }
@keyframes md-spin { to { transform: rotate(360deg); } }
.md-pane { animation: md-pane .45s var(--ease); }
@keyframes md-pane { from { opacity: 0; transform: translateX(-16px); } }
.md-pane h3 { margin: 0 0 6px; font-size: var(--step-1); font-weight: 700; }
.md-pane > p { color: var(--muted); margin: 0 0 18px; font-size: var(--step--1); }
.md-pane form { display: grid; gap: 12px; }
.md-pane .md-actions { display: grid; gap: 10px; margin-top: 18px; }
.md-pane .md-actions--sticky { position: sticky; bottom: -22px; padding: 14px 0 22px; background: linear-gradient(180deg, rgba(255,255,255,0), #fff 30%); }
.md-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.md-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px; background: var(--nacre); margin-bottom: 18px; }
.md-tabs button { min-height: 40px; border: 0; border-radius: 999px; background: transparent; cursor: pointer; font-weight: 600; color: var(--muted); }
.md-tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(15,26,58,.1); }
.md-link { background: none; border: 0; padding: 0; color: var(--lapis); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: var(--step--1); }
.md-otp { display: flex; gap: 8px; direction: ltr; justify-content: center; }
.md-otp input { width: 46px; height: 56px; text-align: center; font-size: 1.4rem; font-weight: 700; border: 1px solid var(--line); border-radius: var(--r-sm); }
.md-otp input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200,160,74,.2); }
.md-check { display: flex; gap: 8px; align-items: center; font-size: var(--step--1); color: var(--muted); }
.md-empty { text-align: center; padding: 40px 10px; color: var(--muted); }
.md-empty svg { width: 64px; height: 64px; margin: 0 auto 10px; fill: none; stroke: var(--gold); stroke-width: 1.2; }

.md-cart__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.md-cart__item { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.md-cart__item img { width: 72px; height: 72px; object-fit: contain; border-radius: 8px; background: var(--nacre); }
.md-cart__info { display: grid; gap: 2px; min-width: 0; }
.md-cart__title { font-weight: 600; font-size: var(--step--1); line-height: 1.6; text-decoration: none; }
.md-cart__price { font-weight: 700; color: var(--ink); font-size: var(--step--1); }
.md-cart__gift { font-size: .75rem; color: var(--muted); }
.md-cart__sum { display: flex; justify-content: space-between; align-items: baseline; margin-top: 18px; padding-top: 14px; border-top: 2px solid var(--ink); }
.md-cart__sum strong { font-family: var(--display); font-weight: 800; font-size: var(--step-1); }
.md-cart__note { font-size: .78rem; color: var(--muted); margin: 6px 0 0; }

/* host for server-rendered checkout pages (Shadow DOM) */
.md-host { display: block; }

.md-toast { position: fixed; z-index: 80; bottom: 22px; left: 50%; transform: translate(-50%, 20px); max-width: calc(100vw - 32px); padding: 12px 20px; border-radius: 999px; background: var(--ink); color: var(--nacre); box-shadow: 0 20px 40px -16px rgba(0,0,0,.5); opacity: 0; transition: opacity .3s, transform .3s var(--ease); font-size: var(--step--1); }
.md-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.md-toast.is-err { background: #6E2630; }
.md-fly { position: fixed; z-index: 90; pointer-events: none; border-radius: 50%; object-fit: contain; background: #fff; box-shadow: 0 10px 30px rgba(15,26,58,.3); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
    .md-top__nav { display: none; }
    .md-top__actions { margin-inline-start: auto; }
    .md-hero { grid-template-columns: 1fr; grid-template-rows: auto auto; padding-top: 86px; min-height: auto; }
    .md-hero__stage { grid-column: 1; grid-row: 1; height: 50vh; min-height: 300px; }
    .md-hero__copy { grid-column: 1; grid-row: 2; }
    .md-hero__scroll { display: none; }
    .md-gift, .md-brand, .md-id, .md-cta { grid-template-columns: 1fr; }
    .md-gift__media { max-width: 520px; width: 100%; justify-self: center; }
    .md-id__text { justify-self: start; }
    .md-doc { justify-self: center; transform: rotate(-1deg); }
    .md-seal { inset-inline-end: -10px; top: -50px; width: 104px; height: 104px; }
}
@media (max-width: 560px) {
    .md-top__account span { display: none; }
    .md-specs { grid-template-columns: 1fr; }
    .md-specs li + li { padding-inline-start: 0; border-inline-start: 0; border-top: 1px solid var(--line); }
    .md-ledger { grid-template-columns: 1fr; }
    .md-ledger div:nth-child(even) { padding-inline-start: 0; border-inline-start: 0; }
    .md-doc { padding: 22px 18px; }
    .md-doc__rows div { grid-template-columns: 1fr; gap: 0; }
    .md-rail-nav { display: none; }
    .md-nafis__head { grid-template-columns: 1fr; }
    .md-row2 { grid-template-columns: 1fr; }
    .md-hero__cta .md-btn { flex: 1 1 100%; }
    .md-otp input { width: 40px; height: 50px; }
    .md-steps li { font-size: .68rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    [data-md-tilt] { transform: none !important; }
}

/* ==========================================================
   v1.1 — حرکت و ریسپانسیو گام‌های خرید
   ========================================================== */

/* نوار پیشرفت اسکرول */
.md-progress { position: fixed; inset-inline: 0; top: 0; z-index: 70; height: 3px; background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi), var(--gold)); transform-origin: 100% 50%; transform: scaleX(0); pointer-events: none; }

/* برق دکمه‌های طلایی */
.md-btn--gold { position: relative; overflow: hidden; isolation: isolate; }
.md-btn--gold::after { content: ""; position: absolute; inset-block: 0; width: 38%; inset-inline-start: -60%; z-index: -1; background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .55), transparent); transform: skewX(-18deg); animation: md-shine 5.5s var(--ease) 1.5s infinite; }
@keyframes md-shine { 0%, 62% { inset-inline-start: -60%; } 100% { inset-inline-start: 140%; } }
.md-btn:focus-visible { outline-offset: 4px; }
.md-btn--soft:active, .md-btn--ink:active { transform: scale(.97); }

/* نوار شناور کلیدواژه‌ها زیر هیرو */
.md-ribbon { overflow: hidden; background: var(--ink-2); color: var(--gold-hi); border-block: 1px solid var(--line-on-ink); direction: ltr; }
.md-ribbon__track { display: flex; width: max-content; animation: md-marquee 38s linear infinite; }
.md-ribbon:hover .md-ribbon__track { animation-play-state: paused; }
.md-ribbon__set { display: flex; align-items: center; gap: 0; flex: none; direction: rtl; }
.md-ribbon__set span { padding: 14px 28px; font-weight: 600; font-size: var(--step--1); white-space: nowrap; display: inline-flex; align-items: center; gap: 28px; }
.md-ribbon__set span::after { content: "✦"; color: var(--gold); font-size: .8em; }
@keyframes md-marquee { to { transform: translateX(-50%); } }

/* هیرو: گلبرگ‌های طلایی شناور */
.md-hero__petals { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.md-hero__petals i { position: absolute; top: -8%; width: var(--s, 14px); height: calc(var(--s, 14px) * 1.5); border-radius: 100% 0 100% 0; background: linear-gradient(135deg, var(--gold-hi), var(--gold-lo)); opacity: 0; animation: md-petal var(--d, 14s) linear var(--w, 0s) infinite; inset-inline-start: var(--x, 50%); filter: blur(var(--b, 0px)); }
@keyframes md-petal { 0% { opacity: 0; transform: translate3d(0, 0, 0) rotate(0); } 10% { opacity: .55; } 90% { opacity: .35; } 100% { opacity: 0; transform: translate3d(var(--dx, 60px), 112vh, 0) rotate(var(--r, 320deg)); } }

/* عنوان بخش‌ها: خط طلایی که کشیده می‌شود */
.md-h2 { position: relative; padding-bottom: .5em; }
.md-h2::after { content: ""; position: absolute; bottom: 0; inset-inline-start: 0; width: 56px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--gold), var(--gold-hi)); transform-origin: 100% 50%; transform: scaleX(var(--ln, 1)); }

/* هدیه ویژه: شناور بودن و هاله چرخان */
.md-gift__media img { animation: md-float 6s ease-in-out infinite; }
@keyframes md-float { 50% { transform: translateZ(40px) translateY(-8px) rotate(.6deg); } }
.md-gift__halo { animation: md-halo 14s linear infinite; }
@keyframes md-halo { to { transform: translateZ(-30px) rotate(360deg); } }
.md-specs b { display: inline-block; }

/* کارت‌های نفیس */
.md-card { transition: box-shadow .35s var(--ease), border-color .35s, translate .35s var(--ease); }
.md-card:hover { translate: 0 -6px; box-shadow: 0 26px 44px -28px rgba(15, 26, 58, .55); border-color: rgba(200, 160, 74, .6); }

/* مهر شناسنامه: درخشش ملایم بعد از ضرب شدن */
.md-seal svg { transform-origin: 50% 50%; }
.md-seal.is-stamped svg { animation: md-seal-glow 4s ease-in-out infinite; }
@keyframes md-seal-glow { 50% { filter: drop-shadow(0 0 6px rgba(169, 84, 95, .45)); } }

/* گام‌های خرید: خط اتصال بین مرحله‌ها */
.md-steps { gap: 0; padding-inline: 12px; }
.md-steps li { z-index: 0; }
.md-steps li::after { content: ""; position: absolute; top: 13px; inset-inline-start: calc(50% + 17px); width: calc(100% - 34px); height: 2px; border-radius: 1px; background: var(--line); z-index: -1; transform-origin: 100% 50%; }
.md-steps li:last-child::after { display: none; }
.md-steps li.is-done::after { background: linear-gradient(90deg, var(--gold), var(--gold-hi)); animation: md-line .5s var(--ease) both; }
@keyframes md-line { from { transform: scaleX(0); } }
.md-steps li.is-now::before { box-shadow: 0 0 0 4px rgba(200, 160, 74, .28); animation: md-pulse 2.2s ease-in-out infinite; }
@keyframes md-pulse { 50% { box-shadow: 0 0 0 7px rgba(200, 160, 74, .1); } }
.md-steps li.is-done::before { background: var(--gold); color: var(--ink); }
.md-steps li { transition: color .3s; }

/* کشو: ورود تدریجی آیتم‌های سبد */
.md-cart__item { transition: border-color .25s, box-shadow .25s; animation: md-pane .5s var(--ease) both; }
.md-cart__item:nth-child(2) { animation-delay: .05s; } .md-cart__item:nth-child(3) { animation-delay: .1s; } .md-cart__item:nth-child(n+4) { animation-delay: .15s; }
.md-drawer__head { position: relative; }
.md-pane .md-actions--sticky { padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); }

/* لمس: هدف‌های حداقل ۴۴ پیکسل */
.md-qty__btn { width: 44px; height: 44px; }
.md-round { min-width: 44px; min-height: 44px; }
.md-link { min-height: 44px; display: inline-flex; align-items: center; }
.md-field select { appearance: none; -webkit-appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%235D6585' stroke-width='1.6'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") no-repeat 14px 50%; padding-inline-start: 36px; }

/* ---------- ریسپانسیو کشو و گام‌ها ---------- */
@media (max-width: 720px) {
    .md-drawer { width: 100vw; height: 100vh; height: 100dvh; box-shadow: none; transform: translateY(104%); border-radius: 22px 22px 0 0; }
    .md-drawer.is-open { transform: none; }
    .md-drawer::before { content: ""; position: absolute; top: 8px; inset-inline: 0; margin-inline: auto; width: 44px; height: 4px; border-radius: 2px; background: var(--line); z-index: 4; }
    .md-drawer__head { padding: 22px 16px 10px; }
    .md-steps { padding: 10px 6px; }
    .md-drawer__body { padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
    .md-pane .md-actions--sticky { bottom: -16px; }
    .md-cart__item { grid-template-columns: 64px minmax(0, 1fr); }
    .md-cart__item img { width: 64px; height: 64px; }
    .md-cart__item .md-qty { grid-column: 1 / -1; justify-self: end; }
    .md-otp { gap: 6px; }
    .md-otp input { width: min(44px, 13vw); height: 52px; }
    .md-toast { bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 400px) {
    .md-steps li { font-size: .64rem; }
    .md-steps li::before { width: 24px; height: 24px; }
    .md-steps li::after { top: 12px; inset-inline-start: calc(50% + 15px); width: calc(100% - 30px); }
    .md-tabs button { font-size: .9rem; }
    .md-pane h3 { font-size: 1.1rem; }
}
@media (max-height: 520px) and (orientation: landscape) {
    .md-drawer { width: min(560px, 100vw); transform: translateX(-104%); border-radius: 0; }
    .md-drawer.is-open { transform: none; }
    .md-drawer::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .md-ribbon__track, .md-hero__petals i, .md-gift__media img, .md-gift__halo, .md-btn--gold::after { animation: none !important; }
    .md-progress { display: none; }
}

/* دکمه بازگشت در هدر کشو + گام‌های کلیک‌پذیر */
.md-drawer__head { gap: 10px; }
.md-drawer__head h2 { flex: 1; min-width: 0; }
.md-back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 14px 0 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); cursor: pointer; font-size: var(--step--1); font-weight: 600; transition: background-color .2s, transform .2s var(--ease); }
.md-back:hover { background: var(--nacre); }
.md-back:active { transform: scale(.96); }
.md-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.md-steps li.is-done { cursor: pointer; }
.md-steps li.is-done:hover { color: var(--ink); }
@media (max-width: 400px) { .md-back span { display: none; } .md-back { padding: 0 10px; } }

/* صفحه شمارنده اتصال به درگاه */
.md-gate { position: absolute; inset: 0; z-index: 20; display: grid; align-content: center; justify-items: center; gap: 10px; padding: 28px; text-align: center; background: rgba(15, 26, 58, .96); color: var(--nacre); opacity: 0; transition: opacity .35s; }
.md-gate.is-on { opacity: 1; }
.md-gate h3 { margin: 10px 0 0; font-size: var(--step-1); color: var(--gold-hi); }
.md-gate p { margin: 0; padding: 10px 18px; border-radius: 999px; background: rgba(169, 84, 95, .25); border: 1px solid rgba(169, 84, 95, .6); color: #FFE3E5; font-weight: 700; font-size: var(--step-0); }
.md-gate small { color: rgba(244, 238, 240, .65); }
.md-gate__ring { position: relative; width: 96px; height: 96px; display: grid; place-items: center; }
.md-gate__ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(90deg) scaleX(-1); fill: none; stroke-width: 4; }
.md-gate__bg { stroke: rgba(238, 216, 150, .2); }
.md-gate__fg { stroke: var(--gold); stroke-linecap: round; stroke-dasharray: 176; stroke-dashoffset: 176; animation: md-gate 7s linear forwards; }
@keyframes md-gate { from { stroke-dashoffset: 0; } to { stroke-dashoffset: 176; } }
.md-gate__ring b { font-size: 2.2rem; font-family: var(--display); color: var(--gold-hi); }

/* ---------- v1.2.1: رفع اسکرول افقی و دیده‌شدن کشوی سبد در موبایل ---------- */
html { overflow-x: clip; max-width: 100%; }
html.md-lock { overflow: hidden; }
body.md { overflow-x: clip; max-width: 100%; }

/* کشو: ستون تک‌تکه با minmax(0,1fr) تا محتوای پهن (سبد پر) کشو را از عرض صفحه بیرون نبرد */
.md-drawer { grid-template-columns: minmax(0, 1fr); overflow: hidden; max-width: 100%; visibility: hidden; pointer-events: none; transition: transform .5s var(--ease), visibility 0s linear .5s; }
.md-drawer.is-open { visibility: visible; pointer-events: auto; transition: transform .5s var(--ease), visibility 0s; }
.md-drawer > * { min-width: 0; }
.md-drawer__body { overflow-x: hidden; min-width: 0; }
.md-pane, .md-pane form, .md-cart__list, .md-cart__item, .md-cart__info, .md-field { min-width: 0; max-width: 100%; }
.md-cart__title, .md-cart__price, .md-cart__gift, .md-cart__note { overflow-wrap: anywhere; }
.md-cart__sum { gap: 8px 12px; flex-wrap: wrap; }
.md-steps { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.md-row2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 560px) { .md-row2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) {
    .md-drawer { width: 100%; inset-inline: 0; left: 0; right: 0; }
    .md-scrim { width: 100%; }
}
.md-fly, .md-toast { max-width: 100vw; }

/* ---------- v1.2.2 ---------- */
/* یادداشت قیمت: فاصله از دکمه افزودن به سبد */
.md-buy { margin-bottom: 0; }
.md-buy__note { margin: 20px 0 0; padding-top: 4px; line-height: 1.9; }

/* متن‌های زیر تیتر «خانه سکه ایران» و «شناسنامه»: دوطرفه (justify) */
.md-brand__text p, .md-id__text p { text-align: justify; text-justify: inter-word; hyphens: manual; }

/* دکمه استعلام اصالت: در موبایل تمام‌عرض و وسط */
@media (max-width: 980px) {
    .md-id__text { justify-self: stretch; width: 100%; max-width: none; }
    .md-id__text .md-btn--ink { display: flex; width: 100%; max-width: 420px; margin-inline: auto; }
}

/* ---------- v1.2.3 ---------- */
/* موبایل: دایره‌های مورب (guilloche) پشت شمش بیفتند، نه زیر متن؛ شمش در موبایل بالای صفحه است */
@media (max-width: 980px) {
    .md-hero::after {
        background: repeating-radial-gradient(circle at 50% calc(86px + max(25vh, 150px)), transparent 0 14px, var(--gold) 14px 15px);
        mask-image: radial-gradient(75% 38% at 50% calc(86px + max(25vh, 150px)), #000 25%, transparent 78%);
        -webkit-mask-image: radial-gradient(75% 38% at 50% calc(86px + max(25vh, 150px)), #000 25%, transparent 78%);
    }
    /* فاصله هدیه ویژه تا شمش‌های نفیس کمتر */
    .md-gift { padding-block: clamp(44px, 9vw, 64px) clamp(20px, 5vw, 32px); }
    .md-nafis { padding-top: clamp(28px, 6vw, 44px); }
}

/* ---------- v1.2.4: T99 در شناسنامه راست‌چین (موبایل و دسکتاپ) ---------- */
.md-doc__rows dd.md-doc__mono { direction: rtl; text-align: right; unicode-bidi: isolate; }
