/* =========================================================================
   فروشگاه پارس سیستم حلما — سیستم طراحی سایت عمومی
   الهام‌گرفته از دنیای دفاتر اسناد رسمی: جوهر آرشیوی، مهر برنجی، خط‌کشی دفاتر ثبت.
   ========================================================================= */

/* ---------- توکن‌ها ---------- */
:root {
    color-scheme: light;

    --ink:        #0E1626;
    --indigo:     #16243F;
    --indigo-600: #24385C;
    --indigo-300: #6B7C9E;

    --brass:      #C0873A;
    --brass-600:  #A06E2A;
    --brass-050:  #FBF4E8;

    --teal:       #2A6B67;
    --teal-050:   #EAF3F2;

    /* خاکستری‌ها با انحراف خفیف به سمت نیلی، تا با رنگ اصلی هم‌خانواده باشند */
    --ground:     #F6F7FA;
    --surface:    #FFFFFF;
    --surface-2:  #F0F2F7;
    --line:       #E1E5EE;
    --line-soft:  #EDEFF5;
    --muted:      #626F8A;
    --muted-2:    #8A94A8;

    --ok:      #1F7A4D;
    --ok-bg:   #E9F5EE;
    --warn:    #9A6B0F;
    --warn-bg: #FBF2DE;
    --bad:     #B3261E;
    --bad-bg:  #FBEAE9;

    --radius:    10px;
    --radius-sm: 6px;
    --radius-lg: 16px;

    --shadow-sm: 0 1px 2px rgba(14, 22, 38, .05);
    --shadow:    0 4px 16px rgba(14, 22, 38, .07);
    --shadow-lg: 0 16px 48px rgba(14, 22, 38, .12);

    --step--1: clamp(.78rem, .76rem + .1vw, .84rem);
    --step-0:  clamp(.94rem, .92rem + .12vw, 1rem);
    --step-1:  clamp(1.1rem, 1.04rem + .3vw, 1.28rem);
    --step-2:  clamp(1.35rem, 1.24rem + .55vw, 1.7rem);
    --step-3:  clamp(1.7rem, 1.48rem + 1.1vw, 2.35rem);
    --step-4:  clamp(2.1rem, 1.7rem + 2vw, 3.2rem);

    --wrap: 1200px;
    --gap:  clamp(1rem, .7rem + 1.2vw, 1.75rem);

    /* fonts.css این متغیر را تعریف می‌کند؛ مقدار اینجا فقط پشتیبان است. */
    --font: var(--font-fa, "Vazirmatn", "Segoe UI", Tahoma, "Noto Naskh Arabic", sans-serif);
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --ink:        #EEF1F7;
        --indigo:     #C9D5EC;
        --indigo-600: #A9B9D8;
        --indigo-300: #7C8CAC;
        --brass:      #DFA85A;
        --brass-600:  #C89344;
        --brass-050:  #2A2418;
        --teal:       #6FBAB4;
        --teal-050:   #17302E;
        --ground:     #0C1220;
        --surface:    #131B2C;
        --surface-2:  #1A2437;
        --line:       #26314A;
        --line-soft:  #1E2841;
        --muted:      #9AA6BF;
        --muted-2:    #7D89A3;
        --ok:      #5FD3A0;
        --ok-bg:   #12301F;
        --warn:    #E3B457;
        --warn-bg: #322611;
        --bad:     #F0918B;
        --bad-bg:  #3A1614;
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
        --shadow:    0 4px 16px rgba(0, 0, 0, .45);
        --shadow-lg: 0 16px 48px rgba(0, 0, 0, .55);
    }
}

/* ---------- پایه ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    font-family: var(--font);
    font-size: var(--step-0);
    line-height: 1.75;
    color: var(--ink);
    background: var(--ground);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    margin: 0;
    line-height: 1.3;
    text-wrap: balance;
    font-weight: 800;
    letter-spacing: -.01em;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p { margin: 0; }

a { color: inherit; text-decoration: none; }

img, svg { max-width: 100%; display: block; }

button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
    outline: 2px solid var(--brass);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* اعداد قیمت و جدول‌ها باید ستونی هم‌تراز باشند */
.num, .price, td, .tabular { font-variant-numeric: tabular-nums; }

.wrap {
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: clamp(1rem, .6rem + 1.6vw, 2rem);
}

.stack { display: flex; flex-direction: column; gap: var(--gap); }

.section { padding-block: clamp(2.5rem, 1.6rem + 3.4vw, 4.75rem); }
.section--tight { padding-block: clamp(1.75rem, 1.2rem + 2vw, 2.75rem); }

/* ---------- نوار بالای صفحه ---------- */
.topbar {
    background: var(--indigo);
    color: #DDE4F1;
    font-size: var(--step--1);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

@media (prefers-color-scheme: dark) {
    .topbar { background: var(--surface-2); color: var(--muted); }
}

.topbar__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    min-height: 40px;
}

.topbar a { color: inherit; opacity: .85; }
.topbar a:hover { opacity: 1; }

.topbar__links { display: flex; gap: 1.25rem; align-items: center; }

/* ---------- هدر ---------- */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.header__row {
    display: flex;
    align-items: center;
    gap: clamp(.75rem, .4rem + 1.4vw, 2rem);
    min-height: 72px;
}

.brand { display: flex; align-items: center; gap: .7rem; flex-shrink: 0; }

.brand__mark {
    width: 40px;
    height: 40px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: var(--indigo);
    color: #fff;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: -.03em;
}

@media (prefers-color-scheme: dark) {
    .brand__mark { background: var(--brass); color: var(--ground); }
}

.brand__name { font-weight: 800; font-size: 1.02rem; line-height: 1.25; }
.brand__sub { font-size: .72rem; color: var(--muted); letter-spacing: .02em; }

/* جستجو */
.search { flex: 1; max-width: 460px; position: relative; }

.search input {
    width: 100%;
    padding: .6rem 2.5rem .6rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-2);
    transition: border-color .15s, background .15s;
}

.search input:focus {
    outline: none;
    border-color: var(--brass);
    background: var(--surface);
}

.search button {
    position: absolute;
    inset-inline-start: .4rem;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: none;
    color: var(--muted);
    cursor: pointer;
    padding: .3rem;
    display: grid;
    place-items: center;
}

.search button:hover { color: var(--brass); }

.header__actions { display: flex; align-items: center; gap: .4rem; margin-inline-start: auto; }

