/* Material Icons */
.material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    vertical-align: middle;
}

/* Reset and Base Styles */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
    font-family: 'Inter', sans-serif;
            line-height: 1.6;
    color: #333;
    background: #f8fafc;
        }

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

/* Header */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
            top: 0;
    z-index: 100;
}

.header .container {
            display: flex;
            flex-direction: column;
            padding: 1rem 20px;
        }

.header-top {
            display: flex;
            justify-content: center;
            align-items: center;
            margin-bottom: 0.5rem;
            width: 100%;
        }

.header-nav {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 0.5rem;
            flex-wrap: wrap;
            width: 100%;
        }

/* Desktop layout */
@media (min-width: 769px) {
    .header {
        position: sticky;
        top: 0;
        z-index: 100;
    }
    
    .header .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .header-top {
        margin-bottom: 0;
    }
    
    .header-nav {
        justify-content: flex-end;
        gap: 0.75rem;
        flex-wrap: wrap;
        max-width: 100%;
    }
    
    .header-nav .nav-link {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
        white-space: nowrap;
    }
    
    /* On desktop, sidebar should stick but not overlap header */
    .sidebar {
        top: 80px;
    }
}

.logo {
            display: flex;
            align-items: center;
    gap: 0.5rem;
        }

.logo i {
            font-size: 1.5rem;
    color: #3b82f6;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
}

.header-nav {
    display: flex;
    gap: 1rem;
}

.header-nav .nav-link {
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
    display: flex !important;
    align-items: center;
    position: relative;
    white-space: nowrap;
    font-size: 0.9rem;
    visibility: visible !important;
    opacity: 1 !important;
}

.header-nav .nav-link:hover {
    color: #3b82f6;
            background: #f1f5f9;
}

.header-nav .nav-link.active {
    color: #3b82f6;
    background: #f1f5f9;
}

/* Badge for parts count */
.badge {
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.4rem;
    border-radius: 10px;
    min-width: 1.1rem;
    height: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.4rem;
    line-height: 1;
}

/* Clear build button */
.clear-build-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

.clear-build-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.clear-build-btn i {
    font-size: 0.8rem;
}


/* Main Layout */
.main-layout {
            display: flex;
    min-height: calc(100vh - 80px);
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: #fff;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 80px;
    height: calc(100vh - 80px);
            overflow-y: auto;
    z-index: 50;
    border-radius: 0 0.5rem 0.5rem 0;
}

.sidebar-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.sidebar-nav {
    padding: 1rem 0;
}

