:root {
    --dark-blue: #0d1b3a;
    --light-blue: #2d4a8a;
    --accent-blue: #3a6bd9;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --green: #27ae60;
    --orange: #f39c12;
    --red: #e74c3c;
    --royal-blue: #0b1a57;
    --border-radius: 16px;
    --translucent-bg: rgba(255, 255, 255, 0.15);
    --translucent-dark-bg: rgba(0, 0, 0, 0.4);
    --blur-filter: blur(15px);
    --section-bg: #f5f7fa;
    --text-color-dark: #2c3e50;
    --shadow-light: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-heavy: 0 12px 36px rgba(0, 0, 0, 0.15);
    --gradient-primary: linear-gradient(135deg, var(--dark-blue) 0%, var(--light-blue) 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent-blue) 0%, var(--light-blue) 100%);
    /* FIXED: Added a new variable for surface colors */
    --surface-color: #ffffff;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --section-bg: #1a1a1a;
    /* FIXED: The --white variable is no longer changed. Instead, --surface-color is used for backgrounds. */
    --surface-color: #2d2d2d;
    --light-gray: #3d3d3d;
    --text-color-dark: #ffffff;
    --shadow-light: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-heavy: 0 12px 36px rgba(0, 0, 0, 0.5);
}

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

body {
    font-family: 'Tajawal', sans-serif;
    direction: rtl;
    background-color: var(--section-bg);
    color: var(--text-color-dark);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    overflow-x: hidden;
    transition: all 0.3s ease;
}

.app-wrapper {
    width: 100%;
    max-width: 450px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.1);
}

/* The top section with the car background image */
.top-section {
    background: var(--gradient-primary);
    position: relative;
    z-index: 1;
    padding: 20px;
    padding-bottom: 20px;
    overflow: hidden;
}

.top-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 0;
}

.top-section::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    z-index: 0;
}

.top-content {
    position: relative;
    z-index: 1;
    color: var(--white);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--white);
    padding-bottom: 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    background: transparent;
    backdrop-filter: var(--blur-filter);
    padding: 15px 0;
}

.header-icons, .header-logo {
    display: flex;
    gap: 15px;
    font-size: 24px;
    align-items: center;
    position: relative;
}

.header-logo {
    background: var(--translucent-bg);
    padding: 8px 16px;
    border-radius: 50px;
    backdrop-filter: var(--blur-filter);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.header-logo:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.header-logo span {
    font-size: 20px;
    font-weight: bold;
    background: linear-gradient(45deg, #fff, #e0e0e0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cart-badge, .notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(45deg, var(--red), #ff6b6b);
    color: var(--white);
    font-size: 10px;
    width: 18px;
    height: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
}

.notification-badge {
    background: linear-gradient(45deg, var(--orange), #ffa726);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Search Bar */
.search-box {
    background-color: var(--translucent-bg);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    padding: 0 15px;
    color: var(--black);
    font-size: 1.1rem;
    position: relative;
    backdrop-filter: var(--blur-filter);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.search-box:focus-within {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    border-color: rgba(255, 255, 255, 0.4);
}

.search-box input {
    background: none;
    border: none;
    color: var(--white);
    font-family: 'Tajawal', sans-serif;
    flex-grow: 1;
    outline: none;
    padding: 15px 0;
    text-align: right;
    font-size: 1rem;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-btn {
    background: var(--translucent-bg);
    border: none;
    color: var(--white);
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: var(--blur-filter);
}

.search-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/* Main Content styles */
.title-section h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    background: linear-gradient(45deg, #fff, #e0e0e0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 0.8s ease;
}

.title-section p {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
    animation: fadeInUp 0.8s ease 0.2s both;
}

.search-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.action-button {
    background: var(--gradient-accent);
    color: var(--white);
    border: none;
    padding: 15px;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    text-decoration: none;
    font-family: 'Tajawal', sans-serif;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden;
}

.action-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: all 0.6s ease;
}

.action-button:hover::before {
    left: 100%;
}

.action-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.action-button .icon {
    font-size: 20px;
}

.scan-button {
    background: var(--translucent-bg);
    color: var(--white);
    font-size: 1.1rem;
    backdrop-filter: var(--blur-filter);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.scan-button:hover {
    background: rgba(255, 255, 255, 0.15);
}

.status-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--translucent-bg);
    padding: 12px 18px;
    border-radius: var(--border-radius);
    width: fit-content;
    font-size: 0.9rem;
    backdrop-filter: var(--blur-filter);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-light);
    animation: fadeInUp 0.8s ease 0.6s both;
}

/* The three cards with translucent background */
.cards-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
    animation: fadeInUp 0.8s ease 0.8s both;
}

.card {
    background-color: var(--translucent-dark-bg);
    backdrop-filter: var(--blur-filter);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.card .icon {
    font-size: 48px;
    margin-bottom: 10px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.card p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.card.green .icon {
    color: var(--green);
}

.card.green::before {
    background: var(--green);
}

.card.blue .icon {
    color: var(--light-blue);
}

.card.blue::before {
    background: var(--light-blue);
}

.card.orange .icon {
    color: var(--orange);
}

.card.orange::before {
    background: var(--orange);
}

/* The bottom section with white background and new content */
.bottom-section {
    background-color: var(--section-bg);
    color: var(--text-color-dark);
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 100px;
}

.stats-section {
    display: flex;
    justify-content: space-around;
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.stats-section:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.stat-item {
    text-align: center;
    position: relative;
}

.stat-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-accent);
    border-radius: 3px;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--light-blue);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.8rem;
    color: #777;
}

.section {
    background-color: var(--surface-color);
    color: var(--text-color-dark);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow-light);
    margin-top: 10px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.section:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.section-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 15px;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--dark-blue);
    position: relative;
    padding-bottom: 8px;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 3px;
    background: var(--gradient-accent);
    border-radius: 3px;
}

.section-header p {
    font-size: 0.9rem;
    color: #777;
    margin-top: 5px;
}

.section-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.car-card {
    background-color: var(--surface-color);
    border: 1px solid #eaeaea;
    border-radius: var(--border-radius);
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.car-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-light);
    border-color: var(--light-blue);
}

.car-details h4 {
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--dark-blue);
}

.car-details p {
    font-size: 0.9rem;
    color: #777;
}