.icon-btn {
    position: relative;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    background: none;
    color: var(--ink);
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.icon-btn:hover { background: var(--surface-2); border-color: var(--line); }

.icon-btn__badge {
    position: absolute;
    top: 4px;
    inset-inline-start: 4px;
    min-width: 18px;
    height: 18px;
    padding-inline: 4px;
    border-radius: 9px;
    background: var(--brass);
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    display: grid;
    place-items: center;
    line-height: 1;
}

/* ---------- ناوبری ---------- */
.nav { border-bottom: 1px solid var(--line); background: var(--surface); }

.nav__row {
    display: flex;
    align-items: center;
    gap: .25rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.nav__row::-webkit-scrollbar { display: none; }

.nav a {
    padding: .85rem 1rem;
    font-size: .93rem;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: color .15s, border-color .15s;
}

.nav a:hover { color: var(--ink); }
.nav a.is-active { color: var(--indigo); border-bottom-color: var(--brass); }

@media (prefers-color-scheme: dark) {
    .nav a.is-active { color: var(--brass); }
}

/* دکمهٔ برجستهٔ «ثبت سفارش» — همیشه دیده شود و به فرم درخواست خرید برود */
.nav__cta {
    margin-inline-start: auto;   /* در RTL به انتهای نوار می‌رود تا برجسته بماند */
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem 1.15rem !important;
    color: #fff !important;
    background: var(--brass);
    border: 0;
    border-bottom: 0 !important;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(192, 135, 58, .35);
    white-space: nowrap;
}

.nav__cta:hover { background: var(--brass-600); color: #fff !important; }
.nav__cta.is-active { border-bottom-color: transparent !important; }

/* ---------- دکمه‌ها ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .7rem 1.4rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: .94rem;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s, transform .1s;
    text-align: center;
}

.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--indigo); color: #fff; }
.btn--primary:hover { background: var(--indigo-600); }

.btn--brass { background: var(--brass); color: #fff; }
.btn--brass:hover { background: var(--brass-600); }

.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--indigo-300); background: var(--surface-2); }

.btn--quiet { background: var(--surface-2); color: var(--ink); }
.btn--quiet:hover { background: var(--line-soft); }

.btn--danger { background: transparent; border-color: var(--line); color: var(--bad); }
.btn--danger:hover { background: var(--bad-bg); border-color: var(--bad); }

.btn--block { width: 100%; }
.btn--lg { padding: .9rem 1.9rem; font-size: 1rem; }
.btn--sm { padding: .45rem .9rem; font-size: .85rem; }

.btn[disabled], .btn.is-disabled {
    opacity: .5;
    cursor: not-allowed;
    pointer-events: none;
}

@media (prefers-color-scheme: dark) {
    .btn--primary { background: var(--brass); color: var(--ground); }
    .btn--primary:hover { background: var(--brass-600); }
    .btn--brass { color: var(--ground); }
}

/* ---------- اسلایدر قهرمان صفحه اول ---------- */
.slider {
    position: relative;
    background: var(--indigo);
    color: #fff;
    overflow: hidden;
}

/* خط‌کشی دفتر ثبت — بافت مشترک همه اسلایدها که آرام حرکت می‌کند */
.slider::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: repeating-linear-gradient(to bottom, transparent 0 38px, rgba(255, 255, 255, .045) 38px 39px);
    animation: ledger-drift 22s linear infinite;
    pointer-events: none;
}

@keyframes ledger-drift {
    from { background-position-y: 0; }
    to   { background-position-y: 39px; }
}

.slider__track { position: relative; }

/* هر اسلاید روی هم قرار می‌گیرد و با محو‌شدن جابه‌جا می‌شود */
.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .7s ease;
}

.slide.is-active {
    position: relative;
    opacity: 1;
    visibility: visible;
}

.slide[hidden] { display: block; }   /* hidden فقط برای دسترس‌پذیری اولیه است */

.slide__bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }

/* هاله برنجی که آرام نفس می‌کشد */
.slide__glow {
    position: absolute;
    inset-block: -20%;
    inset-inline-end: -10%;
    width: 55%;
    background: radial-gradient(circle at 60% 45%, rgba(223, 168, 90, .32), transparent 66%);
    animation: glow-breathe 7s ease-in-out infinite;
}

@keyframes glow-breathe {
    0%, 100% { opacity: .7; transform: scale(1); }
    50%      { opacity: 1;  transform: scale(1.12); }
}

/* تصاویر متحرک هر اسلاید، سمت چپ و کم‌رنگ پشت متن */
.slide__seal, .slide__devices, .slide__wrench {
    position: absolute;
    inset-block: 50%;
    inset-inline-start: clamp(1rem, 5vw, 6rem);
    transform: translateY(-50%);
    width: clamp(200px, 30vw, 360px);
    opacity: .9;
}

.slide__inner {
    position: relative;
    z-index: 2;
    padding-block: clamp(3rem, 2rem + 6vw, 6.5rem);
    max-width: 640px;
}

.slide__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem .85rem;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 100px;
    font-size: .8rem;
    font-weight: 600;
    color: #EBD9BC;
    margin-bottom: 1.25rem;
}

.slide__title {
    color: #fff;
    font-size: clamp(1.75rem, 1.2rem + 3vw, 3.15rem);
    line-height: 1.32;
    margin-bottom: 1.1rem;
    text-wrap: balance;
}

.slide__title em { font-style: normal; color: var(--brass); }

.slide__lead {
    font-size: var(--step-1);
    color: #C4CFE3;
    max-width: 52ch;
    line-height: 1.9;
    margin-bottom: 2rem;
}

.slide__cta { display: flex; flex-wrap: wrap; gap: .75rem; }

/* دکمه شیشه‌ای برای CTA دوم روی زمینه تیره */
.btn--glass {
    background: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .3);
    color: #fff;
    backdrop-filter: blur(4px);
}

.btn--glass:hover { background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .5); }

/* محتوای هر اسلاید هنگام فعال‌شدن، مرحله‌به‌مرحله می‌آید */
.slide.is-active .slide__eyebrow { animation: rise .6s .05s both; }
.slide.is-active .slide__title { animation: rise .6s .15s both; }
.slide.is-active .slide__lead { animation: rise .6s .25s both; }
.slide.is-active .slide__cta { animation: rise .6s .35s both; }