/* Scroll indicators for sidebar */
.scroll-indicator {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(59, 130, 246, 0.9);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.scroll-indicator.visible {
    opacity: 1;
    pointer-events: auto;
}

.scroll-indicator:hover {
    background: rgba(37, 99, 235, 1);
    transform: translateY(-50%) scale(1.1);
}

.scroll-indicator i {
    font-size: 0.875rem;
}

.scroll-left {
    left: 0.5rem;
}

.scroll-right {
    right: 0.5rem;
}

.sidebar-nav .nav-link {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.75rem 1.5rem;
            text-decoration: none;
    color: #64748b;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-nav .nav-link:hover {
    color: #3b82f6;
    background: #f1f5f9;
    border-left-color: #3b82f6;
}

.sidebar-nav .nav-link.active {
    color: #3b82f6;
    background: #f1f5f9;
    border-left-color: #3b82f6;
    font-weight: 600;
}

.sidebar-nav .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.sidebar-nav .nav-link span {
            font-size: 0.9rem;
}


/* Loading */
.loading {
            display: flex;
    flex-direction: column;
            align-items: center;
    justify-content: center;
    padding: 4rem;
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Main Content */
.main {
    flex: 1;
    padding: 2rem 0;
            background: #f8fafc;
}

.main .container {
    max-width: none;
    padding: 0 2rem;
}

/* Category Section */
.category-section {
    margin-bottom: 4rem;
}

.category-header {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin-bottom: 2rem;
            padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.category-icon {
    width: 50px;
    height: 50px;
    background: #3b82f6;
    border-radius: 0.75rem;
            display: flex;
            align-items: center;
    justify-content: center;
            color: white;
            font-size: 1.5rem;
}

.category-title {
    font-size: 2rem;
            font-weight: 700;
    color: #1e293b;
}

.category-count {
    background: #e2e8f0;
    color: #64748b;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
            font-weight: 500;
        }

/* Parts Grid */
.parts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Part Card */
.part-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
    position: relative;
    transition: all 0.2s;
    overflow: hidden;
}

.part-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.part-image {
            width: 100%;
    height: 200px;
            object-fit: contain;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    background: #f8fafc;
}

.part-name {
                font-size: 1.1rem;
            font-weight: 600;
    color: #1e293b;
            margin-bottom: 0.5rem;
    line-height: 1.4;
        }

.part-brand {
    color: #64748b;
            font-size: 0.875rem;
            margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
        }

        .part-specs {
    margin-bottom: 1rem;
}

.spec-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
    padding: 0.25rem 0;
    font-size: 0.875rem;
}

.spec-label {
    color: #64748b;
            font-weight: 500;
        }

.spec-value {
    color: #1e293b;
            font-weight: 600;
        }

.part-price {
            display: flex;
    justify-content: space-between;
            align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #059669;
}

.stock {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.875rem;
    color: #64748b;
}

.stock.in-stock {
    color: #059669;
}

.stock.low-stock {
    color: #d97706;
}

.stock.out-of-stock {
    color: #dc2626;
}

/* Footer */
.footer {
    background: #1e293b;
            color: white;
            text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* Responsive */
        @media (max-width: 768px) {
    .header {
        position: static;
    }
    
    .main-layout {
                flex-direction: column;
    }
    
    .sidebar {
            width: 100%;
        height: auto;
        position: sticky;
        top: 0;
        z-index: 200;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        background: #fff;
        margin-top: 0;
        /* Ensure it sticks at top when scrolling */
        will-change: transform;
    }
    
    .sidebar-container {
        position: relative;
    }
    
    .sidebar-nav {
            display: flex;
        overflow-x: auto;
        padding: 0.5rem 2.5rem;
        gap: 0.5rem;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* Internet Explorer 10+ */
        scroll-behavior: smooth;
    }
    
    .sidebar-nav::-webkit-scrollbar {
        display: none; /* WebKit browsers */
    }
    
    .scroll-indicator {
        top: 50%;
        width: 28px;
        height: 28px;
    }
    
    .scroll-indicator i {
        font-size: 0.75rem;
    }
    
    .scroll-left {
        left: 0.25rem;
    }
    
    .scroll-right {
        right: 0.25rem;
    }
    
    .sidebar-nav .nav-link {
            flex-shrink: 0;
        padding: 0.5rem 1rem;
        border-left: none;
        border-bottom: 3px solid transparent;
        white-space: nowrap;
    }
    
    .sidebar-nav .nav-link:hover {
        border-left-color: transparent;
        border-bottom-color: #3b82f6;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .parts-grid {
        grid-template-columns: 1fr;
    }
    
    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .main .container {
        padding: 0 1rem;
    }
}

/* Incompatible Parts */
.part-card.incompatible {
    opacity: 0.6;
    border: 2px solid #ef4444;
    background: #fef2f2;
    pointer-events: none;
}

.compatibility-label {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #ef4444;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    z-index: 10;
}

.compatibility-label i {
    font-size: 0.75rem;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
            text-align: center;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
            margin-bottom: 1rem;
}

/* Part Actions */
.part-actions {
            margin-top: 1rem;
            padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.btn-add-to-builder {
            width: 100%;
    background: #3b82f6;
            color: white;
            border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-weight: 600;
            cursor: pointer;
    transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
    gap: 0.5rem;
        }

.btn-add-to-builder:hover {
    background: #2563eb;
            transform: translateY(-1px);
        }

.btn-add-to-builder:active {
    transform: translateY(0);
}

.btn-add-to-builder.disabled {
    background: #94a3b8;
    color: #64748b;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-add-to-builder.disabled:hover {
    background: #94a3b8;
    transform: none;
}

/* Add to Builder Notification */
.add-to-builder-notification {
            position: fixed;
    top: 20px;
    right: 20px;
    background: #059669;
            color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
            z-index: 1000;
    transform: translateX(100%);
            opacity: 0;
            transition: all 0.3s ease;
        }

.add-to-builder-notification.show {
    transform: translateX(0);
            opacity: 1;
}

.notification-content {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            position: relative;
}

.notification-content i {
            font-size: 1.25rem;
}

.go-to-builder {
            color: white;
    text-decoration: underline;
    font-weight: 600;
    margin-left: 0.5rem;
}

.go-to-builder:hover {
    color: #f0f9ff;
}

.notification-close {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    transition: all 0.2s;
    font-size: 1rem;
    opacity: 0.8;
}

.notification-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.notification-close i {
    font-size: 1rem;
}

/* Mobile notification adjustments */
        @media (max-width: 768px) {
    .add-to-builder-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        transform: translateY(-100%);
    }
    
    .add-to-builder-notification.show {
    transform: translateY(0);
}

/* RAM Quantity Control */
.ram-quantity-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.ram-quantity-control label {
    font-weight: 500;
    color: #64748b;
}

.ram-quantity-control select {
    padding: 0.25rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    background: white;
    font-size: 0.9rem;
    min-width: 60px;
}

.ram-quantity-control select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.ram-slots-info {
    color: #64748b;
    font-size: 0.8rem;
    font-style: italic;
}

/* SSD Quantity Control */
.ssd-quantity-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.ssd-quantity-control label {
    font-weight: 500;
    color: #64748b;
}

.ssd-quantity-control select {
    padding: 0.25rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    background: white;
    font-size: 0.9rem;
    min-width: 60px;
}

.ssd-quantity-control select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.ssd-slots-info {
    color: #64748b;
    font-size: 0.8rem;
    font-style: italic;
}

/* Price Notice */
.price-notice {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-left: 4px solid #ef4444;
    color: #991b1b;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.price-notice i {
    color: #ef4444;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.price-notice span {
    flex: 1;
}

/* Sorting Controls */
.sorting-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border-radius: 0.75rem;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sort-options label {
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
}

.sort-options select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background: white;
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 1em;
    padding-right: 2.5rem;
}

.sort-options select:hover {
    border-color: #3b82f6;
}

.sort-options select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-options {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.filter-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3b82f6;
}

.filter-checkbox:hover {
    color: #3b82f6;
}

.filter-checkbox span {
    white-space: nowrap;
}


/* Responsive sorting controls */
@media (max-width: 768px) {
    .price-notice {
        font-size: 0.85rem;
        padding: 0.65rem 0.85rem;
        gap: 0.5rem;
    }
    
    .price-notice i {
        font-size: 1rem;
    }
    
    .sorting-controls {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
        padding: 1rem;
    }
    
    .sorting-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sort-options {
        justify-content: center;
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    .sort-options label {
        text-align: center;
        font-size: 1rem;
    }
    
    .sort-options select {
        font-size: 1rem;
        padding: 0.75rem;
        min-height: 44px; /* Better touch target for mobile */
        width: 100%;
    }
    
    .filter-options {
        width: 100%;
        justify-content: center;
        padding-top: 0.5rem;
        border-top: 1px solid #e2e8f0;
    }
    
    .filter-checkbox {
        font-size: 0.95rem;
    }
    
    .filter-checkbox input[type="checkbox"] {
        width: 20px;
        height: 20px;
    }
    
    .filter-options {
        width: 100%;
        justify-content: center;
        padding-top: 0.5rem;
        border-top: 1px solid #e2e8f0;
    }
    
    .filter-checkbox {
        font-size: 0.95rem;
    }
    
    .filter-checkbox input[type="checkbox"] {
        width: 20px;
        height: 20px;
    }
    
}

/* Language Switcher */
.language-switcher {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
}

.language-switcher button {
    background: transparent;
    border: 2px solid #e2e8f0;
    color: #64748b;
    padding: 0.4rem 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    font-size: 0.75rem;
    min-width: 44px; /* Better touch target for mobile */
    text-align: center;
}

.language-switcher button:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: #f1f5f9;
}

.language-switcher button.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.language-switcher button.active:hover {
    background: #2563eb;
    border-color: #2563eb;
}

/* Mobile styles for language switcher */
@media (max-width: 768px) {
    .header .container {
        padding: 1rem 15px;
    }
    
    .header-top {
        margin-bottom: 0.75rem;
    }
    
    .logo h1 {
        font-size: 1.25rem;
    }
    
    .logo i {
        font-size: 1.25rem;
    }
    
    .language-switcher {
        margin-left: 0;
        margin-right: 0;
        gap: 0.5rem;
        order: -1; /* Put language switcher first on mobile */
        width: 100%;
        justify-content: center;
        margin-bottom: 0.75rem;
        padding: 0.5rem 0;
        border-bottom: 1px solid #e2e8f0;
    }
    
    .language-switcher button {
        padding: 0.6rem 1.25rem;
        font-size: 0.875rem;
        flex: 0 0 auto;
        min-width: 50px;
    }
    
    .header-nav {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }
    
    .header-nav .nav-link {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        border-radius: 0.75rem;
        display: flex !important;
        visibility: visible !important;
    }
    
    .clear-build-btn {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
        border-radius: 0.75rem;
    }
}

/* Desktop styles for language switcher */
@media (min-width: 769px) {
    .language-switcher {
        margin-left: 1rem;
        margin-right: 0;
        gap: 0.5rem;
    }
    
    .language-switcher button {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

/* RTL Support */
body.rtl {
    direction: rtl;
    text-align: right;
}

body.rtl .header-nav {
    flex-direction: row-reverse;
}

body.rtl .logo {
    flex-direction: row-reverse;
}

body.rtl .sidebar {
    right: 0;
    left: auto;
}

body.rtl .scroll-left {
    left: auto;
    right: 0.5rem;
}

body.rtl .scroll-right {
    right: auto;
    left: 0.5rem;
}

@media (max-width: 768px) {
    body.rtl .scroll-left {
        left: auto;
        right: 0.25rem;
    }
    
    body.rtl .scroll-right {
        right: auto;
        left: 0.25rem;
    }
}

body.rtl .main {
    margin-right: 250px;
    margin-left: 0;
}

body.rtl .part-card {
    text-align: right;
}

body.rtl .part-specs {
    text-align: right;
}

body.rtl .price-notice {
    border-left: none;
    border-right: 4px solid #ef4444;
    text-align: right;
}

body.rtl .sorting-controls {
    text-align: right;
}

body.rtl .selected-part {
    flex-direction: row-reverse;
}

body.rtl .selected-part-actions {
    flex-direction: row-reverse;
}

body.rtl .part-actions {
    flex-direction: row-reverse;
}

body.rtl .summary-header {
    flex-direction: row-reverse;
}

body.rtl .notification-content {
    flex-direction: row-reverse;
}

body.rtl .notification-close {
    margin-left: 0;
    margin-right: auto;
}

body.rtl .language-switcher {
    margin-left: 0;
    margin-right: 1rem;
}

@media (max-width: 768px) {
    body.rtl .main {
        margin-right: 0;
    }
    
    /* Sidebar should always be visible on mobile, not hidden */
    body.rtl .sidebar {
        transform: none;
        right: auto;
        left: auto;
        width: 100%;
        position: sticky;
        top: 0;
        z-index: 200;
    }
    
    body.rtl .sidebar.open {
        transform: none;
    }
    
    /* RTL sidebar navigation should scroll horizontally like LTR */
    body.rtl .sidebar-nav {
        display: flex;
        overflow-x: auto;
        direction: rtl; /* Reverse scroll direction for RTL */
    }
    
    body.rtl .sidebar-nav .nav-link {
        direction: ltr; /* But keep text direction normal */
    }
    
    body.rtl .language-switcher {
        margin-left: 0;
        margin-right: 0;
    }
    
    body.rtl .header-nav {
        flex-direction: column;
    }
}