/* ========================================================
   Design tokens — shared language with the admin panel
   تم: کارگاه/تعمیرگاه حرفه‌ای — خاکستری آسفالتی + کهربایی مسی
   ======================================================== */
   :root{
    --bg:#14171B;
    --surface:#1E2227;
    --surface-alt:#252A30;
    --ink:#ECEEF0;
    --ink-muted:#8D96A0;
    --line:#2C3238;
    --accent:#E8871E;
    --accent-hover:#D3760F;
    --accent-soft:#2C2114;
    --accent-2:#2FA6A6;
    --gold:#D8B24A;
    --gold-soft:#2B2417;
    --danger:#D6483F;
    --danger-soft:#2E1918;
    --success:#4CAF71;
    --success-soft:#16241B;
    --radius:12px;
    --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    background-color: var(--bg);
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 42px 42px;
    background-attachment: fixed;
    background-position: center top;
    color: var(--ink);
    direction: rtl;
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select { font-family: inherit; }

::selection { background: var(--accent); color: #14171B; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---------- نوار بالا ---------- */
.topbar {
    background: #0F1215;
    color: var(--ink-muted);
    text-align: center;
    font-size: 12.5px;
    padding: 7px 12px;
    border-bottom: 1px solid var(--line);
    letter-spacing: 0.2px;
}

/* ---------- دکمه همبرگر ---------- */
.menu-toggle {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 60;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: background .2s ease, transform .15s ease, border-color .2s ease;
}
.menu-toggle:hover { background: var(--surface-alt); border-color: #3A4048; }
.menu-toggle:active { transform: scale(0.9); }
.menu-toggle span {
    width: 18px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform .3s cubic-bezier(.5,-0.2,.3,1.3), opacity .2s ease, width .2s ease;
}
.menu-toggle.active { border-color: var(--accent); }
.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; width: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- منوی کشویی: باز شدن دایره‌ای از دکمه همبرگر ---------- */
.side-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    background: var(--surface);
    border-left: 1px solid var(--line);
    box-shadow: -16px 0 40px rgba(0,0,0,0.45);
    z-index: 70;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    clip-path: circle(0% at calc(100% - 37px) 37px);
    transition: clip-path .55s cubic-bezier(.65,0,.35,1);
    pointer-events: none;
}
.side-menu.open {
    clip-path: circle(150% at calc(100% - 37px) 37px);
    pointer-events: auto;
}

.menu-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    border-bottom: 1px solid var(--line);
    position: relative;
    z-index: 2;
    background: var(--surface);
    opacity: 0;
    transform: scale(.85);
    transition: opacity .3s ease, transform .3s ease;
}
.side-menu.open .menu-header {
    opacity: 1;
    transform: scale(1);
    transition-delay: .18s;
}
.menu-title {
    font-weight: 700;
    font-size: 15px;
    flex: 1;
    display: inline-block;
    animation: titleFade .25s ease both;
}
@keyframes titleFade {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
.menu-back, .menu-close-btn {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    color: var(--ink-muted);
    transition: background .15s ease, color .15s ease, transform .15s ease;
}
.menu-back:hover { background: var(--surface-alt); color: var(--accent); transform: translateX(3px); }
.menu-close-btn:hover { background: var(--danger-soft); color: var(--danger); transform: rotate(90deg); }
.menu-back:active, .menu-close-btn:active { transform: scale(0.85); }

.menu-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 6px 0;
    position: relative;
    opacity: 0;
    transition: opacity .3s ease;
}
.side-menu.open .menu-body {
    opacity: 1;
    transition-delay: .24s;
}

.menu-screen { display: none; }
.menu-screen.active {
    display: block;
    animation: screenInFwd .3s cubic-bezier(.19,1,.22,1) both;
}
.menu-screen.active.nav-back {
    animation-name: screenInBack;
}
@keyframes screenInFwd {
    from { opacity: 0; transform: translateX(-24px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes screenInBack {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: translateX(0); }
}

.menu-row {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    font-size: 14px;
    color: var(--ink);
    transition: background .15s ease, padding-right .18s ease;
    border-right: 2px solid transparent;
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: rowIn .32s ease both;
}
.menu-screen.active .menu-row:nth-child(1) { animation-delay: .04s; }
.menu-screen.active .menu-row:nth-child(2) { animation-delay: .08s; }
.menu-screen.active .menu-row:nth-child(3) { animation-delay: .12s; }
.menu-screen.active .menu-row:nth-child(4) { animation-delay: .16s; }
.menu-screen.active .menu-row:nth-child(5) { animation-delay: .20s; }
.menu-screen.active .menu-row:nth-child(6) { animation-delay: .24s; }
.menu-screen.active .menu-row:nth-child(n+7) { animation-delay: .27s; }
@keyframes rowIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
.menu-row:hover { background: var(--surface-alt); border-right-color: var(--accent); padding-right: 22px; }
.menu-row:active { background: var(--accent-soft); }
.menu-row-icon { color: var(--accent); flex-shrink: 0; display: flex; transition: transform .2s ease; }
.menu-row:hover .menu-row-icon { transform: scale(1.15); }
.menu-row-label { flex: 1; text-align: right; }
.menu-row-arrow { color: var(--ink-muted); flex-shrink: 0; transition: transform .2s ease; }
.menu-row:hover .menu-row-arrow { transform: translateX(-3px); color: var(--accent); }
.menu-row-muted { color: var(--ink-muted); }
.menu-row-muted .menu-row-icon { color: var(--ink-muted); }
.menu-divider { height: 1px; background: var(--line); margin: 8px 0; }
.menu-empty { padding: 20px 18px; color: var(--ink-muted); font-size: 13px; }

/* ---------- گرید برندها (صفحه‌ی کمپانی‌ها) ---------- */
.menu-brand-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 16px;
}
.menu-brand-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 6px;
    background: var(--surface-alt);
    border: 1px solid var(--line);
    border-radius: 14px;
    opacity: 0;
    transform: translate(-24px, 18px) scale(.85);
    animation: brandIn .55s cubic-bezier(.34,1.56,.64,1) both;
    animation-delay: calc(var(--i, 0) * 60ms);
    transition: border-color .2s ease, background .2s ease, transform .18s ease, box-shadow .2s ease;
}
@keyframes brandIn {
    to { opacity: 1; transform: translate(0,0) scale(1); }
}
.menu-brand-card:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(0,0,0,0.35);
}
.menu-brand-card:active { transform: scale(.93); }
.menu-brand-visual {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.35);
    transition: transform .2s ease;
}
.menu-brand-logo {
    object-fit: contain;
    background: #fff;
    padding: 5px;
    box-sizing: border-box;
}
.menu-brand-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    background: hsl(var(--brand-hue, 30), 62%, 40%);
}
.menu-brand-card:hover .menu-brand-visual { transform: scale(1.08) rotate(-4deg); }
.menu-brand-name {
    font-size: 12px;
    text-align: center;
    color: var(--ink);
    line-height: 1.3;
}


