/* =====================================================================
   پنل فروش — قالب اختصاصی area «Store»
   موبایل اول: هر قاعده برای صفحه کوچک نوشته شده و در نقطه های شکست بزرگ تر گسترش می یابد.
   همه فاصله ها و جهت ها منطقی اند (inline-start/end) تا در راست به چپ درست بمانند.
   ===================================================================== */

@font-face {
    font-family: "Vazirmatn";
    src: url("../fonts/Vazirmatn-Variable.woff2") format("woff2-variations"),
         url("../fonts/Vazirmatn-Variable.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    /* پالت روشن فیروزه ای: رنگ اصلی بین سبز و آبی، زمینه روشن متمایل به همان رنگ */
    --bg: #f2f8f8;
    --surface: #ffffff;
    --surface-2: #e8f3f2;
    --surface-3: #d9ecea;
    --ink: #17312f;
    --ink-2: #4a6462;
    --ink-3: #7c9593;
    --line: #dae8e6;
    --line-strong: #c2d8d5;

    --brand: #0e8f8c;
    --brand-2: #1a9fd0;
    --brand-deep: #0a6f6d;
    --brand-ink: #ffffff;
    --brand-soft: #dff3f1;

    /* دکمه اقدام اصلی (ثبت سفارش، پرداخت): سبز آبی روشن تر */
    --accent: #12a36f;
    --accent-ink: #ffffff;
    --accent-soft: #dcf5ea;

    /* قیمت ها: مبلغ قابل پرداخت سبز، قیمت پیش از تخفیف و کسرها قرمز */
    --price: #13894f;
    --price-old: #d23c3c;
    --sale: #e5484d;
    --sale-ink: #ffffff;

    --success: #13894f;
    --success-soft: #dff4e8;
    --warn: #a86a0c;
    --warn-soft: #fbf0d8;
    --danger: #cc3a36;
    --danger-soft: #fbe4e3;
    --info: #1f76b4;
    --info-soft: #e0eef9;
    --neutral: #5b6e6c;
    --neutral-soft: #e7efee;

    --radius-xs: 8px;
    --radius-sm: 12px;
    --radius: 16px;
    --radius-lg: 22px;
    --radius-pill: 999px;

    --shadow-1: 0 1px 2px rgba(14, 64, 62, .06), 0 1px 1px rgba(14, 64, 62, .04);
    --shadow-2: 0 6px 20px rgba(14, 64, 62, .10);
    --shadow-3: 0 18px 48px rgba(14, 64, 62, .18);

    --topbar-h: 60px;
    --bottomnav-h: 64px;
    --safe-b: env(safe-area-inset-bottom, 0px);
    --gutter: 16px;
    --ease: cubic-bezier(.2, .8, .2, 1);

    --font: "Vazirmatn", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;

    /* قالب فقط روشن است؛ حالت تاریک سیستم عامل آن را تیره نمی کند */
    color-scheme: light;
}

/* ---------- پایه ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    overflow-x: clip;
    min-height: 100dvh;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.45; font-weight: 800; letter-spacing: -.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }

:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent);
    outline-offset: 2px;
    border-radius: 6px;
}

.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.strong { font-weight: 800; }
.nowrap { white-space: nowrap; }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100;
    background: var(--brand); color: var(--brand-ink); padding: 10px 16px; border-radius: var(--radius-sm);
    transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

.icon { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon--sm { width: 18px; height: 18px; }
.icon--lg { width: 28px; height: 28px; }
.icon--xl { width: 44px; height: 44px; }

/* ---------- چیدمان ---------- */

.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: 720px; }

.page { padding-block: 16px calc(var(--bottomnav-h) + 32px + var(--safe-b)); }
.page--with-bar { padding-bottom: calc(var(--bottomnav-h) + 112px + var(--safe-b)); }

.stack > * + * { margin-top: 12px; }
.stack-lg > * + * { margin-top: 20px; }
.row { display: flex; align-items: center; gap: 12px; }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }

/* ---------- نوار بالا ---------- */

.topbar {
    position: sticky; top: 0; z-index: 40;
    height: var(--topbar-h);
    background: color-mix(in srgb, var(--bg) 86%, transparent);
    backdrop-filter: saturate(1.4) blur(14px);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s, box-shadow .2s;
}
.topbar.is-scrolled { border-bottom-color: var(--line); }
.topbar__inner { height: 100%; display: flex; align-items: center; gap: 8px; }

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 900; font-size: 17px; }
.brand__logo { width: 36px; height: 36px; border-radius: 11px; object-fit: contain; background: var(--surface); box-shadow: var(--shadow-1); }
.brand__mark {
    width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
    background: var(--brand); color: var(--brand-ink); font-weight: 900; font-size: 17px;
}
.brand__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand__sub { display: block; font-size: 11px; font-weight: 600; color: var(--ink-3); line-height: 1.2; }

.topbar__actions { margin-inline-start: auto; display: flex; align-items: center; gap: 4px; }
.topnav { display: none; }

.icon-btn {
    position: relative; width: 44px; height: 44px; border-radius: 14px; border: 0;
    display: inline-grid; place-items: center; background: transparent; color: var(--ink);
    transition: background .15s;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(.96); }