/* دستگاه‌ها و چرخ‌دنده کمی جان می‌گیرند */
.dev { opacity: .5; }
.slide--gear.is-active .dev { animation: dev-pop .5s both; }
.slide--gear.is-active .dev:nth-of-type(2) { animation-delay: .12s; }
.slide--gear.is-active .dev:nth-of-type(3) { animation-delay: .24s; }
.slide--gear.is-active .dev:nth-of-type(4) { animation-delay: .36s; }
@keyframes dev-pop { from { opacity: 0; transform: scale(.8); } to { opacity: .5; transform: none; } }
.dev-dot { animation: blink 2s ease-in-out infinite; }

.slide--service.is-active .gear { animation: spin-slow 14s linear infinite; transform-origin: 150px 90px; }
@keyframes spin-slow { to { transform: rotate(360deg); } }

/* فلش‌ها و نقطه‌ها */
.slider__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .25);
    background: rgba(0, 0, 0, .2);
    color: #fff;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    backdrop-filter: blur(4px);
    transition: background .15s, border-color .15s;
}

.slider__arrow:hover { background: rgba(0, 0, 0, .45); border-color: var(--brass); }
.slider__arrow--prev { inset-inline-start: clamp(.5rem, 2vw, 1.5rem); }
.slider__arrow--next { inset-inline-end: clamp(.5rem, 2vw, 1.5rem); }

.slider__dots {
    position: absolute;
    z-index: 5;
    inset-inline: 0;
    bottom: 1.1rem;
    display: flex;
    justify-content: center;
    gap: .5rem;
}

.slider__dots button {
    width: 30px;
    height: 5px;
    border: 0;
    border-radius: 100px;
    background: rgba(255, 255, 255, .3);
    cursor: pointer;
    padding: 0;
    transition: background .2s, width .2s;
}

.slider__dots button.is-active { background: var(--brass); width: 44px; }

