/* ========================================
   نیاکان - دیزاین کامل و مدرن
   ======================================== */
@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #0f172a;
    --gray: #64748b;
    --light: #f8fafc;
    --white: #ffffff;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --radius: 16px;
}

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

body {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    direction: rtl;
    background: var(--light);
    color: var(--dark);
    line-height: 1.7;
}

a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; }

/* ============ HEADER ============ */
.site-header {
    background: white;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    font-size: 28px;
    font-weight: 900;
    color: var(--primary);
    text-decoration: none;
    flex-shrink: 0;
}

.main-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.main-nav a {
    color: var(--gray);
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
}

.cart-btn {
    position: relative;
    background: var(--primary);
    color: white;
    padding: 10px 18px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-count {
    background: white;
    color: var(--primary);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 24px;
}

.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success { background: #d1fae5; color: #065f46; border-right: 4px solid var(--secondary); }
.alert-danger, .alert-error { background: #fee2e2; color: #991b1b; border-right: 4px solid var(--danger); }
.alert-warning { background: #fef3c7; color: #92400e; border-right: 4px solid var(--warning); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    font-size: 14px;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn-success { background: var(--secondary); color: white; }
.btn-success:hover { background: #059669; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-secondary { background: #e2e8f0; color: #475569; }
.btn-warning { background: var(--warning); color: white; }

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.3s;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 8px; color: var(--dark); }

.card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 24px;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    font-size: 18px;
    background: #f8fafc;
}

.card-body { padding: 24px; }

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.product-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.product-image {
    height: 220px;
    background: #f1f5f9;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image img { transform: scale(1.05); }

.badge-discount {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--danger);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.badge-stock {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--warning);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.product-info { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.product-name { font-size: 15px; font-weight: 700; margin-bottom: 8px; min-height: 45px; line-height: 1.5; }
.product-name a { color: var(--dark); text-decoration: none; }
.product-name a:hover { color: var(--primary); }
.product-brand { color: var(--gray); font-size: 13px; margin-bottom: 12px; }
.product-price { margin-bottom: 16px; margin-top: auto; }
.old-price { color: var(--gray); text-decoration: line-through; font-size: 13px; margin-left: 8px; }
.current-price { color: var(--primary); font-weight: 800; font-size: 18px; }

.btn-add-cart {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s;
    font-size: 14px;
}

.btn-add-cart:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn-add-cart:disabled { background: var(--gray); cursor: not-allowed; transform: none; }
.btn-add-cart.adding { animation: buttonPress 0.3s ease; }

@keyframes buttonPress {
    0% { transform: scale(1); }
    50% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

.filter-sidebar {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 24px;
}

.filter-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

.filter-option {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 4px;
}

.filter-option:hover { background: rgba(99, 102, 241, 0.08); }
.filter-option input { margin-left: 8px; }

.site-footer {
    background: var(--dark);
    color: white;
    padding: 50px 24px 20px;
    margin-top: 60px;
}

.footer-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding-bottom: 40px;
}

.footer-grid h4 { color: var(--primary); margin-bottom: 16px; font-size: 18px; }
.footer-grid p { line-height: 1.8; color: #cbd5e1; margin-bottom: 8px; }
.footer-grid a { display: block; color: #cbd5e1; text-decoration: none; margin-bottom: 8px; transition: color 0.3s; }
.footer-grid a:hover { color: white; padding-right: 5px; }
.footer-bottom { text-align: center; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.1); color: #94a3b8; font-size: 14px; }

/* ============ AUTH (ورود و ثبت‌نام) ============ */
.auth-container {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8eaf6 100%);
}

.auth-box {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 440px;
    border: 1px solid var(--border);
}

.auth-box-wide { max-width: 640px; }

.auth-header { text-align: center; margin-bottom: 32px; }

.auth-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 36px;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.auth-header h2 { font-size: 26px; font-weight: 800; color: var(--dark); margin-bottom: 8px; }
.auth-header p { color: var(--gray); font-size: 14px; margin: 0; }

.auth-form .form-group { margin-bottom: 20px; }

.auth-form label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--dark);
}

.auth-form label i { color: var(--primary); font-size: 14px; }

.form-hint { display: block; margin-top: 6px; font-size: 12px; color: var(--gray); }

.password-wrapper { position: relative; }
.password-wrapper .form-control { padding-left: 45px; }

.toggle-password {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    padding: 6px;
    font-size: 16px;
    transition: color 0.3s;
}

.toggle-password:hover { color: var(--primary); }

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 14px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
    color: var(--dark);
}

.checkbox-label input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.forgot-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.forgot-link:hover { opacity: 0.8; }

.auth-submit {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    border-radius: 12px;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0;
    color: var(--gray);
    font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border);
}

.auth-divider::before { margin-left: 12px; }
.auth-divider::after { margin-right: 12px; }

.auth-switch { text-align: center; color: var(--gray); margin: 0; font-size: 14px; }
.auth-switch a { color: var(--primary); font-weight: 600; text-decoration: none; margin-right: 4px; }
.auth-switch a:hover { text-decoration: underline; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ============ نوار ابزار محصولات ============ */
.products-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    padding: 20px 24px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    gap: 20px;
    flex-wrap: wrap;
}

.toolbar-right, .toolbar-left { display: flex; align-items: center; gap: 16px; }

.results-badge {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(16, 185, 129, 0.08));
    padding: 12px 20px;
    border-radius: 14px;
    border: 2px solid rgba(99, 102, 241, 0.15);
}

.results-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.results-info { display: flex; flex-direction: column; line-height: 1.3; }
.results-count { font-size: 22px; font-weight: 800; color: var(--primary); line-height: 1; }
.results-label { font-size: 12px; color: var(--gray); font-weight: 500; margin-top: 4px; }

.sort-wrapper { display: flex; align-items: center; gap: 14px; }
.sort-label-modern { display: flex; align-items: center; gap: 8px; color: var(--gray); font-weight: 600; font-size: 14px; white-space: nowrap; }
.sort-label-modern i { color: var(--primary); font-size: 16px; }

.sort-options {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--light);
    padding: 6px;
    border-radius: 14px;
    border: 1px solid var(--border);
}

