/* ===== توکن‌های طراحی ArzFlow Landing v3 ===== */
:root, [data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f6f8fc;
    --bg-card: #ffffff;
    --bg-card-hover: #f4f7fd;
    --bg-input: #fbfcff;
    --bg-overlay: rgba(255, 255, 255, 0.9);

    /* سطوح تیره‌ی طراحی (هیرو، نوار آمار، فوتر) */
    --deep: #080f2b;
    --deep-2: #0b1226;
    --deep-line: #141d3d;

    --border-color: #e7ebf6;
    --border-strong: #e3e9f7;
    --border-active: #0d2bff;

    --text-primary: #0b1226;
    --text-secondary: #5a6478;
    --text-muted: #8089a0;

    --primary: #0d2bff;
    --primary-light: #007aff;
    --primary-dark: #0a1fc4;
    --primary-soft: #eaf1ff;

    --purple: #5f3dc4;
    --purple-light: #7c5cf0;
    --cyan: #00cfff;
    --pink: #e8443a;
    --gold: #f5a623;
    --success: #00935f;
    --danger: #e8443a;

    --gradient-primary: linear-gradient(135deg, #0d2bff 0%, #007aff 100%);
    --gradient-purple: linear-gradient(135deg, #5f3dc4 0%, #7433b8 100%);
    --gradient-brand: linear-gradient(90deg, #4a9dff 0%, #00e0ff 100%);

    --shadow-sm: 0 2px 8px rgba(10, 18, 48, 0.06);
    --shadow-md: 0 10px 30px rgba(10, 18, 48, 0.08);
    --shadow-lg: 0 18px 44px rgba(10, 18, 48, 0.12);

    --font-fa: 'Vazirmatn', system-ui, -apple-system, sans-serif;
    --font-en: 'Vazirmatn', system-ui, sans-serif;

    --radius-sm: 10px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 22px;

    /* حاشیه‌ی افقی سکشن‌ها — در طراحی ۴۸px است */
    --pad-x: 48px;
}

/* ===== ریست ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
    font-family: var(--font-fa);
    background: #fff;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font-family: inherit; }

/* ===== منوی کاربر (دراپ‌داون نام در هدر) ===== */
.login-wrap { position: relative; }
.user-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 180px;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 6px;
    display: none;
    flex-direction: column;
    gap: 2px;
    z-index: 200;
}
.user-menu.active { display: flex; }
.user-menu-item {
    padding: 10px 12px;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font-fa);
    font-size: 14px;
    text-align: right;
    cursor: pointer;
}
.user-menu-item:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.user-menu-item.danger { color: var(--danger); }
.user-menu-item.danger:hover { background: rgba(239, 68, 68, 0.1); }

/* ===== صفحات مستقل (جایگزین مودال‌های قبلی) ===== */
.site-page {
    display: none;
    padding: 40px 20px 80px;
    min-height: 55vh;
}
.site-page.active { display: block; animation: pageFadeIn 0.35s ease-out; }
/* صفحه‌ی اصلی نوارهای تمام‌عرض دارد (هیرو/آمار)، پس padding عمومی ندارد */
#pageHome { padding: 0; }
@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}
.site-page-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 9px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: var(--font-fa);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.site-page-back:hover { color: var(--text-primary); border-color: var(--primary); }


/* ===== پنل کاربری ===== */
.panel-box {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 28px;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.panel-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.panel-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}
.panel-avatar svg { width: 28px; height: 28px; }
.panel-id { display: flex; flex-direction: column; }
.panel-name { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.panel-email { font-size: 13px; color: var(--text-muted); }

.panel-tabs { display: flex; gap: 8px; margin-bottom: 20px; border-bottom: 1px solid var(--border-color); }
.panel-tab {
    padding: 10px 16px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-fa);
    font-size: 14px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.panel-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.panel-section { display: none; }
.panel-section.active { display: block; }

.panel-orders { display: flex; flex-direction: column; gap: 12px; }
.order-item {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
}
.order-item-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.oi-service { font-weight: 700; color: var(--text-primary); }
.order-item-body { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--text-secondary); }
.oi-tg { color: var(--primary); }
.oi-date { color: var(--text-muted); }
.oi-actions { display: flex; gap: 8px; margin-top: 10px; }
.oi-delivery { margin-top: 12px; padding: 12px; color: var(--text-primary); background: #eef8f1; border: 1px solid #bde4c7; border-radius: 10px; }
.oi-delivery b { display: block; margin-bottom: 7px; font-size: 12px; }
.oi-delivery pre { margin: 0; direction: ltr; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.7 monospace; }
.oi-cancel {
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-family: var(--font-fa);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.oi-cancel:hover { background: var(--danger); color: #fff; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-pending { background: rgba(255, 215, 0, 0.15); color: var(--gold); }
.badge-completed { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.badge-cancelled { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.badge-processing { background: rgba(79, 142, 247, 0.15); color: var(--primary); }

.panel-form .form-group { margin-bottom: 14px; }
.panel-form label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }
.panel-form input {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-fa);
    font-size: 14px;
}
.panel-form input:focus { outline: none; border-color: var(--primary); }
.panel-security-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: rgba(13, 43, 255, 0.055);
    border: 1px solid rgba(13, 43, 255, 0.16);
    border-radius: var(--radius-md);
}
.panel-security-icon { font-size: 22px; line-height: 1.4; }
.panel-security-note strong { display: block; margin-bottom: 4px; color: var(--text-primary); font-size: 14px; }
.panel-security-note p { color: var(--text-secondary); font-size: 12px; line-height: 1.9; }
.btn-panel {
    width: 100%;
    padding: 12px;
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    margin-top: 4px;
}
.btn-panel:hover { box-shadow: var(--shadow-glow); }

.btn-logout-panel {
    width: 100%;
    margin-top: 16px;
    padding: 11px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: var(--font-fa);
}
.btn-logout-panel:hover { color: var(--text-primary); border-color: var(--border-strong); }

.panel-loading, .panel-empty { text-align: center; color: var(--text-muted); padding: 24px; }

/* تأیید موبایل (OTP) در پنل */
.mobile-verify { display: flex; align-items: center; gap: 12px; }
.mv-status { font-size: 13px; color: var(--text-muted); }
.mv-status.verified { color: var(--success); font-weight: 600; }
.btn-otp {
    padding: 8px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-fa);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.btn-otp:hover { border-color: var(--primary); color: var(--primary); }
.otp-entry { display: flex; gap: 8px; margin-top: 10px; }
.otp-entry input {
    flex: 1;
    padding: 10px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-fa);
    letter-spacing: 4px;
    text-align: center;
}
.otp-entry input:focus { outline: none; border-color: var(--primary); }
.mobile-change-auth {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px 14px;
    padding: 14px;
    background: rgba(245, 158, 11, .07);
    border: 1px solid rgba(245, 158, 11, .28);
    border-radius: var(--radius-md);
}
.mobile-change-copy { display: grid; gap: 3px; }
.mobile-change-copy strong { color: #b36b00; font-size: 13px; }
.mobile-change-copy span { color: var(--text-muted); font-size: 11px; line-height: 1.8; }
.mobile-change-auth.authorized { background: rgba(34, 197, 94, .07); border-color: rgba(34, 197, 94, .28); }
.mobile-change-auth.authorized .mobile-change-copy strong { color: var(--success); }
.mobile-change-code { grid-column: 1 / -1; margin-top: 0; }

/* ===== تب کیف پول در پنل کاربری ===== */
.wallet-balance-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px;
    margin-bottom: 20px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    color: #fff;
}
.wallet-balance-label { font-size: 12px; opacity: 0.85; }
.wallet-balance-value { font-size: 22px; font-weight: 700; }
.wallet-balance-value small { font-size: 12px; font-weight: 400; opacity: 0.85; }

.wallet-charge-form { margin-bottom: 24px; }

.wallet-tx-title { font-size: 14px; color: var(--text-secondary); margin: 0 0 12px; }
.wallet-tx-list { display: flex; flex-direction: column; gap: 10px; }
.wallet-tx-item {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 14px;
}
.wallet-tx-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.wallet-tx-kind { font-weight: 600; color: var(--text-primary); font-size: 13px; }
.wallet-tx-amount { font-weight: 700; font-size: 13px; white-space: nowrap; }
.wallet-tx-amount.positive { color: var(--success); }
.wallet-tx-amount.negative { color: var(--danger); }
.wallet-tx-body {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

/* ===== سبد خرید ===== */
.cart-toggle {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
}
.cart-toggle:hover { background: rgba(255, 255, 255, 0.14); }
.cart-icon svg { width: 20px; height: 20px; }
.cart-badge {
    position: absolute;
    top: -4px;
    left: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 4px;
    background: var(--danger);
    color: #fff;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font-en);
    border: 2px solid #080f2b;
}

.cart-box { max-width: 480px; }
.cart-modal-title { color: var(--text-primary); font-size: 18px; margin-bottom: 16px; }

.cart-items { display: flex; flex-direction: column; gap: 10px; max-height: 40vh; overflow-y: auto; }
.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 14px;
}
.cart-item-info { display: flex; flex-direction: column; gap: 3px; }
.cart-item-service { font-weight: 700; color: var(--text-primary); font-size: 13px; }
.cart-item-qty, .cart-item-tg { font-size: 12px; color: var(--text-muted); }
.cart-item-price { font-weight: 700; color: var(--text-primary); font-size: 13px; white-space: nowrap; }
.cart-item-remove {
    padding: 6px 12px;
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-sm);
    font-family: var(--font-fa);
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}
.cart-item-remove:hover { background: var(--danger); color: #fff; }

.cart-summary { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border-color); }
.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--text-secondary);
}
.cart-total-value { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.cart-total-value small { font-size: 12px; font-weight: 400; color: var(--text-secondary); }

.cart-payment-method { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.cart-pay-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
}
.cart-pay-option:has(input:checked) { border-color: var(--primary); color: var(--text-primary); }

/* ===== صفحات حقوقی / درباره ما ===== */
.legal-box {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 28px;
    position: relative;
    box-shadow: var(--shadow-lg);
}
.legal-tabs { display: flex; gap: 8px; margin-bottom: 20px; border-bottom: 1px solid var(--border-color); }
.legal-tab {
    padding: 10px 16px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-fa);
    font-size: 14px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.legal-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.legal-section { display: none; }
.legal-section.active { display: block; }
.legal-section h3 { color: var(--text-primary); font-size: 18px; margin-bottom: 12px; }
.legal-section h4 { color: var(--text-primary); font-size: 14px; margin: 16px 0 6px; }
.legal-section p { color: var(--text-secondary); font-size: 14px; line-height: 1.9; }

/* فهرست راه‌های تماس در صفحه‌ی «تماس با ما» (/contact) */
/* اطلاعات تماس — جفت «برچسب → مقدار» با آیکن */
.contact-details { display: flex; flex-direction: column; gap: 4px; margin: 18px 0 22px; }
.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}
.contact-item:last-child { border-bottom: none; }
.contact-ic {
    display: flex;
    flex-shrink: 0;
    /* هم‌تراز با خط اول متن، نه وسط بلوک چندخطی (نشانی) */
    margin-top: 2px;
    color: var(--primary-light);
}
.contact-ic svg { width: 20px; height: 20px; }
.contact-body { min-width: 0; }
.contact-details dt {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 3px;
}
.contact-details dd {
    margin: 0;
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.9;
}
/* لینک تماس: هدف لمسی کافی و بازخورد واضح */
.contact-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    /* شکستن ایمیل بلند روی موبایل به‌جای سرریز افقی */
    overflow-wrap: anywhere;
}
.contact-link:hover, .contact-link:focus-visible { text-decoration: underline; }
.contact-address { color: var(--text-secondary); }
.contact-address-line { display: block; }
.contact-hint {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.9;
    margin: 12px 0 0;
}