.menu-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(232,135,30,0.25);
    transform: scale(0);
    animation: rippleOut .55s ease-out;
    pointer-events: none;
}
@keyframes rippleOut {
    to { transform: scale(1); opacity: 0; }
}

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6,7,9,0.6);
    backdrop-filter: blur(0px);
    z-index: 65;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease, backdrop-filter .3s ease;
}
.side-menu.open ~ .menu-overlay {
    opacity: 1;
    pointer-events: auto;
    backdrop-filter: blur(3px);
}


/* ---------- هیرو ---------- */
.hero {
    position: relative;
    text-align: center;
    padding: 76px 20px 56px;
    background:
        radial-gradient(ellipse 70% 60% at 50% 0%, rgba(232,135,30,0.16), transparent 65%),
        linear-gradient(180deg, #191D22 0%, #14171B 100%);
    overflow: hidden;
}
.hero::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 8px;
    background: repeating-linear-gradient(
        -45deg,
        var(--accent), var(--accent) 16px,
        #14171B 16px, #14171B 32px
    );
}
.hero h1 {
    font-size: clamp(28px, 5vw, 42px);
    font-weight: 800;
    letter-spacing: -0.5px;
    animation: heroUp .55s cubic-bezier(.2,.7,.2,1) both;
}
.hero p {
    margin-top: 10px;
    color: var(--ink-muted);
    font-size: 16px;
    animation: heroUp .55s cubic-bezier(.2,.7,.2,1) .1s both;
}
@keyframes heroUp {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}
.badges {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 24px;
}
.badges span {
    border: 1px solid #3A4048;
    color: var(--ink-muted);
    background: rgba(255,255,255,0.02);
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 13px;
    opacity: 0;
    animation: badgePop .4s ease both;
}
.badges span:nth-child(1) { animation-delay: .22s; }
.badges span:nth-child(2) { animation-delay: .30s; }
.badges span:nth-child(3) { animation-delay: .38s; }
@keyframes badgePop {
    from { opacity: 0; transform: translateY(8px) scale(.94); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- جستجو ---------- */
.search-bar {
    max-width: 1200px;
    margin: -22px auto 0;
    padding: 0 20px;
    position: relative;
    z-index: 5;
}
.search-form {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    box-shadow: 0 12px 28px rgba(0,0,0,0.35);
}
.search-form input[type="text"] {
    flex: 2 1 220px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 11px 14px;
    color: var(--ink);
    font-size: 14px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.search-form select {
    flex: 1 1 150px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 11px 12px;
    color: var(--ink);
    font-size: 14px;
}
.search-form input:focus, .search-form select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.search-form button {
    background: var(--accent);
    color: #17130A;
    font-weight: 700;
    padding: 11px 26px;
    border-radius: 9px;
    font-size: 14px;
    transition: background .15s ease, transform .1s ease;
}
.search-form button:hover { background: var(--accent-hover); }
.search-form button:active { transform: scale(0.97); }
.clear-filter {
    color: var(--accent-2);
    font-size: 13px;
    padding: 8px 6px;
    white-space: nowrap;
}
.clear-filter:hover { text-decoration: underline; }

/* ---------- عنوان بخش ---------- */
.section-title {
    max-width: 1200px;
    margin: 44px auto 18px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.section-title h2 { font-size: 20px; font-weight: 700; white-space: nowrap; }
.section-title .line { flex: 1; height: 1px; background: var(--line); }

/* ---------- گرید محصولات ---------- */
.product-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 16px;
}

.product-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(16px);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.product-card.in-view {
    animation: cardIn .5s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes cardIn {
    to { opacity: 1; transform: translateY(0); }
}
.product-card:hover {
    transform: translateY(-4px);
    border-color: #3A4048;
    box-shadow: 0 14px 30px rgba(0,0,0,0.4);
}

.img-wrap {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--surface-alt);
    overflow: hidden;
}
.img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.product-card:hover .img-wrap img { transform: scale(1.06); }

.tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent-2);
    color: #0C1B1B;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    z-index: 2;
}
.discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--danger);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(214,72,63,0.4);
    z-index: 2;
}

