/* ============================================
   DARK MODE CSS VARIABLES
   ============================================ */
:root {
    --primary: #e62e2e;
    --primary-dark: #c12727;
    --dark: #000000;
    --dark-bg: #000000;
    --gray-text: #888888;

    /* Light mode tokens */
    --body-bg: #ffffff;
    --body-color: #212529;
    --card-bg: #ffffff;
    --card-color: #212529;
    --card-border: #eeeeee;
    --footer-bg: #ffffff;
    --footer-color: #212529;
    --footer-muted: #6c757d;
    --footer-link: #6c757d;
    --navbar-bg: #000000;
    --search-bg: #ffffff;
    --search-border: #eeeeee;
    --newsletter-bg: #f8f9fa;
    --newsletter-color: #212529;
    --explore-bg: #ffffff;
    --explore-color: #212529;
    --transition-speed: 0.3s;
    --spec-border: #eeeeee;
    --empty-state-bg: #ffffff;
}

/* Dark Mode Overrides */
[data-theme="dark"] {
    --body-bg: #0d0d0d;
    --body-color: #f0f0f0;
    --card-bg: #1a1a1a;
    --card-color: #f0f0f0;
    --card-border: #333333;
    --footer-bg: #111111;
    --footer-color: #cccccc;
    --footer-muted: #888888;
    --footer-link: #aaaaaa;
    --navbar-bg: #0a0a0a;
    --search-bg: #1a1a1a;
    --search-border: #333333;
    --newsletter-bg: #111111;
    --newsletter-color: #f0f0f0;
    --explore-bg: #0d0d0d;
    --explore-color: #f0f0f0;
    --spec-border: #222222;
    --empty-state-bg: #1a1a1a;
}

/* ============================================
   BASE STYLES
   ============================================ */
body {
    font-family: 'Inter', 'Noto Sans Arabic', sans-serif;
    color: var(--body-color);
    background-color: var(--body-bg);
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

h1, h2, h3, h4, h5, h6 {
    color: inherit;
}

.fw-black { font-weight: 900; }
.text-primary { color: var(--primary) !important; }

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    background: var(--navbar-bg) !important;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background var(--transition-speed);
}
.navbar .nav-link {
    color: #fff !important;
    text-transform: uppercase;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    padding: 0 20px !important;
}
.navbar-brand span {
    font-size: 1.5rem;
    font-weight: 900;
}

/* Dark mode toggle button */
#darkModeToggle {
    font-size: 1rem;
    transition: transform 0.3s;
}
#darkModeToggle:hover {
    transform: scale(1.2);
}

/* ============================================
   HERO
   ============================================ */
.hero-section {
    padding-top: 100px;
    padding-bottom: 150px;
}
.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 0.5rem;
}
.hero-content p {
    font-size: 1rem;
    max-width: 600px;
    margin: 2rem auto;
    color: #ccc;
}

/* ============================================
   SEARCH WIDGET
   ============================================ */
.search-widget {
    background: var(--search-bg);
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
    margin-top: -40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid var(--search-border);
    max-width: 900px !important;
    transition: background var(--transition-speed), border var(--transition-speed);
}
.search-tabs {
    background: var(--search-bg);
    border-bottom: 1px solid var(--search-border);
}
.search-tabs .btn-link {
    border: none;
    border-radius: 0;
    padding: 12px 30px;
    color: #888;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.75rem;
    background: var(--search-bg);
    letter-spacing: 0.5px;
    transition: all 0.3s;
}
.search-tabs .btn-link.active {
    background: #e62e2e !important;
    color: #fff !important;
}
.search-widget .search-form {
    background: var(--search-bg) !important;
}
.search-widget .search-field {
    padding: 10px 25px;
    border-right: 1px solid var(--search-border);
    flex: 1;
}
.search-widget .search-field .label-text {
    display: block;
    font-size: 0.65rem;
    font-weight: 800;
    color: #aaa;
    text-transform: uppercase;
    margin-bottom: 0px;
}
.search-widget .form-select {
    border: none;
    height: 35px;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0;
    color: var(--body-color);
    background-image: none;
    background-color: transparent;
}
.search-btn {
    background: #e62e2e !important;
    color: #fff !important;
    border: none;
    height: 75px;
    width: 75px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}
