* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #f4f6fb;
    --card: #ffffff;
    --border: #e6e9f2;
    --text: #1c2340;
    --muted: #6b7394;
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --accent: #f59e0b;
    --danger: #ef4444;
    --success: #10b981;
    --radius: 16px;
}

body {
    font-family: "Segoe UI", Tahoma, Vazirmatn, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
}

.container { max-width: 1150px; margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    gap: 20px;
}
.logo { font-weight: 900; font-size: 20px; color: var(--primary); text-decoration: none; }
.nav { display: flex; gap: 24px; }
.nav a { color: var(--text); text-decoration: none; font-size: 15px; font-weight: 600; }
.nav a:hover { color: var(--primary); }
.cart-btn {
    position: relative;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cart-btn:hover { background: var(--primary-dark); }
.cart-count {
    background: var(--accent);
    border-radius: 999px;
    min-width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
}

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(135deg, #4f46e5, #7c3aed 55%, #9333ea);
    color: #fff;
    text-align: center;
    padding: 70px 20px;
}
.hero h1 { font-size: 34px; margin-bottom: 12px; }
.hero p { font-size: 17px; opacity: 0.9; margin-bottom: 26px; }
.btn-primary {
    display: inline-block;
    background: var(--accent);
    color: #1c2340;
    font-weight: 800;
    padding: 13px 28px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: 15px;
    text-decoration: none;
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-block { width: 100%; display: block; text-align: center; }

/* ---------- Products ---------- */
#products { padding-top: 40px; }
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 26px;
}
.filter-chip {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 8px 18px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
}
.filter-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 22px;
    padding-bottom: 50px;
}
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(76, 71, 229, 0.12); }
.card-head {
    position: relative;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    background: linear-gradient(135deg, #eef1ff, #f7f3ff);
    text-decoration: none;
    color: inherit;
}
.p-title-link { color: var(--text); text-decoration: none; }
.p-title-link:hover { color: var(--primary); }
.p-title-link::after { content: ''; position: absolute; inset: 0; z-index: 2; }
.card-emoji { line-height: 1; }

/* ---------- Product page ---------- */
.product-section { padding-top: 28px; padding-bottom: 10px; }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); }
.p-detail {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 34px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 26px;
}
.p-gallery { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.p-thumbs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.p-thumbs img {
    width: 62px; height: 62px; object-fit: cover; border-radius: 10px;
    border: 2px solid transparent; cursor: pointer; opacity: 0.75;
}
.p-thumbs img.active { border-color: var(--primary); opacity: 1; }
.p-big {
    width: 100%;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 130px;
    background: linear-gradient(135deg, #eef1ff, #f7f3ff);
    border-radius: var(--radius);
}
.p-big img { width: 100%; max-height: 380px; object-fit: contain; border-radius: var(--radius); }
.card-head img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover;
}
.p-info-box h1 { font-size: 26px; margin-bottom: 6px; }
.p-cat { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.p-desc { font-size: 15px; color: #4c5578; margin-bottom: 18px; white-space: pre-wrap; line-height: 2; }
.loading-box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 60px 24px; text-align: center; color: var(--muted); font-size: 15px; }
.p-badges { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.p-badges .badge { position: static; }
.p-price-big { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.p-price-big .price { font-size: 28px; color: var(--primary); font-weight: 900; }
.p-price-big .old-price { font-size: 16px; }
.p-stock-line { font-size: 14px; font-weight: 700; margin-bottom: 20px; }
.p-buy { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.p-qty {
    display: flex; align-items: center; gap: 6px;
    border: 1px solid var(--border); border-radius: 12px; padding: 4px;
}
.p-qty button {
    width: 38px; height: 38px; border: none; border-radius: 9px;
    background: var(--bg); cursor: pointer; font-size: 18px; font-weight: 800;
}
.p-qty button:disabled { opacity: 0.4; cursor: not-allowed; }
.p-qty span { min-width: 36px; text-align: center; font-weight: 900; font-size: 16px; }
.p-add { padding: 13px 36px; font-size: 16px; }
.p-features-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 28px;
    margin-bottom: 34px;
}
.p-features-box h2 { font-size: 18px; margin-bottom: 12px; }
.p-features-box ul { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.p-features-box li { font-size: 14px; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.p-features-box li::before { content: "✓ "; color: var(--success); font-weight: 800; }
.p-desc-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 28px;
    margin-bottom: 34px;
}
.p-desc-box h2 { font-size: 18px; margin-bottom: 12px; }
.p-desc-box .p-desc { margin-bottom: 14px; max-height: 8.6em; overflow: hidden; }
.p-desc-box .p-desc.expanded { max-height: none; overflow: visible; }
.more-btn {
    background: var(--card-2, #f1f3fb); border: 1px solid var(--border); color: var(--primary);
    font-size: 14px; font-weight: 800; padding: 9px 26px; border-radius: 11px; cursor: pointer;
}
.more-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.related-title { margin: 6px 0 18px; font-size: 20px; }
.related-title::after { content: ""; display: block; width: 44px; height: 4px; background: var(--primary); border-radius: 4px; margin-top: 6px; }

@media (max-width: 640px) {
    .p-detail { grid-template-columns: 1fr; padding: 18px; }
    .p-big { min-height: 200px; font-size: 90px; }
    .p-features-box ul { grid-template-columns: 1fr; }
}
.badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--danger);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
}
.badge.warn { background: var(--accent); color: #1c2340; }
.card-body { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-size: 17px; margin-bottom: 6px; }
.card-body .cat { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.card-body .desc { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.features { list-style: none; margin-bottom: 14px; flex: 1; }
.features li { font-size: 13px; color: var(--text); padding: 3px 0; }
.features li::before { content: "✓ "; color: var(--success); font-weight: 800; }
.price-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.price { font-size: 19px; font-weight: 900; color: var(--primary); }
.old-price { font-size: 13px; color: var(--danger); text-decoration: line-through; text-decoration-thickness: 1px; }
.card-body .price-row { margin-bottom: 0; }
.stock-low { font-size: 12px; color: var(--danger); font-weight: 700; }
.add-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 11px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    width: 100%;
}
.add-btn:hover { background: var(--primary-dark); }
.add-btn:disabled { background: #c8cbe0; cursor: not-allowed; }

/* ---------- Track ---------- */
.track-section { padding: 0 0 50px; }
.track-section h2 { text-align: center; margin-bottom: 16px; }
.track-box {
    display: flex;
    gap: 10px;
    max-width: 460px;
    margin: 0 auto 20px;
}
.track-box input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
}
.track-result { max-width: 560px; margin: 0 auto; }
.track-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}
.track-card .t-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px dashed var(--border);
    font-size: 14px;
}
.status-pill {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}
.status-pill.pending { background: #fef3c7; color: #b45309; }
.status-pill.processing { background: #dbeafe; color: #1d4ed8; }
.status-pill.done { background: #d1fae5; color: #065f46; }
.status-pill.canceled { background: #fee2e2; color: #b91c1c; }

/* ---------- Footer ---------- */
.footer { background: #141a2c; color: #c7cce4; }
.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    padding: 36px 20px 20px;
}
.footer .logo { color: #fff; }
.footer p { font-size: 13px; margin-top: 8px; color: #9aa2c0; }
.footer-contact div { font-size: 14px; padding: 4px 0; }
.footer-bottom {
    border-top: 1px solid #232b47;
    padding: 14px 20px;
    font-size: 12px;
    text-align: center;
    color: #7a82a5;
}

/* ---------- Drawer ---------- */
.drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 380px;
    max-width: 100vw;
    height: 100vh;
    background: var(--card);
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    display: flex;
    flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}
.drawer-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--muted);
}
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.empty-cart { text-align: center; color: var(--muted); padding: 40px 0; font-size: 15px; }
.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px dashed var(--border);
}
.cart-item .em { font-size: 28px; }
.cart-item .info { flex: 1; }
.cart-item .name { font-size: 14px; font-weight: 700; }
.cart-item .unit { font-size: 12px; color: var(--muted); }
.qty-row { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.qty-row button {
    width: 26px; height: 26px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    cursor: pointer;
    font-weight: 800;
}
.qty-row .qty { min-width: 24px; text-align: center; font-weight: 700; }
.remove-btn { background: none; border: none; color: var(--danger); cursor: pointer; font-size: 14px; }
.drawer-footer { padding: 18px 20px; border-top: 1px solid var(--border); }
.cart-total {
    font-size: 16px;
    font-weight: 900;
    margin-bottom: 12px;
    text-align: center;
}
.cart-total span { color: var(--primary); }

/* ---------- Overlay / Modal ---------- */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(12, 14, 28, 0.5);
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}
.overlay.show { opacity: 1; pointer-events: auto; }

.modal {
    position: fixed;
    inset: 0;
    z-index: 110;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal.open { display: flex; }
.modal-card {
    background: var(--card);
    border-radius: 18px;
    width: 100%;
    max-width: 480px;
    max-height: 92vh;
    overflow-y: auto;
    padding: 24px;
    box-shadow: 0 30px 70px rgba(12, 14, 28, 0.3);
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.modal-header h3 { font-size: 19px; }
.modal-card input,
.modal-card textarea {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
}
.row { display: flex; gap: 10px; }
.row input { flex: 1; min-width: 0; }
.pay-label { font-size: 14px; font-weight: 700; display: block; margin: 6px 0 8px; }
.pay-methods { display: flex; gap: 18px; margin-bottom: 16px; }
.pay-methods label { font-size: 14px; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.modal-error {
    background: #fee2e2;
    color: #b91c1c;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 12px;
    display: none;
}
.modal-error.show { display: block; }
.success-body { text-align: center; padding: 8px 0 4px; }
.success-body .big-ref {
    font-size: 30px;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: 3px;
    margin: 10px 0;
}
.success-body .sum { font-size: 15px; color: var(--muted); }
.success-body .hint { font-size: 13px; color: var(--muted); margin-top: 12px; background: var(--bg); padding: 10px; border-radius: 10px; }

@media (max-width: 640px) {
    .nav { display: none; }
    .hero h1 { font-size: 26px; }
    .row { flex-direction: column; gap: 0; }
}
/* ===== ناحیه کاربری ===== */
.account-btn {
    background: transparent; border: 1px solid var(--border); color: var(--text);
    font-size: 14px; font-weight: 700; padding: 9px 16px; border-radius: 12px;
    cursor: pointer; text-decoration: none; display: inline-block; white-space: nowrap;
}
.account-btn:hover { border-color: var(--primary); color: var(--primary); }
.account-btn.logged-in { background: var(--primary); color: #fff; border-color: var(--primary); }
.account-btn.logged-in:hover { color: #fff; opacity: .92; }
.auth-hint { font-size: 13px; color: var(--muted); line-height: 2; margin-bottom: 16px; }
.auth-sent { font-size: 14px; margin-bottom: 14px; line-height: 1.9; }
.auth-msg { font-size: 13px; margin-bottom: 14px; line-height: 1.9; color: var(--success); }
.auth-msg:empty { display: none; }
.auth-msg.error { color: #c62828; }
.auth-msg:not(.error):not(:empty) { background: #e8f7ee; border: 1px solid #b7e4c8; border-radius: 10px; padding: 10px 12px; }
.auth-msg.error:not(:empty) { background: #fdecec; border: 1px solid #f5c2c2; border-radius: 10px; padding: 10px 12px; }
.auth-step-lbl, #authStep1 .lbl, #authStep2 .lbl { display: block; margin-bottom: 6px; }
#authStep1 input, #authStep2 input { width: 100%; margin-bottom: 14px; }
.link-btn { background: none; border: none; color: var(--primary); font-size: 13px; font-weight: 700; cursor: pointer; padding: 8px 4px; }
.link-btn:hover { text-decoration: underline; }


/* ==========================================================
   سیستم طراحی — 2026
   ========================================================== */
:root {
    --bg: #f6f7fb;
    --bg-2: #eef0f8;
    --card: #ffffff;
    --border: #e7e9f2;
    --border-2: #d8dbe8;
    --text: #141a33;
    --text-2: #5c6485;
    --muted: #838ba8;
    --primary: #4f46e5;
    --primary-2: #6d5ef0;
    --primary-soft: #eef0ff;
    --success: #0ea371;
    --success-soft: #e6f7f0;
    --warn: #d97706;
    --warn-soft: #fdf3e4;
    --danger: #e5484d;
    --danger-soft: #fdeced;

    --r-xs: 8px;
    --r-sm: 11px;
    --r-md: 14px;
    --r-lg: 18px;
    --r-xl: 24px;
    --r-full: 999px;

    --sh-1: 0 1px 2px rgba(20, 26, 51, .05);
    --sh-2: 0 2px 8px rgba(20, 26, 51, .06), 0 1px 2px rgba(20, 26, 51, .04);
    --sh-3: 0 10px 28px rgba(20, 26, 51, .09), 0 2px 6px rgba(20, 26, 51, .05);
    --sh-primary: 0 6px 18px rgba(79, 70, 229, .28);

    --ease: cubic-bezier(.4, 0, .2, 1);
    --fast: .16s var(--ease);
    --med: .28s var(--ease);
}

[data-theme="dark"] {
    --bg: #0b0e1a;
    --bg-2: #111524;
    --card: #151a2c;
    --border: #242a42;
    --border-2: #313857;
    --text: #eef1fa;
    --text-2: #a8b0cd;
    --muted: #7c85a6;
    --primary: #7c74ff;
    --primary-2: #918aff;
    --primary-soft: #1e2140;
    --success: #34d399;
    --success-soft: #10291f;
    --warn: #fbbf24;
    --warn-soft: #2a2010;
    --danger: #f87171;
    --danger-soft: #2c1418;
    --sh-1: 0 1px 2px rgba(0, 0, 0, .4);
    --sh-2: 0 2px 8px rgba(0, 0, 0, .45);
    --sh-3: 0 12px 32px rgba(0, 0, 0, .55);
    --sh-primary: 0 6px 18px rgba(124, 116, 255, .3);
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0b0e1a; --bg-2: #111524; --card: #151a2c;
        --border: #242a42; --border-2: #313857;
        --text: #eef1fa; --text-2: #a8b0cd; --muted: #7c85a6;
        --primary: #7c74ff; --primary-2: #918aff; --primary-soft: #1e2140;
        --success: #34d399; --success-soft: #10291f;
        --warn: #fbbf24; --warn-soft: #2a2010;
        --danger: #f87171; --danger-soft: #2c1418;
        --sh-1: 0 1px 2px rgba(0,0,0,.4);
        --sh-2: 0 2px 8px rgba(0,0,0,.45);
        --sh-3: 0 12px 32px rgba(0,0,0,.55);
        --sh-primary: 0 6px 18px rgba(124,116,255,.3);
    }
}

body {
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    transition: background var(--med), color var(--med);
}

.ic { flex: 0 0 auto; vertical-align: middle; }
[data-icon] { display: inline-flex; align-items: center; justify-content: center; }

/* ---------- دکمه‌ها ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: inherit; font-size: 14px; font-weight: 700; line-height: 1;
    padding: 12px 20px; border-radius: var(--r-md); border: 1px solid transparent;
    cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: transform var(--fast), background var(--fast), border-color var(--fast), box-shadow var(--fast), color var(--fast);
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--sh-primary); }
.btn-primary:hover:not(:disabled) { background: var(--primary-2); box-shadow: 0 8px 22px rgba(79, 70, 229, .34); }
.btn-ghost { background: var(--card); color: var(--text); border-color: var(--border-2); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.btn-danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-lg { padding: 14px 26px; font-size: 15px; border-radius: var(--r-lg); }
.btn-block { width: 100%; }
.btn .ic { width: 18px; height: 18px; }

.icon-btn {
    width: 40px; height: 40px; display: inline-grid; place-items: center;
    border-radius: var(--r-md); border: 1px solid var(--border);
    background: var(--card); color: var(--text-2); cursor: pointer;
    font-family: inherit; transition: var(--fast);
}
.icon-btn:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }

/* ---------- فرم ---------- */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 700; color: var(--text-2); }
.field input, .field textarea, .field select {
    font-family: inherit; font-size: 14px; color: var(--text);
    background: var(--bg); border: 1.5px solid var(--border);
    border-radius: var(--r-md); padding: 12px 14px; width: 100%;
    transition: var(--fast); resize: vertical;
}
.field input:focus, .field textarea:focus {
    outline: none; border-color: var(--primary); background: var(--card);
    box-shadow: 0 0 0 4px var(--primary-soft);
}
.field input:disabled { opacity: .6; cursor: not-allowed; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.otp-input { text-align: center; letter-spacing: 10px; font-weight: 800; font-size: 19px; padding: 15px 12px; }

.check-row {
    display: flex; align-items: center; gap: 10px; font-size: 13.5px;
    cursor: pointer; user-select: none; margin: 6px 0;
}
.check-row input { position: absolute; opacity: 0; width: 0; height: 0; }
.check-box {
    width: 22px; height: 22px; border-radius: 7px; flex: 0 0 22px;
    border: 1.5px solid var(--border-2); background: var(--card);
    display: grid; place-items: center; color: transparent; transition: var(--fast);
}
.check-box .ic { width: 14px; height: 14px; stroke-width: 3; }
.check-row input:checked + .check-box { background: var(--primary); border-color: var(--primary); color: #fff; }
.check-row input:focus-visible + .check-box { box-shadow: 0 0 0 4px var(--primary-soft); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.field-wide { grid-column: 1 / -1; }

/* ==========================================================
   ناحیه کاربری
   ========================================================== */
.acc-body { background: var(--bg); }
.acc-shell { max-width: 1180px; margin: 0 auto; padding: 28px 20px 90px; }

/* ---- دروازهٔ مهمان ---- */
.acc-gate {
    max-width: 560px; margin: 26px auto; text-align: center;
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--r-xl); padding: 46px 38px 40px; box-shadow: var(--sh-3);
}
.gate-art { position: relative; width: 112px; height: 112px; margin: 0 auto 22px; }
.gate-ring {
    position: absolute; inset: 0; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    opacity: .13; animation: gatePulse 3.2s var(--ease) infinite;
}
.gate-ring-2 { inset: 16px; opacity: .2; animation-delay: .4s; }
.gate-art-ic {
    position: absolute; inset: 30px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    display: grid; place-items: center; color: #fff;
    box-shadow: var(--sh-primary);
}
.gate-art-ic .ic { width: 26px; height: 26px; stroke-width: 1.9; }
@keyframes gatePulse { 0%, 100% { transform: scale(1); opacity: .13; } 50% { transform: scale(1.07); opacity: .2; } }
.gate-title { font-size: 24px; font-weight: 800; margin-bottom: 10px; letter-spacing: -.2px; }
.gate-text { color: var(--text-2); font-size: 14.5px; line-height: 2.05; margin-bottom: 28px; }
.gate-actions { display: flex; gap: 11px; justify-content: center; flex-wrap: wrap; margin-bottom: 32px; }
.gate-feats {
    list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
    border-top: 1px solid var(--border); padding-top: 26px; text-align: right;
}
.gate-feats li { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--text-2); }
.gate-feats .ic { width: 17px; height: 17px; color: var(--primary); }

/* ---- چیدمان دسکتاپ ---- */
#accApp { display: grid; grid-template-columns: 274px 1fr; gap: 26px; align-items: start; }

.acc-side {
    position: sticky; top: 92px;
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--r-xl); padding: 20px 16px; box-shadow: var(--sh-2);
    display: flex; flex-direction: column; gap: 16px;
}
.side-profile { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.avatar {
    width: 52px; height: 52px; border-radius: 50%; flex: 0 0 52px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff; display: grid; place-items: center;
    font-size: 22px; font-weight: 800; box-shadow: var(--sh-primary);
}
.avatar .ic { width: 24px; height: 24px; }
.side-profile-txt { min-width: 0; display: flex; flex-direction: column; }
.side-profile-txt b { font-size: 15px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-profile-txt span { font-size: 12.5px; color: var(--muted); }

.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-link {
    display: flex; align-items: center; gap: 11px; width: 100%;
    padding: 11px 13px; border: none; background: none; border-radius: var(--r-md);
    font-family: inherit; font-size: 14px; font-weight: 600; color: var(--text-2);
    cursor: pointer; text-align: right; transition: var(--fast); position: relative;
}
.side-link .ic { width: 19px; height: 19px; }
.side-link:hover { background: var(--bg-2); color: var(--text); }
.side-link.active { background: var(--primary); color: #fff; box-shadow: var(--sh-primary); }
.side-link.active .ic { color: #fff; }
.side-count {
    margin-right: auto; font-style: normal; font-size: 11.5px; font-weight: 800;
    background: var(--bg-2); color: var(--text-2); border-radius: var(--r-full);
    padding: 2px 9px; min-width: 24px; text-align: center;
}
.side-link.active .side-count { background: rgba(255, 255, 255, .24); color: #fff; }

.side-sum {
    display: flex; align-items: center; gap: 11px; padding: 14px;
    background: var(--primary-soft); border-radius: var(--r-md); color: var(--primary);
}
.side-sum .ic { width: 22px; height: 22px; }
.side-sum div { display: flex; flex-direction: column; }
.side-sum small { font-size: 11.5px; color: var(--text-2); }
.side-sum b { font-size: 14.5px; font-weight: 800; color: var(--text); }
.side-logout {
    display: flex; align-items: center; justify-content: center; gap: 9px;
    width: 100%; padding: 11px; border: 1px solid var(--border);
    background: none; border-radius: var(--r-md); font-family: inherit;
    font-size: 13.5px; font-weight: 700; color: var(--text-2); cursor: pointer; transition: var(--fast);
}
.side-logout:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }
.side-logout .ic { width: 17px; height: 17px; }

.acc-main { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.acc-panel { animation: panelIn var(--med); }
@keyframes panelIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.panel-head { margin-bottom: 4px; }
.panel-head h2 { font-size: 20px; font-weight: 800; letter-spacing: -.2px; }
.panel-head p { color: var(--muted); font-size: 13.5px; margin-top: 3px; }

.stack { display: flex; flex-direction: column; gap: 13px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(224px, 1fr)); gap: 16px; }

.acc-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--r-lg); padding: 22px 24px; box-shadow: var(--sh-1);
}
.acc-card h3 { display: flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.acc-card h3 .ic { width: 18px; height: 18px; color: var(--primary); }
.card-note { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.card-actions { display: flex; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.form-card h3 { margin-bottom: 18px; }
.danger-card { border-color: var(--danger-soft); }
.danger-card h3 .ic { color: var(--danger); }

/* ---------- کارت علاقه‌مندی ---------- */
.wish-card { display: flex; flex-direction: column; gap: 9px; padding: 16px; }
.wish-card .thumb {
    height: 92px; border-radius: var(--r-md); display: grid; place-items: center;
    background: var(--primary-soft); color: var(--primary); overflow: hidden;
}
.wish-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.wish-card .thumb .em { font-size: 34px; line-height: 1; }
.wish-card h3 { font-size: 14.5px; margin: 0; }
.wish-card .p-title-link { cursor: pointer; }
.wish-card .wish-price { font-size: 15px; font-weight: 800; color: var(--primary); }
.wish-card .wish-actions { display: flex; gap: 8px; margin-top: 4px; }
.wish-card .wish-actions .btn { flex: 1; padding: 10px 12px; font-size: 13px; }
.wish-card .wish-actions .mini-btn { padding: 10px 12px; }
.wish-card.out { opacity: .6; }
.wish-card.out .wish-price { text-decoration: line-through; color: var(--muted); }

/* ---------- نمایش پیام ---------- */
.toast {
    position: fixed; bottom: 24px; left: 50%; z-index: 200;
    display: flex; align-items: center; gap: 9px;
    background: var(--text); color: var(--bg);
    font-size: 13.5px; font-weight: 700; padding: 12px 20px;
    border-radius: var(--r-full); box-shadow: var(--sh-3);
    opacity: 0; transform: translate(-50%, 14px);
    transition: opacity var(--med), transform var(--med);
    pointer-events: none; max-width: 90vw;
}
.toast.in { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--danger); color: #fff; }

/* ---- اسکلت لودینگ ---- */
.skel { background: var(--bg-2); border-radius: var(--r-md); position: relative; overflow: hidden; }
.skel::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent);
    animation: shimmer 1.4s infinite;
}
[data-theme="dark"] .skel::after { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .05), transparent); }
@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.skel-card { height: 104px; }
.skel-line { height: 12px; margin-bottom: 9px; }

/* ---- کارت سفارش ---- */
.order {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-1);
    transition: var(--med);
}
.order:hover { box-shadow: var(--sh-3); transform: translateY(-2px); }
.order-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px 20px; flex-wrap: wrap; }
.order-id { display: flex; flex-direction: column; gap: 3px; }
.order-id b { font-size: 14.5px; font-weight: 800; }
.order-id b span { font-family: ui-monospace, monospace; letter-spacing: 1px; color: var(--primary); }
.order-meta { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.order-meta .ic { width: 14px; height: 14px; }
.order-right { display: flex; align-items: center; gap: 14px; }
.order-total { font-size: 15px; font-weight: 800; }
.order-more {
    width: 100%; background: var(--bg); border: none; border-top: 1px solid var(--border);
    padding: 12px; font-family: inherit; font-size: 13px; font-weight: 700;
    color: var(--text-2); cursor: pointer; display: flex; align-items: center;
    justify-content: center; gap: 8px; transition: var(--fast);
}
.order-more:hover { background: var(--primary-soft); color: var(--primary); }
.order-more .ic { width: 16px; height: 16px; transition: transform var(--med); }
.order.open .order-more .ic { transform: rotate(180deg); }
.order-body { padding: 20px; background: var(--bg); border-top: 1px solid var(--border); }

/* ---- مراحل سفارش ---- */
.track { display: flex; align-items: flex-start; margin-bottom: 22px; }
.track-step { flex: 1; text-align: center; position: relative; }
.track-step::before {
    content: ''; position: absolute; top: 15px; right: 50%; width: 100%; height: 2px;
    background: var(--border-2); z-index: 0;
}
.track-step:last-child::before { display: none; }
.track-step.done::before { background: var(--success); }
.track-dot {
    position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%;
    margin: 0 auto 8px; display: grid; place-items: center;
    background: var(--card); border: 2px solid var(--border-2); color: var(--muted);
    transition: var(--med);
}
.track-dot .ic { width: 15px; height: 15px; stroke-width: 2.6; }
.track-step.done .track-dot { background: var(--success); border-color: var(--success); color: #fff; }
.track-step.now .track-dot { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 0 0 5px var(--primary-soft); }
.track-step span { font-size: 12px; font-weight: 700; color: var(--muted); }
.track-step.done span { color: var(--success); }
.track-step.now span { color: var(--primary); }

/* ---- چیپ ---- */
.chip {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11.5px; font-weight: 800; border-radius: var(--r-full);
    padding: 5px 12px; white-space: nowrap;
}
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.pending { background: var(--warn-soft); color: var(--warn); }
.chip.processing { background: var(--primary-soft); color: var(--primary); }
.chip.shipped { background: #e0f2f1; color: #00796b; }
[data-theme="dark"] .chip.shipped { background: #0f2b28; color: #5eead4; }
.chip.done { background: var(--success-soft); color: var(--success); }
.chip.canceled { background: var(--danger-soft); color: var(--danger); }
.chip.default { background: var(--primary-soft); color: var(--primary); }
.chip.default::before { display: none; }

/* ---- جدول ---- */
.tbl-wrap { overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--card); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 420px; }
.tbl th, .tbl td { padding: 12px 14px; text-align: right; }
.tbl thead th { background: var(--bg); font-size: 12.5px; font-weight: 800; color: var(--text-2); border-bottom: 1px solid var(--border); }
.tbl tbody tr + tr td { border-top: 1px solid var(--border); }
.tbl tbody tr:hover { background: var(--bg); }
.tbl tfoot td { background: var(--bg); font-weight: 800; border-top: 1.5px solid var(--border); }
.tbl img { width: 42px; height: 42px; border-radius: var(--r-xs); object-fit: cover; background: var(--bg-2); }

/* ---- آدرس ---- */
.addr {
    display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    align-items: flex-start; background: var(--card); border: 1px solid var(--border);
    border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--sh-1); transition: var(--med);
}
.addr:hover { box-shadow: var(--sh-2); }
.addr.is-default { border-color: var(--primary); background: linear-gradient(180deg, var(--primary-soft), var(--card) 62%); }
.addr-main { flex: 1; min-width: 240px; }
.addr-top { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; flex-wrap: wrap; }
.addr-top b { font-size: 15px; font-weight: 800; }
.addr-top .ic { width: 17px; height: 17px; color: var(--primary); }
.addr-line { font-size: 13.5px; color: var(--text-2); line-height: 1.95; display: flex; gap: 8px; align-items: flex-start; }
.addr-line .ic { width: 15px; height: 15px; color: var(--muted); margin-top: 5px; }
.addr-acts { display: flex; gap: 8px; }
.mini-btn {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px;
    border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--card);
    font-family: inherit; font-size: 12.5px; font-weight: 700; color: var(--text-2);
    cursor: pointer; transition: var(--fast);
}
.mini-btn .ic { width: 14px; height: 14px; }
.mini-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.mini-btn.danger:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }

/* ---- حالت خالی ---- */
.empty {
    text-align: center; padding: 52px 24px; background: var(--card);
    border: 1.5px dashed var(--border-2); border-radius: var(--r-lg);
}
.empty-ic {
    width: 66px; height: 66px; border-radius: 50%; margin: 0 auto 16px;
    display: grid; place-items: center; background: var(--bg-2); color: var(--muted);
}
.empty-ic .ic { width: 28px; height: 28px; }
.empty b { display: block; font-size: 15.5px; margin-bottom: 6px; }
.empty p { color: var(--muted); font-size: 13.5px; margin-bottom: 18px; }

/* ---- پیام‌ها ---- */
.modal-error {
    display: none; font-size: 13px; border-radius: var(--r-md);
    padding: 11px 14px; margin: 4px 0 12px; line-height: 1.8;
}
.modal-error.show { display: block; background: var(--danger-soft); color: var(--danger); }
.modal-error.ok { display: block; background: var(--success-soft); color: var(--success); }
.auth-msg { display: none; font-size: 13px; border-radius: var(--r-md); padding: 11px 14px; margin-top: 14px; line-height: 1.8; }
.auth-msg.show { display: block; background: var(--success-soft); color: var(--success); }
.auth-msg.error { display: block; background: var(--danger-soft); color: var(--danger); }
.drawer-text { font-size: 13.5px; color: var(--text-2); line-height: 1.95; margin-bottom: 16px; }
.drawer-text b { color: var(--primary); font-weight: 800; }

/* ---- کشو ---- */
.drawer {
    position: fixed; top: 0; left: 0; width: 400px; max-width: 92vw; height: 100dvh;
    background: var(--card); z-index: 110; box-shadow: var(--sh-3);
    transform: translateX(-100%); transition: transform var(--med);
    display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 20px; border-bottom: 1px solid var(--border); flex: 0 0 auto;
}
.drawer-head strong { font-size: 16px; font-weight: 800; }
.drawer-body { padding: 22px 20px; overflow-y: auto; }
.overlay {
    position: fixed; inset: 0; background: rgba(10, 14, 30, .5);
    backdrop-filter: blur(3px); z-index: 100; opacity: 0; visibility: hidden;
    transition: var(--med);
}
.overlay.show { opacity: 1; visibility: visible; }


/* ==========================================================
   اجزای فروشگاه
   ========================================================== */
.header {
    background: var(--card);
    border-bottom-color: var(--border);
}
.header-inner { gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-size: 19px; }
.logo .ic { color: var(--primary); }
.header-tools { display: flex; align-items: center; gap: 9px; }
.account-btn {
    display: inline-flex; align-items: center; gap: 7px;
    font-family: inherit; font-size: 13.5px; font-weight: 700;
    padding: 10px 15px; border-radius: var(--r-md);
    border: 1px solid var(--border-2); background: var(--card); color: var(--text);
    cursor: pointer; text-decoration: none; white-space: nowrap; transition: var(--fast);
}
.account-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.account-btn.logged-in { background: var(--primary); color: #fff; border-color: var(--primary); }
.account-btn.logged-in:hover { background: var(--primary-2); color: #fff; }
.cart-btn {
    padding: 10px 16px; border-radius: var(--r-md); font-family: inherit;
    font-size: 13.5px; font-weight: 700; box-shadow: var(--sh-primary);
}
.cart-btn:hover { background: var(--primary-2); }
.cart-btn .ic { flex: 0 0 auto; }

.sec-head { text-align: center; margin-bottom: 24px; }
.sec-head h2 { font-size: 22px; font-weight: 800; letter-spacing: -.2px; }
.sec-head p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.sec-head h2::after {
    content: ''; display: block; width: 44px; height: 3.5px; border-radius: 4px;
    background: var(--primary); margin: 10px auto 0;
}

.hero { position: relative; overflow: hidden; padding: 76px 20px 66px; }
.hero::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(900px 380px at 15% -10%, rgba(255, 255, 255, .22), transparent 62%),
        radial-gradient(700px 320px at 88% 110%, rgba(255, 255, 255, .14), transparent 60%);
    pointer-events: none;
}
.hero-inner { position: relative; }
.hero h1 { font-size: 36px; font-weight: 900; letter-spacing: -.6px; margin-bottom: 10px; }
.hero p { font-size: 16.5px; opacity: .92; margin-bottom: 26px; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px;
    background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28);
    padding: 7px 15px; border-radius: var(--r-full); font-size: 13px; font-weight: 700;
}
.hero-actions { display: flex; gap: 11px; justify-content: center; flex-wrap: wrap; }
.hero-actions .btn-ghost { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .3); }
.hero-actions .btn-ghost:hover { background: rgba(255, 255, 255, .24); color: #fff; border-color: #fff; }
.hero-feats {
    list-style: none; display: flex; gap: 26px; justify-content: center; flex-wrap: wrap;
    margin-top: 38px; padding-top: 26px; border-top: 1px solid rgba(255, 255, 255, .2);
}
.hero-feats li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; opacity: .95; }

/* ---- کارت محصول ---- */
.grid { grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 18px; }
.card {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg);
    overflow: hidden; display: flex; flex-direction: column; position: relative;
    box-shadow: var(--sh-1); transition: transform var(--fast), box-shadow var(--fast), border-color var(--fast);
    cursor: default;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--sh-3); border-color: var(--border-2); }
.card.is-off { opacity: .72; }
.card.is-off .card-head { filter: grayscale(.85); }
.card-head {
    height: 150px; display: grid; place-items: center; position: relative;
    background: linear-gradient(140deg, var(--primary-soft), var(--bg-2));
}
.card-head img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-emoji { font-size: 54px; line-height: 1; }
.card-body { padding: 15px 16px 16px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.card-body h3 { font-size: 15.5px; font-weight: 700; line-height: 1.6; }
.price-row { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.price { font-size: 17px; font-weight: 900; color: var(--primary); }
.old-price { font-size: 12.5px; color: var(--muted); text-decoration: line-through; }
.card-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 9px;
    margin-top: auto; padding-top: 11px; border-top: 1px solid var(--border);
    position: relative; z-index: 3;
}
.stock-line {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12px; font-weight: 700; color: var(--success);
}
.stock-line .ic { color: currentColor; }
.stock-line.low { color: var(--warn); }
.stock-line.off { color: var(--muted); }
.card-foot .mini-btn { padding: 8px 12px; }
.card-foot .mini-btn[disabled] { opacity: .45; cursor: not-allowed; }
.card-foot .mini-btn[disabled]:hover { border-color: var(--border-2); color: var(--text-2); background: var(--card); }
.filters { justify-content: center; margin-bottom: 28px; }
.filter-chip { padding: 8px 17px; font-size: 13.5px; font-weight: 700; transition: var(--fast); }
.filter-chip:hover { border-color: var(--primary); color: var(--primary); }
.filter-chip.active { box-shadow: var(--sh-primary); border-color: var(--primary); }

/* ---- صفحه محصول ---- */
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.breadcrumb .ic { opacity: .6; }
.p-detail {
    display: grid; grid-template-columns: 1fr 1.2fr; gap: 30px;
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--r-xl); padding: 26px; margin-bottom: 22px; box-shadow: var(--sh-1);
}
.p-big {
    width: 100%; min-height: 340px; display: grid; place-items: center;
    background: linear-gradient(140deg, var(--primary-soft), var(--bg-2));
    border-radius: var(--r-lg); overflow: hidden;
}
.p-big img { width: 100%; max-height: 400px; object-fit: contain; }
.p-em { font-size: 110px; line-height: 1; }
.p-thumbs img { width: 58px; height: 58px; border-radius: var(--r-sm); border: 2px solid transparent; cursor: pointer; opacity: .7; }
.p-thumbs img.active { border-color: var(--primary); opacity: 1; }
.p-features-box, .p-desc-box {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--r-lg); padding: 22px 24px; margin-bottom: 20px; box-shadow: var(--sh-1);
}
.p-features-box h2, .p-desc-box h2 {
    display: flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 800; margin-bottom: 14px;
}
.p-features-box h2 .ic, .p-desc-box h2 .ic { color: var(--primary); }
.p-features-box ul { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; }
.p-features-box li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.p-features-box li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--success); flex: 0 0 6px; }
.st { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 700; margin-bottom: 18px; }
.st-ok { color: var(--success); }
.st-off { color: var(--danger); }
.p-buy { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.p-qty { display: flex; align-items: center; border: 1.5px solid var(--border-2); border-radius: var(--r-md); padding: 4px; background: var(--bg); }
.p-qty button {
    width: 36px; height: 36px; border: none; border-radius: var(--r-sm); background: var(--card);
    color: var(--text); cursor: pointer; display: grid; place-items: center; transition: var(--fast);
}
.p-qty button:hover:not(:disabled) { background: var(--primary); color: #fff; }
.p-qty button:disabled { opacity: .35; cursor: not-allowed; }
.p-qty span { min-width: 40px; text-align: center; font-weight: 800; font-size: 15px; }
.p-add { padding: 13px 30px; font-size: 15px; border-radius: var(--r-md); }
.wish-btn {
    display: inline-flex; align-items: center; gap: 7px; padding: 13px 18px;
    border: 1.5px solid var(--border-2); border-radius: var(--r-md); background: var(--card);
    font-family: inherit; font-size: 13.5px; font-weight: 700; color: var(--text-2); cursor: pointer; transition: var(--fast);
}
.wish-btn:hover { border-color: var(--danger); color: var(--danger); }
.wish-btn.on { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.more-btn {
    display: inline-flex; align-items: center; gap: 7px; background: var(--primary-soft);
    border: 1px solid var(--border); color: var(--primary);
    font-family: inherit; font-size: 13.5px; font-weight: 800; padding: 9px 22px;
    border-radius: var(--r-md); cursor: pointer; transition: var(--fast);
}
.more-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.more-btn .ic { transition: transform var(--med); }
.more-btn.open .ic { transform: rotate(180deg); }

/* ---- پیگیری ---- */
.track-box {
    display: flex; gap: 10px; max-width: 480px; margin: 0 auto 20px;
}
.track-box input {
    flex: 1; min-width: 0; padding: 13px 16px; border: 1.5px solid var(--border);
    border-radius: var(--r-md); font-size: 15px; font-family: inherit;
    background: var(--card); color: var(--text); transition: var(--fast);
}
.track-box input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.track-result { max-width: 560px; margin: 0 auto; }
.track-card {
    display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border);
    border-radius: var(--r-lg); padding: 20px 22px; box-shadow: var(--sh-1);
}
.track-card.err { flex-direction: row; align-items: center; gap: 9px; color: var(--danger); border-color: var(--danger-soft); background: var(--danger-soft); }
.track-card .t-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.track-card .t-row:last-child { border-bottom: none; }
.status-pill { display: inline-block; padding: 4px 14px; border-radius: var(--r-full); font-size: 12.5px; font-weight: 800; }
.status-pill.pending { background: var(--warn-soft); color: var(--warn); }
.status-pill.processing { background: var(--primary-soft); color: var(--primary); }
.status-pill.done { background: var(--success-soft); color: var(--success); }
.status-pill.canceled { background: var(--danger-soft); color: var(--danger); }

/* ---- فوتر ---- */
.footer { background: #10142a; color: #b9c0dd; }
.footer .logo { color: #fff; }
.footer .logo .ic { color: #8b83ff; }
.footer p { font-size: 13px; margin-top: 9px; color: #8b93b5; max-width: 320px; }
.footer-contact div { display: flex; align-items: center; gap: 9px; font-size: 13.5px; padding: 5px 0; }
.footer-contact .ic { color: #8b83ff; }
.footer-bottom { border-top: 1px solid #232a49; padding: 15px 20px; font-size: 12px; text-align: center; color: #6f7799; }

/* ---- کشو و مودال ---- */
.drawer {
    width: 410px; background: var(--card); z-index: 110; box-shadow: var(--sh-3);
    height: 100dvh; transition: transform var(--med);
}
.drawer-body { padding: 20px; overflow-y: auto; }
.drawer-foot { padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: var(--card); }
.cart-total { font-size: 15.5px; font-weight: 800; margin-bottom: 12px; text-align: center; }
.cart-total span { color: var(--primary); }
.overlay { z-index: 100; background: rgba(10, 14, 30, .55); backdrop-filter: none; }
.modal-card { background: var(--card); color: var(--text); border-radius: var(--r-xl); border: 1px solid var(--border); padding: 0; box-shadow: var(--sh-3); }
.modal-card form { padding: 20px; }
.modal-card .drawer-head { border-bottom: 1px solid var(--border); }
.modal-card input, .modal-card textarea {
    background: var(--bg); border: 1.5px solid var(--border); color: var(--text);
    border-radius: var(--r-md); font-size: 14px; font-family: inherit;
}
.modal-card input:focus, .modal-card textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row .field { margin-bottom: 0; }
.pay-label { font-size: 13.5px; font-weight: 700; display: block; margin: 4px 0 10px; }
.pay-methods { display: flex; gap: 18px; margin-bottom: 16px; }
.pay-methods label {
    display: flex; align-items: center; gap: 7px; font-size: 13.5px; cursor: pointer;
    border: 1.5px solid var(--border-2); border-radius: var(--r-md); padding: 10px 14px; flex: 1;
    transition: var(--fast);
}
.pay-methods label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); font-weight: 700; }
.pay-methods input { width: 17px; height: 17px; accent-color: var(--primary); }
.modal-error { background: var(--danger-soft); color: var(--danger); border-radius: var(--r-md); padding: 11px 14px; font-size: 13px; margin-bottom: 12px; display: none; }
.success-body { padding: 26px 22px; text-align: center; }
.success-body .ok-msg {
    display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px;
    background: var(--success-soft); color: var(--success); padding: 11px 20px; border-radius: var(--r-full);
}
.success-body .big-ref {
    font-size: 30px; font-weight: 900; color: var(--primary);
    letter-spacing: 4px; margin: 16px 0 8px;
}
.success-body .sum { font-size: 15px; color: var(--muted); }
.success-body .hint {
    font-size: 12.5px; color: var(--muted); margin-top: 16px; background: var(--bg);
    padding: 11px 14px; border-radius: var(--r-md); line-height: 1.9;
}
.empty-cart { text-align: center; color: var(--muted); padding: 46px 12px; }
.empty-cart .empty-ic { margin: 0 auto 14px; }
.empty-cart b { display: block; color: var(--text); font-size: 15px; margin-bottom: 6px; }
.empty-cart p { font-size: 13px; }
.cart-item { display: flex; align-items: flex-start; gap: 12px; padding: 13px 0; border-bottom: 1px dashed var(--border); }
.cart-thumb {
    width: 54px; height: 54px; flex: 0 0 54px; border-radius: var(--r-md); overflow: hidden;
    display: grid; place-items: center; background: var(--primary-soft); color: var(--primary);
}
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-thumb .em { font-size: 26px; line-height: 1; }
.cart-item .info { flex: 1; min-width: 0; }
.cart-item .name { font-size: 14px; font-weight: 700; line-height: 1.6; }
.cart-item .unit { font-size: 12px; color: var(--muted); }
.cart-item .price { font-size: 13.5px; font-weight: 800; white-space: nowrap; }
.qty-row { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.qty-row button {
    width: 28px; height: 28px; border-radius: var(--r-sm); border: 1px solid var(--border);
    background: var(--bg); color: var(--text); cursor: pointer; display: grid; place-items: center; transition: var(--fast);
}
.qty-row button:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.qty-row .qty { min-width: 26px; text-align: center; font-weight: 800; font-size: 13.5px; }
.remove-btn {
    display: inline-flex; align-items: center; gap: 5px; background: none; border: none;
    color: var(--danger); cursor: pointer; font-family: inherit; font-size: 12.5px; font-weight: 700;
    margin-right: auto; padding: 4px 6px; border-radius: var(--r-xs);
}
.remove-btn:hover { background: var(--danger-soft); }
.cell-em { font-size: 20px; }
.loading-box {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg);
    padding: 56px 24px; text-align: center; color: var(--muted); font-size: 14px;
}

/* ---- نوار پایین موبایل ---- */
.acc-dock {
    display: none; position: fixed; bottom: 0; right: 0; left: 0; z-index: 90;
    background: var(--card); border-top: 1px solid var(--border);
    padding: 7px 6px calc(7px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px rgba(20, 26, 51, .07);
}
.dock-link {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 7px 3px; border: none; background: none; border-radius: var(--r-md);
    font-family: inherit; font-size: 10.5px; font-weight: 700; color: var(--muted);
    cursor: pointer; transition: var(--fast);
}
.dock-link .ic { width: 21px; height: 21px; }
.dock-link i { font-style: normal; }
.dock-link.active { color: var(--primary); background: var(--primary-soft); }

/* ---- واکنش‌گرا ---- */
@media (max-width: 1000px) {
    #accApp { grid-template-columns: 1fr; }
    .acc-side { display: none; }
    .acc-dock { display: flex; }
    .acc-shell { padding: 20px 16px 96px; }
}
@media (min-width: 1001px) {
    .acc-dock { display: none; }
}
/* ---- هدر فشرده در موبایل ---- */
@media (max-width: 640px) {
    .container { padding: 0 14px; }
    .header-inner { gap: 10px; }
    .header-tools { gap: 6px; margin-inline-start: auto; }
    .logo { font-size: 16px; }
    .logo .ic { width: 17px; height: 17px; }
    .icon-btn { width: 36px; height: 36px; }
    .account-btn { padding: 9px 10px; }
    .account-btn span:last-child { display: none; }
    .cart-btn { padding: 9px 11px; }
    .cart-btn span:not(.cart-count) { display: none; }
    .cart-count { position: absolute; top: -6px; left: -6px; min-width: 20px; height: 20px; font-size: 11px; }
    .hero { padding: 52px 16px 46px; }
    .hero h1 { font-size: 26px; }
    .hero p { font-size: 15px; }
    .hero-feats { gap: 14px; margin-top: 26px; padding-top: 20px; }
    .hero-feats li { font-size: 12px; }
    .sec-head h2 { font-size: 19px; }
    .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
    .card-head { height: 118px; }
    .card-emoji { font-size: 42px; }
    .card-body { padding: 12px 13px 13px; }
    .card-body h3 { font-size: 13.5px; }
    .price { font-size: 15px; }
    .card-foot { flex-direction: column; align-items: stretch; gap: 8px; }
    .card-foot .mini-btn { justify-content: center; }
    .p-detail { padding: 16px; gap: 18px; }
    .p-big { min-height: 220px; }
    .p-em { font-size: 74px; }
    .p-features-box, .p-desc-box { padding: 18px 16px; }
    .p-features-box ul { grid-template-columns: 1fr; }
    .row { grid-template-columns: 1fr; }
    .track-box { flex-direction: column; }
    .track-box .btn { justify-content: center; }
    .modal-card form { padding: 16px; }
    .drawer { width: 100%; max-width: 100vw; }
    .footer-inner { padding: 28px 14px 18px; }
    .toast { bottom: 82px; }
}

@media (max-width: 620px) {
    .acc-gate { padding: 34px 22px 28px; border-radius: var(--r-lg); }
    .gate-title { font-size: 20px; }
    .gate-actions { flex-direction: column; }
    .gate-actions .btn { width: 100%; }
    .gate-feats { grid-template-columns: 1fr; gap: 10px; }
    .form-grid { grid-template-columns: 1fr; }
    .card { padding: 18px 16px; }
    .order-top { padding: 15px 16px; }
    .order-body { padding: 16px; }
    .track-step span { font-size: 10.5px; }
    .grid-cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
    .panel-head h2 { font-size: 18px; }
}