.sort-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: var(--gray);
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}

.sort-option i { font-size: 14px; transition: transform 0.3s; }
.sort-option:hover { background: rgba(99, 102, 241, 0.08); color: var(--primary); transform: translateY(-2px); }
.sort-option.active { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4); }

.view-toggle { display: flex; align-items: center; background: var(--light); border-radius: 10px; padding: 4px; border: 1px solid var(--border); }
.view-btn { width: 38px; height: 38px; border: none; background: transparent; border-radius: 8px; color: var(--gray); cursor: pointer; transition: all 0.3s; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.view-btn:hover { color: var(--primary); }
.view-btn.active { background: var(--primary); color: white; box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3); }

/* ============ انیمیشن پرواز ============ */
.flying-item {
    position: fixed;
    z-index: 99999;
    pointer-events: none;
    width: 100px;
    height: 100px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.5), 0 10px 20px rgba(0, 0, 0, 0.3);
    border: 3px solid white;
    background: white;
}

.flying-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

.fly-particle {
    position: fixed;
    pointer-events: none;
    border-radius: 50%;
    z-index: 99998;
    animation: particleFade 0.6s ease-out forwards;
}

@keyframes particleFade {
    0% { opacity: 1; transform: translate(-50%, -50%) translate(0, 0) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) translate(var(--dx), var(--dy)) scale(0.2); }
}

.fly-explosion { position: fixed; pointer-events: none; z-index: 99999; }
.explosion-particle { position: absolute; border-radius: 50%; animation: explode 0.8s ease-out forwards; }