.search-btn:hover {
    background: #c12727 !important;
}

/* ============================================
   SOCIAL ICONS
   ============================================ */
.social-icons a {
    width: 35px;
    height: 35px;
    background: #e62e2e;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 0.9rem;
}

/* ============================================
   BRANDS
   ============================================ */
.brand-logos img {
    height: 25px;
    filter: brightness(0);
    opacity: 0.6;
    transition: all 0.3s;
}
.brand-logos img:hover {
    opacity: 1;
}
[data-theme="dark"] .brand-logos img {
    filter: brightness(0) invert(1);
}

/* ============================================
   MOTOR CARDS
   ============================================ */
.motor-card {
    background: var(--card-bg) !important;
    border-radius: 15px !important;
    border: 1px solid var(--card-border) !important;
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
}
.motor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1) !important;
}
[data-theme="dark"] .motor-card:hover {
    box-shadow: 0 15px 40px rgba(230, 46, 46, 0.15) !important;
}
.motor-card .card-img-top {
    border-radius: 15px 15px 0 0;
}
.motor-card .card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--card-color);
    margin-bottom: 0.5rem;
}
.motor-card .price {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--primary) !important;
}
.motor-card .spec-row {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--spec-border);
}
.motor-card .spec-item {
    font-size: 0.8rem;
    color: var(--footer-muted);
    text-align: center;
}
.motor-card .spec-item i {
    display: block;
    margin-bottom: 5px;
    color: var(--primary);
}
.brand-badge {
    z-index: 5;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.brand-badge img {
    max-width: 80%;
    max-height: 80%;
}

/* ============================================
   SECTION TITLE
   ============================================ */
.section-title {
    font-size: 1.5rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 2rem;
}

/* ============================================
   CATEGORIES
   ============================================ */
.cat-item {
    position: relative;
    height: 200px;
    border-radius: 15px;
    overflow: hidden;
}
.cat-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.cat-item:hover img {
    transform: scale(1.06);
}
.cat-item .label {
    position: absolute;
    bottom: 20px;
    left: 20px;
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
    font-size: 1.2rem;
}

/* ============================================
   NEWSLETTER SECTION
   ============================================ */
.newsletter-section {
    background: var(--newsletter-bg);
    color: var(--newsletter-color);
    transition: background var(--transition-speed), color var(--transition-speed);
}

/* ============================================
   EXPLORE SECTION
   ============================================ */
.explore-section {
    background: var(--explore-bg);
    color: var(--explore-color);
    transition: background var(--transition-speed), color var(--transition-speed);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-color);
    transition: background var(--transition-speed), color var(--transition-speed);
}
.footer-muted {
    color: var(--footer-muted) !important;
}
.footer-link {
    color: var(--footer-link) !important;
    transition: color 0.2s;
}
.footer-link:hover {
    color: var(--primary) !important;
}

/* ============================================
   INFO / FEATURE SECTION
   ============================================ */
.info-section h2 {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--body-color);
}
.info-section p {
    color: var(--footer-muted);
}
.feature-icon {
    width: 60px;
    height: 60px;
    background: #f8f8f8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
}
[data-theme="dark"] .feature-icon {
    background: #222;
}

/* ============================================
   EMPTY STATE / LISTINGS
   ============================================ */
.empty-state {
    background: var(--empty-state-bg);
    transition: background var(--transition-speed);
}
.list-card {
    background: var(--card-bg) !important;
    border: 1px solid var(--card-border) !important;
}
.list-card-body {
    background: var(--card-bg);
    color: var(--body-color);
}
.list-placeholder {
    background: var(--newsletter-bg) !important;
}