/* نوار قلاب اعتماد که روی لبه پایین اسلایدر می‌نشیند */
.hookbar {
    position: relative;
    z-index: 3;
    margin-top: clamp(-2.5rem, -4vw, -3.5rem);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: clamp(1.1rem, .8rem + 1vw, 1.6rem);
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.hookbar__item { display: flex; align-items: center; gap: .8rem; }
.hookbar__item svg { flex-shrink: 0; color: var(--brass); }
.hookbar__item b { display: block; font-size: .95rem; font-weight: 700; }
.hookbar__item span { font-size: .82rem; color: var(--muted); }

/* روی موبایل: تصویر متحرک پشت متن کم‌رنگ‌تر تا خوانایی حفظ شود */
@media (max-width: 720px) {
    .slide__seal, .slide__devices, .slide__wrench { opacity: .22; inset-inline-start: 0; width: 62%; }
    .slide__inner { max-width: none; }
    .slider__arrow { width: 40px; height: 40px; font-size: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    .slider::before,
    .slide__glow,
    .dev-dot,
    .slide--service.is-active .gear { animation: none; }
}

/* ---------- عنوان بخش ---------- */
.head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: clamp(1.5rem, 1rem + 1.6vw, 2.5rem);
}

.head__eyebrow {
    display: block;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    color: var(--brass);
    margin-bottom: .5rem;
}

.head p { color: var(--muted); margin-top: .5rem; max-width: 62ch; }

.head__link { font-weight: 700; color: var(--indigo); font-size: .92rem; }
.head__link:hover { color: var(--brass); }

@media (prefers-color-scheme: dark) {
    .head__link { color: var(--brass); }
}

/* ---------- شبکه‌ها ---------- */
.grid { display: grid; gap: var(--gap); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

/* ---------- کارت محصول ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color .18s, box-shadow .18s, transform .18s;
}

.card:hover {
    border-color: var(--indigo-300);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.card__media {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--surface-2);
    display: grid;
    place-items: center;
    padding: 1.25rem;
    border-bottom: 1px solid var(--line-soft);
}

.card__media img { width: 100%; height: 100%; object-fit: contain; }

.card__flags {
    position: absolute;
    top: .75rem;
    inset-inline-start: .75rem;
    display: flex;
    flex-direction: column;
    gap: .35rem;
    align-items: flex-start;
}

.card__body { padding: 1.15rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }

.card__brand {
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .06em;
    color: var(--muted-2);
    text-transform: uppercase;
}

.card__title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card:hover .card__title { color: var(--indigo); }

@media (prefers-color-scheme: dark) {
    .card:hover .card__title { color: var(--brass); }
}

.card__desc {
    font-size: .87rem;
    color: var(--muted);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card__foot {
    margin-top: auto;
    padding-top: .9rem;
    border-top: 1px solid var(--line-soft);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: .75rem;
}

.price { display: flex; flex-direction: column; gap: .1rem; }
.price__old { font-size: .8rem; color: var(--muted-2); text-decoration: line-through; }
.price__now { font-size: 1.06rem; font-weight: 800; color: var(--indigo); }
.price__ask { font-size: .92rem; font-weight: 700; color: var(--teal); }

@media (prefers-color-scheme: dark) {
    .price__now { color: var(--brass); }
}

/* ---------- برچسب‌ها ---------- */
.tag {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .22rem .6rem;
    border-radius: 100px;
    font-size: .74rem;
    font-weight: 700;
    line-height: 1.6;
}

.tag--off   { background: var(--bad);  color: #fff; }
.tag--new   { background: var(--brass); color: #fff; }
.tag--out   { background: var(--surface); color: var(--muted); border: 1px solid var(--line); }
.tag--ok    { background: var(--ok-bg);  color: var(--ok); }
.tag--warn  { background: var(--warn-bg); color: var(--warn); }
.tag--teal  { background: var(--teal-050); color: var(--teal); }
.tag--brass { background: var(--brass-050); color: var(--brass-600); }

/* ---------- دسته‌بندی‌ها ---------- */
.cat {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    transition: border-color .18s, box-shadow .18s, transform .18s;
}

.cat:hover { border-color: var(--brass); box-shadow: var(--shadow); transform: translateY(-2px); }

.cat__icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: grid;
    place-items: center;
    background: var(--brass-050);
    color: var(--brass-600);
    flex-shrink: 0;
}

.cat h4 { font-size: 1rem; }
.cat p { font-size: .83rem; color: var(--muted); margin-top: .15rem; }

/* ---------- جدول مقایسه پکیج ---------- */
.plan {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    position: relative;
}

.plan--featured {
    border-color: var(--brass);
    box-shadow: 0 0 0 1px var(--brass), var(--shadow);
}

.plan__badge {
    position: absolute;
    top: -12px;
    inset-inline-start: 50%;
    transform: translateX(50%);
    background: var(--brass);
    color: #fff;
    font-size: .74rem;
    font-weight: 700;
    padding: .25rem .9rem;
    border-radius: 100px;
    white-space: nowrap;
}

.plan__price { font-size: var(--step-2); font-weight: 800; color: var(--indigo); }
.plan__price small { font-size: .8rem; font-weight: 600; color: var(--muted); }

@media (prefers-color-scheme: dark) {
    .plan__price { color: var(--brass); }
}

.plan__features { display: flex; flex-direction: column; gap: .7rem; font-size: .9rem; }

.plan__features div { display: flex; align-items: flex-start; gap: .55rem; color: var(--muted); }
.plan__features svg { flex-shrink: 0; margin-top: .3rem; color: var(--ok); }

/* ---------- صفحه محصول ---------- */
.detail { display: grid; gap: clamp(1.5rem, 1rem + 3vw, 3.5rem); grid-template-columns: 1fr; }

@media (min-width: 900px) {
    .detail { grid-template-columns: 1fr 1fr; align-items: start; }
}

.gallery__main {
    aspect-ratio: 1;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    display: grid;
    place-items: center;
    padding: 2rem;
}

.gallery__main img { width: 100%; height: 100%; object-fit: contain; }

.gallery__thumbs { display: flex; gap: .6rem; margin-top: .75rem; flex-wrap: wrap; }

.gallery__thumb {
    width: 72px;
    height: 72px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    padding: .4rem;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.gallery__thumb.is-active { border-color: var(--brass); box-shadow: 0 0 0 1px var(--brass); }
.gallery__thumb img { width: 100%; height: 100%; object-fit: contain; }

.detail__price {
    display: flex;
    align-items: baseline;
    gap: .75rem;
    padding: 1.25rem 0;
    border-block: 1px solid var(--line);
    margin-block: 1.25rem;
}

.detail__price b { font-size: var(--step-3); font-weight: 800; color: var(--indigo); }

@media (prefers-color-scheme: dark) {
    .detail__price b { color: var(--brass); }
}

.detail__buy { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

.qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
}

.qty button {
    width: 40px;
    height: 44px;
    border: 0;
    background: none;
    cursor: pointer;
    color: var(--muted);
    font-size: 1.15rem;
    font-weight: 700;
}

.qty button:hover { background: var(--surface-2); color: var(--ink); }

.qty input {
    width: 52px;
    height: 44px;
    border: 0;
    text-align: center;
    background: none;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    -moz-appearance: textfield;
}

.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* جدول مشخصات فنی — خط‌کشی دفتری */
.specs { width: 100%; border-collapse: collapse; font-size: .92rem; }

.specs tr { border-bottom: 1px solid var(--line-soft); }
.specs tr:last-child { border-bottom: 0; }

.specs th {
    text-align: start;
    font-weight: 600;
    color: var(--muted);
    padding: .8rem 0;
    width: 40%;
    vertical-align: top;
}

.specs td { padding: .8rem 0; font-weight: 600; }

/* ---------- جعبه‌ها ---------- */
.box {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: clamp(1.25rem, 1rem + 1vw, 1.85rem);
}

.box--flat { background: var(--surface-2); border-color: transparent; }

/* ---------- سبد خرید و جدول‌ها ---------- */
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }

.table th {
    text-align: start;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .03em;
    color: var(--muted);
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.table td { padding: 1rem; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }

.table__scroll { overflow-x: auto; }

.line-item { display: flex; align-items: center; gap: .9rem; min-width: 220px; }

.line-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    padding: .35rem;
    flex-shrink: 0;
}

.line-item b { font-size: .93rem; font-weight: 700; line-height: 1.5; }
.line-item span { font-size: .78rem; color: var(--muted); }

.summary { display: flex; flex-direction: column; gap: .8rem; }

.summary__row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: .92rem;
    color: var(--muted);
}

.summary__row--total {
    padding-top: .9rem;
    border-top: 1px solid var(--line);
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--ink);
}

.summary__row--total b { color: var(--indigo); }

@media (prefers-color-scheme: dark) {
    .summary__row--total b { color: var(--brass); }
}

/* ---------- فرم‌ها ---------- */
.field { display: flex; flex-direction: column; gap: .4rem; }

.field > label {
    font-size: .87rem;
    font-weight: 700;
    color: var(--ink);
}

.field .req { color: var(--bad); }

.field input, .field select, .field textarea {
    width: 100%;
    padding: .68rem .9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    transition: border-color .15s, box-shadow .15s;
}

.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--brass);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brass) 18%, transparent);
}

.field textarea { resize: vertical; min-height: 110px; line-height: 1.8; }

.field__hint { font-size: .78rem; color: var(--muted-2); }

.field-error, .validation-summary-errors {
    color: var(--bad);
    font-size: .82rem;
    font-weight: 600;
}

.validation-summary-errors ul { margin: 0; padding-inline-start: 1.1rem; }

.form-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.form-grid .span-2 { grid-column: 1 / -1; }

.input-validation-error { border-color: var(--bad) !important; }

