/* ==========================================================================
   تم شب رادین‌پرینتر
   این فایل فقط وقتی اعمال می‌شود که <html> صفت data-theme="dark" داشته باشد
   (دکمهٔ ماه/خورشید هدر). در حالت روز هیچ اثری ندارد.
   ========================================================================== */

/* ---------- ۱) بازنگری توکن‌های رنگ در حالت شب ---------- */
html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0a1322;
    --surface: #101c31;
    --heading: #e6eefb;
    --link-d: #7fb0ff;
    --ink: #dfe9f7;
    --ink-soft: #b9c8de;
    --muted: #8fa6c4;
    --muted-2: #6980a3;
    --line: #1d2c4a;
    --line-strong: #2a3d63;
    --blue-25: #101f3a;
    --blue-50: #13254a;
    --green-50: #0e2a22;
    --red-50: #2c1420;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-sm: 0 4px 14px -6px rgba(0, 0, 0, .5);
    --shadow: 0 18px 40px -24px rgba(0, 0, 0, .6);
    --shadow-lg: 0 34px 70px -40px rgba(0, 0, 0, .7);
    --shadow-blue: 0 18px 36px -18px rgba(37, 99, 235, .45);
}

body { transition: background .35s ease, color .35s ease; }

/* ---------- ۲) تبدیل خودکار رنگ‌های هاردکد قالب ---------- */