.car-card .btn {
    background: var(--gradient-accent);
    color: var(--white);
    border: none;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.car-card .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.add-car-card {
    background-color: var(--light-gray);
    border: 2px dashed #ccc;
    text-align: center;
    padding: 20px;
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-car-card:hover {
    background-color: #e9ecef;
    border-color: var(--light-blue);
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.add-car-card .fa-plus {
    font-size: 24px;
    color: #999;
    transition: all 0.3s ease;
}

.add-car-card:hover .fa-plus {
    color: var(--light-blue);
    transform: scale(1.1);
}

.brands-section .section-header p {
    font-size: 0.9rem;
    color: #777;
}

.brand-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    text-align: center;
}

.brand-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.brand-item:hover {
    transform: translateY(-5px);
}

.brand-logo-container {
    background: var(--gradient-primary);
    border-radius: 12px;
    padding: 10px;
    width: 70px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.brand-logo-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.brand-item:hover .brand-logo-container::before {
    transform: translateX(100%);
}

.brand-item:hover .brand-logo-container {
    box-shadow: var(--shadow-medium);
}

.brand-logo {
    max-width: 100%;
    max-height: 100%;
    filter: brightness(0) invert(1);
    transition: all 0.3s ease;
}

.brand-item:hover .brand-logo {
    transform: scale(1.05);
}

.brand-item p {
    font-size: 0.7rem;
    color: #555;
    font-weight: bold;
    text-align: center;
    line-height: 1.2;
    transition: all 0.3s ease;
}

.brand-item:hover p {
    color: var(--light-blue);
}

.view-all-btn {
    background-color: transparent;
    border: 2px solid var(--light-blue);
    color: var(--light-blue);
    padding: 12px;
    border-radius: var(--border-radius);
    margin-top: 15px;
    width: 100%;
    font-family: 'Tajawal', sans-serif;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.view-all-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(68, 104, 165, 0.1), transparent);
    transition: all 0.6s ease;
}

.view-all-btn:hover::before {
    left: 100%;
}

.view-all-btn:hover {
    background-color: var(--light-blue);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(68, 104, 165, 0.3);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.category-card {
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-accent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.category-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 1.5rem;
    box-shadow: 0 4px 8px rgba(68, 104, 165, 0.3);
    transition: all 0.3s ease;
}

.category-card:hover .category-icon {
    transform: scale(1.1) rotate(5deg);
}

.category-card h4 {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--dark-blue);
}

.category-card p {
    font-size: 0.8rem;
    color: #777;
}

/* Navigation Bar */
nav {
    background-color: var(--translucent-bg);
    backdrop-filter: var(--blur-filter);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 0;
    display: flex;
    justify-content: space-around;
    border-radius: 20px 20px 0 0;
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 450px;
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

.nav-item {
    text-align: center;
    color: var(--white);
    opacity: 0.7;
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 10px;
    position: relative;
}

.nav-item.active {
    opacity: 1;
    color: var(--white);
}

.nav-item .icon {
    font-size: 24px;
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

.nav-item p {
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.nav-item.active {
    position: relative;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: var(--white);
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(255,255,255,0.5);
}

.nav-item:hover {
    opacity: 1;
    transform: translateY(-3px);
}

.nav-item:hover .icon {
    transform: scale(1.1);
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-heavy);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.1);
}

.modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.modal-close {
    background: rgba(255,255,255,0.2);
    border: none;
    font-size: 1.25rem;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #eee;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-blue);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: #f8f9fa;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--light-blue);
    box-shadow: 0 0 0 3px rgba(68, 104, 165, 0.2);
    background: var(--surface-color);
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon i {
    position: absolute;
    right: 1rem;
    color: #777;
    z-index: 1;
}

.input-with-icon input {
    width: 100%;
    padding: 0.75rem 3rem 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: #f8f9fa;
}

.input-with-icon input:focus {
    outline: none;
    border-color: var(--light-blue);
    box-shadow: 0 0 0 3px rgba(68, 104, 165, 0.2);
    background: var(--surface-color);
}

.form-help {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #777;
}

/* Vehicle Preview Styles */
.vehicle-preview {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-top: 1rem;
    border: 1px solid #e9ecef;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.preview-header {
    margin-bottom: 1rem;
}

.preview-header h4 {
    color: var(--dark-blue);
    font-weight: 600;
    position: relative;
    padding-bottom: 8px;
}

.preview-header h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 30px;
    height: 2px;
    background: var(--light-blue);
    border-radius: 2px;
}

.preview-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #dee2e6;
    transition: all 0.2s ease;
}

.preview-item:hover {
    background: rgba(68, 104, 165, 0.05);
    padding-left: 10px;
    padding-right: 10px;
    margin-left: -10px;
    margin-right: -10px;
    border-radius: 5px;
}

.preview-item:last-child {
    border-bottom: none;
}

.preview-label {
    font-weight: 600;
    color: #555;
}

.preview-value {
    color: var(--light-blue);
    font-weight: 500;
}

/* Button Styles */
.btn-primary {
    background: var(--gradient-accent);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: all 0.6s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-outline {
    background: transparent;
    color: var(--light-blue);
    border: 2px solid var(--light-blue);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-outline::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(68, 104, 165, 0.1), transparent);
    transition: all 0.6s ease;
}

.btn-outline:hover::before {
    left: 100%;
}

.btn-outline:hover {
    background: var(--light-blue);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(68, 104, 165, 0.3);
}

/* Checkout Styles */
.checkout-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.checkout-steps::before {
    content: '';
    position: absolute;
    top: 15px;
    right: 0;
    left: 0;
    height: 2px;
    background: #e9ecef;
    z-index: 1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: var(--light-blue);
    color: white;
}

.step.completed .step-number {
    background: var(--green);
    color: white;
}

.step-text {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 500;
}

.step.active .step-text {
    color: var(--light-blue);
    font-weight: 600;
}

.checkout-step-content {
    display: none;
}

.checkout-step-content.active {
    display: block;
}

.shipping-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.shipping-option {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.shipping-option:hover {
    border-color: var(--light-blue);
}

.shipping-option.selected {
    border-color: var(--light-blue);
    background: rgba(68, 104, 165, 0.05);
}

.shipping-option input {
    display: none;
}

.shipping-info h5 {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--dark-blue);
}

.shipping-info p {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.shipping-price {
    font-weight: bold;
    color: var(--light-blue);
    font-size: 1.1rem;
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.payment-option {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-option:hover {
    border-color: var(--light-blue);
}

.payment-option.selected {
    border-color: var(--light-blue);
    background: rgba(68, 104, 165, 0.05);
}

.payment-option input {
    display: none;
}

.payment-option label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--dark-blue);
}

.payment-option i {
    font-size: 1.25rem;
    color: var(--light-blue);
}

.card-form {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-top: 1rem;
}

.order-summary {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 1.5rem;
}

.order-items {
    margin-bottom: 1.5rem;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #dee2e6;
}

.order-item:last-child {
    border-bottom: none;
}

.order-item-name {
    font-weight: 500;
    color: var(--dark-blue);
}

.order-item-price {
    color: var(--light-blue);
    font-weight: 600;
}

.order-totals {
    border-top: 2px solid #dee2e6;
    padding-top: 1rem;
}

.order-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.order-row.total {
    border-top: 1px solid #dee2e6;
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--dark-blue);
}

.order-details {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.order-details h5 {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--dark-blue);
}

.checkout-actions {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    width: 100%;
}

/* Profile Styles */
.profile-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
}

.profile-info h4 {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--dark-blue);
}