/* ---------- پیام‌ها ---------- */
.alert {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    padding: .9rem 1.1rem;
    border-radius: var(--radius);
    font-size: .9rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.alert svg { flex-shrink: 0; margin-top: .2rem; }
.alert--ok   { background: var(--ok-bg);   color: var(--ok);   border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.alert--bad  { background: var(--bad-bg);  color: var(--bad);  border-color: color-mix(in srgb, var(--bad) 25%, transparent); }
.alert--warn { background: var(--warn-bg); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.alert--info { background: var(--teal-050); color: var(--teal); border-color: color-mix(in srgb, var(--teal) 25%, transparent); }

/* ---------- حالت خالی ---------- */
.empty {
    text-align: center;
    padding: clamp(2.5rem, 2rem + 3vw, 4.5rem) 1.5rem;
    color: var(--muted);
}

.empty svg { margin-inline: auto; margin-bottom: 1.1rem; color: var(--muted-2); }
.empty h3 { color: var(--ink); margin-bottom: .5rem; }
.empty p { max-width: 44ch; margin-inline: auto; margin-bottom: 1.5rem; }

/* ---------- کنارستون فیلتر ---------- */
.shop { display: grid; gap: var(--gap); grid-template-columns: 1fr; align-items: start; }

@media (min-width: 900px) {
    .shop { grid-template-columns: 250px 1fr; }
    .shop__side { position: sticky; top: 92px; }
}

.filter { display: flex; flex-direction: column; gap: .15rem; }

.filter a {
    padding: .55rem .8rem;
    border-radius: var(--radius-sm);
    font-size: .91rem;
    font-weight: 600;
    color: var(--muted);
    display: flex;
    justify-content: space-between;
    gap: .5rem;
    transition: background .15s, color .15s;
}

.filter a:hover { background: var(--surface-2); color: var(--ink); }
.filter a.is-active { background: var(--brass-050); color: var(--brass-600); }

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-bottom: 1.1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--line);
}

.toolbar__count { font-size: .88rem; color: var(--muted); }

.toolbar select {
    padding: .5rem .8rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
}

/* ---------- صفحه‌بندی ---------- */
.pager { display: flex; justify-content: center; gap: .4rem; margin-top: 2.5rem; flex-wrap: wrap; }

.pager a, .pager span {
    min-width: 40px;
    height: 40px;
    padding-inline: .6rem;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: .9rem;
    font-weight: 700;
    color: var(--muted);
    background: var(--surface);
}

.pager a:hover { border-color: var(--brass); color: var(--brass-600); }
.pager .is-active { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.pager .is-disabled { opacity: .4; pointer-events: none; }

@media (prefers-color-scheme: dark) {
    .pager .is-active { background: var(--brass); border-color: var(--brass); color: var(--ground); }
}

/* ---------- نوار اعتماد ---------- */
.trust {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.trust__item { display: flex; gap: .9rem; align-items: flex-start; }

.trust__item svg { flex-shrink: 0; color: var(--brass); margin-top: .15rem; }
.trust__item b { display: block; font-size: .95rem; font-weight: 700; }
.trust__item span { font-size: .83rem; color: var(--muted); line-height: 1.65; }

/* ---------- پاورقی ---------- */
.footer {
    background: var(--indigo);
    color: #B9C5DB;
    margin-top: clamp(3rem, 2rem + 4vw, 5rem);
    font-size: .9rem;
}

@media (prefers-color-scheme: dark) {
    .footer { background: var(--surface); border-top: 1px solid var(--line); color: var(--muted); }
}

.footer__grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    padding-block: clamp(2.5rem, 2rem + 2vw, 3.5rem);
}

.footer h5 {
    margin: 0 0 1rem;
    font-size: .95rem;
    font-weight: 700;
    color: #fff;
}

@media (prefers-color-scheme: dark) { .footer h5 { color: var(--ink); } }

.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.footer a { opacity: .85; }
.footer a:hover { opacity: 1; color: var(--brass); }

.footer__contact { display: flex; flex-direction: column; gap: .75rem; }
.footer__contact div { display: flex; gap: .6rem; align-items: flex-start; line-height: 1.7; }
.footer__contact svg { flex-shrink: 0; margin-top: .3rem; color: var(--brass); }

/* نمادهای اعتماد (اینماد و ساماندهی) */
.footer__seals {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding-block: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, .12);
}

@media (prefers-color-scheme: dark) {
    .footer__seals { border-top-color: var(--line); }
}

.footer__seal {
    background: #fff;
    border-radius: 10px;
    padding: .5rem;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer__seal img { display: block; max-height: 90px; width: auto; }

/* جای خالی نماد تا وقتی کد واقعی وارد نشده */
.footer__seal--empty {
    flex-direction: column;
    gap: .4rem;
    width: 130px;
    height: 100px;
    background: rgba(255, 255, 255, .06);
    border: 1px dashed rgba(255, 255, 255, .3);
    color: #B9C5DB;
    text-align: center;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.5;
}

.footer__seal--empty svg { color: var(--brass); }
.footer__seal--empty small { opacity: .7; font-weight: 400; }

@media (prefers-color-scheme: dark) {
    .footer__seal--empty { border-color: var(--line); color: var(--muted); }
}

.footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, .12);
    padding-block: 1.25rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: .84rem;
    opacity: .8;
}

@media (prefers-color-scheme: dark) {
    .footer__bottom { border-top-color: var(--line); }
}

/* ---------- مراحل پرداخت ---------- */
.steps {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    font-size: .87rem;
    font-weight: 600;
    color: var(--muted);
}

.steps b {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--muted);
    font-size: .8rem;
    margin-inline-end: .4rem;
}