.product-info {
    padding: 13px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    flex: 1;
}
.product-info h3 {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--ink-muted);
}
.product-rating .stars { display: inline-flex; gap: 1px; color: var(--gold); }
.product-rating .stars svg { display: block; }

.stock-bar-wrap { margin-top: 2px; }
.stock-bar-track {
    height: 5px;
    background: var(--line);
    border-radius: 4px;
    overflow: hidden;
}
.stock-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--danger));
    border-radius: 4px;
    transition: width .5s ease;
}
.stock-bar-label { font-size: 11px; color: var(--ink-muted); margin-top: 3px; }
.stock-bar-label.low { color: var(--danger); font-weight: 600; }

.product-bottom {
    margin-top: auto;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    padding-top: 6px;
}
.price-row { display: flex; flex-direction: column; gap: 2px; }
.price-old {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--ink-muted);
    text-decoration: line-through;
}
.product-price {
    font-family: var(--mono);
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
}
.product-price::after {
    content: " تومان";
    font-family: 'Vazirmatn', sans-serif;
    font-size: 11px;
    font-weight: 400;
    color: var(--ink-muted);
}
.product-price.out-of-stock {
    font-family: 'Vazirmatn', sans-serif;
    color: var(--ink-muted);
    font-weight: 600;
    font-size: 13px;
}

.add-btn {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 9px;
    background: var(--accent);
    color: #17130A;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background .15s ease, transform .15s ease;
}
.add-btn:hover { background: var(--accent-hover); }
.add-btn.clicked { animation: btnPop .35s ease; }
@keyframes btnPop {
    0% { transform: scale(1); }
    40% { transform: scale(0.8) rotate(-8deg); background: var(--success); }
    100% { transform: scale(1); }
}

/* ---------- بنر فیلتر فعال ---------- */
.active-filter-banner {
    background: var(--accent-soft) !important;
    color: var(--accent) !important;
}

/* ---------- صفحه‌بندی ---------- */
.pagination {
    max-width: 1200px;
    margin: 0 auto 50px;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}