.profile-info p {
    color: #6c757d;
    font-size: 0.9rem;
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.profile-stat .stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--light-blue);
    display: block;
}

.profile-stat .stat-label {
    font-size: 0.8rem;
    color: #6c757d;
}

.profile-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.menu-item:hover {
    background: #f8f9fa;
    border-color: var(--light-blue);
    transform: translateX(-5px);
}

.menu-item i:first-child {
    color: var(--light-blue);
    font-size: 1.25rem;
    width: 24px;
}

.menu-item i:last-child {
    margin-right: auto;
    color: #6c757d;
}

.menu-item span {
    font-weight: 500;
    color: var(--dark-blue);
}

/* Tracking Styles */
.tracking-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.tracking-search {
    margin-bottom: 1.5rem;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 1rem;
}

.tracking-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.tracking-step {
    display: flex;
    gap: 1rem;
    position: relative;
}

.tracking-step::before {
    content: '';
    position: absolute;
    top: 30px;
    right: 15px;
    bottom: -20px;
    width: 2px;
    background: #e9ecef;
}

.tracking-step:last-child::before {
    display: none;
}

.tracking-step.completed::before {
    background: var(--green);
}

.tracking-step.active::before {
    background: var(--light-blue);
}

.step-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #6c757d;
    z-index: 2;
}

.tracking-step.completed .step-icon {
    background: var(--green);
    color: white;
}

.tracking-step.active .step-icon {
    background: var(--light-blue);
    color: white;
}

.step-content {
    flex: 1;
}

.step-content h5 {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--dark-blue);
}

.step-content p {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.step-time {
    font-size: 0.8rem;
    color: #6c757d;
}

.delivery-info {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 1.5rem;
}

.delivery-info h5 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-blue);
}

.delivery-details p {
    margin-bottom: 0.5rem;
    color: #6c757d;
}

.delivery-details strong {
    color: var(--dark-blue);
}

/* Success Modal */
.success-modal .modal-body {
    text-align: center;
    padding: 2rem;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    margin: 0 auto 1.5rem;
}

.success-modal h3 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-blue);
}

.success-modal p {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.order-details-success {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-top: 1.5rem;
    text-align: right;
}

.order-details-success p {
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
}

.order-details-success strong {
    color: var(--dark-blue);
}

/* Order History */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-card {
    background: var(--surface-color);
    border: 1px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.order-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
    border-color: var(--light-blue);
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.order-id {
    font-weight: 600;
    color: var(--dark-blue);
}

.order-date {
    color: #6c757d;
    font-size: 0.9rem;
}

.order-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-delivered {
    background: #d4edda;
    color: #155724;
}

.status-shipping {
    background: #cce7ff;
    color: #004085;
}

.status-processing {
    background: #fff3cd;
    color: #856404;
}

.order-items-preview {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.order-total {
    font-weight: 600;
    color: var(--light-blue);
    text-align: left;
}

/* Camera Modal Styles */
.camera-modal .modal-body {
    padding: 0;
}

.camera-container {
    position: relative;
    width: 100%;
    height: 400px;
    background: #000;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    overflow: hidden;
}

.camera-container video,
.camera-container canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    color: var(--white);
}

.scan-frame {
    width: 250px;
    height: 100px;
    border: 2px solid var(--white);
    border-radius: 8px;
    margin-bottom: 1rem;
    position: relative;
    box-shadow: 0 0 20px rgba(255,255,255,0.3);
    animation: pulse 2s infinite;
}

.scan-frame::before,
.scan-frame::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--white);
}

.scan-frame::before {
    top: -2px;
    right: -2px;
    border-bottom: none;
    border-left: none;
}

.scan-frame::after {
    bottom: -2px;
    left: -2px;
    border-top: none;
    border-right: none;
}

.damage-frame {
    width: 300px;
    height: 200px;
}

.camera-controls {
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.scan-results,
.analysis-results {
    padding: 1.5rem;
    border-top: 1px solid #eee;
}

.scanned-text {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 1rem;
    margin: 1rem 0;
    font-family: monospace;
    font-size: 1.1rem;
    text-align: center;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.damage-info {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: var(--border-radius);
    padding: 1rem;
    margin: 1rem 0;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.recommended-parts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.part-card {
    background: var(--surface-color);
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.part-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
    border-color: var(--light-blue);
}

.part-card h5 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-blue);
}

.part-card .price {
    color: var(--light-blue);
    font-weight: bold;
    font-size: 1.1rem;
}

/* Cart Modal Styles */
.cart-modal .modal-body {
    max-height: 400px;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #eee;
    transition: all 0.2s ease;
}

.cart-item:hover {
    background: #f8f9fa;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #777;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cart-item-details {
    flex: 1;
}

.cart-item-details h4 {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--dark-blue);
}

.cart-item-details p {
    color: #777;
    font-size: 0.875rem;
}

.cart-item-price {
    font-weight: bold;
    color: var(--light-blue);
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    background: #f8f9fa;
    border: 1px solid #ddd;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background: var(--light-blue);
    color: var(--white);
    border-color: var(--light-blue);
    transform: scale(1.1);
}

.cart-summary {
    margin-bottom: 1rem;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    padding: 10px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.total-amount {
    color: var(--light-blue);
}

.shipping-note {
    font-size: 0.875rem;
    color: #777;
    text-align: center;
}

.cart-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Part Modal Styles */
.part-modal .modal-body {
    max-height: 500px;
    overflow-y: auto;
}

.part-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.part-image {
    width: 100%;
    height: 200px;
    background: #f8f9fa;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #777;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.part-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.part-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--light-blue);
    margin: 0.5rem 0;
}

.part-description {
    color: #777;
    line-height: 1.5;
}

.part-specs {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 1rem;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.part-specs h5 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-blue);
    position: relative;
    padding-bottom: 5px;
}