.count-badge {
    position: absolute; top: 4px; inset-inline-end: 2px;
    min-width: 19px; height: 19px; padding-inline: 5px; border-radius: 10px;
    background: var(--accent); color: var(--accent-ink);
    font-size: 11px; font-weight: 800; line-height: 19px; text-align: center;
    box-shadow: 0 0 0 2px var(--bg);
    transition: transform .25s var(--ease);
}
.count-badge.is-empty { transform: scale(0); }
.count-badge.is-bump { animation: bump .45s var(--ease); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }

/* جستجو */
.search {
    display: flex; align-items: center; gap: 8px;
    height: 48px; padding-inline: 14px; border-radius: var(--radius-sm);
    background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1);
}
.search:focus-within { border-color: var(--brand); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; height: 100%; }
.search input::-webkit-search-cancel-button { display: none; }
.search__clear { border: 0; background: transparent; color: var(--ink-3); display: grid; place-items: center; padding: 4px; }

/* ---------- ناوبری پایین (موبایل) ---------- */

.bottom-nav {
    position: fixed; inset-inline: 0; bottom: 0; z-index: 45;
    height: calc(var(--bottomnav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
    display: grid; grid-template-columns: repeat(4, 1fr);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--line);
}
.bottom-nav__item {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    color: var(--ink-3); font-size: 11px; font-weight: 700;
    transition: color .15s;
}
.bottom-nav__item .icon { width: 24px; height: 24px; }
.bottom-nav__item.is-active { color: var(--brand); }
.bottom-nav__item.is-active::before {
    content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 4px 4px; background: var(--brand);
}
.bottom-nav__item .count-badge { top: 6px; inset-inline-end: calc(50% - 22px); }

/* ---------- نوار سبد شناور ---------- */

.cartbar {
    position: fixed; z-index: 44; inset-inline: 12px;
    bottom: calc(var(--bottomnav-h) + var(--safe-b) + 10px);
    display: flex; align-items: center; gap: 12px;
    padding: 10px 10px 10px 16px; padding-inline-start: 16px;
    border-radius: 18px; background: var(--brand); color: var(--brand-ink);
    box-shadow: var(--shadow-3);
    transform: translateY(0); opacity: 1;
    transition: transform .35s var(--ease), opacity .25s;
}
.cartbar.is-hidden { transform: translateY(140%); opacity: 0; pointer-events: none; }
.cartbar__icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand-ink) 14%, transparent); }
.cartbar__text { flex: 1; min-width: 0; line-height: 1.4; }
.cartbar__count { font-size: 12px; opacity: .8; }
.cartbar__total { font-weight: 900; font-size: 16px; }
.cartbar__cta {
    display: inline-flex; align-items: center; gap: 6px; height: 42px; padding-inline: 16px;
    border-radius: 13px; background: var(--brand-ink); color: var(--brand); font-weight: 800; font-size: 14px;
}

/* ---------- دکمه ها ---------- */