.steps .is-active { color: var(--ink); }
.steps .is-active b { background: var(--brass); color: #fff; }
.steps .is-done b { background: var(--ok); color: #fff; }

/* ---------- صفحه نتیجه پرداخت ---------- */
.result { max-width: 560px; margin-inline: auto; text-align: center; }

.result__icon {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin: 0 auto 1.5rem;
}

.result__icon--ok  { background: var(--ok-bg);  color: var(--ok); }
.result__icon--bad { background: var(--bad-bg); color: var(--bad); }

.result__meta {
    margin-top: 1.75rem;
    padding: 1.25rem;
    background: var(--surface-2);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    gap: .7rem;
    text-align: start;
    font-size: .9rem;
}

.result__meta div { display: flex; justify-content: space-between; gap: 1rem; }
.result__meta span { color: var(--muted); }
.result__meta b { font-variant-numeric: tabular-nums; }

/* ---------- مسیر مرحله‌ای سفارش ---------- */
.wizard-head {
    position: relative;
    background: var(--indigo);
    color: #fff;
    padding-block: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
    overflow: hidden;
}

/* همان بافت خط‌کشی دفتر ثبت که در قهرمان صفحه اول استفاده شده */
.wizard-head::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(to bottom, transparent 0 34px, rgba(255, 255, 255, .04) 34px 35px);
    pointer-events: none;
}

.wizard-head > .wrap { position: relative; z-index: 1; }

.wsteps {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.5rem;
    list-style: none;
    margin: 2rem 0 0;
    padding: 0;
    counter-reset: step;
}

.wsteps li {
    display: flex;
    align-items: center;
    gap: .55rem;
    font-size: .88rem;
    font-weight: 600;
    color: #8E9EBD;
}

.wsteps b {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
    font-size: .82rem;
    flex-shrink: 0;
}

.wsteps .is-active { color: #fff; }
.wsteps .is-active b { background: var(--brass); border-color: var(--brass); color: #fff; }
.wsteps .is-done { color: #C9D6EC; }
.wsteps .is-done b { background: var(--ok); border-color: var(--ok); color: #fff; }

/* بخش‌های مرحله انتخاب لوازم */
.group { scroll-margin-top: 90px; }

/* پیام وضعیت هر بخش */
.group__note {
    display: flex;
    align-items: flex-start;
    gap: .45rem;
    margin-bottom: 1.1rem;
    font-size: .86rem;
    font-weight: 600;
    line-height: 1.7;
}

.group__note svg { flex-shrink: 0; margin-top: .2rem; }
.group__note--required { color: var(--brass-600); }
.group__note--optional { color: var(--muted); }

@media (prefers-color-scheme: dark) {
    .group__note--required { color: var(--brass); }
}

/* بخش الزامیِ بدون انتخاب — یادآوری ملایم، نه خطای قرمز پررنگ */
.group--required.is-missing .group__note--required {
    color: var(--bad);
}

.group--required.is-missing .grid {
    outline: 1px dashed color-mix(in srgb, var(--bad) 45%, transparent);
    outline-offset: 10px;
    border-radius: var(--radius);
}

.group__skip {
    margin-top: 1rem;
    padding: .45rem .9rem;
    border: 1px dashed var(--line);
    border-radius: 100px;
    background: none;
    color: var(--muted);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s, color .15s;
}

.group__skip:hover { border-color: var(--muted-2); color: var(--ink); }

/* گزینه «این بخش را لازم ندارم» در گام‌های اختیاری */
.pick-none {
    position: relative;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1rem 1.1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color .15s;
}

.pick-none:hover { border-color: var(--indigo-300); }
.pick-none:has(.pick__input:checked) { border-color: var(--brass); box-shadow: 0 0 0 1px var(--brass); }

.pick-none .pick__check {
    position: static;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.pick-none:has(.pick__input:checked) .pick__check {
    background: var(--brass);
    border-color: var(--brass);
    color: #fff;
}

/* آیتم چک‌باکس (مثلا «دفتر قضایی هم دارم») */
.checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    padding: 1rem 1.1rem;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

.checkbox-item:hover { border-color: var(--indigo-300); }
.checkbox-item:has(input:checked) { border-color: var(--brass); background: var(--brass-050); }
.checkbox-item input { width: 20px; height: 20px; margin-top: .15rem; flex-shrink: 0; cursor: pointer; accent-color: var(--brass); }
.checkbox-item b { font-size: .95rem; font-weight: 700; }

/* اسپینر داخل دکمه هنگام ارسال */
.btn-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btn-spin .7s linear infinite;
    margin-inline-end: .5rem;
    vertical-align: -2px;
}

.btn.is-loading { pointer-events: none; opacity: .85; }
.btn.is-loading .btn-spinner { display: inline-block; }

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

/* اطلاعات واریز دستی */
.deposit { display: flex; flex-direction: column; gap: .1rem; }

.deposit__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .8rem 0;
    border-bottom: 1px solid var(--line-soft);
}

.deposit__row:last-child { border-bottom: 0; }
.deposit__label { color: var(--muted); font-size: .9rem; flex-shrink: 0; }
.deposit__value { font-weight: 700; font-size: 1rem; letter-spacing: .02em; }

/* کارت انتخاب لوازم */
.pick {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: border-color .18s, box-shadow .18s, transform .18s;
}

.pick:hover { border-color: var(--indigo-300); box-shadow: var(--shadow); transform: translateY(-2px); }

.pick.is-picked {
    border-color: var(--brass);
    box-shadow: 0 0 0 1px var(--brass), var(--shadow);
}

.pick__input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.pick__input:focus-visible ~ .pick__check {
    outline: 2px solid var(--brass);
    outline-offset: 2px;
}

.pick__check {
    position: absolute;
    top: .7rem;
    inset-inline-start: .7rem;
    z-index: 2;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid var(--line);
    background: var(--surface);
    display: grid;
    place-items: center;
    color: transparent;
    transition: background .18s, border-color .18s, color .18s, transform .18s;
}

.pick.is-picked .pick__check {
    background: var(--brass);
    border-color: var(--brass);
    color: #fff;
    transform: scale(1.06);
}

.pick__default {
    position: absolute;
    top: .7rem;
    inset-inline-end: .7rem;
    z-index: 2;
    padding: .2rem .55rem;
    border-radius: 100px;
    background: var(--brass-050);
    color: var(--brass-600);
    border: 1px solid var(--brass);
    font-size: .7rem;
    font-weight: 700;
}

.pick__media {
    aspect-ratio: 4 / 3;
    background: var(--surface-2);
    display: grid;
    place-items: center;
    padding: 1.1rem;
    border-bottom: 1px solid var(--line-soft);
}

.pick__media img { width: 100%; height: 100%; object-fit: contain; }

.pick__body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: .4rem;
    flex: 1;
}

.pick__title { font-size: .95rem; font-weight: 700; line-height: 1.55; }

.pick__price {
    margin-top: auto;
    padding-top: .6rem;
    border-top: 1px solid var(--line-soft);
    font-weight: 800;
    color: var(--indigo);
    font-variant-numeric: tabular-nums;
}

@media (prefers-color-scheme: dark) {
    .pick__price { color: var(--brass); }
}

/* نوار پایین مرحله */
.wizard-bar {
    position: sticky;
    bottom: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    padding: 1rem;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(10px);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.wizard-bar__spacer { flex: 1; }

/* ---------- انیمیشن ---------- */

/* ظاهرشدن تدریجی بخش‌ها هنگام اسکرول */
.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .55s ease, transform .55s ease;
}

.reveal.is-in { opacity: 1; transform: none; }

/* ورود صحنه قهرمان */
@keyframes rise {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: none; }
}

.hero__inner > div > * { animation: rise .7s both; }
.hero__inner > div > *:nth-child(1) { animation-delay: .05s; }
.hero__inner > div > *:nth-child(2) { animation-delay: .15s; }
.hero__inner > div > *:nth-child(3) { animation-delay: .25s; }
.hero__inner > div > *:nth-child(4) { animation-delay: .35s; }
.hero__inner > div > *:nth-child(5) { animation-delay: .45s; }
.hero__card { animation: rise .8s .3s both; }

/* صحنه متحرک: سند در حال ثبت و مهر شدن */
.seal-scene { width: 100%; max-width: 320px; margin-inline: auto; display: block; }

.seal-scene .doc-line {
    stroke-dasharray: 120;
    stroke-dashoffset: 120;
    animation: write 3.4s ease-in-out infinite;
}

.seal-scene .doc-line:nth-of-type(2) { animation-delay: .25s; }
.seal-scene .doc-line:nth-of-type(3) { animation-delay: .5s; }
.seal-scene .doc-line:nth-of-type(4) { animation-delay: .75s; }

@keyframes write {
    0%        { stroke-dashoffset: 120; }
    35%, 78%  { stroke-dashoffset: 0; }
    100%      { stroke-dashoffset: 0; opacity: 0; }
}

.seal-scene .seal {
    transform-origin: 50% 50%;
    animation: stamp 3.4s ease-in-out infinite;
}

@keyframes stamp {
    0%, 55%   { opacity: 0; transform: scale(1.5) rotate(-12deg); }
    68%       { opacity: 1; transform: scale(.96) rotate(-4deg); }
    74%       { transform: scale(1.04) rotate(-4deg); }
    80%, 96%  { opacity: 1; transform: scale(1) rotate(-4deg); }
    100%      { opacity: 0; transform: scale(1) rotate(-4deg); }
}

/* ---------- نشان‌های اعتماد ---------- */
.badges {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    align-items: center;
}

.badge-chip {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .9rem;
    border: 1px solid var(--line);
    border-radius: 100px;
    background: var(--surface);
    font-size: .84rem;
    font-weight: 600;
    color: var(--muted);
}

.badge-chip svg { color: var(--brass); flex-shrink: 0; }

/* ---------- انتخاب درگاه پرداخت ---------- */
.gateways { display: flex; flex-direction: column; gap: .5rem; }

.gateway {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .75rem .9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    cursor: pointer;
    font-weight: 600;
    font-size: .92rem;
    transition: border-color .15s, background .15s;
}

.gateway:hover { border-color: var(--indigo-300); }

.gateway.is-picked {
    border-color: var(--brass);
    background: var(--brass-050);
    box-shadow: 0 0 0 1px var(--brass);
}

.gateway input { accent-color: var(--brass); }
.gateway svg { color: var(--brass); flex-shrink: 0; }

/* ---------- ویجت گفتگو با مشاور هوشمند ---------- */
.chat-fab {
    position: fixed;
    inset-inline-end: 20px;
    inset-block-end: 20px;
    z-index: 90;
    display: none;               /* تا وقتی مشاور پیکربندی نشده، پنهان است */
    align-items: center;
    gap: .55rem;
    padding: .8rem 1.25rem;
    border: 0;
    border-radius: 100px;
    background: var(--brass);
    color: #fff;
    font-weight: 700;
    font-size: .92rem;
    cursor: pointer;
    box-shadow: 0 8px 26px rgba(192, 135, 58, .38);
    transition: transform .18s, box-shadow .18s;
}

.chat-fab.is-ready { display: inline-flex; }
.chat-fab:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(192, 135, 58, .48); }

/* نبض ملایم برای جلب توجه — فقط تا اولین باز شدن */
.chat-fab::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 2px solid var(--brass);
    animation: chat-pulse 2.6s ease-out infinite;
}