.part-specs h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 30px;
    height: 2px;
    background: var(--light-blue);
    border-radius: 2px;
}

.part-specs ul {
    list-style: none;
    padding: 0;
}

.part-specs li {
    padding: 0.25rem 0;
    border-bottom: 1px solid #eee;
    position: relative;
    padding-right: 15px;
}

.part-specs li::before {
    content: '✓';
    position: absolute;
    right: 0;
    color: var(--green);
    font-weight: bold;
}

.part-specs li:last-child {
    border-bottom: none;
}

/* Full Page Styles */
.full-page {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--surface-color);
    z-index: 2000;
    overflow-y: auto;
    animation: slideInRight 0.3s ease;
}

.page-header {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.back-button {
    background: rgba(255,255,255,0.2);
    border: none;
    color: var(--white);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-button:hover {
    background: rgba(255,255,255,0.3);
    transform: translateX(-3px);
}

.page-header h2 {
    font-weight: 600;
}

.page-content {
    padding: 1.5rem;
}

.brands-grid-full {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.brand-card {
    background: var(--surface-color);
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden;
}

.brand-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-accent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.brand-card:hover::before {
    transform: scaleX(1);
}

.brand-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.brand-card-logo {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.brand-card:hover .brand-card-logo {
    transform: scale(1.05);
    box-shadow: var(--shadow-medium);
}

.brand-card-logo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.brand-card:hover .brand-card-logo::before {
    transform: translateX(100%);
}

.brand-card-logo img {
    max-width: 100%;
    max-height: 100%;
    filter: brightness(0) invert(1);
    transition: all 0.3s ease;
}

.brand-card h4 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-blue);
}

.brand-card p {
    color: #777;
    font-size: 0.875rem;
}

/* Parts Grid Full Styles */
.parts-grid-full {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.part-item-full {
    background: var(--surface-color);
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden;
}

.part-item-full::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-accent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.part-item-full:hover::before {
    transform: scaleX(1);
}

.part-item-full:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.part-item-icon {
    width: 60px;
    height: 60px;
    background: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: var(--light-blue);
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.part-item-full:hover .part-item-icon {
    background: var(--gradient-accent);
    color: white;
    transform: scale(1.1) rotate(5deg);
}

.part-item-full h4 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-blue);
}

.part-item-full .price {
    color: var(--light-blue);
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.part-item-full .description {
    color: #777;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* Years Grid Styles */
.years-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.year-card {
    background: var(--surface-color);
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden;
}

.year-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-accent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.year-card:hover::before {
    transform: scaleX(1);
}

.year-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: var(--light-blue);
}

.year-card h4 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-blue);
}

.year-card p {
    color: #777;
    font-size: 0.875rem;
}

/* Loading Spinner */
.loading-spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.loading-spinner-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-heavy);
    animation: pulse 2s infinite;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--light-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 4000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-heavy);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 350px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    position: relative;
    border-right: 4px solid;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.success {
    border-right-color: var(--green);
}

.toast.error {
    border-right-color: var(--red);
}

.toast.warning {
    border-right-color: var(--orange);
}

.toast.info {
    border-right-color: var(--light-blue);
}

.toast-icon {
    font-size: 1.25rem;
}

.toast.success .toast-icon {
    color: var(--green);
}

.toast.error .toast-icon {
    color: var(--red);
}

.toast.warning .toast-icon {
    color: var(--orange);
}

.toast.info .toast-icon {
    color: var(--light-blue);
}

.toast-content {
    flex: 1;
}

.toast-content h4 {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--dark-blue);
}

.toast-content p {
    color: #777;
    font-size: 0.875rem;
}

.toast-close {
    background: none;
    border: none;
    color: #777;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    transition: all 0.2s ease;
    font-size: 1rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    background: #f0f0f0;
    color: #333;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 280px;
    background: var(--surface-color);
    transform: translateX(100%);
    transition: all 0.3s ease;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
}

.mobile-menu.active .mobile-menu-content {
    transform: translateX(0);
}

.mobile-menu-header {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.mobile-menu-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: var(--white);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-close:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

.mobile-menu-items {
    padding: 1rem 0;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: var(--text-color-dark);
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu-item:last-child {
    border-bottom: none;
}

.mobile-menu-item:hover {
    background: #f8f9fa;
    padding-right: 2rem;
}

.mobile-menu-item i {
    font-size: 1.25rem;
    color: var(--light-blue);
    width: 24px;
    transition: all 0.2s ease;
}

.mobile-menu-item:hover i {
    transform: scale(1.1);
}

.cart-badge-mobile {
    background: var(--red);
    color: var(--white);
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
    margin-right: auto;
}

/* Notification Modal Styles */
.notification-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    position: relative;
}

.notification-item.unread {
    background: #f8f9fa;
    border-color: var(--light-blue);
}

.notification-item:hover {
    transform: translateX(-5px);
    box-shadow: var(--shadow-light);
}

.notification-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
}

.notification-content h4 {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--dark-blue);
}

.notification-content p {
    color: #6c757d;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.notification-time {
    font-size: 0.75rem;
    color: #999;
}

.notification-dot {
    width: 8px;
    height: 8px;
    background: var(--red);
    border-radius: 50%;
    position: absolute;
    top: 1rem;
    right: 1rem;
}

/* Addresses Modal Styles */
.addresses-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.address-item {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
}