.btn {
    --btn-bg: var(--surface-2); --btn-ink: var(--ink);
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 48px; padding-inline: 20px; border: 1px solid transparent; border-radius: 14px;
    background: var(--btn-bg); color: var(--btn-ink);
    font-weight: 800; font-size: 15px; white-space: nowrap; user-select: none;
    transition: transform .12s, background .15s, box-shadow .15s, opacity .15s;
}
.btn:hover { filter: brightness(1.04); }
.btn:active { transform: scale(.98); }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }
.btn--primary { --btn-bg: var(--brand); --btn-ink: var(--brand-ink); box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 28%, transparent); }
.btn--accent { --btn-bg: var(--accent); --btn-ink: var(--accent-ink); box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn--outline { --btn-bg: transparent; border-color: var(--line-strong); }
.btn--ghost { --btn-bg: transparent; }
.btn--danger { --btn-bg: var(--danger-soft); --btn-ink: var(--danger); }
.btn--block { width: 100%; }
.btn--lg { height: 56px; font-size: 16px; border-radius: 16px; }
.btn--sm { height: 38px; padding-inline: 14px; font-size: 13px; border-radius: 11px; }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
    content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%;
    border: 2.5px solid var(--btn-ink); border-inline-end-color: transparent;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.link { color: var(--brand); font-weight: 700; }
.link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- کارت و فهرست ---------- */

.card {
    background: var(--surface); border-radius: var(--radius);
    border: 1px solid var(--line); box-shadow: var(--shadow-1);
}
.card__body { padding: 16px; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 0; }
.card__title { font-size: 16px; font-weight: 800; }

.section-title { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 800; margin-bottom: 12px; }
.section-title__num {
    width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center;
    background: var(--brand); color: var(--brand-ink); font-size: 14px; font-weight: 900;
}

.page-head { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.page-head h1 { font-size: 22px; }
.page-head__back { margin-inline-start: -8px; }

.list { display: flex; flex-direction: column; }
.list__row {
    display: flex; align-items: center; gap: 12px; padding: 14px 16px; min-height: 56px;
    border-top: 1px solid var(--line);
}
.list__row:first-child { border-top: 0; }
a.list__row:hover, .list__row.is-active { background: var(--surface-2); }
.list__icon {
    width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center;
    background: var(--surface-2); color: var(--brand);
}
.list__chevron { color: var(--ink-3); margin-inline-start: auto; }

.kv { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-block: 6px; }
.kv__k { color: var(--ink-2); }
.kv__v { font-weight: 700; text-align: end; }
.kv--total { border-top: 1px dashed var(--line-strong); margin-top: 6px; padding-top: 12px; font-size: 17px; }
.kv--total .kv__k { color: var(--ink); font-weight: 800; }
.kv--total .kv__v { font-weight: 900; color: var(--price); }
.kv--discount .kv__v { color: var(--price-old); }

/* هر مبلغ پرداختنی: جمع ردیف، جمع سفارش، مبلغ تراکنش */
.money { color: var(--price); font-weight: 900; }

/* ---------- برچسب وضعیت ---------- */

.tag {
    --tag-bg: var(--neutral-soft); --tag-ink: var(--neutral);
    display: inline-flex; align-items: center; gap: 6px; height: 26px; padding-inline: 10px;
    border-radius: var(--radius-pill); background: var(--tag-bg); color: var(--tag-ink);
    font-size: 12px; font-weight: 800; white-space: nowrap;
}
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag--plain::before { display: none; }
.tag--success { --tag-bg: var(--success-soft); --tag-ink: var(--success); }
.tag--warn { --tag-bg: var(--warn-soft); --tag-ink: var(--warn); }
.tag--danger { --tag-bg: var(--danger-soft); --tag-ink: var(--danger); }
.tag--info { --tag-bg: var(--info-soft); --tag-ink: var(--info); }
.tag--accent { --tag-bg: var(--accent-soft); --tag-ink: var(--accent); }

/* ---------- اعلان ---------- */

.notice {
    --n-bg: var(--info-soft); --n-ink: var(--info);
    display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius);
    background: var(--n-bg); color: var(--ink);
}
.notice > .icon { color: var(--n-ink); margin-top: 2px; }
.notice--warn { --n-bg: var(--warn-soft); --n-ink: var(--warn); }
.notice--success { --n-bg: var(--success-soft); --n-ink: var(--success); }
.notice--danger { --n-bg: var(--danger-soft); --n-ink: var(--danger); }
.notice__title { font-weight: 800; }

.toast-stack {
    position: fixed; z-index: 90; inset-inline: 12px; top: calc(var(--topbar-h) + 8px);
    display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
}
.toast {
    pointer-events: auto; width: 100%; max-width: 440px;
    display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px;
    background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow-3);
    font-weight: 600; font-size: 14px;
    animation: toast-in .35s var(--ease);
}
.toast.is-leaving { animation: toast-out .25s ease forwards; }
.toast__icon { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--brand-soft); color: var(--brand); }
.toast--success .toast__icon { background: var(--success); color: #fff; }
.toast--danger .toast__icon { background: var(--danger); color: #fff; }
.toast__text { flex: 1; min-width: 0; }
.toast__action { border: 0; background: transparent; color: inherit; font-weight: 900; text-decoration: underline; text-underline-offset: 4px; }
@keyframes toast-in { from { transform: translateY(-16px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toast-out { to { transform: translateY(-12px); opacity: 0; } }

/* ---------- فرم ---------- */

.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: 13px; font-weight: 800; color: var(--ink-2); }
.field__label .req { color: var(--accent); }
.field__help { font-size: 12px; color: var(--ink-3); }
.field__error, .field-validation-error { font-size: 12px; color: var(--danger); font-weight: 700; }
.field-validation-valid { display: none; }

.input, .select, .textarea {
    width: 100%; height: 50px; padding-inline: 14px; border-radius: var(--radius-sm);
    border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
    transition: border-color .15s, box-shadow .15s; outline: 0;
    font-size: 16px; /* جلوگیری از بزرگ نمایی خودکار در iOS */
}
.textarea { height: auto; min-height: 96px; padding-block: 12px; resize: vertical; line-height: 1.8; }
.select {
    appearance: none; -webkit-appearance: none; padding-inline-end: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%238b857a' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: left 14px center;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); }
.input.input-validation-error, .select.input-validation-error { border-color: var(--danger); }
.input[dir="ltr"] { text-align: left; }
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }

.form-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
.form-grid--2 { grid-template-columns: 1fr 1fr; }

/* گزینه های کارت (رادیو) */
.choices { display: grid; gap: 10px; }
.choice { position: relative; display: block; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice__body {
    display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: var(--radius);
    border: 1.5px solid var(--line); background: var(--surface); cursor: pointer;
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.choice__body:hover { border-color: var(--line-strong); }
.choice__radio {
    width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; margin-top: 2px;
    display: grid; place-items: center; transition: border-color .15s;
}
.choice__radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); transform: scale(0); transition: transform .2s var(--ease); }
.choice input:checked + .choice__body { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 4%, var(--surface)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 10%, transparent); }
.choice input:checked + .choice__body .choice__radio { border-color: var(--brand); }
.choice input:checked + .choice__body .choice__radio::after { transform: scale(1); }
.choice input:focus-visible + .choice__body { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; }
.choice input:disabled + .choice__body { opacity: .5; cursor: not-allowed; }
.choice__main { flex: 1; min-width: 0; }
.choice__title { font-weight: 800; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.choice__desc { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.choice__side { font-weight: 800; white-space: nowrap; font-size: 14px; }
.choice__icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--brand); flex: none; }

/* کنترل دوحالته */
.segmented {
    display: grid; grid-auto-columns: 1fr; grid-auto-flow: column; gap: 4px; padding: 4px;
    background: var(--surface-2); border-radius: 16px;
}
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; }
.segmented span {
    display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px; border-radius: 12px;
    font-weight: 800; font-size: 14px; color: var(--ink-2); cursor: pointer; transition: background .2s, color .2s, box-shadow .2s;
}
.segmented input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.segmented input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); }