.chat-fab.is-open::before { animation: none; }

@keyframes chat-pulse {
    0%   { opacity: .55; transform: scale(1); }
    70%  { opacity: 0;   transform: scale(1.28); }
    100% { opacity: 0;   transform: scale(1.28); }
}

.chat-panel {
    position: fixed;
    inset-inline-end: 20px;
    inset-block-end: 84px;
    z-index: 91;
    width: min(380px, calc(100vw - 40px));
    height: min(560px, calc(100vh - 130px));
    display: none;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.chat-panel.is-open { display: flex; animation: rise .28s both; }

.chat-panel__head {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .9rem 1rem;
    background: var(--indigo);
    color: #fff;
    flex-shrink: 0;
}

.chat-panel__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--brass);
    flex-shrink: 0;
}

.chat-panel__title { font-weight: 700; font-size: .95rem; line-height: 1.3; }
.chat-panel__sub { font-size: .74rem; opacity: .8; }

.chat-panel__close {
    margin-inline-start: auto;
    background: none;
    border: 0;
    color: #fff;
    opacity: .8;
    cursor: pointer;
    font-size: 1.35rem;
    line-height: 1;
    padding: .2rem .4rem;
}

.chat-panel__close:hover { opacity: 1; }

.chat-log {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: .7rem;
    background: var(--surface-2);
}

.chat-msg {
    max-width: 85%;
    padding: .65rem .9rem;
    border-radius: 14px;
    font-size: .89rem;
    line-height: 1.85;
    white-space: pre-wrap;
    word-break: break-word;
}

.chat-msg--bot {
    align-self: flex-start;
    background: var(--surface);
    border: 1px solid var(--line);
    border-start-start-radius: 4px;
}

.chat-msg--me {
    align-self: flex-end;
    background: var(--indigo);
    color: #fff;
    border-start-end-radius: 4px;
}

@media (prefers-color-scheme: dark) {
    .chat-msg--me { background: var(--brass); color: var(--ground); }
}

.chat-msg--error { background: var(--bad-bg); color: var(--bad); border-color: transparent; }

/* سه نقطه «در حال نوشتن» */
.chat-typing { display: inline-flex; gap: 4px; align-items: center; }

.chat-typing i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--muted-2);
    animation: blink 1.3s infinite;
}

.chat-typing i:nth-child(2) { animation-delay: .18s; }
.chat-typing i:nth-child(3) { animation-delay: .36s; }

@keyframes blink {
    0%, 60%, 100% { opacity: .25; transform: translateY(0); }
    30%           { opacity: 1;   transform: translateY(-3px); }
}

.chat-suggest {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    padding: 0 1rem .7rem;
    background: var(--surface-2);
}

.chat-suggest button {
    padding: .35rem .75rem;
    border: 1px solid var(--line);
    border-radius: 100px;
    background: var(--surface);
    font-size: .78rem;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    transition: border-color .15s, color .15s;
}

