/* Exotic Car Trader - Modern Clean Design */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-bg: #ffffff;
    --secondary-bg: #f8f9fa;
    --dark-accent: #1a1a1a;
    --gold-accent: #d4af37;
    --gold-hover: #e5c158;
    --text-primary: #1a1a1a;
    --text-secondary: #374151;
    --border-color: #e5e7eb;
}

/* Ensure text is always visible */
body,
p,
div,
span {
    color: var(--text-primary);
}

.section-gray {
    background: var(--secondary-bg);
}

.section-gray *:not(.feature-icon):not(.stat-number):not(.cta-title) {
    color: var(--text-primary);
}

.section-light {
    background: var(--primary-bg);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: var(--primary-bg);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Global text color system - Smart defaults */

/* Dark text on light backgrounds (default) */
h1, h2, h3, h4, h5, h6 {
    color: #1a1a1a;
    font-weight: 700;
}

p {
    color: #374151;
    font-weight: 500;
}

label {
    color: #1a1a1a;
    font-weight: 700;
}

/* Header (white background) */
.header-main {
    background: white;
}

.header-main .logo {
    color: #1a1a1a !important;
}

.header-main .logo span {
    color: #d4af37 !important;
}

.header-main .nav a {
    color: #1a1a1a !important;
}

.header-main .nav a:hover,
.header-main .nav a.active {
    color: #d4af37 !important;
}

/* Header top (dark background) - white text */
.header-top {
    background: #1a1a1a;
}

.header-top,
.header-top a,
.header-top span {
    color: white !important;
}

/* Hero section - white text on dark */
.hero {
    color: white;
}

.hero h1,
.hero p,
.hero span,
.hero .hero-title,
.hero .hero-subtitle {
    color: white !important;
}

.hero input {
    color: #1a1a1a !important;
    background: white !important;
}

.hero input::placeholder {
    color: #6b7280 !important;
}

.hero .btn-outline {
    color: white !important;
    border-color: white !important;
}

.hero .search-box button {
    color: white !important;
}

/* Light sections - dark text */
.section-light {
    background: white;
}

.section-light h1,
.section-light h2,
.section-light h3,
.section-light .section-title,
.section-light .feature-title {
    color: #1a1a1a !important;
}

.section-light p,
.section-light .section-subtitle,
.section-light .feature-description {
    color: #374151 !important;
}

/* Gray sections - dark text */
.section-gray {
    background: #f8f9fa;
}

.section-gray h1,
.section-gray h2,
.section-gray h3,
.section-gray .section-title,
.section-gray .feature-title {
    color: #1a1a1a !important;
}

.section-gray p,
.section-gray .section-subtitle,
.section-gray .feature-description {
    color: #374151 !important;
}

/* Dark sections - white text */
.section-dark {
    background: #1a1a1a;
}

.section-dark,
.section-dark h1,
.section-dark h2,
.section-dark p,
.section-dark .section-title,
.section-dark .section-subtitle {
    color: white !important;
}

/* Stats section - white text */
.stats-section {
    background: #1a1a1a;
}

.stats-section,
.stats-section .stat-label {
    color: white !important;
}

.stats-section .stat-number {
    color: #d4af37 !important;
}

/* Footer - white text on dark */
.footer {
    background: #1a1a1a;
}

.footer,
.footer h4,
.footer p,
.footer a,
.footer li,
.footer span {
    color: rgba(255, 255, 255, 0.9) !important;
}

.footer h4 {
    color: #d4af37 !important;
}

/* CTA sections - dark text on gold */
.cta-section {
    background: linear-gradient(135deg, #d4af37 0%, #c49d2f 100%);
}

.cta-section,
.cta-section h3,
.cta-section p {
    color: #1a1a1a !important;
}

/* Vehicle cards - white background, dark text */
.vehicle-card {
    background: white !important;
}

.vehicle-info,
.vehicle-title,
.vehicle-specs,
.vehicle-specs span {
    color: #1a1a1a !important;
}

.vehicle-price {
    color: #d4af37 !important;
}

/* Filters - white background, dark text */
.filters {
    background: white !important;
}

.filters h3,
.filters label,
.filters .form-label {
    color: #1a1a1a !important;
}

/* Buttons */
.btn-primary {
    color: white !important;
    background: #d4af37 !important;
}

.btn-secondary {
    background: white !important;
    color: #1a1a1a !important;
}

.btn-outline {
    color: white !important;
    background: transparent !important;
}

/* Header */
.header {
    background: white !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background: var(--dark-accent);
    color: white !important;
    padding: 10px 0;
    font-size: 14px;
}

.header-top-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-contact {
    display: flex;
    gap: 30px;
}

.header-contact a,
.header-contact span {
    color: white !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-main {
    padding: 20px 0;
    background: white !important;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    color: #1a1a1a !important;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo span {
    color: #d4af37 !important;
}

.nav {
    display: flex;
    gap: 35px;
    align-items: center;
}

.nav a {
    color: #1a1a1a !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s;
    position: relative;
}

.nav a:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gold-accent);
    transition: width 0.3s;
}

.nav a:hover {
    color: #d4af37 !important;
}

.nav a:hover:after {
    width: 100%;
}

.nav a.active {
    color: #d4af37 !important;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-primary);
}

/* Vehicle Grid */
.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.vehicle-card {
    background: white !important;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
}

.vehicle-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border-color: var(--gold-accent);
}

.vehicle-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform 0.3s;
}

.vehicle-card:hover .vehicle-image {
    transform: scale(1.05);
}

.vehicle-info {
    padding: 25px;
    background: white !important;
}

.vehicle-title {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #1a1a1a !important;
}

.vehicle-specs {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #374151 !important;
    font-weight: 600;
}

.vehicle-specs span {
    color: #374151 !important;
}

.vehicle-price {
    font-size: 28px;
    font-weight: 800;
    color: #d4af37 !important;
}

/* Filters */
.filters {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.filters h3 {
    color: #1a1a1a !important;
    font-weight: 800 !important;
    font-size: 22px !important;
    margin-bottom: 25px !important;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.filters .form-label {
    color: #1a1a1a !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px !important;
}

.filters .form-select {
    background: white !important;
    color: #1a1a1a !important;
    font-weight: 600 !important;
    border: 2px solid #e5e7eb !important;
}

.filters .form-select option {
    color: #1a1a1a !important;
    background: white !important;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 50px 0;
}

.pagination a,
.pagination span {
    min-width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.pagination a:hover {
    background: var(--gold-accent);
    color: white;
    border-color: var(--gold-accent);
}

.pagination .active {
    background: var(--gold-accent);
    color: white;
    border-color: var(--gold-accent);
}

/* Footer */
.footer {
    background: var(--dark-accent);
    color: white;
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    color: var(--gold-accent);
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 700;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: var(--gold-accent);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
}

.social-link:hover {
    background: var(--gold-accent);
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 1024px) {
    .nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
}

@media (max-width: 768px) {
    .header-contact {
        flex-direction: column;
        gap: 10px;
    }
    
    .vehicle-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-grid {
        grid-template-columns: 1fr;
    }
}