html[data-theme="dark"] h1, html[data-theme="dark"] h2, html[data-theme="dark"] h3, html[data-theme="dark"] h4, html[data-theme="dark"] h5 {
    color: var(--heading);
}
html[data-theme="dark"] .btn.ghost {
    background: var(--surface);
    color: var(--link-d);
}
html[data-theme="dark"] .btn.soft {
    color: var(--link-d);
}
html[data-theme="dark"] .icon-btn:hover {
    color: var(--link-d);
}
html[data-theme="dark"] .input, html[data-theme="dark"] .select, html[data-theme="dark"] .textarea {
    background: #0f1d38;
}
html[data-theme="dark"] .input:focus, html[data-theme="dark"] .select:focus, html[data-theme="dark"] .textarea:focus {
    background: var(--surface);
}
html[data-theme="dark"] .badge.blue {
    color: var(--link-d);
}
html[data-theme="dark"] .badge.amber {
    background: #2f2a13;
}
html[data-theme="dark"] .badge.gray {
    background: #101f3a;
    color: #92a8c6;
}
html[data-theme="dark"] .nav-links > li > a:hover, html[data-theme="dark"] .nav-links > li > button:hover, html[data-theme="dark"] .nav-links > li.active > a {
    color: var(--link-d);
}
html[data-theme="dark"] .nav-cta {
    color: var(--link-d);
    background: linear-gradient(180deg, #101c31, #13254a);
}
html[data-theme="dark"] .mega {
    background: var(--surface);
}
html[data-theme="dark"] .mega-col h4 {
    color: var(--heading);
}
html[data-theme="dark"] .mega-list a:hover {
    color: var(--link-d);
}
html[data-theme="dark"] .mega-promo .btn {
    background: var(--surface);
    color: var(--heading);
}
html[data-theme="dark"] .drawer {
    background: var(--surface);
}
html[data-theme="dark"] .drawer-foot {
    background: #0f1d38;
}
html[data-theme="dark"] .mobile-nav a:hover, html[data-theme="dark"] .mobile-nav button:hover {
    color: var(--link-d);
}
html[data-theme="dark"] .mobile-nav .sub a:hover {
    color: var(--link-d);
}
html[data-theme="dark"] .footer-brand img {
    background: var(--surface);
}
html[data-theme="dark"] .page-head {
    background: linear-gradient(180deg, var(--surface), #0f1d38);
}
html[data-theme="dark"] .breadcrumb a:hover {
    color: var(--link-d);
}
html[data-theme="dark"] .section-link {
    color: var(--link-d);
}
html[data-theme="dark"] .card {
    background: var(--surface);
}
html[data-theme="dark"] .empty-state {
    background: var(--surface);
}
html[data-theme="dark"] .skeleton {
    background: linear-gradient(90deg, #0f1d38 25%, #0f1d38 37%, #0f1d38 63%);
}
html[data-theme="dark"] .spinner {
    border-top-color: var(--surface);
}
html[data-theme="dark"] .toast {
    background: var(--surface);
}
html[data-theme="dark"] .header-support .hs-ico {
    color: var(--link-d);
}
html[data-theme="dark"] .drawer-support {
    background: #0f1d38;
}
html[data-theme="dark"] .drawer-socials a {
    background: var(--surface);
    color: var(--link-d);
}
html[data-theme="dark"] .nd-social a {
    background: #101c31;
}
html[data-theme="dark"] .w-count {
    border: 2px solid var(--surface);
}
html[data-theme="dark"] .nav-call {
    background: #101c31;
}
html[data-theme="dark"] .nav-call .nc-txt b {
    color: var(--heading);
}
html[data-theme="dark"] .fc-actions .btn {
    background: var(--surface);
    color: var(--heading);
}
html[data-theme="dark"] .fc-actions .btn:hover {
    background: #13254a;
}
html[data-theme="dark"] .footer-brand img {
    background: var(--surface);
}
html[data-theme="dark"] .footer-links a:hover::before {
    background: var(--surface);
}
html[data-theme="dark"] .nd-col + .nd-col {
    border-inline-start: 1px solid var(--line);
}
html[data-theme="dark"] .nav-links > li > a, html[data-theme="dark"] .nav-links > li > button {
    color: var(--ink-soft);
}
html[data-theme="dark"] .nav-links > li > a:hover, html[data-theme="dark"] .nav-links > li > button:hover, html[data-theme="dark"] .nav-links > li:hover > a, html[data-theme="dark"] .nav-links > li.active > a {
    color: var(--link-d);
}
html[data-theme="dark"] .nav-call .nc-txt small {
    color: #92a8c6;
}
/* ---------- هیرو (کانسپت سرمه‌ای/طلایی) ---------- */
html[data-theme="dark"] .hero-main {
    background:
        radial-gradient(620px 360px at 82% 118%, rgba(37, 99, 235, .48), transparent 72%),
        radial-gradient(430px 260px at 8% -16%, rgba(56, 189, 248, .15), transparent 70%),
        linear-gradient(160deg, #122c54 0%, #0c2148 46%, #081831 100%);
    border-color: rgba(96, 137, 196, .3) !important;
}
html[data-theme="dark"] .slide-eyebrow {
    background: rgba(255, 212, 0, .09);
    border-color: rgba(255, 212, 0, .32);
    color: var(--gold);
}
html[data-theme="dark"] .slide h1, html[data-theme="dark"] .slide h2 { color: var(--heading); }
html[data-theme="dark"] .slide h2 em { color: var(--gold); background: none; }
html[data-theme="dark"] .slide p { color: #c3d5ee; }
html[data-theme="dark"] .slide-cta .btn.ghost {
    background: rgba(255, 255, 255, .07);
    border-color: rgba(255, 255, 255, .28);
    color: #fff;
}
html[data-theme="dark"] .slide-cta .btn.ghost:hover { background: rgba(255, 255, 255, .16); }
html[data-theme="dark"] .hero-stats .stat { border-inline-start-color: rgba(255, 255, 255, .14); }
html[data-theme="dark"] .hero-stats b { color: var(--heading); }
html[data-theme="dark"] .hero-stats span { color: #9db4d6; }
html[data-theme="dark"] .pedestal::before { background: radial-gradient(closest-side, rgba(37, 99, 235, .4), transparent 74%); }
html[data-theme="dark"] .pedestal::after { border-color: rgba(255, 212, 0, .4); }
html[data-theme="dark"] .pedestal-disc {
    background: linear-gradient(165deg, #f8fbff, #d9e5f5);
    box-shadow: 0 34px 70px -28px rgba(0, 0, 0, .78), 0 0 0 10px rgba(255, 255, 255, .05);
}
html[data-theme="dark"] .float-badge, html[data-theme="dark"] .float-chip {
    background: rgba(10, 25, 50, .74);
    border-color: rgba(126, 166, 214, .34);
    color: #eaf2ff;
    box-shadow: 0 18px 34px -18px rgba(0, 0, 0, .8);
}
html[data-theme="dark"] .float-badge small, html[data-theme="dark"] .float-chip small { color: #9db4d6; }
html[data-theme="dark"] .slider-dots button { background: rgba(255, 255, 255, .24); }
html[data-theme="dark"] .slider-dots button.active { background: linear-gradient(90deg, #ffdb26, #f2b800); }
html[data-theme="dark"] .slider-arrows button {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .24);
    color: #fff;
}
html[data-theme="dark"] .slider-arrows button:hover { background: rgba(255, 255, 255, .18); }
html[data-theme="dark"] .hero-tile {
    border-color: rgba(96, 137, 196, .3);
    background: var(--surface);
}
html[data-theme="dark"] .countdown-card {
    background:
        radial-gradient(300px 160px at 85% 10%, rgba(56, 189, 248, .28), transparent 70%),
        linear-gradient(150deg, var(--navy-800), var(--navy-950));
    color: #fff;
    border-color: rgba(96, 137, 196, .32);
}
html[data-theme="dark"] .countdown-card::before { background: rgba(37, 99, 235, .35); }
html[data-theme="dark"] .cd-title { color: #fff; }
html[data-theme="dark"] .cd-title small { color: #a9c7ea; }
html[data-theme="dark"] .cd-cell { background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .13); }
html[data-theme="dark"] .cd-cell b { color: #fff; }
html[data-theme="dark"] .cd-cell span { color: #9fbde0; }
html[data-theme="dark"] .cd-sep { color: #7ea4cd; }
html[data-theme="dark"] .cd-chip { background: rgba(255, 212, 0, .12); border-color: rgba(255, 212, 0, .3); color: var(--gold); }
html[data-theme="dark"] .cd-link { color: #cfe1f6; }
html[data-theme="dark"] .cd-link:hover { color: #fff; }
html[data-theme="dark"] .hero-tile-body span {
    background: var(--surface);
    color: var(--heading);
}
html[data-theme="dark"] .feature {
    background: var(--surface);
}
/* رفع باگ: باکس آیکون خدمات نباید نقره‌ای/روشن بماند */
html[data-theme="dark"] .feature .f-ico {
    background: #14233e;
    color: #7fb0ff;
    border-color: #2f4a7d;
}
html[data-theme="dark"] .cat-card {
    background: var(--surface);
}
/* عکس‌های محصولات پس‌زمینهٔ سفید دارند؛ باکس تصویر هم سفید می‌ماند تا عکس‌ها واضح باشند */
html[data-theme="dark"] .cat-card .c-img {
    background: #fff;
}
html[data-theme="dark"] .cat-card:hover {
    border-color: #2f4a7d;
    box-shadow: 0 20px 42px -26px rgba(2, 8, 20, .85), 0 0 0 1px rgba(59, 130, 246, .1);
}
html[data-theme="dark"] .product-card {
    background: var(--surface);
}
html[data-theme="dark"] .pc-media {
    background: #fff;
    border-color: #e3edf9;
}
html[data-theme="dark"] .product-card:hover {
    border-color: #2f4a7d;
    box-shadow: 0 20px 42px -26px rgba(2, 8, 20, .85), 0 0 0 1px rgba(59, 130, 246, .1);
}
html[data-theme="dark"] .pc-fav.active {
    background: #2c1420;
}
html[data-theme="dark"] .pc-brand .b-chip {
    background: #101f3a;
}
html[data-theme="dark"] .pc-title:hover {
    color: var(--link-d);
}
html[data-theme="dark"] .pc-price .val {
    color: var(--heading);
}
html[data-theme="dark"] .pc-price .contact {
    color: var(--link-d);
}
html[data-theme="dark"] .pc-add {
    color: var(--link-d);
}
html[data-theme="dark"] .pc-add:disabled {
    background: #101f3a;
    border-color: var(--line);
}
html[data-theme="dark"] .brands {
    background: var(--surface);
}
html[data-theme="dark"] .blog-card {
    background: var(--surface);
}
html[data-theme="dark"] .blog-date {
    color: var(--heading);
}
html[data-theme="dark"] .blog-date b {
    color: var(--link-d);
}
html[data-theme="dark"] .blog-body .cat {
    color: var(--link-d);
}
html[data-theme="dark"] .blog-card:hover .blog-title {
    color: var(--link-d);
}
html[data-theme="dark"] .cart-drawer .drawer-head {
    background: #0f1d38;
}
html[data-theme="dark"] .cart-line {
    background: var(--surface);
}
html[data-theme="dark"] .cart-line img {
    background: #fff;
}
html[data-theme="dark"] .cart-line .cl-price {
    color: var(--heading);
}
html[data-theme="dark"] .cart-drawer .drawer-foot {
    background: var(--surface);
}
html[data-theme="dark"] .cart-total-row b {
    color: var(--heading);
}
html[data-theme="dark"] .qty {
    background: var(--surface);
}
html[data-theme="dark"] .qty button {
    background: #0f1d38;
    color: var(--link-d);
}
html[data-theme="dark"] .qty button:disabled {
    background: #101c31;
}
html[data-theme="dark"] .tab.active {
    color: var(--link-d);
}
html[data-theme="dark"] .modal {
    background: var(--surface);
}
html[data-theme="dark"] .modal-foot {
    background: #0f1d38;
}
html[data-theme="dark"] .filter-card {
    background: var(--surface);
}
/* کارت مشاوره: گرادینت خودش را در حالت شب هم نگه می‌دارد */
html[data-theme="dark"] .consult-card {
    background: linear-gradient(135deg, #0c2340, #1e40af);
}
html[data-theme="dark"] .filter-head {
    background: linear-gradient(180deg, #0f1d38, #0f1d38);
}
html[data-theme="dark"] .filter-head button {
    color: var(--link-d);
}
html[data-theme="dark"] .filter-opt.checked {
    color: var(--link-d);
}
html[data-theme="dark"] .cat-tree a:hover {
    color: var(--link-d);
}
html[data-theme="dark"] .cat-tree .cnt {
    background: #14243f;
}
html[data-theme="dark"] .price-inputs input {
    background: #0f1d38;
}
html[data-theme="dark"] .range-slider input[type=range]::-webkit-slider-thumb {
    background: var(--surface);
}
html[data-theme="dark"] .shop-toolbar {
    background: var(--surface);
}
html[data-theme="dark"] .sort-select {
    background: #0f1d38;
}
/* چیپ‌های انتخاب رنگ در صفحهٔ محصول در حالت شب */
html[data-theme="dark"] .opt-chip {
    background: #0f1d38;
    border-color: var(--line-strong);
    color: var(--ink);
}
html[data-theme="dark"] .opt-chip small {
    color: var(--muted);
}
html[data-theme="dark"] .opt-chip:hover {
    border-color: var(--link-d);
}
html[data-theme="dark"] .opt-chip.active {
    background: var(--blue-50);
    border-color: var(--link-d);
    box-shadow: 0 0 0 3px rgba(127, 176, 255, .12);
}
html[data-theme="dark"] .opt-chip.active small {
    color: var(--link-d);
}
html[data-theme="dark"] .opt-chip .oc-dot {
    border-color: rgba(255, 255, 255, .25);
}
/* دکمهٔ تغییر چیدمان کارت/لیست در حالت شب */
html[data-theme="dark"] .view-toggle {
    background: #0f1d38;
    border-color: var(--line);
}
html[data-theme="dark"] .view-toggle button {
    color: var(--muted);
}
html[data-theme="dark"] .view-toggle button.active {
    background: #1c3155;
    color: var(--link-d);
}
html[data-theme="dark"] .chip {
    background: var(--surface);
}
html[data-theme="dark"] .pagination button, html[data-theme="dark"] .pagination a {
    background: var(--surface);
}
html[data-theme="dark"] .pagination button:hover {
    color: var(--link-d);
}
html[data-theme="dark"] .product-top {
    background: var(--surface);
}
html[data-theme="dark"] .gallery-main {
    background: #fff;
}
html[data-theme="dark"] .gallery-thumbs button {
    background: var(--surface);
}
html[data-theme="dark"] .pi-brand {
    color: var(--link-d);
}
html[data-theme="dark"] .product-info h1 {
    color: var(--heading);
}
html[data-theme="dark"] .pi-price-box {
    background: linear-gradient(135deg, #0f1d38, #132241);
}
html[data-theme="dark"] .pi-price .val {
    color: var(--heading);
}
html[data-theme="dark"] .product-tabs {
    background: var(--surface);
}
html[data-theme="dark"] .spec-table tr:nth-child(odd) {
    background: #0f1d38;
}
html[data-theme="dark"] .spec-table td {
    border: 1px solid var(--line);
}
html[data-theme="dark"] .desc-content h2, html[data-theme="dark"] .desc-content h3, html[data-theme="dark"] .desc-content h4 {
    color: var(--heading);
}
html[data-theme="dark"] .desc-content a {
    color: var(--link-d);
}
html[data-theme="dark"] .sticky-buy {
    background: var(--surface);
}
html[data-theme="dark"] .sticky-buy .sb-price b {
    color: var(--heading);
}
html[data-theme="dark"] .cart-panel {
    background: var(--surface);
}
html[data-theme="dark"] .cart-row .cr-img {
    background: #fff;
}
html[data-theme="dark"] .cart-row .cr-name:hover {
    color: var(--link-d);
}
html[data-theme="dark"] .cart-row .cr-price {
    color: var(--heading);
}
html[data-theme="dark"] .cart-row .cr-total {
    color: var(--heading);
}
html[data-theme="dark"] .summary-card {
    background: var(--surface);
}
html[data-theme="dark"] .summary-row.total .val {
    color: var(--heading);
}
html[data-theme="dark"] .coupon-box input {
    background: #0f1d38;
}
html[data-theme="dark"] .upsell {
    background: linear-gradient(135deg, #0f1d38, #132241);
}
html[data-theme="dark"] .upsell-head .ic {
    background: var(--surface);
    color: var(--link-d);
}
html[data-theme="dark"] .upsell-item {
    background: var(--surface);
}
html[data-theme="dark"] .upsell-item img {
    background: #fff;
}
html[data-theme="dark"] .upsell-item .u-price {
    color: var(--heading);
}
html[data-theme="dark"] .upsell-item .u-add {
    color: var(--link-d);
}
html[data-theme="dark"] .step .n {
    background: var(--surface);
}
html[data-theme="dark"] .step.active {
    color: var(--link-d);
}
html[data-theme="dark"] .checkout-card {
    background: var(--surface);
}
html[data-theme="dark"] .checkout-card h3 .n {
    color: var(--link-d);
}
html[data-theme="dark"] .pay-option {
    background: #0f1d38;
}
html[data-theme="dark"] .pay-bank-card {
    background: var(--surface);
}
html[data-theme="dark"] .pay-amount {
    background: #0f1d38;
}
html[data-theme="dark"] .pay-amount b {
    color: var(--heading);
}
html[data-theme="dark"] .result-card {
    background: var(--surface);
}
html[data-theme="dark"] .result-info {
    background: #101c31;
}
html[data-theme="dark"] .invoice-sheet {
    background: var(--surface);
}
html[data-theme="dark"] .inv-title h1 {
    color: var(--heading);
}
html[data-theme="dark"] .inv-title .code {
    color: var(--link-d);
}
html[data-theme="dark"] .inv-box h4 {
    color: var(--link-d);
}
html[data-theme="dark"] .inv-table tbody tr:nth-child(even) {
    background: #0f1d38;
}
html[data-theme="dark"] .inv-totals tr.grand td {
    color: var(--heading);
}
html[data-theme="dark"] .auth-card {
    background: var(--surface);
}
/* تب‌های ورود/ثبت‌نام: ریل تیره و تب فعال آبی مثل بقیهٔ دکمه‌ها (سفید نمی‌شود) */
html[data-theme="dark"] .auth-tabs {
    background: #0f1d38;
    box-shadow: inset 0 0 0 1px #1d2c4a;
}
html[data-theme="dark"] .auth-tabs a {
    color: #8fa6c4;
}
html[data-theme="dark"] .auth-tabs a.active {
    background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
    color: #fff;
    box-shadow: 0 8px 18px -8px rgba(37, 99, 235, .55);
}
html[data-theme="dark"] .auth-alt a {
    color: var(--link-d);
}
html[data-theme="dark"] .account-side {
    background: var(--surface);
}
html[data-theme="dark"] .account-user {
    background: linear-gradient(135deg, #0f1d38, #132241);
}
html[data-theme="dark"] .account-menu a:hover, html[data-theme="dark"] .account-menu button:hover {
    color: var(--link-d);
}
html[data-theme="dark"] .account-menu a.active {
    color: var(--link-d);
}
html[data-theme="dark"] .account-panel {
    background: var(--surface);
}
html[data-theme="dark"] .order-card-head {
    background: #101c31;
}
html[data-theme="dark"] .order-thumbs img {
    background: #fff;
}
html[data-theme="dark"] .order-total b {
    color: var(--heading);
}
html[data-theme="dark"] .status-pill.pending {
    background: #2f2a13;
}
html[data-theme="dark"] .status-pill.processing {
    color: var(--link-d);
}
html[data-theme="dark"] .status-pill.canceled {
    background: #101f3a;
    color: #92a8c6;
}
html[data-theme="dark"] .content-card {
    background: var(--surface);
}
html[data-theme="dark"] .about-stat {
    background: var(--surface);
}
html[data-theme="dark"] .about-stat b {
    color: var(--link-d);
}
html[data-theme="dark"] .drivers-hero {
    background: linear-gradient(120deg, #101c31, #13254a);
    border-color: #223457;
}
html[data-theme="dark"] .driver-brand-tabs button {
    background: var(--surface);
}
html[data-theme="dark"] .driver-card {
    background: var(--surface);
}
html[data-theme="dark"] .driver-logo {
    background: #0c1830;
    color: var(--link-d);
}
html[data-theme="dark"] .contact-item {
    background: var(--surface);
}
html[data-theme="dark"] .contact-item .ic {
    color: var(--link-d);
}
html[data-theme="dark"] .contact-form {
    background: var(--surface);
}
/* کادر درخواست تعمیرات (صفحهٔ اول و صفحهٔ تعمیرات تخصصی) در تم شب */
html[data-theme="dark"] .repair-box {
    background: var(--surface);
    border-color: var(--line);
    box-shadow: var(--shadow);
}
html[data-theme="dark"] .repair-box .rb-form .input,
html[data-theme="dark"] .repair-box .rb-form .textarea {
    background: #0f1d38;
    border-color: var(--line-strong);
    color: var(--ink);
}
html[data-theme="dark"] .repair-box .rb-form .input:focus,
html[data-theme="dark"] .repair-box .rb-form .textarea:focus {
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .25);
}
html[data-theme="dark"] .article-card {
    background: var(--surface);
}
html[data-theme="dark"] .pi-fav {
    background: var(--surface);
}
html[data-theme="dark"] .pi-fav.active {
    background: #2c1420;
}
/* دکمهٔ پنل مدیریت: هم‌سبک بقیهٔ دکمه‌ها در حالت شب */
html[data-theme="dark"] .account-menu .admin-account-link {
    background: linear-gradient(135deg, #13254a, #101c31);
    color: #7fb0ff;
    border: 1px dashed #2f4a7d;
}

@media (max-width: 900px) {
html[data-theme="dark"] .sidebar {
    background: var(--surface);
}
html[data-theme="dark"] .filter-sheet-head {
    background: var(--surface);
    border-bottom-color: var(--line-d);
}
html[data-theme="dark"] .filter-sheet-head .sheet-close {
    background: #14233e; border-color: var(--line-d); color: #cddcf2;
}
html[data-theme="dark"] .filter-sheet-head .sheet-close:hover {
    background: var(--blue-600); border-color: var(--blue-400); color: #fff;
}
}

/* ستون فیلترها در دسکتاپ دیگر اسکرول داخلی ندارد — بدون اسکرول‌بار */

@media print {
html[data-theme="dark"] body {
    background: var(--surface);
}
}

/* ---------- ۳) سطوح شیشه‌ای و منوها (بازنویسی دقیق) ---------- */
html[data-theme="dark"] .site-header {
    background: rgba(10, 19, 34, .97);
    border-color: rgba(255, 255, 255, .08);
    box-shadow: 0 22px 48px -22px rgba(0, 0, 0, .6), 0 6px 18px -10px rgba(0, 0, 0, .4);
}
html[data-theme="dark"] .site-header.scrolled { background: rgba(11, 21, 38, .98); }
html[data-theme="dark"] .main-nav {
    background: rgba(9, 17, 32, .5);
    border-top-color: rgba(255, 255, 255, .06);
}
html[data-theme="dark"] .search-form {
    background: rgba(15, 27, 48, .92);
    border-color: rgba(255, 255, 255, .08);
}
html[data-theme="dark"] .search-form:focus-within {
    background: rgba(13, 24, 44, .96);
}
html[data-theme="dark"] .wish-btn .wb-ico,
html[data-theme="dark"] .account-link .a-ico {
    background: rgba(15, 27, 48, .95);
    border-color: rgba(255, 255, 255, .1);
    color: #b9c8de;
}
/* رفع باگ: هاور دکمهٔ علاقه‌مندی‌ها سفید نمی‌شود؛ هالهٔ آبی تیره مثل دکمه‌های ورود/ثبت‌نام می‌گیرد */
html[data-theme="dark"] .wish-btn:hover,
html[data-theme="dark"] .account-link:hover,
html[data-theme="dark"] .account-wrap.open .account-link {
    background: linear-gradient(180deg, #101c31, #13254a);
    box-shadow: inset 0 0 0 1px #2f4a7d;
}
html[data-theme="dark"] .wish-btn:hover .wb-ico,
html[data-theme="dark"] .account-link:hover .a-ico,
html[data-theme="dark"] .account-wrap.open .account-link .a-ico {
    background: #14233e;
    border-color: #2f4a7d;
    color: #7fb0ff;
}
html[data-theme="dark"] .nav-socials a {
    background: rgba(15, 27, 48, .8);
    border-color: rgba(255, 255, 255, .1);
    color: #92a8c6;
}
html[data-theme="dark"] .mobile-bottom {
    background: rgba(10, 19, 34, .97);
    border-color: rgba(255, 255, 255, .08);
    box-shadow: 0 -22px 46px -20px rgba(0, 0, 0, .65);
}
html[data-theme="dark"] .mobile-bottom a { color: #7e92b0; }
html[data-theme="dark"] .mobile-bottom a.active { color: #5b8cf7; }
html[data-theme="dark"] .mobile-bottom a.active .mb-ico { background: rgba(59, 130, 246, .18); }
html[data-theme="dark"] .mobile-bottom .fab {
    background: #1a2947;
    border-color: rgba(255, 255, 255, .12);
    color: #cfe0f7;
    box-shadow: 0 14px 26px -10px rgba(0, 0, 0, .6), 0 0 0 6px rgba(10, 19, 34, .55);
}
html[data-theme="dark"] .mobile-bottom a.bn-fab:hover .fab { color: #e6eefb; }
html[data-theme="dark"] .mobile-bottom a.bn-fab:focus .fab,
html[data-theme="dark"] .mobile-bottom a.bn-fab.active .fab { background: #1d4ed8; color: #fff; }

/* منوهای کشویی و پیشنهاد جستجو */
html[data-theme="dark"] .nav-drop,
html[data-theme="dark"] .account-drop,
html[data-theme="dark"] .suggest {
    background: #0e1930;
    border-color: #223457;
    box-shadow: 0 30px 60px -28px rgba(0, 0, 0, .8);
}
html[data-theme="dark"] .nav-drop::after,
html[data-theme="dark"] .account-drop::after {
    background: #0e1930;
    border-inline-start-color: #223457;
    border-top-color: #223457;
}
html[data-theme="dark"] .nav-drop h5 {
    color: #7d94b8;
    border-bottom-color: #1c2c4c;
}
html[data-theme="dark"] .nav-drop a { color: #b9c8de; }
html[data-theme="dark"] .nav-drop a:hover { background: #14243f; color: #dce9fb; }
html[data-theme="dark"] .nav-drop a > span:not(.ndi) {
    background: #14233e;
    border-color: #223457;
    color: #8fa6c4;
}
html[data-theme="dark"] .nav-drop a:hover > span:not(.ndi) {
    background: #0e1930;
    color: #cfe0f7;
    border-color: #2f4a7d;
}
html[data-theme="dark"] .nav-drop .nd-all { border-top-color: #1c2c4c; color: #7fb0ff; }
html[data-theme="dark"] .nav-drop .nd-all:hover { color: #9cc3ff; }
html[data-theme="dark"] .ndi { background: #14233e; color: #6ea8ff; }
html[data-theme="dark"] .nav-drop .nd-social a {
    background: #14233e;
    border-color: #223457;
    color: #8fa6c4;
}
html[data-theme="dark"] .nav-drop .nd-social a:hover {
    background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
    border-color: transparent;
    color: #fff;
}
html[data-theme="dark"] .nav-drop .nd-social a:hover .icon { color: #fff; opacity: 1; }
html[data-theme="dark"] .nd-contact b { color: #e6eefb; }
html[data-theme="dark"] .account-drop .ad-link { color: #b9c8de; }
html[data-theme="dark"] .account-drop .ad-link:hover { background: #14243f; color: #dce9fb; }
html[data-theme="dark"] .account-drop .ad-link svg { color: #8fa6c4; }
html[data-theme="dark"] .account-drop .ad-head { border-bottom-color: #1c2c4c; }
html[data-theme="dark"] .account-drop .ad-admin { background: #14233e; border-color: #2f4a7d; }
html[data-theme="dark"] .account-drop .ad-link:not(.ad-admin):not(.ad-logout)::after { color: #3f5a85; }

/* ردیف منوی اصلی */
html[data-theme="dark"] .nav-links > li > a,
html[data-theme="dark"] .nav-links > li > button { color: #b9c8de; }
html[data-theme="dark"] .nav-links > li > a:hover,
html[data-theme="dark"] .nav-links > li > button:hover,
html[data-theme="dark"] .nav-links > li:hover > a,
html[data-theme="dark"] .nav-links > li.active > a {
    color: #dce9fb;
    background: rgba(59, 130, 246, .15);
}

/* انتخاب متن */
html[data-theme="dark"] ::selection { background: rgba(59, 130, 246, .4); }

/* ---------- ۱۵) دسته‌بندی‌های صفحه اول: بنتو + ستون بنر ---------- */
html[data-theme="dark"] .catb-card {
    background: var(--surface);
}
html[data-theme="dark"] .catb-card:hover {
    border-color: #2f4a7d;
    box-shadow: 0 20px 42px -26px rgba(2, 8, 20, .85), 0 0 0 1px rgba(59, 130, 246, .1);
}
/* عکس‌های دسته‌ها پس‌زمینهٔ سفید دارند؛ پس در شب هم داخل یک چیپ سفید می‌نشینند */
html[data-theme="dark"] .catb-card .media {
    background: #fff; border-radius: 12px; padding: 4px 8px;
}
html[data-theme="dark"] .catb-card .cnt em {
    background: var(--blue-50);
}
html[data-theme="dark"] .catb-featured {
    background: linear-gradient(200deg, var(--blue-50), #10233f);
    border-color: #24406e;
}
html[data-theme="dark"] .catb-featured::before {
    background: radial-gradient(circle, rgba(59, 130, 246, .16), transparent 68%);
}
html[data-theme="dark"] .catb-featured .media {
    background: #fff; border-radius: 14px; padding: 5px 10px;
}
html[data-theme="dark"] .catb-featured .cnt em {
    background: rgba(10, 19, 34, .55); border-color: #2a3d63;
}
html[data-theme="dark"] .catb-cta {
    background: linear-gradient(135deg, #1e56c8, #143a94);
}
html[data-theme="dark"] .bento-promo {
    box-shadow: 0 18px 30px -20px rgba(0, 0, 0, .6);
}


/* منوی کشویی جستجو در حالت شب */
html[data-theme="dark"] .search-cat-drop {
    background: #0e1930;
    border-color: #223457;
    box-shadow: 0 20px 40px -10px rgba(0,0,0,.6);
}
html[data-theme="dark"] .scd-item {
    color: #b9c8de;
}
html[data-theme="dark"] .scd-item:hover {
    background: #14243f;
    color: #fff;
}
html[data-theme="dark"] .scd-item.selected {
    background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
    color: #fff;
}

/* پولیش باکس پیشنهادات (Suggest) در حالت شب */
html[data-theme="dark"] .suggest {
    background: #0e1930;
    border-color: #223457;
}
html[data-theme="dark"] .suggest-item:hover {
    background: #14243f;
}
html[data-theme="dark"] .suggest-item .s-name {
    color: #dfe9f7;
}
html[data-theme="dark"] .suggest-item .s-price {
    color: #7fb0ff;
}

html[data-theme="dark"] .brand-item img {
    /* حذف اینورت تا رنگ اصلی حفظ بشه، فقط کمی روشن‌ترش میکنیم که توی پس‌زمینه تیره گم نشه */
    filter: brightness(1.15) !important;
    opacity: 0.9;
}

html[data-theme="dark"] .brand-item:hover img {
    filter: brightness(1.3) !important;
    opacity: 1;
}

/* اصلاح کامل فلش منوهای کشویی در حالت شب */
html[data-theme="dark"] .select {
    background-color: #0f1d38 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23b9c8de' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: left 14px center !important;
    background-size: 14px 14px !important;
}


/* =========================================
   اصلاح ظاهر فیلدهای دارای خطا در حالت شب
   ========================================= */
html[data-theme="dark"] .field.invalid .input,
html[data-theme="dark"] .field.invalid .select,
html[data-theme="dark"] .field.invalid .textarea {
    background: #2c1420 !important; /* ترکیب رنگ سرمه‌ای با قرمزِ تیره */
    border-color: #e11d48 !important; /* حاشیه قرمز */
    color: #dfe9f7 !important; /* متن روشن برای خوانایی */
}

/* درخشش ملایم قرمز موقع کلیک روی کادر خطادار */
html[data-theme="dark"] .field.invalid .input:focus,
html[data-theme="dark"] .field.invalid .select:focus,
html[data-theme="dark"] .field.invalid .textarea:focus {
    box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.2) !important;
}

/* استایل کادر قفل شده در حالت شب */
html[data-theme="dark"] .input[readonly], 
html[data-theme="dark"] .input:read-only {
    background: #0f1d38 !important; /* پس‌زمینه سرمه‌ای تیره */
    color: #8fa6c4 !important; /* متن خاکستری روشن */
    border-color: #1d2c4a !important; /* حاشیه هماهنگ با تم */
}
/* ---------- ست کارتریج تونر در حالت شب ---------- */
html[data-theme="dark"] .p-colors .oc-dot {
    border-color: rgba(255, 255, 255, .28);
}
html[data-theme="dark"] .pc-specs {
    background: #0f1d38;
    border-color: var(--line);
}
html[data-theme="dark"] .pc-specs li span { color: var(--muted); }
html[data-theme="dark"] .pc-specs li b { color: var(--ink); }
html[data-theme="dark"] .pi-colors-label { color: var(--muted); }

/* ==========================================================================
   بروزرسانی نسخه ۳ — منوی تعمیرات، ملزومات جانبی، ضمانت یکساله
   ========================================================================== */
html[data-theme="dark"] .nav-drop .nd-sep { background: rgba(255, 255, 255, .1); }
html[data-theme="dark"] .nav-drop .nd-empty { color: var(--muted, #8ba0bb); }
html[data-theme="dark"] .pc-badge.hot { background: #d97706; color: #fff; }

html[data-theme="dark"] .acc-box {
    background: var(--card, #10233f);
    border-color: rgba(255, 255, 255, .09);
    box-shadow: none;
}
html[data-theme="dark"] .acc-box .acc-head {
    background: linear-gradient(135deg, rgba(29, 78, 216, .14), rgba(15, 44, 82, .35));
    border-bottom-color: rgba(255, 255, 255, .09);
}
html[data-theme="dark"] .acc-box .acc-title b { color: #e8f0fb; }
html[data-theme="dark"] .acc-box .acc-title small,
html[data-theme="dark"] .acc-box .acc-note { color: var(--muted, #8ba0bb); }
html[data-theme="dark"] .acc-box .acc-item {
    background: rgba(255, 255, 255, .04);
    border-color: rgba(255, 255, 255, .1);
}
html[data-theme="dark"] .acc-box .acc-item.checked {
    background: rgba(29, 78, 216, .16);
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}
html[data-theme="dark"] .acc-box .acc-media { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); }
html[data-theme="dark"] .acc-box .acc-name { color: #e8f0fb; }
html[data-theme="dark"] .acc-box .acc-name small { color: var(--muted, #8ba0bb); }
html[data-theme="dark"] .acc-box .acc-price { color: #fbbf24; }
html[data-theme="dark"] .acc-box .acc-price small { color: var(--muted, #8ba0bb); }
html[data-theme="dark"] .acc-box .acc-qty { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .14); }
html[data-theme="dark"] .acc-box .acc-qty button { background: rgba(255, 255, 255, .09); color: #e8f0fb; }
html[data-theme="dark"] .acc-box .acc-qty button:hover:not(:disabled) { background: #1d4ed8; color: #fff; }
html[data-theme="dark"] .acc-box .acc-qty.w-pct { background: transparent; color: #93c5fd; }
html[data-theme="dark"] .acc-box .acc-warranty {
    background: linear-gradient(135deg, rgba(245, 158, 11, .12), rgba(245, 158, 11, .05));
    border-color: rgba(245, 158, 11, .4);
}
html[data-theme="dark"] .acc-box .acc-warranty .acc-media { background: rgba(255, 255, 255, .06); border-color: rgba(245, 158, 11, .4); }
html[data-theme="dark"] .acc-box .acc-warranty .acc-media.w-ic { color: #fbbf24; }
html[data-theme="dark"] .acc-box .acc-group-title { color: #e8f0fb; border-bottom-color: rgba(255, 255, 255, .12); }
html[data-theme="dark"] .acc-box .acc-group-title svg { color: #60a5fa; }

html[data-theme="dark"] .cart-row.warranty-line,
html[data-theme="dark"] .cart-line.warranty-line {
    background: linear-gradient(135deg, rgba(245, 158, 11, .1), rgba(245, 158, 11, .04));
    border-color: rgba(245, 158, 11, .35);
}
html[data-theme="dark"] .w-chip {
    background: rgba(245, 158, 11, .14);
    border-color: rgba(245, 158, 11, .4);
    color: #fbbf24;
}