.pagination a, .pagination .current-page, .pagination .dots {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 13px;
    font-family: var(--mono);
}
.pagination a {
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink-muted);
    transition: border-color .15s ease, color .15s ease;
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .current-page {
    background: var(--accent);
    color: #17130A;
    font-weight: 700;
}
.pagination .dots { color: var(--ink-muted); }

/* ---------- فوتر ---------- */
footer {
    text-align: center;
    padding: 24px 20px;
    color: var(--ink-muted);
    font-size: 12.5px;
    border-top: 1px solid var(--line);
}

/* ---------- نوتیفیکیشن (toast) ---------- */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink);
    padding: 12px 22px;
    border-radius: 10px;
    font-size: 13.5px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
    z-index: 100;
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ---------- ریسپانسیو ---------- */
@media (max-width: 640px) {
    .hero { padding: 66px 16px 46px; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
    .section-title h2 { font-size: 17px; }
}

/* ========================================================
   کلاس‌های صفحات دیگر (سبد خرید، جزئیات محصول، سفارش‌ها،
   ادمین، دراپ‌داون سفارشی) — با همون تم جدید هماهنگ شدن
   ======================================================== */

.admin-link {
    position: fixed;
    top: 16px;
    left: 16px;
    background: #0F1215;
    border: 1px solid var(--line);
    color: var(--ink-muted);
    font-size: 12px;
    padding: 8px 16px;
    border-radius: 20px;
    z-index: 100;
    transition: color .15s ease, border-color .15s ease;
}
.admin-link:hover{ color: var(--ink); border-color: var(--accent); }

.cart-link {
    position: fixed;
    top: 16px;
    right: 66px;
    background: var(--accent);
    color: #17130A;
    font-weight: 700;
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 20px;
    z-index: 100;
    box-shadow: 0 3px 10px rgba(232,135,30,0.3);
    transition: background .15s ease;
}
.cart-link:hover{ background: var(--accent-hover); }

.cart-page {
    max-width: 800px;
    margin: 40px auto;
    background: var(--surface);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    border: 1px solid var(--line);
    animation: cardIn .4s ease both;
}
.cart-page h1 { margin: 16px 0 24px; font-size: 22px; color: var(--ink); }

.back-link { font-size: 13px; color: var(--accent); font-weight: 600; }
.back-link:hover{ color: var(--accent-hover); }

.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td {
    text-align: right;
    padding: 12px 8px;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
    vertical-align: middle;
    color: var(--ink);
}
.cart-product { display: flex; align-items: center; gap: 10px; }
.cart-product img {
    width: 44px; height: 44px;
    object-fit: cover; border-radius: 8px;
    border: 1px solid var(--line);
}

.qty-form { display: flex; gap: 6px; }
.qty-form input {
    width: 55px; padding: 5px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    font-family: var(--mono);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.qty-form input:focus{ outline:none; border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }
.qty-form button {
    font-size: 11px;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 6px;
    padding: 0 10px;
    transition: background .15s ease;
}
.qty-form button:hover{ background:#3A2B16; }

.cart-total {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 24px; font-size: 16px; color: var(--ink);
    font-family: var(--mono); font-weight: 700;
}

.checkout-btn {
    display: block; text-align: center; margin-top: 20px;
    padding: 14px; background: var(--accent); color: #17130A;
    font-weight: 700; border-radius: 10px;
    transition: background .15s ease, transform .1s ease;
}
.checkout-btn:hover{ background: var(--accent-hover); }
.checkout-btn:active{ transform: scale(.98); }

.empty-cart { text-align: center; color: var(--ink-muted); padding: 40px 0; }
.mock-badge {
    background: var(--gold-soft); color: var(--gold);
    padding: 10px 14px; border-radius: 8px;
    font-size: 12px; margin-bottom: 20px;
}

.success-page { text-align: center; padding: 60px 30px; animation: cardIn .45s ease both; }
.success-icon { font-size: 50px; margin-bottom: 16px; animation: popIn .5s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes popIn{ from{ opacity:0; transform: scale(.5); } to{ opacity:1; transform: scale(1); } }
.success-page h1 { font-size: 20px; margin-bottom: 10px; color: var(--ink); }
.success-page p { color: var(--ink-muted); margin-bottom: 24px; font-size: 14px; }
.success-page .checkout-btn { display: inline-block; width: auto; padding: 12px 30px; }

/* ---------- سفارش‌ها ---------- */
.order-card {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
    background: var(--surface);
    transition: box-shadow .15s ease;
}
.order-card:hover{ box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
.order-head {
    display: flex; justify-content: space-between;
    font-size: 13px; color: var(--accent); font-weight: 700;
    margin-bottom: 10px; font-family: var(--mono);
}
.order-card p { font-size: 13px; margin-bottom: 6px; color: var(--ink-muted); }
.order-total { text-align: left; font-weight: 700; margin-top: 10px; color: var(--ink); font-family: var(--mono); }

.order-tracker { display: flex; justify-content: space-between; margin: 20px 0 16px; position: relative; }
.order-tracker::before {
    content: ""; position: absolute; top: 14px; right: 8%; left: 8%;
    height: 3px; background: var(--line); z-index: 0;
}
.tracker-step { flex: 1; text-align: center; position: relative; z-index: 1; }
.tracker-step .dot {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--line); color: var(--ink-muted);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 8px; font-size: 13px; font-weight: 700;
    transition: background .25s ease, color .25s ease, transform .25s ease;
}
.tracker-step.done .dot { background: var(--accent); color: #17130A; transform: scale(1.05); }
.tracker-step .label { font-size: 11px; color: var(--ink-muted); }

.status-form { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.status-form select {
    padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px;
    background: var(--surface); color: var(--ink);
}
.status-form button {
    padding: 8px 16px; border-radius: 8px;
    background: var(--accent); color: #17130A;
    transition: background .15s ease;
}
.status-form button:hover{ background: var(--accent-hover); }

/* ---------- دراپ‌داون سفارشی ---------- */
.custom-select { position: relative; width: 220px; font-family: inherit; }
.custom-select-selected {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 8px; padding: 10px 14px; cursor: pointer;
    user-select: none; color: var(--ink);
    transition: border-color .15s ease;
}
.custom-select.open .custom-select-selected{ border-color: var(--accent); }
.custom-select-options {
    display: none; position: absolute; top: 105%; right: 0; left: 0;
    background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.45);
    z-index: 10; max-height: 200px; overflow-y: auto;
    animation: dropIn .18s ease both;
}
@keyframes dropIn{ from{ opacity:0; transform: translateY(-4px); } to{ opacity:1; transform: translateY(0); } }
.custom-select.open .custom-select-options { display: block; }
.custom-select-option { padding: 10px 14px; cursor: pointer; color: var(--ink); transition: background .12s ease; }
.custom-select-option:hover { background: var(--accent-soft); }

/* ---------- صفحه جزئیات محصول ---------- */
.product-detail-page { max-width: 1000px; margin: 30px auto; padding: 0 20px; animation: cardIn .4s ease both; }
.detail-wrap {
    display: flex; gap: 40px;
    background: var(--surface); border-radius: var(--radius); padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    border: 1px solid var(--line); flex-wrap: wrap;
}
.detail-img { flex: 1; min-width: 280px; }
.detail-img img { width: 100%; border-radius: 12px; object-fit: cover; border: 1px solid var(--line); }
.detail-info { flex: 1.2; min-width: 280px; color: var(--ink); }
.detail-info h1 { margin: 0 0 10px; }
.part-type, .compatible-cars, .tech-code { color: var(--ink-muted); margin: 4px 0; }
.tech-code{ font-family: var(--mono); font-size: 13px; }

.brand-selector { margin: 18px 0; }
.brand-options { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.brand-btn {
    padding: 8px 16px; border: 1px solid var(--line); border-radius: 20px;
    background: var(--surface); color: var(--ink);
    transition: all .15s ease; font-family: inherit;
}
.brand-btn:hover{ border-color: var(--accent); color: var(--accent); }
.brand-btn.active { background: var(--accent); color: #17130A; border-color: transparent; }

.detail-price { font-family: var(--mono); font-size: 26px; font-weight: 700; margin: 14px 0 4px; color: var(--ink); }
.stock-status { margin-bottom: 16px; font-weight: 600; color: var(--success); }
.add-btn-detail {
    padding: 12px 30px; border-radius: 10px;
    background: var(--accent); color: #17130A; font-size: 15px;
    transition: background .15s ease, transform .1s ease;
}
.add-btn-detail:hover{ background: var(--accent-hover); }
.add-btn-detail:active{ transform: scale(.97); }
.add-btn-detail:disabled { background: var(--line); color: var(--ink-muted); cursor: not-allowed; }
.detail-description { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--ink-muted); }