.chat-suggest button:hover { border-color: var(--brass); color: var(--brass-600); }

.chat-form {
    display: flex;
    gap: .5rem;
    padding: .75rem;
    border-top: 1px solid var(--line);
    background: var(--surface);
    flex-shrink: 0;
}

.chat-form input {
    flex: 1;
    padding: .6rem .85rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-2);
    font-size: .9rem;
}

.chat-form input:focus { outline: none; border-color: var(--brass); background: var(--surface); }

.chat-form button {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border: 0;
    border-radius: var(--radius);
    background: var(--brass);
    color: #fff;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.chat-form button:disabled { opacity: .5; cursor: not-allowed; }

.chat-note {
    padding: .5rem 1rem .7rem;
    font-size: .72rem;
    color: var(--muted-2);
    text-align: center;
    background: var(--surface);
}

/* ---------- کمکی ---------- */
.text-muted { color: var(--muted); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.hide-sm { display: none; }

@media (min-width: 760px) {
    .hide-sm { display: revert; }
    .only-sm { display: none; }
}

/* ============================================================
   واکنش‌گرایی (responsive) — نمایش درست روی موبایل و تبلت
   ============================================================ */

/* ----- تبلت و موبایل (تا ۷۶۰px): هدر و جستجو ----- */
@media (max-width: 760px) {
    /* هدر دو ردیفه می‌شود: ردیف اول برند + آیکن‌ها، ردیف دوم جستجوی تمام‌عرض */
    .header__row {
        flex-wrap: wrap;
        gap: .55rem .75rem;
        padding-block: .65rem;
        min-height: 0;
    }

    .brand { order: 1; }
    .header__actions { order: 2; margin-inline-start: auto; }

    .search {
        order: 3;
        flex-basis: 100%;
        max-width: none;
    }

    /* نوار بالا فشرده‌تر */
    .topbar__row { min-height: 34px; }
    .topbar__links { gap: .9rem; }

    /* عنوان بخش‌ها و دکمه‌ها زیر هم */
    .head { flex-direction: column; align-items: flex-start; }

    /* نوار ابزار فهرست محصولات نشکند */
    .toolbar { gap: .6rem; }
}

/* ----- موبایل (تا ۵۲۰px): چیدمان و فاصله‌ها ----- */
@media (max-width: 520px) {
    /* زیرعنوان برند برای صرفه‌جویی جا حذف می‌شود، خودِ نام می‌ماند */
    .brand__sub { display: none; }
    .brand__name { font-size: .95rem; }
    .brand__mark { width: 36px; height: 36px; font-size: .95rem; }

    .icon-btn { width: 40px; height: 40px; }

    /* کارت‌های کوچک دو‌ستونه؛ فهرست محصول تک‌ستونه که تصویر و قیمت جا بگیرد */
    .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
    .grid--3 { grid-template-columns: 1fr; }

    /* در کارت‌های باریک (شبکه دوستونه)، قیمت و دکمه «افزودن» کنار هم جا نمی‌شوند و
       دکمه از کارت بیرون می‌زند؛ پس زیر هم و دکمه تمام‌عرض می‌شوند. */
    .grid--4 .card__foot { flex-direction: column; align-items: stretch; gap: .6rem; }
    .grid--4 .card__foot .price { align-items: flex-start; }
    .grid--4 .card__foot > form,
    .grid--4 .card__foot > .btn,
    .grid--4 .card__foot form .btn { width: 100%; }

    /* دسته‌بندی‌ها روی موبایل تک‌ستونه، آیکن کوچک‌تر */
    .cat { padding: 1rem; gap: .8rem; }
    .cat__icon { width: 42px; height: 42px; }

    /* کارت‌های خرید مرحله‌ای دو‌ستونه */
    .grid--2 { grid-template-columns: 1fr; }

    /* عنوان‌های بزرگ کمی کوچک‌تر تا نشکنند */
    .card__title, .pick__title { font-size: .92rem; }

    /* مراحل ویزارد: فشرده و قابل‌پیچش افقی به‌جای شکستن بد */
    .wsteps { gap: .4rem .9rem; font-size: .8rem; }
    .wsteps b { width: 24px; height: 24px; font-size: .75rem; }

    /* نوار پایین ویزارد: دکمه تمام‌عرض زیر خلاصه قیمت */
    .wizard-bar { flex-direction: column; align-items: stretch; gap: .75rem; padding: .85rem; }
    .wizard-bar__spacer { display: none; }
    .wizard-bar .btn { width: 100%; }
    .wizard-bar > a.btn { order: 3; }

    /* مراحل پرداخت/سبد */
    .steps { font-size: .8rem; gap: .35rem; }

    /* جدول‌ها: عرض ردیف کالا کمتر تا اسکرول افقی کمینه شود */
    .line-item { min-width: 0; gap: .6rem; }
    .line-item img { width: 48px; height: 48px; }

    /* پلن‌ها و جعبه‌ها فاصله داخلی کمتر */
    .plan { padding: 1.35rem; }
    .box { padding: 1.15rem; }

    /* خلاصه سفارش تمام‌عرض شود (نه چسبیده به راست) */
    .summary, .box[style*="margin-inline-start"] { max-width: none !important; }

    /* آمار قهرمان دو‌ستونه تا فشرده نشود */
    .hero__stats { gap: 1.25rem 1.75rem; }

    /* فرم‌ها تک‌ستونه */
    .form-grid { grid-template-columns: 1fr; }

    /* پاورقی: ستون‌ها زیر هم */
    .footer__grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
    .footer__bottom { flex-direction: column; gap: .5rem; text-align: center; }
}

/* ----- موبایل کوچک (تا ۳۸۰px) ----- */
@media (max-width: 380px) {
    /* فهرست محصول ویژه هم تک‌ستونه تا تصویر بزرگ‌تر دیده شود */
    .grid--4 { grid-template-columns: 1fr; }
    .footer__grid { grid-template-columns: 1fr; }

    /* دکمه چت فقط آیکن، گرد */
    .chat-fab { padding: .8rem; border-radius: 50%; }
    .chat-fab span { display: none; }
}

/* ----- ویجت چت روی موبایل تمام‌صفحه ----- */
@media (max-width: 520px) {
    .chat-panel {
        inset: 0;
        width: 100%;
        height: 100%;
        max-height: 100%;
        border: 0;
        border-radius: 0;
    }
}

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