/* پیوند میان دو صفحه‌ی «درباره ما» و «تماس با ما» — جایگزین تب‌های قبلی */
.info-crosslink {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-muted);
}
.info-crosslink a { color: var(--primary-light); text-decoration: none; font-weight: 600; }
.info-crosslink a:hover { text-decoration: underline; }


/* فرم */
.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.input-wrapper { position: relative; }

.input-wrapper input, .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.3s;
    direction: rtl;
}

.input-wrapper input { padding-left: 40px; direction: ltr; text-align: right; }
.input-wrapper input::placeholder, .form-group textarea::placeholder { color: var(--text-muted); }

.input-wrapper input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 142, 247, 0.1);
    background: var(--bg-card-hover);
}

/* ===== اعتبارسنجی inline ===== */
.input-wrapper input.invalid {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.04);
}
.input-wrapper input.invalid:focus {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

/* حالت معتبر (سبز) + تیک سمت چپ */
.input-wrapper input.valid {
    border-color: var(--success);
    background: rgba(34, 197, 94, 0.04);
}
.input-wrapper input.valid:focus {
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}
/* تیک روی فیلدهایی که آیکن راست ندارند (input-icon سمت چپ نیست) */
.input-wrapper input.valid ~ .input-icon { color: var(--success); }
.input-wrapper input.valid ~ .pw-toggle { color: var(--success); }

/* ===== نشانگر قدرت رمز ===== */
.pw-strength {
    display: flex;
    gap: 5px;
    margin-top: 8px;
}
.pw-strength[data-level=""] { display: none; }
.pw-strength-bar {
    flex: 1;
    height: 4px;
    border-radius: 4px;
    background: var(--border-strong);
    transition: background 0.25s ease;
}
.pw-strength[data-level="weak"] .pw-strength-bar:nth-child(1) { background: var(--danger); }
.pw-strength[data-level="medium"] .pw-strength-bar:nth-child(-n+2) { background: #f59e0b; }
.pw-strength[data-level="strong"] .pw-strength-bar { background: var(--success); }
.pw-strength-label {
    display: block;
    font-size: 11px;
    line-height: 1.6;
    margin-top: 4px;
    color: var(--text-muted);
}
.pw-strength[data-level="weak"] ~ .pw-strength-label { color: var(--danger); }

.field-error {
    display: block;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    font-size: 12px;
    line-height: 1.7;
    color: var(--danger);
    transition: max-height 0.25s ease, opacity 0.25s ease, margin-top 0.25s ease;
}
.field-error.show {
    max-height: 48px;
    opacity: 1;
    margin-top: 6px;
}
.field-error.show::before {
    content: '⚠ ';
}

/* باکس خطای سطح فرم (خطاهای سرور) */
.auth-error-box {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    margin-bottom: 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: var(--radius-sm);
    color: var(--danger);
    font-size: 13px;
    line-height: 1.7;
}
.auth-error-box.show { display: flex; }
.auth-error-box.show::before {
    content: '✕';
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.2);
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
}

/* دکمه‌ی نمایش/مخفی‌کردن رمز */
.pw-toggle {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}
.pw-toggle:hover { color: var(--text-primary); background: var(--bg-card-hover); }
.pw-toggle svg { width: 18px; height: 18px; }

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    pointer-events: none;
}

.form-group textarea { resize: vertical; min-height: 90px; font-family: inherit; }

/* =====================================================================
   لندینگ — پیاده‌سازی ArzFlow Landing v3
   ===================================================================== */

/* ===== هدر (داخل نوار هیرو می‌نشیند) ===== */
.header {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px var(--pad-x);
}