/* کلید روشن و خاموش */
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch__track { width: 46px; height: 28px; border-radius: 14px; background: var(--line-strong); position: relative; flex: none; transition: background .2s; }
.switch__track::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-1); transition: inset-inline-start .2s var(--ease); }
.switch input:checked + .switch__track { background: var(--brand); }
.switch input:checked + .switch__track::after { inset-inline-start: 21px; }

/* ---------- تراشه ها ---------- */

.chips {
    display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-block: 4px;
    margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter);
    scroll-snap-type: x proximity;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
    flex: none; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding-inline: 16px;
    border-radius: var(--radius-pill); border: 1px solid var(--line); background: var(--surface);
    font-size: 14px; font-weight: 700; color: var(--ink-2); white-space: nowrap; scroll-snap-align: start;
    transition: background .15s, color .15s, border-color .15s;
}
.chip:hover { border-color: var(--line-strong); }
.chip.is-active { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }

/* ---------- شبکه محصولات ---------- */

.shop-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.shop-head__title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.shop-head__title h1 { font-size: 22px; }

.hero {
    position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: 22px 20px;
    background: linear-gradient(135deg, #d8f3ef 0%, #d9edfb 100%); color: var(--ink); border: 1px solid var(--line);
    margin-bottom: 16px;
}
.hero::after {
    content: ""; position: absolute; inset-inline-end: -40px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--brand) 30%, transparent) 0%, transparent 70%);
}
.hero__title { font-size: 21px; font-weight: 900; position: relative; color: var(--brand-deep); }
.hero__text { font-size: 14px; color: var(--ink-2); margin-top: 4px; position: relative; max-width: 460px; }
.hero__stats { display: flex; gap: 18px; margin-top: 14px; position: relative; font-size: 13px; }
.hero__stats strong { display: block; font-size: 18px; font-weight: 900; color: var(--brand); }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.pcard { position: relative; display: flex; flex-direction: column; min-width: 0; }
.pcard__media {
    position: relative; aspect-ratio: 1 / 1; border-radius: var(--radius); overflow: hidden;
    background: var(--surface-2);
}
.pcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.pcard:hover .pcard__media img { transform: scale(1.04); }
.pcard__placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-3); }
.pcard__badges { position: absolute; top: 8px; inset-inline-start: 8px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.pcard__badge {
    height: 24px; padding-inline: 8px; border-radius: 8px; display: inline-flex; align-items: center;
    font-size: 12px; font-weight: 900; background: var(--sale); color: var(--sale-ink);
}
.pcard__badge--low { background: var(--surface); color: var(--warn); box-shadow: var(--shadow-1); }
.pcard.is-soldout .pcard__media img { filter: grayscale(1) opacity(.55); }
.pcard__soldout {
    position: absolute; inset-inline: 8px; bottom: 8px; height: 30px; border-radius: 10px;
    display: grid; place-items: center; font-size: 12px; font-weight: 800;
    background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--ink-2); backdrop-filter: blur(6px);
}
.pcard__add {
    position: absolute; bottom: 8px; inset-inline-end: 8px; z-index: 2;
    width: 42px; height: 42px; border-radius: 14px; border: 0; display: grid; place-items: center;
    background: var(--surface); color: var(--ink); box-shadow: var(--shadow-2);
    transition: transform .15s, background .15s;
}
.pcard__add:hover { background: var(--brand); color: var(--brand-ink); }
.pcard__add:active { transform: scale(.92); }
.pcard__body { padding: 10px 2px 4px; display: flex; flex-direction: column; gap: 2px; }
.pcard__title {
    font-size: 14px; font-weight: 700; line-height: 1.6; color: var(--ink);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 3.2em;
}
.pcard__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; }
.price__now { font-weight: 900; font-size: 15px; color: var(--price); }
.price__now small { font-size: 11px; font-weight: 600; color: var(--ink-3); margin-inline-start: 2px; }
.price__old { font-size: 12px; color: var(--price-old); text-decoration: line-through; text-decoration-thickness: 1.5px; }

.empty {
    text-align: center; padding: 48px 24px; display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.empty__art {
    width: 96px; height: 96px; border-radius: 30px; display: grid; place-items: center;
    background: var(--surface-2); color: var(--ink-3);
}
.empty__title { font-size: 18px; font-weight: 800; }
.empty__text { color: var(--ink-2); max-width: 340px; }

.load-more { display: flex; justify-content: center; padding-block: 24px 8px; }

.skeleton { position: relative; overflow: hidden; background: var(--surface-2); border-radius: var(--radius); }
.skeleton::after {
    content: ""; position: absolute; inset: 0; transform: translateX(100%);
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 60%, transparent), transparent);
    animation: shimmer 1.2s infinite;
}
@keyframes shimmer { to { transform: translateX(-100%); } }
.pcard--skeleton .pcard__media { border-radius: var(--radius); }
.pcard--skeleton .line { height: 12px; margin-top: 10px; border-radius: 6px; }