@keyframes explode {
    0% { transform: translate(-50%, -50%) translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
}

.fly-ring {
    position: fixed;
    pointer-events: none;
    z-index: 99998;
    border: 4px solid var(--primary);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: ringExpand 0.6s ease-out forwards;
}

@keyframes ringExpand {
    0% { width: 20px; height: 20px; opacity: 1; }
    100% { width: 150px; height: 150px; opacity: 0; }
}

@keyframes cartBounce {
    0%, 100% { transform: scale(1) rotate(0deg); }
    15% { transform: scale(1.25) rotate(-12deg); }
    30% { transform: scale(0.9) rotate(8deg); }
    45% { transform: scale(1.15) rotate(-6deg); }
    60% { transform: scale(0.95) rotate(4deg); }
    75% { transform: scale(1.05) rotate(-2deg); }
}

.cart-btn.bouncing { animation: cartBounce 0.8s cubic-bezier(0.36, 0.07, 0.19, 0.97); }
.cart-btn.bouncing .cart-count { background: var(--secondary); color: white; animation: countPulse 0.6s ease; }

@keyframes countPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.5); }
}

.cart-notification {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px) scale(0.8);
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 20px 40px;
    border-radius: 16px;
    box-shadow: 0 15px 50px rgba(16, 185, 129, 0.5);
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 700;
    font-size: 16px;
    z-index: 100000;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.cart-notification.show { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
.cart-notification i { font-size: 28px; }

/* رفع مشکل کلیک منو در کامپیوتر */
.cart-notification { pointer-events: none !important; }

.fade-in { animation: fadeInUp 0.5s ease; }

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

.site-header.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,0.1); }

/* ============ دکمه‌ها ============ */
.theme-toggle {
    background: rgba(99, 102, 241, 0.1);
    border: 2px solid var(--border);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--primary);
    font-size: 20px;
}

.theme-toggle:hover { background: var(--primary); color: white; transform: rotate(15deg); }
.theme-toggle .fa-moon { display: none; }
[data-theme="dark"] .theme-toggle .fa-sun { display: none; }
[data-theme="dark"] .theme-toggle .fa-moon { display: inline; }

.sound-toggle { background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.3); color: var(--secondary); }
.sound-toggle:hover { background: var(--secondary); color: white; border-color: var(--secondary); }