.address-item:hover {
    border-color: var(--light-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.address-item.default {
    border-color: var(--green);
    background: #f0f9f0;
}

.address-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.address-name {
    font-weight: 600;
    color: var(--dark-blue);
}

.default-badge {
    background: var(--green);
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
}

.address-details p {
    color: #6c757d;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.address-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Payment Methods Modal Styles */
.payment-methods-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.payment-method-item {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
}

.payment-method-item:hover {
    border-color: var(--light-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.payment-method-item.default {
    border-color: var(--green);
    background: #f0f9f0;
}

.payment-method-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.payment-method-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
}

.payment-method-info h4 {
    font-weight: 600;
    color: var(--dark-blue);
    margin-bottom: 0.25rem;
}

.payment-method-info p {
    color: #6c757d;
    font-size: 0.875rem;
}

/* Settings Modal Styles */
.settings-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-radius: var(--border-radius);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.setting-item:hover {
    border-color: var(--light-blue);
    transform: translateX(-5px);
}

.setting-info h4 {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--dark-blue);
}

.setting-info p {
    color: #6c757d;
    font-size: 0.875rem;
}

/* Switch Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--light-blue);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Custom Select Styles */
.custom-select {
    position: relative;
    width: 100%;
}

.select-selected {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.select-selected:hover {
    border-color: var(--light-blue);
}

.select-selected:after {
    content: '';
    transition: all 0.2s ease;
}

.select-items {
    position: absolute;
    background-color: var(--surface-color);
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    top: 100%;
    left: 0;
    right: 0;
    z-index: 99;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: var(--shadow-medium);
    display: none;
}

.select-items.show {
    display: block;
}

.select-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.select-item:hover {
    background-color: #f8f9fa;
    color: var(--light-blue);
}

.select-item:last-child {
    border-bottom: none;
}

/* Custom Alert Modal */
.alert-modal .modal-body {
    text-align: center;
    padding: 2rem;
}

.alert-icon {
    width: 80px;
    height: 80px;
    background: var(--orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    margin: 0 auto 1.5rem;
}

.alert-modal h3 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-blue);
}

.alert-modal p {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

/* Responsive Design */
@media (max-width: 480px) {
    .app-wrapper {
        max-width: 100%;
    }
    
    .top-section {
        padding: 15px;
    }
    
    .title-section h1 {
        font-size: 1.8rem;
    }
    
    .cards-section {
        gap: 10px;
    }
    
    .card {
        padding: 15px;
    }
    
    .card .icon {
        font-size: 36px;
    }
    
    .stats-section {
        padding: 15px;
    }
    
    .section {
        padding: 15px;
    }
    
    .brand-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .modal-content {
        margin: 1rem;
        max-height: 85vh;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 1rem;
        flex-direction: column;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .camera-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .camera-controls .btn {
        width: 100%;
        justify-content: center;
    }
    
    .brands-grid-full {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .parts-grid-full {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .years-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .checkout-steps {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .checkout-steps::before {
        display: none;
    }
    
    .step {
        flex-direction: row;
        gap: 1rem;
    }
    
    .order-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .notification-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .address-actions {
        flex-direction: column;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.5s ease;
}

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

.slide-in-right {
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

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

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

/* Utility Classes */
.text-center {
    text-align: center;
}

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

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

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.hidden {
    display: none !important;
}

/* VIN Input Styles */
.vin-input-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.vin-options {
    display: flex;
    gap: 0.5rem;
}

.vin-btn {
    flex: 1;
    justify-content: center;
    font-size: 0.875rem;
    padding: 0.5rem;
}

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

.part-item {
    background: var(--surface-color);
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
}

.part-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.part-item-icon {
    width: 50px;
    height: 50px;
    background: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    font-size: 1.5rem;
    color: var(--light-blue);
    transition: all 0.3s ease;
}

.part-item:hover .part-item-icon {
    background: var(--gradient-accent);
    color: white;
    transform: scale(1.1);
}

.part-item h5 {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--dark-blue);
}

.part-item p {
    color: #777;
    font-size: 0.875rem;
}

/* Vehicle Info Styles */
.vehicle-info {
    background: var(--light-gray);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.vehicle-info h3 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-blue);
}

.vehicle-info p {
    color: #777;
    margin-bottom: 0.25rem;
}

/* Empty State Styles */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: #777;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ddd;
}

.empty-state h4 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #555;
}

.empty-state p {
    margin-bottom: 1rem;
}

/* Search Filter Styles */
.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--light-blue);
    box-shadow: 0 0 0 3px rgba(68, 104, 165, 0.2);
}

/* Language Support */
[dir="rtl"] {
    text-align: right;
}

[dir="ltr"] {
    text-align: left;
}

/* Dark Mode Enhancements */
[data-theme="dark"] .search-box {
    background-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .card {
    background-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .section {
    background-color: #2d2d2d;
    border-color: #3d3d3d;
}

[data-theme="dark"] .modal-content {
    background: #2d2d2d;
    color: #ffffff;
}

[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] .select-selected {
    background: #3d3d3d;
    border-color: #4d4d4d;
    color: #ffffff;
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: #aaaaaa;
}
/* أضف هذه الفئة إلى ملف styles.css لديك */
.icon-wrapper {
    /* **هذه هي أهم خطوة لضمان تموضع الشارة داخل أيقونتها** */
    position: relative; 
    /* لترتيب الأيقونات بشكل صحيح */
    display: inline-block; 
    /* لضمان تفاعل النقر بشكل صحيح */
    cursor: pointer;
}

/* الآن، شارات الإشعارات وسلة التسوق ستتموضع بناءً على الـ .icon-wrapper */
.cart-badge, .notification-badge {
    position: absolute;
    top: -5px;
    /* تأكد من استخدام right أو left بناءً على اتجاه التطبيق */
    /* بما أن dir="rtl"، right هو الجانب الأيسر (من المنظور) */
    right: -5px; 
    /* ... باقي خصائص التنسيق مثل اللون والحجم ... */
}

header {
    /* تفعيل Flexbox لتوزيع العناصر */
    display: flex;
    /* لتوزيع المسافة بين العناصر: الأيقونات اليسرى، الشعار، الأيقونات اليمنى */
    justify-content: space-between; 
    /* لمحاذاة العناصر عمودياً في المنتصف */
    align-items: center; 
    /* لضمان أن العناصر تتدفق من اليسار إلى اليمين (افتراضي، لكن جيد للتأكيد) */
    direction: ltr; 
    /* ... خصائص أخرى للهيدر مثل الارتفاع، الخلفية، الهامش ... */
    height: 60px;
    padding: -18px; /* مسافة داخلية من الجوانب */
}

/* لا تحتاج إلى استخدام float أو تحديد width كبير لهذه الفئات */
.header-icons.left {
    /* ترتيب الأيقونات الداخلية في مجموعة اليسار */
    display: flex;
    gap: 15px; /* مسافة بين أيقونات البحث والقائمة */
    order: 1; /* يضمن أنها أول عنصر في الترتيب (على اليسار) */
}

.header-logo {
    /* لضمان بقائه في المنتصف تقريباً */
    text-align: center;
    order: 2; /* يضمن أنه ثاني عنصر في الترتيب (في المنتصف) */
}

.header-icons.right {
    /* ترتيب الأيقونات الداخلية في مجموعة اليمين */
    display: flex;
    gap: 15px; /* مسافة بين أيقونات المستخدم والسلة والإشعارات */
    order: 3; /* يضمن أنها آخر عنصر في الترتيب (على اليمين) */
}

/* ⚠️ تأكد أيضاً من استخدام التعديل السابق للشارات في اتجاه LTR ⚠️ */
.cart-badge, .notification-badge {
    position: absolute;
    top: -5px;
    right: -5px; /* هذا هو التعديل الصحيح لاتجاه LTR */
    /* ... باقي التنسيقات ... */
}
.header-icons.left {
    display: flex;
    gap: 15px;
    order: 1;
}

.header-logo {
    text-align: center;
    order: 2;
}

.header-icons.right {
    display: flex;
    gap: 15px;
    order: 3;
}

/* تأكد من أن الشارات تظهر بشكل صحيح */
.cart-badge, .notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(45deg, var(--red), #ff6b6b);
    color: var(--white);
    font-size: 10px;
    width: 18px;
    height: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
}

.notification-badge {
    background: linear-gradient(45deg, var(--orange), #ffa726);
}

/* تحديد نافذة تتبع الطلبات فقط */
.modal#trackingModal .search-box input#trackingSearch {
    color: #000000 !important;
    font-weight: 500;
}

.modal#trackingModal .search-box input#trackingSearch::placeholder {
    color: #666666 !important;
    opacity: 1;
}

.modal#trackingModal .search-box {
    background-color: #ffffff !important;
    border: 1px solid #cccccc !important;
}

.modal#trackingModal .search-box .fas.fa-search {
    color: #333333 !important;
}
/* ================================================= */
/* ✨ إصلاح ظهور القوائم المنسدلة في الإعدادات ✨ */
/* ================================================= */

/* هذا يجعل القائمة المنسدلة تظهر بشكل عائم فوق باقي المحتوى */
.setting-item .select-items {
    position: absolute;
    width: 100%; /* اجعل عرض القائمة بنفس عرض الزر */
    z-index: 100; /* رقم مرتفع لضمان ظهورها في المقدمة */
}

/* هذا يضمن أن العنصر الأب لديه مرجعية للموقع */
.setting-item .custom-select {
    position: relative;
}

/* ================================================= */
/* ✨ بداية كود الإصلاحات ✨            */
/* ================================================= */

/* إصلاح أيقونة زر اختيار المدينة في صفحة الدفع */
.select-selected {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* إصلاح تداخل القوائم المنسدلة في الإعدادات */
.settings-modal .custom-select {
    position: relative; /* هذا يضمن أن القائمة المنسدلة ستتموضع بالنسبة للزر */
}

.settings-modal .select-items {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    z-index: 99; /* رقم مرتفع لضمان ظهور القائمة فوق العناصر الأخرى */
    background-color: var(--surface-color); /* للتأكد من أنها ليست شفافة */
    border: 1px solid var(--border-color, #ddd);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    margin-top: 4px; /* مسافة بسيطة بين الزر والقائمة */
}

/* إصلاح حجم أزرار وحدة القياس لتكون متساوية */
.setting-item#unitSetting .custom-select {
    width: 150px; /* تحديد عرض ثابت لكلا الزرين */
    text-align: center; /* توسيط النص */
}
.setting-item#languageSetting .custom-select {
    width: 150px; /* تحديد عرض ثابت لكلا الزرين */
    text-align: center; /* توسيط النص */
}
/* ================================================= */
/* ✨ نهاية كود الإصلاحات ✨             */
/* ================================================= */
/*
=================================================
✨ CSS Enhancements & Fixes by Gemini ✨
=================================================
This block contains all the requested modifications:
1.  Hiding the scrollbar.
2.  Unifying background and card colors with border removal.
3.  Fixing layout issues in the settings modal.
4.  Making the layout full-width and more responsive.
5.  Restyling the bottom navigation bar for better visibility and theme consistency.
6.  Improving dark mode text contrast.
7.  Adding general aesthetic touches.
=================================================
*/

/* --- 1. إخفاء شريط التمرير --- */
body {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
}
body::-webkit-scrollbar {
    display: none; /* Chrome, Safari, and Opera */
}


/* --- 2. توحيد الألوان وإزالة الحواف --- */
:root {
    --unified-light-gray: #f0f2f5;
    --text-color-secondary: #6c757d;
    --section-bg: var(--unified-light-gray);
    --surface-color: #ffffff; /* تم إبقاء البطاقات بيضاء لإعطاء عمق بصري أفضل مع الخلفية الرمادية */
    --light-gray: #e9ecef;
    /* تحسين الظلال لتعويض إزالة الحواف */
    --shadow-light: 0 5px 15px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.08);
    --shadow-heavy: 0 12px 36px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --section-bg: #121212;
    --surface-color: #1e1e1e;
    --text-color-dark: #e1e1e1;
    --text-color-secondary: #a9a9b3; /* لون أفتح للنصوص الثانوية في الوضع الليلي */
    /* تحسين ظلال الوضع الليلي */
    --shadow-light: 0 5px 15px rgba(0, 0, 0, 0.2);
    --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.3);
    --shadow-heavy: 0 12px 36px rgba(0, 0, 0, 0.4);
}

/* إزالة الحواف من جميع البطاقات الرئيسية */
.section, .stats-section, .car-card, .category-card, .order-card, .menu-item {
    border: none;
}

/* --- 3. إصلاح القوائم المنسدلة في الإعدادات --- */
/* هذا يضمن أن حاوية القائمة المنسدلة يمكنها احتواء القائمة دون قصها */
.modal-body {
    overflow-y: auto;
    overflow-x: hidden;
}

/* تمكين العنصر الأب من تحديد موقع القائمة المنسدلة */
.setting-item .custom-select {
    position: relative;
}

/* جعل القائمة تظهر بشكل عائم فوق كل شيء آخر */
.setting-item .select-items {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 9999; /* رقم مرتفع جدًا لضمان ظهوره في المقدمة */
    margin-top: 5px;
    border: 1px solid #e0e0e0;
}

[data-theme="dark"] .setting-item .select-items {
    border: 1px solid #3d3d3d;
}


/* --- 4. جعل الصفحة تملأ الشاشة ومتجاوبة --- */
.app-wrapper {
    max-width: none; /* إزالة الحد الأقصى للعرض */
    box-shadow: none; /* لا حاجة للظل في وضع ملء الشاشة */
}

body {
    justify-content: flex-start; /* إزالة التوسيط */
}

/* --- 5. تحسين شريط التنقل السفلي --- */
nav {
    max-width: none;
    left: 0;
    transform: none;
    border-radius: 0;
    background-color: var(--surface-color);
    backdrop-filter: none;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.nav-item {
    color: var(--text-color-secondary); /* لون موحد للأيقونات غير النشطة */
    opacity: 1;
}

.nav-item.active {
    color: var(--accent-blue); /* لون مميز للأيقونة النشطة */
}

.nav-item.active::before {
    background: var(--accent-blue);
    box-shadow: 0 0 10px var(--accent-blue);
}

/* تعديلات الوضع الليلي لشريط التنقل */
[data-theme="dark"] nav {
    background-color: #2d2d2d;
    border-top: 1px solid #3d3d3d;
}

[data-theme="dark"] .nav-item {
    color: #888888;
}

[data-theme="dark"] .nav-item.active {
    color: var(--white);
}

[data-theme="dark"] .nav-item.active::before {
    background: var(--white);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}


/* --- 6. تحسين نصوص الوضع الليلي --- */
/* تطبيق المتغير الجديد على جميع النصوص الثانوية */
.stat-label, .section-header p, .car-details p, .brand-item p, .category-card p, .step-text, .profile-info p, .profile-stat .stat-label, .menu-item i:last-child, .step-content p, .step-time, .delivery-details p, .success-modal p, .order-date, .notification-content p, .notification-time, .address-details p, .part-description, .brand-card p, .year-card p, .toast-content p, .empty-state p, .empty-state, .vehicle-info p, .part-item p, .shipping-note, .form-help {
    color: var(--text-color-secondary);
}

/* --- 7. تحسينات جمالية إضافية وتجاوبية --- */
/* تأثيرات مرور الماوس المحسنة */
.section:hover, .card:hover, .category-card:hover, .car-card:hover, .order-card:hover {
    box-shadow: var(--shadow-heavy);
    transform: translateY(-5px);
}

/* تحسين التجاوبية للشاشات الأكبر */
@media (min-width: 768px) {
    /* للحفاظ على مظهر احترافي، نعيد تحديد عرض أقصى في الشاشات الكبيرة مع توسيطه */
    .app-wrapper {
        max-width: 1200px;
        margin: 0 auto;
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.1);
    }
    nav {
        max-width: 1200px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 20px 20px 0 0;
    }
    .brand-grid { grid-template-columns: repeat(6, 1fr); }
    .categories-grid { grid-template-columns: repeat(3, 1fr); }
    .parts-grid-full { grid-template-columns: repeat(3, 1fr); }
    .years-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1024px) {
    .brand-grid { grid-template-columns: repeat(8, 1fr); }
    .categories-grid { grid-template-columns: repeat(4, 1fr); }
    .parts-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}
/*
=================================================
✨ تحسين تأثير الضغط على الأيقونات والأزرار ✨
=================================================
*/

/* 1. إلغاء لون التحديد الأزرق الافتراضي من المتصفح عند اللمس */
* {
  -webkit-tap-highlight-color: transparent;
}


/* 2. إضافة تأثير تكبير ناعم عند الضغط على العناصر التفاعلية */
.header-icons i,
.action-button,
.scan-button,
.nav-item,
.menu-item,
.brand-item,
.category-card,
.btn,
.view-all-btn,
.back-button,
.modal-close,
.quantity-btn {
  /* خاصية الانتقال موجودة بالفعل في تصميمك، وهذا يضمن أن التأثير التالي سيكون ناعمًا */
  /* transition: all 0.3s ease; */
}

/* هذا هو التأثير الذي سيظهر عند ضغط المستخدم بإصبعه أو بالماوس */
.header-icons i:active,
.action-button:active,
.scan-button:active,
.nav-item:active,
.menu-item:active,
.brand-item:active,
.category-card:active,
.btn:active,
.view-all-btn:active,
.back-button:active,
.modal-close:active,
.quantity-btn:active {
  transform: scale(1.1); /* تكبير العنصر بنسبة 10% عند الضغط */
  transition-duration: 0.1s; /* جعل الاستجابة للضغط سريعة وفورية */
}
/* إخفاء شريط التمرير في جميع المتصفحات الرئيسية */

/* لمتصفحات كروم، سفاري، وأوبرا */
body::-webkit-scrollbar {
  display: none;
}

/* لمتصفح فايرفوكس */
body {
  scrollbar-width: none;
}

/* لمتصفح إنترنت إكسبلورر وإيدج */
body {
  -ms-overflow-style: none;
}
/*
 * Fix for dropdown menu appearing behind other elements
 * هذا الكود لإصلاح مشكلة ظهور القائمة المنسدلة خلف العناصر الأخرى
*/

/* الخطوة الأولى: نضبط الحاوية الرئيسية للقائمة المنسدلة */
/* نجعلها مرجعاً للعناصر بداخلها ونعطيها z-index افتراضي */
.custom-select {
    position: relative;
    z-index: 2;
}

/* الخطوة الثانية: نضبط القائمة المنسدلة نفسها (الخيارات) */
/* نعطيها z-index بقيمة عالية جدًا لتظهر دائمًا في المقدمة */
.select-items {
    position: absolute; /* ضروري لكي تظهر القائمة خارج تدفق الصفحة الطبيعي */
    width: 100%;
    background-color: white; /* خلفية بيضاء لكي لا تكون القائمة شفافة */
    border: 1px solid #ccc;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15); /* ظل لإعطاء عمق */
    z-index: 999; /* رقم عالي جداً لضمان ظهورها فوق كل شيء */

    /* يمكنك تعديل هذه القيم لتناسب تصميمك */
    top: 100%; /* اجعلها تبدأ مباشرة بعد العنصر الأصلي */
    right: 0;
}
/* =================================================================== */
/* ✨ FIX: Dropdown menu in Settings appearing behind other elements ✨ */
/* ✨ إصلاح ظهور القائمة المنسدلة في الإعدادات خلف العناصر الأخرى ✨ */
/* =================================================================== */

/* الخطوة 1:
   نجعل كل "عنصر إعداد" (setting-item) قابلاً لتغيير ترتيب الطبقات.
   هذا يسمح لنا بالتحكم في أي منهم سيظهر في المقدمة. */
.setting-item {
    position: relative; /* ضروري لعمل z-index */
    z-index: 1;         /* نعطيه طبقة افتراضية */
}

/* الخطوة 2: (هذه هي الخدعة السحرية)
   عندما يمرر المستخدم الماوس فوق أي عنصر إعداد، أو عندما يكون التركيز داخله (بعد النقر)،
   نقوم برفع طبقة هذا العنصر بأكمله إلى المقدمة. */
.setting-item:hover,
.setting-item:focus-within {
    z-index: 2; /* طبقة أعلى تجعله هو وقائمته المنسدلة يظهران فوق العناصر الأخرى */
}

/* الخطوة 3:
   نتأكد من أن القائمة المنسدلة نفسها (select-items) تظهر بشكل صحيح "عائم"
   فوق محتويات العنصر الأب الخاص بها. */
.setting-item .select-items {
    position: absolute; /* يجعل القائمة تطفو فوق المحتوى */
    z-index: 999;       /* z-index عالي ليظهر فوق أي شيء آخر داخل نفس الـ setting-item */
    width: 100%;        /* اجعل عرض القائمة يطابق عرض الزر */
    right: 0;
    top: 100%;          /* ابدأ في الظهور مباشرة بعد الزر */
    margin-top: 5px;    /* مسافة صغيرة للجمالية */
}

/* إصلاح بسيط لخلفية القائمة في الوضع الليلي لضمان عدم شفافيتها */
[data-theme="dark"] .select-items {
    background-color: #2d2d2d; /* نفس لون الـ modal في الوضع الليلي */
    border-color: #4d4d4d;
}
/* =================================================================== */
/* ✨ تصميم إشعار "تشي" الفاخر (نسخة 2) ✨ */
/* =================================================================== */

.chee-luxury-notification.swal2-toast {
    /* --- أبعاد وموقع الإشعار --- */
    display: flex !important; /* لتمكين الترتيب المرن للعناصر */
    align-items: center; /* لمحاذاة العناصر عمودياً في المنتصف */
    gap: 15px; /* مسافة بين الأيقونة والنص وزر الإغلاق */
    padding: 18px 25px !important; /* مساحة داخلية أكبر لإحساس الفخامة */
    max-width: 95%; /* أقصى عرض ليتناسب مع الشاشات المختلفة */
    width: auto; /* يجعل العرض يتكيف مع المحتوى */
    min-height: 70px; /* ضمان ارتفاع أدنى للإشعار */

    /* --- الخلفية والحدود والظلال --- */
    background-color: var(--dark-blue); /* الخلفية الزرقاء الداكنة الفاخرة */
    color: var(--white); /* لون النص أبيض ليتناسق مع الخلفية الداكنة */
    border-radius: var(--border-radius); /* حواف دائرية تتناسب مع تصميم التطبيق */
    box-shadow: var(--shadow-heavy), 0 0 20px rgba(var(--accent-blue-rgb), 0.5); /* ظل فاخر مع توهج أزرق */
    border-left: 5px solid var(--accent-blue); /* شريط أزرق مميز على اليسار */
    
    /* --- خصائص إضافية --- */
    overflow: hidden; /* لمنع أي تجاوزات */
    z-index: 10000; /* لضمان ظهوره فوق باقي العناصر */
}

/* أيقونة الجرس الفاخرة على اليمين */
.chee-luxury-notification .chee-bell-icon {
    font-size: 26px; /* حجم أكبر لأيقونة الجرس */
    color: var(--accent-blue); /* لون أزرق مميز */
    min-width: 26px; /* لضمان حجم ثابت للأيقونة */
    display: flex; /* لضمان توسيط الأيقونة */
    align-items: center;
    justify-content: center;
    order: 1; /* لجعل الأيقونة تظهر أولاً على اليمين في تخطيط RTL */
}

/* حاوية النص (العنوان والرسالة) */
.chee-luxury-notification .chee-text-content {
    display: flex;
    flex-direction: column;
    text-align: right; /* محاذاة النص لليمين */
    flex-grow: 1; /* لجعل المحتوى يأخذ المساحة المتاحة */
    margin: 0 !important; /* إزالة الهوامش الافتراضية */
    line-height: 1.4;
    order: 2; /* ترتيب النص بعد الأيقونة */
}

/* تنسيق العنوان */
.chee-luxury-notification .notification-title {
    font-size: 1.05rem; /* حجم خط أكبر قليلاً للعنوان */
    font-weight: 700; /* خط عريض لإبراز الأهمية */
    color: var(--white); /* أبيض نقي */
    margin: 0 0 4px 0; /* مسافة صغيرة أسفل العنوان */
}

/* تنسيق نص الرسالة */
.chee-luxury-notification .notification-body {
    font-size: 0.9rem; /* حجم خط مناسب للرسالة */
    color: rgba(255, 255, 255, 0.85); /* أبيض شفاف قليلاً لإضفاء عمق */
    margin: 0;
}

/* زر الإغلاق الأنيق (X) */
.chee-luxury-notification .swal2-close {
    color: rgba(255, 255, 255, 0.6) !important; /* لون رمادي فاتح شفاف */
    font-size: 22px !important; /* حجم أكبر لسهولة النقر */
    transition: color 0.2s ease-in-out; /* انتقال سلس عند التفاعل */
    margin: 0 !important; /* إزالة الهوامش الافتراضية */
    height: auto !important; /* لضمان شكل مربع لزر الإغلاق */
    width: auto !important;
    padding: 0 5px !important; /* مساحة داخلية حول الرمز X */
    order: 3; /* ترتيب زر الإغلاق ثالثاً */
}

.chee-luxury-notification .swal2-close:hover {
    color: var(--white) !important; /* يصبح أبيض نقي عند التحويم */
}

/* إخفاء أيقونة SweetAlert الافتراضية إذا كانت تظهر */
.chee-luxury-notification .swal2-icon {
    display: none !important;
}

/* شريط التقدم الزمني */
.chee-luxury-notification .swal2-timer-progress-bar {
    background: var(--accent-blue); /* لون أزرق مميز */
    height: 4px; /* سمك أكبر للشريط */
    position: absolute; /* وضعه في أسفل الإشعار */
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 0 0 var(--border-radius) var(--border-radius); /* حواف سفلية مستديرة */
}

/* --- التوافق مع الوضع الليلي (Dark Mode) --- */
[data-theme="dark"] .chee-luxury-notification.swal2-toast {
    background-color: var(--surface-color-dark); /* لون خلفية أغمق للوضع الليلي */
    color: var(--text-color-dark);
    box-shadow: var(--shadow-heavy-dark), 0 0 20px rgba(var(--accent-blue-rgb), 0.3); /* ظل داكن مع توهج خفيف */
    border-left-color: var(--accent-blue);
}

[data-theme="dark"] .chee-luxury-notification .chee-bell-icon {
    color: var(--accent-blue);
}

[data-theme="dark"] .chee-luxury-notification .notification-title {
    color: var(--text-color-dark);
}

[data-theme="dark"] .chee-luxury-notification .notification-body {
    color: var(--text-color-secondary-dark);
}

[data-theme="dark"] .chee-luxury-notification .swal2-close {
    color: rgba(var(--text-color-dark-rgb), 0.6) !important;
}

[data-theme="dark"] .chee-luxury-notification .swal2-close:hover {
    color: var(--text-color-dark) !important;
}