/* ---------- صفحه محصول ---------- */

.pdp { display: grid; gap: 20px; }
.gallery { position: relative; margin-inline: calc(var(--gutter) * -1); }
.gallery__track {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; gap: 8px;
    padding-inline: var(--gutter);
}
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__slide {
    flex: 0 0 88%; scroll-snap-align: center; aspect-ratio: 1 / 1; border-radius: var(--radius-lg);
    overflow: hidden; background: var(--surface-2);
}
.gallery__slide:only-child { flex-basis: 100%; }
.gallery__slide img { width: 100%; height: 100%; object-fit: cover; }
.gallery__dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.gallery__dot { width: 7px; height: 7px; border-radius: 4px; background: var(--line-strong); border: 0; padding: 0; transition: width .25s var(--ease), background .25s; }
.gallery__dot.is-active { width: 22px; background: var(--brand); }

.pdp__title { font-size: 21px; font-weight: 900; line-height: 1.6; }
.pdp__subtitle { color: var(--ink-3); font-size: 13px; }
.pdp__price { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pdp__price .price__now { font-size: 22px; }
.pdp__price .price__old { font-size: 14px; }
.pdp__off { height: 26px; padding-inline: 8px; border-radius: 8px; background: var(--sale); color: var(--sale-ink); font-weight: 900; font-size: 13px; display: inline-flex; align-items: center; }

.vgroup + .vgroup { margin-top: 18px; }
.vgroup__head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.vgroup__name { font-weight: 800; }
.vgroup__value { color: var(--ink-2); font-size: 14px; }
.vgroup__options { display: flex; flex-wrap: wrap; gap: 8px; }
.vopt {
    position: relative; min-width: 50px; height: 46px; padding-inline: 14px; border-radius: 12px;
    border: 1.5px solid var(--line-strong); background: var(--surface); font-weight: 800; font-size: 14px;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.vopt:hover { border-color: var(--ink-2); }
.vopt.is-selected { border-color: var(--brand); background: var(--brand); color: var(--brand-ink); }
.vopt.is-unavailable { color: var(--ink-3); border-style: dashed; }
.vopt.is-unavailable::after {
    content: ""; position: absolute; inset-inline: 8px; top: 50%; height: 1.5px; background: currentColor; transform: rotate(-12deg); opacity: .7;
}
.vopt--swatch { width: 46px; min-width: 46px; padding: 0; border-radius: 50%; }
.vopt--swatch .swatch { width: 34px; height: 34px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.vopt--swatch.is-selected { background: var(--surface); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--brand); border-color: var(--surface); }
.vopt--swatch.is-unavailable::after { inset-inline: 4px; background: var(--danger); }

.stock-hint { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--success); }
.stock-hint.is-low { color: var(--warn); }
.stock-hint.is-out { color: var(--danger); }
.order-rule {
    display: flex; align-items: center; gap: 6px; width: fit-content; margin-top: 8px;
    padding: 4px 10px; border-radius: var(--radius-pill); background: var(--info-soft); color: var(--info);
    font-size: 12px; font-weight: 800; line-height: 1.7;
}
.cart-line .order-rule { margin-top: 2px; }

.qty {
    display: inline-flex; align-items: center; height: 48px; border-radius: 14px; background: var(--surface-2); padding: 4px;
}
.qty__btn { width: 40px; height: 40px; border-radius: 11px; border: 0; display: grid; place-items: center; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.qty__btn:disabled { opacity: .4; }
.qty__input { width: 46px; border: 0; background: transparent; text-align: center; font-weight: 900; font-size: 16px; -moz-appearance: textfield; outline: 0; }
.qty__input::-webkit-outer-spin-button, .qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty--sm { height: 40px; }
.qty--sm .qty__btn { width: 32px; height: 32px; border-radius: 9px; }
.qty--sm .qty__input { width: 36px; font-size: 14px; }

.buybar {
    position: fixed; z-index: 46; inset-inline: 0; bottom: 0;
    padding: 12px var(--gutter) calc(12px + var(--safe-b));
    background: color-mix(in srgb, var(--surface) 96%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--line); box-shadow: 0 -10px 30px rgba(0, 0, 0, .06);
    display: flex; align-items: center; gap: 12px;
}
.buybar__price { line-height: 1.3; }
.buybar__price .price__now { font-size: 17px; }
.buybar .btn { flex: 1; }
.has-buybar .bottom-nav, .has-buybar .cartbar { display: none; }
.has-buybar .page { padding-bottom: calc(120px + var(--safe-b)); }

.prose { color: var(--ink-2); line-height: 2; }
.prose p + p { margin-top: 10px; }
.prose img { border-radius: var(--radius-sm); margin-block: 10px; }
.prose ul { list-style: disc; padding-inline-start: 20px; }

.specs { display: grid; gap: 0; }
.specs__row { display: grid; grid-template-columns: 38% 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.specs__row:first-child { border-top: 0; }
.specs__k { color: var(--ink-3); }
.specs__v { font-weight: 700; }

/* ---------- برگه پایین (bottom sheet) ---------- */

.sheet { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(12, 11, 9, .45); animation: fade-in .25s ease; }
.sheet__panel {
    position: relative; width: 100%; max-width: 560px; max-height: 92dvh; overflow: auto; overscroll-behavior: contain;
    background: var(--surface); border-radius: 24px 24px 0 0; box-shadow: var(--shadow-3);
    padding: 8px 20px calc(20px + var(--safe-b));
    animation: sheet-up .35s var(--ease);
}
.sheet.is-closing .sheet__panel { animation: sheet-down .25s ease forwards; }
.sheet.is-closing .sheet__backdrop { animation: fade-out .25s ease forwards; }
.sheet__grip { width: 42px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 4px auto 12px; }
.sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sheet__title { font-size: 17px; font-weight: 900; }
.sheet__product { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.sheet__thumb { width: 72px; aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden; background: var(--surface-2); flex: none; }
.sheet__thumb img { width: 100%; height: 100%; object-fit: cover; }
.sheet__footer { display: flex; align-items: center; gap: 12px; margin-top: 20px; }
.sheet__footer .btn { flex: 1; }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheet-down { to { transform: translateY(100%); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }

/* ---------- سبد خرید ---------- */

.cart-line { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.cart-line:first-child { border-top: 0; }
.cart-line__thumb { width: 76px; aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden; background: var(--surface-2); flex: none; }
.cart-line__thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-line__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cart-line__title { font-weight: 800; font-size: 14px; line-height: 1.6; }
.cart-line__variant { font-size: 13px; color: var(--ink-2); }
.cart-line__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.cart-line__remove { border: 0; background: transparent; color: var(--ink-3); padding: 6px; border-radius: 10px; }
.cart-line__remove:hover { color: var(--danger); background: var(--danger-soft); }
.cart-line.is-busy { opacity: .5; pointer-events: none; }
.cart-line__warn { font-size: 12px; font-weight: 700; color: var(--danger); }

.stickybar {
    position: fixed; z-index: 46; inset-inline: 0; bottom: calc(var(--bottomnav-h) + var(--safe-b));
    padding: 12px var(--gutter);
    background: color-mix(in srgb, var(--surface) 96%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--line);
}
.stickybar__inner { max-width: 720px; margin-inline: auto; display: flex; align-items: center; gap: 14px; }
.stickybar__sum { line-height: 1.35; }
.stickybar__sum small { display: block; color: var(--ink-3); font-size: 12px; }
.stickybar__sum strong { font-size: 17px; font-weight: 900; color: var(--price); }
.stickybar .btn { flex: 1; }
.has-stickybar .cartbar { display: none; }

/* ---------- ثبت سفارش ---------- */

.checkout { display: grid; gap: 16px; }
.checkout.is-refreshing { opacity: .65; pointer-events: none; transition: opacity .15s; }
.pickup-card { display: flex; gap: 12px; align-items: flex-start; }
.addr { display: flex; flex-direction: column; gap: 2px; }
.addr__title { font-weight: 800; }
.addr__line { font-size: 13px; color: var(--ink-2); line-height: 1.8; }
.addr__meta { font-size: 12px; color: var(--ink-3); }

.coupon { display: flex; gap: 8px; }
.coupon .input { flex: 1; }
.details-toggle { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; font-weight: 800; }
.details-toggle::-webkit-details-marker { display: none; }
details[open] .details-toggle .icon { transform: rotate(180deg); }
.details-toggle .icon { transition: transform .2s; }

/* ---------- پرداخت ---------- */

.success-hero { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 0 4px; }
.success-hero__icon {
    width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center;
    background: var(--success-soft); color: var(--success); animation: pop .5s var(--ease);
}
.success-hero__icon--warn { background: var(--warn-soft); color: var(--warn); }
.success-hero__icon .icon { width: 40px; height: 40px; stroke-width: 2.4; }
.success-hero h1 { font-size: 20px; }
@keyframes pop { 0% { transform: scale(.5); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }

.amount {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; border-radius: var(--radius);
    background: var(--brand); color: var(--brand-ink);
}
.amount__label { font-size: 13px; opacity: .8; }
.amount__value { font-size: 22px; font-weight: 900; }

.copy-row { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.copy-row:first-child { border-top: 0; }
.copy-row__main { flex: 1; min-width: 0; }
.copy-row__label { font-size: 12px; color: var(--ink-3); font-weight: 700; }
.copy-row__value { font-weight: 800; font-size: 16px; word-break: break-all; }
.copy-row__value--mono { font-feature-settings: "tnum"; letter-spacing: .02em; font-size: 15px; }
.copy-btn {
    display: inline-flex; align-items: center; gap: 6px; height: 36px; padding-inline: 12px; border-radius: 10px;
    border: 1px solid var(--line-strong); background: var(--surface); font-size: 13px; font-weight: 800; color: var(--ink-2);
}
.copy-btn.is-copied { border-color: var(--success); color: var(--success); background: var(--success-soft); }

.upload {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    min-height: 150px; padding: 18px; border-radius: var(--radius); text-align: center;
    border: 2px dashed var(--line-strong); background: var(--surface-2); color: var(--ink-2);
    transition: border-color .15s, background .15s;
}
.upload:hover, .upload.is-dragging { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 5%, var(--surface-2)); }
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload__preview { width: 100%; max-height: 260px; object-fit: contain; border-radius: var(--radius-sm); }
.upload.has-file { border-style: solid; padding: 10px; }

.steps-guide { counter-reset: step; display: grid; gap: 10px; }
.steps-guide li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.steps-guide li::before {
    counter-increment: step; content: counter(step, persian);
    width: 24px; height: 24px; border-radius: 8px; flex: none; display: grid; place-items: center;
    background: var(--surface-2); color: var(--ink); font-weight: 900; font-size: 13px;
}

/* ---------- سفارش ---------- */

.order-card { display: block; padding: 14px 16px; }
.order-card + .order-card { border-top: 1px solid var(--line); }
.order-card:hover { background: var(--surface-2); }
.order-card__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.order-card__num { font-weight: 900; }
.order-card__meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.order-card__thumbs { display: flex; gap: 6px; margin-top: 10px; }
.order-card__thumbs img, .order-card__thumbs span { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--surface-2); }
.order-card__thumbs span { display: grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--ink-2); }

.progress { display: grid; grid-template-columns: repeat(var(--steps, 5), 1fr); gap: 4px; margin-block: 6px 4px; }
.progress__step { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 11px; font-weight: 700; color: var(--ink-3); position: relative; }
.progress__dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-3); position: relative; z-index: 1; }
.progress__dot .icon { width: 16px; height: 16px; }
.progress__step::before {
    content: ""; position: absolute; top: 14px; inset-inline-start: 50%; width: 100%; height: 2px; background: var(--line);
}
.progress__step:last-child::before { display: none; }
.progress__step.is-done { color: var(--ink); }
.progress__step.is-done .progress__dot { background: var(--success); color: #fff; }
.progress__step.is-done::before { background: var(--success); }
.progress__step.is-current .progress__dot { background: var(--brand); color: var(--brand-ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.progress__step.is-current { color: var(--ink); }

.line-item { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.line-item:first-child { border-top: 0; }
.line-item__thumb { width: 52px; height: 52px; border-radius: 10px; overflow: hidden; background: var(--surface-2); flex: none; }
.line-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.line-item__main { flex: 1; min-width: 0; font-size: 14px; }
.line-item__title { font-weight: 700; }
.line-item__sub { font-size: 12px; color: var(--ink-3); }

/* ---------- حساب کاربری ---------- */

.profile-hero {
    display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #d8f3ef, #d9edfb); color: var(--ink); border: 1px solid var(--line);
}
.avatar {
    width: 58px; height: 58px; border-radius: 18px; flex: none; display: grid; place-items: center;
    background: var(--brand); color: var(--brand-ink); font-size: 22px; font-weight: 900;
}
.profile-hero__name { font-size: 18px; font-weight: 900; line-height: 1.5; }
.profile-hero__phone { font-size: 13px; color: var(--ink-2); }
.profile-hero__edit { margin-inline-start: auto; color: var(--brand); background: var(--surface); }
.profile-hero__edit:hover { background: var(--brand-soft); }

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 8px; padding: 16px; }
.tile__icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--brand); }
.tile__label { font-size: 13px; color: var(--ink-2); font-weight: 700; }
.tile__value { font-size: 18px; font-weight: 900; line-height: 1.3; }

.wallet-card {
    position: relative; overflow: hidden; padding: 20px; border-radius: var(--radius-lg); color: #fff;
    background: linear-gradient(135deg, #0e8f8c 0%, #1a9fd0 100%);
    box-shadow: var(--shadow-2);
}
.wallet-card::after { content: ""; position: absolute; inset-inline-end: -50px; bottom: -80px; width: 200px; height: 200px; border-radius: 50%; border: 30px solid rgba(255, 255, 255, .07); }
.wallet-card__label { font-size: 13px; opacity: .8; }
.wallet-card__value { font-size: 28px; font-weight: 900; margin-top: 4px; }
.wallet-card__row { display: flex; gap: 24px; margin-top: 16px; font-size: 13px; position: relative; z-index: 1; }
.wallet-card__row strong { display: block; font-size: 15px; }

.tx { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.tx:first-child { border-top: 0; }
.tx__icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--surface-2); }
.tx__icon--in { background: var(--success-soft); color: var(--success); }
.tx__icon--out { background: var(--danger-soft); color: var(--danger); }
.tx__main { flex: 1; min-width: 0; }
.tx__title { font-weight: 700; font-size: 14px; }
.tx__sub { font-size: 12px; color: var(--ink-3); }
.tx__amount { font-weight: 900; white-space: nowrap; }
.tx__amount--in { color: var(--price); }
.tx__amount--out { color: var(--price-old); }

.address-card { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.address-card__top { display: flex; align-items: center; gap: 8px; }
.address-card__actions { display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 10px; }

.pager { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }

/* ---------- نقشه ---------- */

.map-picker {
    position: relative; height: 300px; border-radius: var(--radius); overflow: hidden;
    border: 1px solid var(--line-strong); background: var(--surface-2); isolation: isolate;
}
.map-picker__canvas { position: absolute; inset: 0; z-index: 0; }
.map-picker__pin {
    position: absolute; z-index: 500; left: 50%; top: 50%; width: 44px; height: 54px; pointer-events: none;
    transform: translate(-50%, -100%); transition: transform .2s var(--ease);
    filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .25));
}
.map-picker__pin::after {
    content: ""; position: absolute; left: 50%; bottom: -4px; width: 10px; height: 4px; border-radius: 50%;
    background: rgba(0, 0, 0, .3); transform: translateX(-50%); transition: transform .2s;
}
.map-picker.is-moving .map-picker__pin { transform: translate(-50%, calc(-100% - 10px)); }
.map-picker.is-moving .map-picker__pin::after { transform: translateX(-50%) scale(.6); }
.map-picker__tools { position: absolute; z-index: 500; inset-inline-end: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 8px; }
.map-picker__tool {
    width: 44px; height: 44px; border-radius: 14px; border: 0; display: grid; place-items: center;
    background: var(--surface); color: var(--ink); box-shadow: var(--shadow-2);
}
.map-picker__status {
    position: absolute; z-index: 600; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center;
    background: color-mix(in srgb, var(--surface-2) 92%, transparent); color: var(--ink-2); font-size: 14px; font-weight: 700;
}
.map-picker__hint {
    position: absolute; z-index: 500; top: 10px; inset-inline: 10px; display: flex; justify-content: center; pointer-events: none;
}
.map-picker__hint span {
    background: color-mix(in srgb, var(--brand-deep) 88%, transparent); color: #fff; font-size: 12px; font-weight: 700;
    padding: 6px 12px; border-radius: var(--radius-pill);
}
.map-picker .leaflet-control-attribution { font-size: 10px; }
.map-picker .leaflet-container { font-family: var(--font); background: var(--surface-2); }

/* ---------- ورود ---------- */

.auth { min-height: calc(100dvh - var(--topbar-h)); display: flex; align-items: center; padding-block: 24px 96px; }
.auth__card { width: 100%; max-width: 420px; margin-inline: auto; padding: 28px 22px; }
.auth__icon { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); margin-bottom: 16px; }
.auth__title { font-size: 22px; font-weight: 900; }
.auth__text { color: var(--ink-2); margin-top: 6px; }
.otp-input { text-align: center; letter-spacing: .6em; font-size: 24px; font-weight: 900; height: 60px; padding-inline-start: .6em; }
.resend { display: flex; justify-content: center; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); margin-top: 14px; }

.hp-field {
    /* پنهان برای انسان؛ عمدا با clip نه با جابه جایی منفی که در راست به چپ صفحه را پهن می کرد */
    position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
    overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; opacity: 0;
}

/* ---------- واکنش گرایی ---------- */

@media (min-width: 560px) {
    .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
    .tiles { grid-template-columns: repeat(3, 1fr); }
    .cartbar { inset-inline: auto 24px; inset-inline-start: auto; width: 420px; inset-inline-end: 24px; }
}

@media (min-width: 900px) {
    :root { --gutter: 24px; --topbar-h: 72px; }
    body { font-size: 15.5px; }
    .bottom-nav { display: none; }
    .page { padding-bottom: 48px; }
    .page--with-bar { padding-bottom: 48px; }
    .topnav { display: flex; align-items: center; gap: 4px; margin-inline-start: 24px; }
    .topnav a { height: 40px; padding-inline: 14px; border-radius: 12px; display: inline-flex; align-items: center; font-weight: 700; color: var(--ink-2); }
    .topnav a:hover { background: var(--surface-2); color: var(--ink); }
    .topnav a.is-active { color: var(--ink); background: var(--surface-2); }
    .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
    .cartbar { bottom: 24px; }
    .stickybar { bottom: 0; }
    .hero { padding: 32px; }
    .hero__title { font-size: 26px; }

    .pdp { grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: start; }
    .gallery { margin-inline: 0; position: sticky; top: calc(var(--topbar-h) + 16px); }
    .gallery__track { padding-inline: 0; }
    .gallery__slide { flex-basis: 100%; }
    .buybar { position: static; padding: 0; background: none; border: 0; box-shadow: none; backdrop-filter: none; margin-top: 8px; }
    .buybar__price { display: none; }
    .has-buybar .cartbar { display: flex; }
    .has-buybar .page { padding-bottom: 48px; }

    .checkout { grid-template-columns: 1fr 380px; align-items: start; gap: 24px; }
    .checkout__aside { position: sticky; top: calc(var(--topbar-h) + 16px); }
    .stickybar--checkout { position: static; padding: 0; background: none; border: 0; backdrop-filter: none; margin-top: 16px; }
    .has-stickybar .cartbar { display: none; }

    .account { display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start; }
    .account__nav { position: sticky; top: calc(var(--topbar-h) + 16px); }

    .sheet { align-items: center; }
    .sheet__panel { border-radius: 24px; padding-bottom: 24px; }
    .sheet__grip { display: none; }
    .map-picker { height: 360px; }
}

@media (min-width: 1200px) {
    .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 899px) {
    .account__nav { display: none; }
    .desktop-only { display: none !important; }
}

@media (min-width: 900px) {
    .mobile-only { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media print {
    .topbar, .bottom-nav, .cartbar, .stickybar, .buybar { display: none !important; }
    body { background: #fff; }
}