/* ============ ریسپانسیو ============ */
@media (max-width: 968px) {
    .container {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    .filter-sidebar {
        width: 100% !important;
    }
    
    .products-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .toolbar-right, .toolbar-left {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .sort-wrapper {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    
    .sort-options {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }
    
    .view-toggle { display: none; }
    .results-badge { width: 100%; justify-content: center; }
}

@media (max-width: 768px) {
    .header-inner { flex-wrap: wrap; }
    .main-nav { order: 3; width: 100%; }
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .product-image { height: 160px; }
    .auth-box { padding: 30px 24px; }
    .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    .product-image { height: 150px; }
    .product-info { padding: 12px; }
    .product-name { font-size: 13px; min-height: 40px; }
    .current-price { font-size: 15px; }
    .btn-add-cart { padding: 10px; font-size: 12px; }

    .hero-section {
        flex-direction: column;
        text-align: center;
        padding: 50px 20px;
    }
    .hero-content { padding-right: 0; }
    .hero-visual { display: none; }
    .hero-title { font-size: 28px !important; }
    .hero-buttons { justify-content: center; }
    .hero-stats { justify-content: center; gap: 16px; }

    .features-strip { grid-template-columns: 1fr; padding: 0 16px; }
    
    .categories-showcase { grid-template-columns: repeat(2, 1fr) !important; gap: 12px; }
    .category-showcase-card { padding: 20px 12px; }
    .category-card-icon { width: 60px; height: 60px; font-size: 26px; }
    .category-card-title { font-size: 14px; }

    .promo-banners { grid-template-columns: 1fr !important; }
    .promo-banner { padding: 28px 20px; min-height: auto; }
    .promo-content h3 { font-size: 18px; }
    .promo-icon { font-size: 80px; right: 10px; }

    .section-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .section-title { font-size: 20px; }
}

@media (max-width: 400px) {
    .products-grid { grid-template-columns: 1fr !important; }
    .categories-showcase { grid-template-columns: 1fr !important; }
}

/* ============ DARK MODE - سیاه واقعی ============ */
[data-theme="dark"] {
    --primary: #818cf8;
    --primary-dark: #6366f1;
    --secondary: #34d399;
    --danger: #f87171;
    --warning: #fbbf24;
    --dark: #f5f5f5;
    --gray: #a3a3a3;
    --light: #000000;
    --white: #0a0a0a;
    --border: #1f1f1f;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.6);
}

[data-theme="dark"] body { background: #000000; color: #f5f5f5; }

/* هدر */
[data-theme="dark"] .site-header { 
    background: #0a0a0a; 
    border-color: #1a1a1a;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
[data-theme="dark"] .main-nav a { color: #a3a3a3; }
[data-theme="dark"] .main-nav a:hover { 
    background: rgba(129, 140, 248, 0.1); 
    color: var(--primary); 
}
[data-theme="dark"] .logo { color: #a78bfa; }

/* کارت‌ها */
[data-theme="dark"] .product-card,
[data-theme="dark"] .card,
[data-theme="dark"] .filter-sidebar,
[data-theme="dark"] .category-showcase-card,
[data-theme="dark"] .products-toolbar,
[data-theme="dark"] .cart-summary,
[data-theme="dark"] .feature-item,
[data-theme="dark"] .auth-box,
[data-theme="dark"] .sort-options,
[data-theme="dark"] .view-toggle {
    background: #0f0f0f;
    border-color: #1f1f1f;
}

[data-theme="dark"] .product-card:hover {
    box-shadow: 0 10px 25px rgba(129, 140, 248, 0.15);
    border-color: rgba(129, 140, 248, 0.3);
}

/* عنوان‌ها و متن‌ها */
[data-theme="dark"] .product-name a,
[data-theme="dark"] .section-title,
[data-theme="dark"] .feature-text h4,
[data-theme="dark"] .category-card-title,
[data-theme="dark"] .auth-header h2,
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4 {
    color: #f5f5f5;
}

[data-theme="dark"] .product-brand,
[data-theme="dark"] .section-subtitle,
[data-theme="dark"] .auth-header p,
[data-theme="dark"] .results-label {
    color: #a3a3a3;
}

/* پس‌زمینه‌های داخلی */
[data-theme="dark"] .product-image,
[data-theme="dark"] .card-header,
[data-theme="dark"] .table th,
[data-theme="dark"] .form-control,
[data-theme="dark"] .quick-price-btn {
    background: #141414;
    border-color: #1f1f1f;
    color: #f5f5f5;
}

[data-theme="dark"] .form-control::placeholder { color: #525252; }

/* جداول */
[data-theme="dark"] .table { background: #0f0f0f; color: #f5f5f5; }
[data-theme="dark"] .table td { border-color: #1f1f1f; }
[data-theme="dark"] .table tr:hover { background: #141414; }

/* Auth */
[data-theme="dark"] .auth-container { 
    background: linear-gradient(135deg, #000000 0%, #0a0a0a 100%); 
}

/* Hero */
[data-theme="dark"] .hero-section { 
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%); 
}

/* Footer */
[data-theme="dark"] .site-footer { 
    background: #000000;
    border-top: 1px solid #1f1f1f;
}

/* Alert */
[data-theme="dark"] .alert-success { 
    background: rgba(52, 211, 153, 0.1); 
    color: #6ee7b7; 
    border-color: rgba(52, 211, 153, 0.3);
}
[data-theme="dark"] .alert-danger { 
    background: rgba(248, 113, 113, 0.1); 
    color: #fca5a5; 
    border-color: rgba(248, 113, 113, 0.3);
}
[data-theme="dark"] .alert-warning {
    background: rgba(251, 191, 36, 0.1);
    color: #fde68a;
    border-color: rgba(251, 191, 36, 0.3);
}

/* دکمه‌ها */
[data-theme="dark"] .btn-secondary { 
    background: #1a1a1a; 
    color: #f5f5f5;
    border: 1px solid #2a2a2a;
}
[data-theme="dark"] .btn-secondary:hover { background: #262626; }

/* Sort Options */
[data-theme="dark"] .sort-option { color: #a3a3a3; }
[data-theme="dark"] .sort-option:hover { 
    background: rgba(129, 140, 248, 0.1); 
    color: var(--primary); 
}

/* Filter */
[data-theme="dark"] .filter-title { color: #f5f5f5; border-color: #1f1f1f; }
[data-theme="dark"] .filter-option { color: #a3a3a3; }
[data-theme="dark"] .filter-option:hover { background: rgba(129, 140, 248, 0.1); }
[data-theme="dark"] .filter-option.active { 
    background: rgba(129, 140, 248, 0.15); 
    color: var(--primary);
    border-color: rgba(129, 140, 248, 0.3);
}

/* Badge */
[data-theme="dark"] .category-card-icon { 
    background: rgba(129, 140, 248, 0.1) !important; 
}

/* Results Badge */
[data-theme="dark"] .results-badge {
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.1), rgba(52, 211, 153, 0.1));
    border-color: rgba(129, 140, 248, 0.2);
}

/* Cart */
[data-theme="dark"] .cart-item { border-color: #1f1f1f; }
[data-theme="dark"] .cart-summary-row { border-color: #1f1f1f; }

/* Promo Banners */
[data-theme="dark"] .promo-banner { 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); 
}

/* نوتیفیکیشن */
[data-theme="dark"] .cart-notification { 
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 15px 50px rgba(52, 211, 153, 0.3);
}

/* Scrollbar */
[data-theme="dark"] ::-webkit-scrollbar { width: 10px; }
[data-theme="dark"] ::-webkit-scrollbar-track { background: #0a0a0a; }
[data-theme="dark"] ::-webkit-scrollbar-thumb { 
    background: #262626; 
    border-radius: 10px;
}
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: #404040; }

/* Category Card Count */
[data-theme="dark"] .category-card-count { color: #a3a3a3; }

/* Auth Box */
[data-theme="dark"] .auth-box { background: #0f0f0f; border-color: #1f1f1f; }
[data-theme="dark"] .auth-header h2 { color: #f5f5f5; }
[data-theme="dark"] .auth-form label { color: #f5f5f5; }
[data-theme="dark"] .form-group label { color: #f5f5f5; }

/* Form Control */
[data-theme="dark"] .form-control {
    background: #141414;
    border-color: #1f1f1f;
    color: #f5f5f5;
}

[data-theme="dark"] .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.15);
}

/* Auth Divider */
[data-theme="dark"] .auth-divider { color: #a3a3a3; }
[data-theme="dark"] .auth-divider::before,
[data-theme="dark"] .auth-divider::after { border-color: #262626; }
[data-theme="dark"] .auth-switch { color: #a3a3a3; }

/* Forgot Link */
[data-theme="dark"] .forgot-link { color: var(--primary); }
[data-theme="dark"] .checkbox-label { color: #f5f5f5; }

/* Theme Toggle */
[data-theme="dark"] .theme-toggle {
    background: rgba(129, 140, 248, 0.1);
    border-color: #262626;
    color: #818cf8;
}

[data-theme="dark"] .theme-toggle:hover {
    background: #818cf8;
    color: #000000;
}

/* Sound Toggle */
[data-theme="dark"] .sound-toggle {
    background: rgba(52, 211, 153, 0.1);
    border-color: rgba(52, 211, 153, 0.3);
    color: #34d399;
}

[data-theme="dark"] .sound-toggle:hover {
    background: #34d399;
    color: #000000;
}

/* Flying Item in Dark Mode */
[data-theme="dark"] .flying-item {
    background: #0f0f0f;
    border-color: #262626;
    box-shadow: 0 20px 40px rgba(129, 140, 248, 0.3);
}

/* Cart Button in Dark Mode */
[data-theme="dark"] .cart-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}