/* در صفحات دیگر هیرویی زیر هدر نیست، پس زمینه‌ی تیره‌ی خودش را می‌گیرد */
body:not(:has(#pageHome.active)) .header {
    position: relative;
    background: var(--deep);
}

.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon { width: 38px; height: 26px; display: flex; align-items: center; justify-content: center; }
.logo-icon svg { width: 100%; height: 100%; }
.logo-text { direction: ltr; font-size: 20px; font-weight: 800; color: #fff; }

.nav { display: flex; gap: 28px; font-size: 14px; font-weight: 500; }
.nav-link { color: #9aa6cf; transition: color 0.2s; }
.nav-link:hover, .nav-link.active { color: #fff; }

.header-actions { display: flex; align-items: center; gap: 10px; }

.btn-login {
    padding: 10px 22px;
    border-radius: 11px;
    font-size: 13.5px;
    font-weight: 700;
    color: #080f2b;
    background: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-login:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25); }

.btn-login.logged-in {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

/* سبد خرید و کیف پول فقط برای کاربر واردشده ظاهر می‌شوند */
.cart-toggle {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: background 0.2s;
}
.cart-toggle:hover { background: rgba(255, 255, 255, 0.16); }
.cart-icon svg { width: 19px; height: 19px; }
.cart-badge {
    position: absolute;
    top: -4px;
    left: -4px;
    min-width: 19px;
    height: 19px;
    padding: 0 4px;
    background: var(--danger);
    color: #fff;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    border: 2px solid #080f2b;
}

.wallet {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 14px;
    background: rgba(0, 184, 119, 0.14);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s;
}
.wallet:hover { background: rgba(0, 184, 119, 0.22); }
.wallet-info { display: flex; flex-direction: column; align-items: flex-end; }
.wallet-label { font-size: 10.5px; color: #4ee0a5; font-weight: 600; }
.wallet-amount { font-size: 13px; color: #fff; font-weight: 700; }
.wallet-amount small { color: #9aa6cf; font-size: 10px; font-weight: 400; }
.wallet-icon { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; color: #4ee0a5; }
.wallet-icon svg { width: 22px; height: 22px; }

/* ===== هیرو ===== */
.hero {
    background:
        radial-gradient(1000px 500px at 80% -10%, #0d2bff55, transparent),
        radial-gradient(800px 400px at 10% 110%, #00cfff33, transparent),
        #080f2b;
    padding: 150px var(--pad-x) 72px;
}

.hero-inner {
    /* اندازه‌ی عنوان یک‌جا تعریف می‌شود تا بج برند همیشه با آن هم‌نسبت بماند؛
       در بریک‌پوینت‌ها فقط همین متغیر عوض می‌شود. */
    --hero-title-size: 48px;

    max-width: 760px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 22px;
    align-items: center;
}

/* نام برند به‌عنوان eyebrow بالای عنوان: قرص شیشه‌ای با حاشیه‌ی گرادیانی ثابت
   و متن گرادیانی. توجه: روی متن فارسی letter-spacing گذاشته نمی‌شود، چون
   حروف متصل را از هم جدا و کلمه را خراب می‌کند. */
.hero-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    /* اندازه‌ها از همان متغیر عنوان مشتق می‌شوند تا نسبت همیشه حفظ شود؛
       با max یک کف گذاشته شده تا روی موبایل بیش‌ازحد جمع نشود. */
    padding: max(7px, calc(var(--hero-title-size) * 0.16))
             max(18px, calc(var(--hero-title-size) * 0.46));
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 8px 26px rgba(0, 120, 255, 0.14);
}

/* حاشیه‌ی گرادیانی: یک لایه‌ی گرادیان که با mask فقط ضخامت ۱px لبه باقی می‌ماند
   (border معمولی گرادیان نمی‌پذیرد). */
.hero-badge::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(115deg, #0619ff, #00cfff, #7fe6ff);
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

.hero-badge-text {
    /* حدود ۴۴٪ اندازه‌ی عنوان، با کف ۱۴px برای صفحه‌های کوچک */
    font-size: max(14px, calc(var(--hero-title-size) * 0.44));
    font-weight: 800;
    line-height: 1.7;
    background: linear-gradient(90deg, #9fd8ff, #ffffff 45%, #7fe6ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-title {
    margin: 0;
    font-size: var(--hero-title-size);
    line-height: 1.4;
    font-weight: 900;
    color: #fff;
    text-wrap: pretty;
}

.hero-grad {
    background: linear-gradient(90deg, #4a9dff, #00e0ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-desc {
    margin: 0;
    font-size: 16.5px;
    line-height: 2.1;
    color: #9aa6cf;
    max-width: 600px;
}

.hero-cta { display: flex; gap: 14px; }

.btn-primary {
    display: inline-block;
    padding: 15px 36px;
    border-radius: 13px;
    font-size: 15.5px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #2b6bff, #00b2ff);
    box-shadow: 0 14px 34px rgba(0, 150, 255, 0.35);
    transition: transform 0.2s;
}
.btn-primary:hover { transform: translateY(-2px); }

.btn-ghost {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 13px;
    font-size: 15.5px;
    font-weight: 700;
    color: #fff;
    border: 1.5px solid #ffffff33;
    transition: background 0.2s;
}
.btn-ghost:hover { background: #ffffff14; }

/* ===== گام ۱: کاشی‌های دسته‌بندی ===== */
.buy-tiles {
    padding: 0 var(--pad-x);
    margin-top: -44px;
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}

.tile {
    position: relative;
    width: 100%;
    background: #fff;
    border-radius: 16px;
    padding: 20px 14px 18px;
    text-align: center;
    box-shadow: 0 14px 34px rgba(10, 18, 48, 0.12);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    border: 2px solid transparent;
    transition: transform 0.15s, border-color 0.15s;
}

.tile:hover { transform: translateY(-3px); }
.tile.active { border-color: #0d2bff; }
.tile.coming-soon {
    cursor: not-allowed;
    color: #8b93a7;
    background: #f8f9fc;
    border-color: #e7eaf1;
    box-shadow: 0 9px 24px rgba(10, 18, 48, .07);
}
.tile.coming-soon:hover,
.tile.coming-soon:active { transform: none; }
.tile.coming-soon .tile-icon { filter: grayscale(.65); opacity: .62; }
.tile.coming-soon .tile-name { color: #697287; }
.tile-coming-soon {
    position: absolute;
    top: 9px;
    right: 9px;
    padding: 3px 8px;
    color: #8a5b00;
    background: #fff2c7;
    border: 1px solid #f4d572;
    border-radius: 999px;
    font-size: 9.5px;
    font-weight: 800;
    line-height: 1.5;
}
.tile, .pill, .plan, .qty-btn, .modal-close, .modal-pay, .modal-cancel, .modal-done-btn { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.tile:focus-visible, .pill:focus-visible, .plan:focus-visible, .modal-close:focus-visible, .modal-pay:focus-visible, .modal-cancel:focus-visible, .modal-done-btn:focus-visible { outline: 3px solid rgba(13, 43, 255, 0.22); outline-offset: 2px; }

.tile-icon { width: 46px; height: 46px; border-radius: 99px; display: grid; place-items: center; }
.tile-icon svg { display: block; }
.tile-name { font-size: 13.5px; font-weight: 700; color: #0b1226; line-height: 1.6; }
.tile-count { font-size: 11.5px; color: #8089a0; }

/* ===== گام ۲ و ۳: زیرمجموعه‌ها و پلن‌ها ===== */
.buy-band { background: #f6f8fc; padding: 48px var(--pad-x) 64px; margin-top: 26px; }

.buy-head { text-align: center; margin-bottom: 26px; }
.buy-head h2 { margin: 0 0 8px; font-size: 26px; font-weight: 800; color: #0b1226; }
.buy-head p { margin: 0; font-size: 14.5px; color: #7a839a; }

.buy-card {
    background: #fff;
    border: 1px solid #e7ebf6;
    border-radius: 22px;
    padding: 28px 28px 32px;
    box-shadow: 0 10px 30px rgba(10, 18, 48, 0.05);
}

.buy-progress { display: flex; align-items: center; justify-content: center; gap: 9px; margin-bottom: 22px; color: #929aad; font-size: 11.5px; }
.buy-progress span { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.buy-progress b { width: 23px; height: 23px; display: grid; place-items: center; color: #7a839a; background: #f0f3f9; border-radius: 50%; font-size: 11px; }
.buy-progress span.done { color: #138766; }
.buy-progress span.done b { color: #fff; background: #20a77e; }
.buy-progress span.active { color: #0d2bff; font-weight: 700; }
.buy-progress span.active b { color: #fff; background: #0d2bff; box-shadow: 0 0 0 4px rgba(13, 43, 255, .09); }
.buy-progress i { width: 34px; height: 1px; background: #dfe4ef; }

.buy-active { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 18px; }
.buy-active-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; }
.buy-active-text { text-align: center; }
.buy-active-name { font-size: 17px; font-weight: 800; color: #0b1226; }
.buy-active-note { font-size: 12.5px; color: #8089a0; }

.buy-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding-bottom: 22px;
    border-bottom: 1px solid #eef1f8;
}

.pill {
    min-height: 44px;
    cursor: pointer;
    padding: 11px 20px;
    border-radius: 99px;
    font-size: 13.5px;
    font-weight: 700;
    border: 1.5px solid #e3e9f7;
    background: #fff;
    color: #3c4356;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.pill.active { border-color: #0d2bff; background: #eaf1ff; color: #0d2bff; }

.buy-subhead { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 22px 0 16px; }
.buy-subtitle { font-size: 15px; font-weight: 800; color: #0b1226; }
.buy-subdesc { font-size: 12.5px; color: #8089a0; }
.buy-product-overview { display: flex; align-items: center; gap: 14px; margin: 22px 0 16px; }
.buy-product-overview .buy-subhead { flex: 1; margin: 0; }
.buy-product-image { width: 52px; height: 52px; flex: none; object-fit: contain; border: 1px solid #e7ebf6; border-radius: 14px; background: #fff; }

.gift-region-picker { margin: 4px 0 18px; padding: 14px; background: #f8faff; border: 1px solid #e5eaf8; border-radius: 15px; }
.gift-region-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.gift-region-head strong { color: #0b1226; font-size: 13px; }
.gift-region-head span { color: #8089a0; font-size: 11px; }
.gift-region-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.gift-region-pill {
    min-width: 58px;
    min-height: 38px;
    padding: 7px 14px;
    color: #536077;
    background: #fff;
    border: 1px solid #dfe5f3;
    border-radius: 11px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
}
.gift-region-pill:hover { color: #0d2bff; border-color: #9eacff; }
.gift-region-pill.active { color: #fff; background: #0d2bff; border-color: #0d2bff; box-shadow: 0 7px 18px rgba(13, 43, 255, .18); }
.gift-card-section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 11px; }
.gift-card-section-title strong { color: #0b1226; font-size: 13px; }
.gift-card-section-title span { color: #8089a0; font-size: 10.5px; }

.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.plan {
    width: 100%;
    cursor: pointer;
    border: 1.5px solid #e7ebf6;
    border-radius: 16px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    background: #fbfcff;
    color: inherit;
    font: inherit;
    text-align: right;
    transition: box-shadow 0.15s;
}
.plan:hover { box-shadow: 0 12px 26px rgba(10, 18, 48, 0.1); }
.plan.active { border-color: #0d2bff; box-shadow: 0 0 0 3px rgba(13, 43, 255, 0.08); }
.plan.disabled { cursor: not-allowed; opacity: 0.58; box-shadow: none; }
.buy-empty { padding: 34px 12px; color: #8089a0; text-align: center; }
.buy-load-error { display: flex; flex-direction: column; align-items: center; gap: 8px; color: #a52b2b; }
.buy-load-error span { max-width: 520px; color: #8089a0; font-size: 12.5px; }
.buy-load-error button { padding: 9px 18px; color: #0d2bff; background: #eef3ff; border: 0; border-radius: 9px; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.buy-loading { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding-top: 22px; }
.buy-loading span { height: 126px; border-radius: 16px; background: linear-gradient(90deg, #f4f6fb 25%, #e9edf7 50%, #f4f6fb 75%); background-size: 200% 100%; animation: buy-shimmer 1.25s infinite; }
@keyframes buy-shimmer { to { background-position: -200% 0; } }

.plan-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 24px; }
.plan-name { font-size: 16px; font-weight: 800; color: #0b1226; }
.plan-badge { font-size: 11px; font-weight: 700; color: #0060d6; background: #eaf3ff; padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.plan-note { font-size: 12.5px; color: #7a839a; line-height: 1.9; }
.plan-bottom { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; }
.plan-price { font-size: 18px; font-weight: 800; color: #0b1226; }
.plan-unit { font-size: 11.5px; font-weight: 500; color: #8089a0; }
.plan-pick { font-size: 13px; font-weight: 700; color: #fff; background: #0d2bff; padding: 9px 18px; border-radius: 10px; white-space: nowrap; }

/* ===== مودال سفارش ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(8, 15, 43, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.modal {
    width: 560px;
    max-width: 100%;
    max-height: 88vh;
    overflow: auto;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 30px 80px rgba(8, 15, 43, 0.4);
}
.modal-handle { display: none; }

.modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 24px 26px 18px;
    border-bottom: 1px solid #eef1f8;
}
.modal-head-right { display: flex; gap: 12px; align-items: center; }
.modal-icon { width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; }
.modal-title { font-size: 16.5px; font-weight: 800; color: #0b1226; }
.modal-path { font-size: 12px; color: #8089a0; margin-top: 3px; }
.modal-close {
    cursor: pointer;
    width: 32px;
    height: 32px;
    flex: none;
    border-radius: 9px;
    background: #f2f4fa;
    color: #5a6478;
    display: grid;
    place-items: center;
    font-size: 17px;
    font-weight: 700;
}

.modal-body { padding: 22px 26px 4px; display: flex; flex-direction: column; gap: 16px; }
.delivery-note { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; color: #075c43; background: #ecfaf5; border: 1px solid #c9eee0; border-radius: 11px; font-size: 12px; line-height: 1.8; }
.delivery-note strong { font-size: 12.5px; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 13px; font-weight: 700; color: #0b1226; }
.field input, .field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1.5px solid #e3e9f7;
    border-radius: 11px;
    font-size: 14px;
    color: #0b1226;
    background: #fbfcff;
}
.field textarea { resize: vertical; font-size: 13.5px; line-height: 1.9; }
.field input:focus, .field textarea:focus { outline: none; border-color: #0d2bff; }
.field-hint { font-size: 11.5px; color: #8089a0; line-height: 1.8; }
.field-inline-error { font-size: 11.5px; color: #bd2c3a; line-height: 1.8; }

.qty-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f7f9fd;
    border-radius: 12px;
    padding: 12px 16px;
}
.qty-label { font-size: 13px; font-weight: 700; color: #0b1226; }
.qty-range { margin-top: 4px; color: #8089a0; font-size: 11px; }
.qty-ctrl { display: flex; align-items: center; gap: 14px; }
.qty-btn {
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: #fff;
    border: 1.5px solid #e3e9f7;
    color: #0d2bff;
    display: grid;
    place-items: center;
    font-size: 16px;
    font-weight: 800;
}
.qty-input { width: 86px; padding: 8px; color: #0b1226; background: #fff; border: 1.5px solid #e3e9f7; border-radius: 9px; font-size: 15px; font-weight: 800; text-align: center; direction: ltr; }
.qty-input:focus { outline: none; border-color: #0d2bff; }
.qty-input::-webkit-inner-spin-button, .qty-input::-webkit-outer-spin-button { appearance: none; margin: 0; }

.bill { background: #f7f9fd; border-radius: 14px; padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 11px; }
.bill-row { display: flex; justify-content: space-between; font-size: 13px; color: #5a6478; }
.bill-strong { font-weight: 700; color: #0b1226; }
.bill-off, .bill-off .bill-strong { color: #00935f; }
.bill-sep { height: 1px; background: #e5eaf5; }
.bill-total { display: flex; justify-content: space-between; align-items: baseline; }
.bill-total-k { font-size: 14px; font-weight: 800; color: #0b1226; }
.bill-total-v { font-size: 21px; font-weight: 900; color: #0d2bff; }
.bill-total-u { font-size: 12px; font-weight: 600; color: #8089a0; }

.modal-note { font-size: 11.5px; color: #8089a0; line-height: 1.9; }

.modal-foot { padding: 18px 26px 24px; display: flex; gap: 12px; align-items: center; }
.modal-pay {
    flex: 1;
    text-align: center;
    cursor: pointer;
    padding: 15px;
    border-radius: 13px;
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #0d2bff, #007aff);
    box-shadow: 0 12px 26px rgba(13, 43, 255, 0.22);
    border: 0;
    font-family: inherit;
}
.modal-pay.disabled { cursor: not-allowed; opacity: 0.45; box-shadow: none; }
.modal-cancel {
    cursor: pointer;
    padding: 15px 22px;
    border-radius: 13px;
    font-size: 14px;
    font-weight: 700;
    color: #5a6478;
    border: 1.5px solid #e3e9f7;
    background: #fff;
    font-family: inherit;
}

.modal-done { padding: 44px 30px 34px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.modal-done-icon { width: 64px; height: 64px; border-radius: 99px; background: #e8f8f1; display: grid; place-items: center; }
.modal-done-title { font-size: 19px; font-weight: 800; color: #0b1226; }
.modal-done-desc { font-size: 13.5px; line-height: 2; color: #7a839a; max-width: 380px; }
.modal-done-box { background: #f7f9fd; border-radius: 12px; padding: 14px 22px; display: flex; gap: 26px; margin-top: 6px; }
.modal-done-k { font-size: 11.5px; color: #8089a0; margin-bottom: 4px; }
.modal-done-v { font-size: 14px; font-weight: 800; color: #0b1226; }
.modal-done-sep { width: 1px; background: #e5eaf5; }
.modal-done-btn {
    cursor: pointer;
    margin-top: 10px;
    padding: 13px 34px;
    border-radius: 12px;
    font-size: 14.5px;
    font-weight: 800;
    color: #fff;
    background: #0b1226;
    border: 0;
    font-family: inherit;
}

/* ===== چطور کار می‌کند؟ ===== */
.how {
    padding: 56px var(--pad-x);
    background: #f6f8fc;
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 56px;
    align-items: center;
}
.how-intro h2 { margin: 0 0 12px; font-size: 26px; font-weight: 800; color: #0b1226; }
.how-intro p { margin: 0 0 24px; font-size: 14.5px; line-height: 2.1; color: #7a839a; }
.how .btn-primary { padding: 13px 30px; font-size: 14.5px; background: linear-gradient(135deg, #0d2bff, #007aff); box-shadow: none; }

.how-steps { display: flex; flex-direction: column; }
.how-step { display: flex; gap: 18px; }
.how-rail { display: flex; flex-direction: column; align-items: center; }
.how-num {
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: 99px;
    background: #0d2bff;
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 15px;
    font-weight: 800;
}
.how-num-done { background: linear-gradient(135deg, #00b877, #00935f); }
.how-line { width: 2px; flex: 1; background: #dfe5f5; }
.how-body { padding-bottom: 26px; }
.how-step:last-child .how-body { padding-bottom: 0; }
.how-title { font-size: 15.5px; font-weight: 800; color: #0b1226; margin-bottom: 5px; }
.how-desc { font-size: 13.5px; line-height: 2; color: #7a839a; }

/* ===== آمار ===== */
.stats {
    background: #080f2b;
    padding: 44px var(--pad-x);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
}
.stat-num { font-size: 30px; font-weight: 900; color: #fff; }
.stat-label { font-size: 13px; color: #9aa6cf; margin-top: 6px; }

/* ===== نظرات کاربران + سوالات متداول ===== */
.voices { padding: 56px var(--pad-x); background: #fff; }
.voices-title { margin: 0 0 28px; font-size: 26px; font-weight: 800; color: #0b1226; text-align: center; }
.voices-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 56px; }
.voice { border: 1px solid #ebeef6; border-radius: 16px; padding: 24px; }
.voice-stars { color: #f5a623; font-size: 14px; letter-spacing: 2px; margin-bottom: 12px; }
.voice-text { margin: 0 0 16px; font-size: 13.5px; line-height: 2.1; color: #3c4356; }
.voice-who { font-size: 13px; font-weight: 700; color: #0b1226; }
.voice-what { font-weight: 400; color: #8089a0; }

.faq-wrap { max-width: 780px; margin: 0 auto; }
.faq-title { margin: 0 0 22px; font-size: 26px; font-weight: 800; color: #0b1226; text-align: center; }
.faq-list { display: flex; flex-direction: column; gap: 10px; }

details.faq { background: #f6f8fc; border-radius: 13px; padding: 18px 22px; }
details.faq > summary {
    list-style: none;
    cursor: pointer;
    font-size: 14.5px;
    font-weight: 700;
    color: #0b1226;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}
details.faq > summary::-webkit-details-marker { display: none; }
.faq-mark { color: #8089a0; }
.faq-mark::after { content: '+'; }
details.faq[open] .faq-mark { color: #0d2bff; }
details.faq[open] .faq-mark::after { content: '−'; }
details.faq p { margin: 12px 0 0; font-size: 13.5px; line-height: 2.1; color: #5a6478; }

/* ===== فوتر ===== */
.footer { background: #080f2b; padding: 40px var(--pad-x); color: #9aa6cf; }
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.footer .logo-icon { width: 30px; height: 21px; }
.footer .logo-text { font-size: 17px; }
.footer-links { display: flex; gap: 24px; font-size: 13px; flex-wrap: wrap; }
.footer-links a { color: #9aa6cf; transition: color 0.2s; }
.footer-links a:hover { color: #fff; }
/* اطلاعات تماس کنار نماد اعتماد. روی موبایل زیر هم می‌روند تا نشانی له نشود. */
.footer-trust { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 7px;
    /* address به‌صورت پیش‌فرض ایتالیک است */
    font-style: normal;
    font-size: 12px;
    line-height: 1.9;
    color: #9aa6cf;
    /* نشانی بلند نباید فوتر را بکشد */
    max-width: 330px;
}
.footer-contact-row { display: flex; align-items: flex-start; gap: 7px; }
.footer-ic { display: flex; flex-shrink: 0; margin-top: 3px; opacity: 0.75; }
.footer-ic svg { width: 14px; height: 14px; }
.footer-contact a { color: #9aa6cf; transition: color 0.2s; overflow-wrap: anywhere; }
.footer-contact a:hover, .footer-contact a:focus-visible { color: #fff; }

@media (max-width: 720px) {
    .footer-contact { max-width: none; }
}
.enamad {
    background: #141d3d;
    border-radius: 9px;
    padding: 4px;
    min-width: 52px;
    min-height: 52px;
    display: grid;
    place-items: center;
}
.enamad img { max-height: 52px; width: auto; display: block; border-radius: 6px; }
.footer-bottom { border-top: 1px solid #141d3d; padding-top: 18px; font-size: 12px; text-align: center; }

/* ===== ریسپانسیو ===== */
@media (max-width: 1100px) {
    .buy-tiles { grid-template-columns: repeat(3, 1fr); }
    .plan-grid, .voices-grid { grid-template-columns: repeat(2, 1fr); }
    .how { grid-template-columns: 1fr; gap: 32px; }
    .stats { grid-template-columns: repeat(2, 1fr); gap: 28px; }
    .hero-inner { --hero-title-size: 40px; }
}

@media (max-width: 860px) {
    :root { --pad-x: 24px; }

    .header { flex-wrap: wrap; gap: 12px; padding: 16px var(--pad-x); }
    .nav { order: 3; width: 100%; justify-content: center; gap: 18px; font-size: 13px; flex-wrap: wrap; }

    .hero { padding: 180px var(--pad-x) 64px; }
    .hero-inner { --hero-title-size: 32px; }
    .hero-desc { font-size: 15px; }

    .buy-tiles { grid-template-columns: repeat(2, 1fr); }
    .buy-card { padding: 20px; }
    .buy-subhead { flex-direction: column; align-items: flex-start; gap: 6px; }
    .buy-product-overview { align-items: flex-start; }
    .buy-loading { grid-template-columns: 1fr; }
    .plan-grid, .voices-grid { grid-template-columns: 1fr; }

    .modal-overlay { padding: 16px; }

    .buy-head h2, .voices-title, .faq-title, .how-intro h2 { font-size: 22px; }

    .footer-row { flex-direction: column; text-align: center; }

    .chat-widget { bottom: 16px; left: 16px; }
    .chat-toggle { width: 52px; height: 52px; }
    .chat-panel { width: calc(100vw - 32px); }
}

@media (max-width: 520px) {
    #authPage { min-height: calc(100dvh - 72px); padding: 14px 12px calc(28px + env(safe-area-inset-bottom)); }
    .auth-box-simple { padding: 20px 17px 18px; border-radius: 18px; box-shadow: var(--shadow-md); }
    .auth-box-simple .site-page-back { min-height: 42px; margin-bottom: 12px; padding: 8px 11px; }
    .auth-box-simple .auth-head h1 { margin-top: 12px; font-size: 20px; }
    .auth-box-simple .auth-subtitle { font-size: 12px; }
    .auth-unified-form input { font-size: 16px; }
    .auth-code-input { min-height: 60px; font-size: 24px !important; letter-spacing: 7px; }
    .btn-auth { min-height: 50px; }
    .auth-code-actions { gap: 6px; }
    .auth-change-mobile, .auth-resend { flex: 1; padding: 6px; }
    .auth-security-note { margin-top: 18px; }
    .mobile-change-auth { grid-template-columns: 1fr; }
    .mobile-change-auth > .btn-otp { min-height: 42px; }
    .mobile-change-code { grid-column: auto; }
    .hero { padding: 190px var(--pad-x) 56px; }
    .hero-inner { --hero-title-size: 26px; }
    .hero-cta { flex-direction: column; width: 100%; }
    .btn-primary, .btn-ghost { text-align: center; }

    .buy-tiles { gap: 10px; }
    .stats { grid-template-columns: 1fr; gap: 22px; }

    .modal-foot { flex-direction: column; }
    .modal-pay, .modal-cancel { width: 100%; text-align: center; }
    .modal-done-box { flex-direction: column; gap: 12px; }
    .modal-done-sep { width: 100%; height: 1px; }
}

/* خرید در موبایل: انتخاب سریع با یک دست و فرم bottom-sheet */
@media (max-width: 700px) {
    :root { --pad-x: 16px; }

    .buy-tiles {
        display: flex;
        gap: 10px;
        margin-top: -34px;
        padding: 0 16px 12px;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scroll-padding-inline: 16px;
        scroll-snap-type: inline mandatory;
        scrollbar-width: none;
    }
    .buy-tiles::-webkit-scrollbar, .buy-pills::-webkit-scrollbar { display: none; }
    .tile {
        flex: 0 0 112px;
        min-height: 116px;
        padding: 14px 9px 12px;
        gap: 6px;
        border-radius: 15px;
        scroll-snap-align: start;
        box-shadow: 0 9px 24px rgba(10, 18, 48, .12);
    }
    .tile:hover { transform: none; }
    .tile:active { transform: scale(.98); }
    .tile-icon { width: 40px; height: 40px; }
    .tile-name { font-size: 12.5px; }
    .tile-count { font-size: 10.5px; }

    .buy-band { margin-top: 8px; padding: 30px 12px 48px; }
    .buy-head { margin-bottom: 18px; padding-inline: 6px; }
    .buy-head h2 { margin-bottom: 6px; font-size: 21px; }
    .buy-head p { max-width: 340px; margin-inline: auto; font-size: 12.5px; line-height: 1.9; }
    .buy-card { padding: 14px; border-radius: 19px; box-shadow: 0 8px 24px rgba(10, 18, 48, .05); }

    .buy-progress { gap: 6px; margin: 2px 0 18px; font-size: 10px; }
    .buy-progress span { gap: 4px; }
    .buy-progress b { width: 21px; height: 21px; font-size: 10px; }
    .buy-progress i { width: min(7vw, 26px); }
    .buy-active { justify-content: flex-start; margin-bottom: 14px; }
    .buy-active-icon { width: 36px; height: 36px; }
    .buy-active-text { text-align: right; }
    .buy-active-name { font-size: 15px; }
    .buy-active-note { font-size: 10.5px; line-height: 1.7; }

    .buy-pills {
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 8px;
        margin-inline: -14px;
        padding: 0 14px 16px;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scroll-padding-inline: 14px;
        scroll-snap-type: inline proximity;
        scrollbar-width: none;
    }
    .pill { flex: 0 0 auto; min-height: 42px; padding: 9px 16px; font-size: 12.5px; scroll-snap-align: start; }

    .buy-product-overview { gap: 10px; margin: 16px 0 12px; }
    .buy-product-image { width: 44px; height: 44px; border-radius: 11px; }
    .buy-subtitle { font-size: 14px; }
    .buy-subdesc { font-size: 11px; line-height: 1.8; }

    .gift-region-picker { margin: 2px -4px 14px; padding: 12px 10px; }
    .gift-region-head { display: grid; gap: 3px; }
    .gift-region-head span { font-size: 10px; }
    .gift-region-pills {
        flex-wrap: nowrap;
        margin-inline: -10px;
        padding: 0 10px 3px;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
    }
    .gift-region-pills::-webkit-scrollbar { display: none; }
    .gift-region-pill { flex: 0 0 auto; min-height: 40px; scroll-snap-align: start; }
    .gift-card-section-title { align-items: flex-start; }

    .plan-grid { gap: 10px; }
    .plan { min-height: 112px; padding: 15px; border-radius: 14px; gap: 5px; }
    .plan:hover { box-shadow: none; }
    .plan:active { border-color: #0d2bff; background: #f5f8ff; }
    .plan-name { font-size: 14.5px; }
    .plan-badge { padding: 3px 8px; font-size: 9.5px; }
    .plan-note { font-size: 11px; }
    .plan-bottom { margin-top: 6px; }
    .plan-price { font-size: 16px; }
    .plan-unit { display: block; margin-top: 2px; font-size: 9.5px; }
    .plan-pick { min-width: 66px; padding: 9px 12px; font-size: 11.5px; text-align: center; }
    .buy-empty { padding: 26px 8px; font-size: 12px; }
    .buy-loading { gap: 9px; padding-top: 14px; }
    .buy-loading span { height: 104px; }

    .modal-overlay {
        align-items: flex-end;
        padding: 0;
        overscroll-behavior: contain;
        background: rgba(8, 15, 43, .68);
    }
    .modal {
        width: 100%;
        max-height: calc(100dvh - 8px);
        display: flex;
        flex-direction: column;
        overflow: hidden;
        border-radius: 24px 24px 0 0;
        animation: buy-sheet-up .24s ease-out;
    }
    .modal-handle { width: 42px; height: 4px; display: block; flex: none; margin: 8px auto 2px; background: #d8deea; border-radius: 99px; }
    .modal-head { flex: none; padding: 12px 16px 13px; align-items: center; }
    .modal-head-right { min-width: 0; gap: 9px; }
    .modal-head-right > div:last-child { min-width: 0; }
    .modal-icon { width: 38px; height: 38px; }
    .modal-title { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
    .modal-path { margin-top: 1px; font-size: 10.5px; }
    .modal-close { width: 40px; height: 40px; border-radius: 12px; font-size: 20px; }
    .modal-body {
        flex: 1;
        min-height: 0;
        gap: 14px;
        padding: 16px 16px 12px;
        overflow-y: auto;
        overscroll-behavior: contain;
        scroll-padding-bottom: 16px;
    }
    .delivery-note { padding: 10px 12px; font-size: 11px; }
    .field { gap: 6px; }
    .field label { font-size: 12.5px; }
    .field input, .field textarea { min-height: 48px; padding: 12px; border-radius: 11px; font-size: 16px; }
    .field textarea { min-height: 88px; }
    .field-hint, .field-inline-error { font-size: 10.5px; }

    .qty-row { align-items: stretch; flex-direction: column; gap: 12px; padding: 12px; }
    .qty-ctrl { justify-content: space-between; gap: 10px; }
    .qty-btn { width: 44px; height: 44px; flex: none; font-size: 19px; }
    .qty-input { width: auto; min-width: 0; height: 44px; flex: 1; box-sizing: border-box; padding: 8px; font-size: 16px; }

    .bill { padding: 14px; gap: 9px; }
    .bill-row { font-size: 12px; }
    .bill-total-v { font-size: 18px; }
    .modal-note { font-size: 10.5px; }
    .modal-foot {
        flex: none;
        flex-direction: column;
        gap: 7px;
        padding: 12px 16px calc(10px + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, .97);
        border-top: 1px solid #edf0f6;
        box-shadow: 0 -12px 28px rgba(8, 15, 43, .08);
    }
    .modal-pay { width: 100%; min-height: 52px; box-sizing: border-box; padding: 13px 10px; font-size: 13.5px; }
    .modal-cancel { width: 100%; min-height: 42px; box-sizing: border-box; padding: 9px; border: 0; font-size: 12.5px; text-align: center; }

    .modal-done { min-height: 0; padding: 26px 18px calc(22px + env(safe-area-inset-bottom)); overflow-y: auto; }
    .modal-done-icon { width: 56px; height: 56px; }
    .modal-done-title { font-size: 17px; }
    .modal-done-desc { font-size: 12px; }
    .modal-done-box { width: 100%; box-sizing: border-box; }
    .modal-done-btn { width: 100%; min-height: 50px; box-sizing: border-box; }
}

@media (max-width: 380px) {
    .tile { flex-basis: 104px; }
    .buy-progress { font-size: 9px; }
    .buy-progress i { width: 14px; }
    .plan-bottom { align-items: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
    .modal { animation: none; }
    .buy-loading span { animation: none; }
}

@keyframes buy-sheet-up {
    from { transform: translateY(28px); opacity: .72; }
    to { transform: translateY(0); opacity: 1; }
}

/* ===== ویجت چت ===== */
.chat-widget {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 1000;
}

.chat-toggle {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(79, 142, 247, 0.4);
    transition: all 0.3s;
}

.chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(79, 142, 247, 0.6);
}

.chat-toggle-pulse {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: var(--gradient-primary);
    opacity: 0.4;
    animation: chatPulse 2s ease-out infinite;
    z-index: -1;
}

@keyframes chatPulse {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.6); opacity: 0; }
}

.chat-icon-open, .chat-icon-close {
    position: absolute;
    width: 26px;
    height: 26px;
    transition: all 0.4s;
}

.chat-icon-close { transform: rotate(-180deg) scale(0); opacity: 0; }

.chat-widget.active .chat-icon-open { transform: rotate(180deg) scale(0); opacity: 0; }
.chat-widget.active .chat-icon-close { transform: rotate(0) scale(1); opacity: 1; }
.chat-widget.active .chat-toggle-pulse { display: none; }

.chat-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 22px;
    height: 22px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font-en);
    border: 2px solid var(--bg-primary);
    animation: badgePop 0.5s ease-out;
}

@keyframes badgePop {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.chat-widget.active .chat-badge { display: none; }

.chat-panel {
    position: absolute;
    bottom: 76px;
    left: 0;
    width: 360px;
    max-width: calc(100vw - 48px);
    height: 480px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-widget.active .chat-panel {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.chat-header {
    padding: 16px 20px;
    background: var(--gradient-primary);
    color: white;
    flex-shrink: 0;
}

.chat-agent { display: flex; align-items: center; gap: 12px; }

.chat-avatar {
    position: relative;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.chat-avatar svg { width: 24px; height: 24px; }

.chat-status {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background: #10B981;
    border: 2px solid var(--bg-card);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

.chat-info { display: flex; flex-direction: column; }
.chat-name { font-size: 14px; font-weight: 600; }
.chat-status-text { font-size: 11px; opacity: 0.8; }

.chat-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-body::-webkit-scrollbar { width: 4px; }
.chat-body::-webkit-scrollbar-track { background: transparent; }
.chat-body::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }

.chat-message {
    display: flex;
    flex-direction: column;
    max-width: 80%;
    animation: messageIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes messageIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-message.agent { align-self: flex-start; align-items: flex-start; }
.chat-message.user { align-self: flex-end; align-items: flex-end; }

.message-bubble {
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.6;
}

.chat-message.agent .message-bubble {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-bottom-right-radius: 4px;
}

[data-theme="light"] .chat-message.agent .message-bubble { background: var(--bg-input); }

.chat-message.user .message-bubble {
    background: var(--gradient-primary);
    color: white;
    border-bottom-left-radius: 4px;
}

.message-time { font-size: 10px; color: var(--text-muted); margin-top: 4px; padding: 0 4px; }

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 14px;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typingDot 1.4s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-8px); opacity: 1; }
}

.chat-quick-replies {
    display: flex;
    gap: 6px;
    padding: 8px 12px;
    overflow-x: auto;
    border-top: 1px solid var(--border-color);
    flex-wrap: nowrap;
}

.chat-quick-replies::-webkit-scrollbar { display: none; }

.quick-reply {
    flex-shrink: 0;
    padding: 6px 12px;
    background: rgba(79, 142, 247, 0.08);
    border: 1px solid rgba(79, 142, 247, 0.2);
    border-radius: 100px;
    color: var(--primary-light);
    font-size: 11px;
    font-family: inherit;
    transition: all 0.3s;
    white-space: nowrap;
}

.quick-reply:hover {
    background: rgba(79, 142, 247, 0.2);
    transform: translateY(-2px);
}

.chat-input-area {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.chat-input-area input {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    transition: border-color 0.3s;
}

.chat-input-area input:focus { border-color: var(--primary); }
.chat-input-area input::placeholder { color: var(--text-muted); }

.chat-send {
    width: 40px;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.chat-send:hover { transform: scale(1.05); box-shadow: 0 4px 12px rgba(79, 142, 247, 0.4); }
.chat-send svg { width: 18px; height: 18px; transform: rotate(180deg); }

/* ===== کانفتی ===== */
#confettiCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}


/* ===== اسکرول‌بار ===== */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary), var(--purple));
    border-radius: 10px;
    border: 2px solid var(--bg-secondary);
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-light), var(--purple-light));
}

::selection { background: rgba(79, 142, 247, 0.3); color: var(--text-primary); }


/* ===== افکت‌های داینامیک (قبلاً توسط JS تزریق می‌شدند) ===== */
@keyframes rippleEffect {
    to { transform: scale(2); opacity: 0; }
}
@keyframes shakeAnim {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

/* ===== نوتیفیکیشن (قبلاً inline در JS) ===== */
.arz-notification {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(20px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.arz-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.arz-notification.success { background: rgba(16, 185, 129, 0.15); border: 1px solid #10B981; color: #10B981; }
.arz-notification.error   { background: rgba(239, 68, 68, 0.15);  border: 1px solid #EF4444; color: #EF4444; }
.arz-notification.info    { background: rgba(79, 142, 247, 0.15); border: 1px solid #4F8EF7; color: #4F8EF7; }

/* ===== صفحه‌ی ورود / ثبت‌نام ===== */
.auth-box {
    position: relative;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 34px 28px 28px;
}

.auth-head { text-align: center; margin-bottom: 22px; }
.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.auth-logo .logo-icon { width: 40px; height: 28px; }
/* برخلاف هدر/فوترِ تیره، اینجا زمینه روشن است پس متن باید تیره باشد */
.auth-logo .logo-text { font-family: var(--font-en); font-size: 22px; font-weight: 800; color: var(--text-primary); }
.auth-logo .logo-dot { background: var(--gradient-brand); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.auth-subtitle { color: var(--text-secondary); font-size: 13px; margin-top: 10px; }

.auth-tabs {
    position: relative;
    display: flex;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 5px;
    margin-bottom: 24px;
}
.auth-tab {
    flex: 1;
    padding: 11px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
    transition: color 0.3s;
}
.auth-tab.active { color: #fff; }
.auth-tab-indicator {
    position: absolute;
    top: 5px;
    bottom: 5px;
    right: 5px;
    width: calc(50% - 5px);
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 14px rgba(79, 142, 247, 0.4);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.auth-tabs.show-signup .auth-tab-indicator { transform: translateX(-100%); }

.auth-form { display: none; }
.auth-form.active { display: block; animation: authFadeIn 0.4s ease; }
@keyframes authFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 22px;
    font-size: 13px;
}
.auth-check {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}
.auth-check input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.auth-terms { margin-bottom: 20px; }
.auth-link { color: var(--primary); transition: color 0.2s; }
.auth-link:hover { color: var(--primary-light); text-decoration: underline; }

.btn-auth {
    width: 100%;
    padding: 14px;
    background: var(--gradient-primary);
    color: #fff;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 700;
    box-shadow: var(--shadow-glow);
    transition: all 0.3s;
}
.btn-auth:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(79, 142, 247, 0.45); }
.btn-auth:active { transform: translateY(0) scale(0.98); }

/* حالت «در حال ارسال» دکمه‌ی ورود/ثبت‌نام */
.btn-auth { position: relative; }
.btn-auth:disabled { cursor: wait; opacity: 0.85; transform: none; }
.btn-auth.loading .btn-auth-text { visibility: hidden; }
.btn-auth.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2.5px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: authSpin 0.7s linear infinite;
}
@keyframes authSpin {
    to { transform: rotate(360deg); }
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 22px 0 16px;
    color: var(--text-muted);
    font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}
.auth-divider span { padding: 0 12px; }

.auth-social-btn {
    width: 100%;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}
.auth-social-btn:hover { border-color: var(--border-active); background: var(--bg-card-hover); transform: translateY(-2px); }
.auth-social-btn svg { width: 22px; height: 22px; color: #2AABEE; }

/* فرم یکپارچه ورود/ثبت‌نام با موبایل */
.auth-box-simple { max-width: 440px; }
.auth-box-simple .auth-head { margin: 4px 0 18px; }
.auth-box-simple .auth-head h1 { margin-top: 16px; font-size: 22px; line-height: 1.5; }
.auth-box-simple .auth-subtitle { min-height: 25px; margin: 5px auto 0; line-height: 1.9; }
.auth-flow-progress {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
    margin: 0 0 22px;
}
.auth-flow-progress span {
    height: 4px;
    overflow: hidden;
    background: var(--border-color);
    border-radius: 99px;
    transition: background .25s ease, transform .25s ease;
}
.auth-flow-progress span.active { background: var(--gradient-primary); transform: scaleY(1.4); }
.auth-flow-progress span.done { background: var(--success); }
.auth-unified-form .form-group { margin-bottom: 18px; }
.auth-field-help { display: block; margin-top: 7px; color: var(--text-muted); font-size: 11.5px; line-height: 1.8; }
.auth-legal-note { margin: 12px 0 0; color: var(--text-muted); font-size: 10.5px; text-align: center; }
.auth-hint-box {
    margin-bottom: 16px;
    padding: 10px 13px;
    color: #08744e;
    background: rgba(16, 185, 129, .08);
    border: 1px solid rgba(16, 185, 129, .22);
    border-radius: var(--radius-sm);
    font-size: 11.5px;
    line-height: 1.8;
}
.auth-code-input {
    width: 100%;
    min-height: 58px;
    padding: 12px 16px;
    direction: ltr;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    outline: none;
    font-family: var(--font-en);
    font-size: 25px;
    font-weight: 700;
    letter-spacing: 9px;
    text-align: center;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.auth-code-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(13, 43, 255, .08); }
#authName { direction: rtl; }
.auth-code-actions { display: flex; justify-content: space-between; gap: 14px; margin-top: 14px; }
.auth-change-mobile, .auth-resend { min-height: 40px; color: var(--primary); font-size: 12px; font-weight: 600; }
.auth-change-mobile:hover, .auth-resend:hover { text-decoration: underline; }
.auth-change-mobile:disabled, .auth-resend:disabled { opacity: .55; cursor: wait; }
.auth-new-user-copy {
    display: grid;
    justify-items: center;
    gap: 5px;
    margin: 0 0 20px;
    padding: 14px;
    color: var(--text-secondary);
    background: var(--primary-soft);
    border-radius: var(--radius-md);
    font-size: 12px;
    line-height: 1.9;
    text-align: center;
}
.auth-new-user-copy strong { color: var(--text-primary); font-size: 15px; }
.auth-new-user-icon { display: grid; width: 38px; height: 38px; place-items: center; color: #fff; background: var(--gradient-primary); border-radius: 50%; }
.auth-new-user-icon svg { width: 19px; height: 19px; }
.auth-security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 22px;
    padding-top: 16px;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    font-size: 11px;
    line-height: 1.7;
    text-align: center;
}

/* ===== مخفی‌سازی موقت تون کوین =====
   برای بازگرداندن تون کوین به سایت، فقط همین بلاک را حذف کنید؛
   تمام markup آن (تب سفارش، آیکون هیرو، لینک فوتر و متن‌ها) سر جایش است. */
.ton-hidden { display: none !important; }

/* ===== صفحه‌ی محصول (محتوا از CMS) ===== */

.product-page {
    width: 100%;
    max-width: 780px;
    margin: 0 auto;
}

/* اسکلت بارگذاری: تا رسیدن محتوا، ارتفاع صفحه ناگهانی نپرد */
.product-skeleton {
    height: 320px;
    border-radius: var(--radius-lg);
    background: linear-gradient(
        100deg,
        var(--bg-card) 30%,
        var(--bg-card-hover) 50%,
        var(--bg-card) 70%
    );
    background-size: 300% 100%;
    animation: productSkeleton 1.3s ease-in-out infinite;
}
@keyframes productSkeleton {
    from { background-position: 200% 0; }
    to { background-position: -100% 0; }
}

.product-head {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 22px;
}
.product-hero {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: 18px;
}
.product-head h1 {
    font-size: clamp(22px, 4vw, 30px);
    line-height: 1.7;
    margin: 0 0 10px;
}
.product-excerpt {
    color: var(--text-secondary);
    line-height: 2;
    margin: 0 0 18px;
}
.product-cta { width: auto; }

.product-article { display: block; }

.product-body {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    line-height: 2.1;
    color: var(--text-secondary);
}
.product-body h2 {
    font-size: 20px;
    color: var(--text-primary);
    margin: 26px 0 12px;
}
.product-body h2:first-child { margin-top: 0; }
.product-body h3 {
    font-size: 16px;
    color: var(--text-primary);
    margin: 20px 0 10px;
}
.product-body p { margin: 0 0 14px; }
.product-body ul, .product-body ol { margin: 0 0 16px; padding-inline-start: 22px; }
/* markdown فقط شماره‌ی ASCII را لیست می‌شناسد، ولی خواننده باید عدد فارسی
   ببیند؛ این counter style استاندارد است و در غیرِ پشتیبانی به عدد لاتین
   برمی‌گردد (نه خرابی). */
.product-body ol { list-style-type: persian; }
.product-body li { margin-bottom: 8px; }
.product-body strong { color: var(--text-primary); }
.product-body a { color: var(--primary); }
/* نقل‌قول تیم محتوا برای «نکته»ها استفاده می‌شود */
.product-body blockquote {
    margin: 0 0 16px;
    padding: 12px 16px;
    border-inline-start: 3px solid var(--primary);
    background: var(--bg-input);
    border-radius: var(--radius-md);
}
.product-body blockquote p:last-child { margin-bottom: 0; }
/* جدول‌های markdown نباید صفحه را افقی بکشند */
.product-body table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.product-body th, .product-body td {
    border: 1px solid var(--border-color);
    padding: 8px 10px;
    text-align: start;
}

.product-faq {
    margin-top: 22px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
}
.product-faq h2 { font-size: 19px; margin: 0 0 14px; }
.product-faq-item {
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
}
.product-faq-item:last-child { border-bottom: none; padding-bottom: 0; }
.product-faq-item summary {
    cursor: pointer;
    font-weight: 500;
    line-height: 1.9;
    list-style: none;
}
.product-faq-item summary::-webkit-details-marker { display: none; }
.product-faq-item summary::before {
    content: "+";
    color: var(--primary);
    margin-inline-end: 8px;
    font-weight: 700;
}
.product-faq-item[open] summary::before { content: "−"; }
.product-faq-item p {
    margin: 10px 0 0;
    padding-inline-start: 18px;
    color: var(--text-secondary);
    line-height: 2.1;
}

.product-missing {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 44px 28px;
    text-align: center;
}
.product-missing h2 { font-size: 20px; margin: 0 0 10px; }
.product-missing p { color: var(--text-secondary); line-height: 2; margin: 0 0 20px; }
.product-missing .btn-primary { width: auto; }

@media (max-width: 640px) {
    .product-head, .product-body, .product-faq { padding: 20px; }
}

/* ----- پنل خرید یک‌ضرب روی صفحه‌ی محصول ----- */

.product-buy {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 26px 28px;
    margin-bottom: 22px;
}
.product-buy h2 { font-size: 19px; margin: 0 0 16px; }
.product-buy-empty {
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px 28px;
    margin-bottom: 22px;
    color: var(--text-muted);
    text-align: center;
}

.buy-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}
.buy-plan {
    display: flex; flex-direction: column; gap: 6px;
    padding: 14px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: var(--font-fa);
    cursor: pointer;
    transition: all .18s;
    text-align: center;
}
.buy-plan:hover { border-color: var(--primary); }
/* انتخاب فعال باید بدون اتکا به رنگ هم پیدا باشد، پس ضخامت هم عوض می‌شود */
.buy-plan.active {
    border-color: var(--primary);
    box-shadow: inset 0 0 0 1px var(--primary);
    background: var(--bg-card-hover);
}
.buy-plan-name { font-size: 14px; color: var(--text-primary); font-weight: 500; }
.buy-plan-price { font-size: 13px; color: var(--text-secondary); }

.buy-field { margin-bottom: 14px; }
.buy-field label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.buy-field .req { color: var(--danger); }
.buy-input {
    width: 100%;
    padding: 10px 13px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-fa);
    font-size: 14px;
}
.buy-input:focus { outline: none; border-color: var(--primary); }
textarea.buy-input { resize: vertical; }
.buy-help {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 5px;
    line-height: 1.9;
}

.buy-bill {
    background: var(--bg-input);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin: 18px 0 14px;
}
.buy-bill-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.buy-bill-row.off { color: var(--success); }
.buy-bill-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.buy-wallet {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 14px;
    cursor: pointer;
}
.buy-wallet input { width: 17px; height: 17px; accent-color: var(--primary); cursor: pointer; }

.buy-submit { width: 100%; }
.buy-submit:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.buy-note {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.9;
    margin: 12px 0 0;
}

.product-buy-done { text-align: center; padding: 12px 0; }
.product-buy-done h3 { font-size: 18px; margin: 0 0 8px; }
.product-buy-done p { color: var(--text-secondary); margin: 0 0 18px; }
.product-buy-done .btn-primary { width: auto; }

@media (max-width: 640px) {
    .product-buy { padding: 20px; }
}
