@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,600;0,700;1,600;1,700&display=swap');

:root {
    /* Modern Dewmotors Blue & Clean Gray Palette */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F3F5F7;
    --text-primary: #111827;
    --text-light: #374151;
    --text-secondary: #6B7280;
    
    /* Brand Accents */
    --accent: #1280DF; /* Royal Blue */
    --accent-hover: #0E66B3;
    --accent-green: #26A65B; /* Success/Action Green */
    --accent-glow: rgba(18, 128, 223, 0.15);
    
    --border: rgba(17, 24, 39, 0.1);
    --radius: 8px;
    --radius-sm: 4px;
    --radius-full: 9999px;
    
    /* Modern Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Outfit', sans-serif;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { 
    font-family: var(--font-heading); 
    font-weight: 700; 
    letter-spacing: -0.02em; 
    color: var(--text-primary);
}

a { color: var(--text-primary); text-decoration: none; transition: var(--transition); display: inline-block;}

.container { max-width: 1400px; margin: 0 auto; padding: 0 5%; }

/* Header - Clean & Professional */
.main-header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

main { padding-top: 80px; }

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo-text { 
    font-size: 1.5rem; 
    font-weight: 800;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-text span {
    color: var(--accent);
}

.main-nav { display: flex; gap: 2.5rem; }
.main-nav a { 
    font-size: 0.9rem; 
    text-transform: uppercase; 
    letter-spacing: 0.05em; 
    font-weight: 600;
    color: var(--text-secondary);
    position: relative;
    padding: 8px 0;
    transition: var(--transition);
}

.main-nav a.nav-classic-link {
    background: rgba(18, 128, 223, 0.08);
    color: var(--accent);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 800;
    border: 1px solid rgba(18, 128, 223, 0.2);
}

.main-nav a.nav-classic-link:hover {
    background: var(--accent);
    color: white;
}

.main-nav a:hover, .main-nav a.active { color: var(--accent); }

.menu-toggle { display: none; background: none; border: none; font-size: 2rem; color: var(--text-primary); cursor: pointer;}

/* Buttons - Solid & Modern */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border: none;
    color: white;
    background: var(--accent);
    cursor: pointer;
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
    font-weight: 700;
    transition: var(--transition);
    border-radius: var(--radius);
}

.btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-green {
    background: var(--accent-green);
}

.btn-green:hover {
    background: #1e8a4b;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
}

.btn-outline:hover {
    background: var(--accent);
    color: white;
}

/* Hero - Bold & Engaging */
.hero {
    height: 80vh;
    min-height: 600px;
    background-image: 
        linear-gradient(rgba(17, 24, 39, 0.7), rgba(17, 24, 39, 0.7)), 
        url('https://images.unsplash.com/photo-1549646875-1262d4e6df5b?q=80&w=2000');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 5%;
    color: white;
}

.hero-content {
    max-width: 800px;
}

.hero h1 { 
    font-size: clamp(2.5rem, 6vw, 4.5rem); 
    line-height: 1.1;
    margin-bottom: 1.5rem; 
    color: white;
    font-weight: 800;
}

.hero p { 
    font-size: 1.25rem; 
    margin-bottom: 2.5rem; 
    color: #D1D5DB; 
    max-width: 600px; 
    margin-inline: auto; 
}

.hero .btn { margin: 0 10px; }

/* Sections */
.section { padding: 10rem 0; }
.section-title {
    text-align: center; 
    font-size: 3.5rem; 
    margin-bottom: 6rem;
    color: var(--text-primary);
}

/* Inventory Cards - Modern Grid */
.inventory-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2rem; }

.car-card { 
    background: white;
    border: 1px solid var(--border);
    overflow: hidden; 
    cursor: pointer; 
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border-radius: var(--radius);
}

.car-card:hover { 
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.car-card-img-wrapper { 
    height: 240px; 
    overflow: hidden; 
    position: relative;
}

.car-card img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.5s ease; 
}

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

.car-card-content { 
    padding: 1.5rem; 
    text-align: left;
}

.car-card h3 { 
    font-size: 1.25rem; 
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.car-card .price { 
    color: var(--accent); 
    font-size: 1.5rem; 
    font-weight: 800; 
    margin-bottom: 1rem;
}

.car-card .metrics { 
    display: flex; 
    gap: 12px;
    font-size: 0.85rem; 
    color: var(--text-secondary); 
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--radius);
}

/* Details Page - Luxury Magazine Style */
.car-details-wrapper { display: flex; min-height: 100vh; }

.car-details-visual { 
    width: 55%; 
    position: sticky; 
    top: 90px; 
    height: calc(100vh - 90px); 
    padding: 40px;
    background: var(--bg-secondary);
}

.car-details-visual .main-image { 
    width: 100%; 
    height: 100%; 
    object-fit: contain; 
    background: white;
    box-shadow: 0 20px 50px rgba(0,0,0,0.05);
    border-radius: var(--radius-sm);
}

.car-details-info { 
    width: 45%; 
    padding: 8rem 6rem; 
    background: var(--bg-primary);
}


.car-header h2 { font-size: 4rem; margin-bottom: 1rem; line-height: 1; }
.car-header .price { font-size: 2.5rem; color: var(--accent); font-weight: 300; margin-bottom: 4rem;}

.specs-table { width: 100%; border-collapse: collapse; margin-top: 4rem; }
.specs-table th, .specs-table td { 
    padding: 1.5rem 0; 
    border-bottom: 1px solid #F0E6D8; 
    text-align: left; 
}
.specs-table th { 
    color: var(--text-secondary); 
    text-transform: uppercase; 
    font-size: 0.7rem; 
    letter-spacing: 0.2em;
    font-weight: 700;
}
.specs-table td { font-weight: 500; font-size: 1.1rem; }

/* Financing Section */
.financing-form-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 6rem;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.form-input {
    width: 100%;
    padding: 20px;
    background: #FBFAFA;
    border: 1px solid #ECE4D9;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
    outline: none;
    border-radius: var(--radius-sm);
}

.form-input:focus {
    border-color: var(--accent);
    background: white;
}

/* Photo Gallery Styling */
.photo-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
}

.gallery-thumb {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    cursor: pointer;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    transition: var(--transition);
    opacity: 0.7;
}

.gallery-thumb:hover {
    transform: scale(1.05);
    opacity: 1;
    border-color: var(--accent);
}

/* Footer - Professional Dark */
.main-footer { 
    background: #111827; 
    color: white; 
    padding: 6rem 0 3rem; 
}

.footer-container { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 4rem; }
.footer-container h3, .footer-container h4 { color: white; margin-bottom: 1.5rem; font-weight: 700; }

.footer-links a { 
    display: block; 
    margin-bottom: 1rem; 
    color: #9CA3AF; 
    font-size: 0.95rem;
}

.footer-links a:hover { color: var(--accent); transform: translateX(5px); }

/* Floating CTA button */
.floating-call {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--accent-green);
    color: white;
    padding: 15px 30px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(38, 166, 91, 0.4);
    z-index: 999;
    transition: var(--transition);
}

.floating-call:hover {
    transform: scale(1.05) translateY(-5px);
    background: #1e8a4b;
}

@media (max-width: 768px) {
    .floating-call {
        bottom: 20px;
        right: 20px;
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

/* Mobile Adaptations */
@media (max-width: 1100px) {
    .car-details-wrapper { flex-direction: column; }
    .car-details-visual { width: 100%; height: auto; position: relative; top: 0; padding: 20px; }
    .car-details-info { width: 100%; padding: 4rem 5%; }
}

@media (max-width: 900px) {
    .main-nav { display: none; }
    .menu-toggle { display: block; }
    .hero h1 { font-size: 4rem; }
    .section { padding: 6rem 0; }
    .footer-container { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
    .footer-container { grid-template-columns: 1fr; }
    .hero h1 { font-size: 3rem; }
}

/* Animations */
.fade-up { 
    opacity: 0; 
    transform: translateY(30px); 
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1); 
    will-change: opacity, transform;
}
.fade-up.visible { 
    opacity: 1; 
    transform: translateY(0); 
}

/* Fallback for no-js or observer failures */
@media (prefers-reduced-motion: reduce) {
    .fade-up { opacity: 1; transform: none; }
}



/* Mobile Menu Toggle Styling */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10001;
}

.menu-toggle span {
    width: 30px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

@media (max-width: 900px) {
    .menu-toggle { display: flex; }
}

body.mobile-active .menu-toggle span:nth-child(1) { transform: rotate(45deg); }
body.mobile-active .menu-toggle span:nth-child(2) { opacity: 0; transform: translateX(20px); }
body.mobile-active .menu-toggle span:nth-child(3) { transform: rotate(-45deg); }

/* Mobile Menu Overlay */
body.mobile-active .main-nav {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-primary);
    z-index: 10000;
    padding: 10rem 2rem;
    gap: 3rem;
    align-items: center;
    justify-content: center;
    animation: menuFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

body.mobile-active .main-nav a {
    font-size: 2.2rem;
    font-family: var(--font-heading);
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

@keyframes menuFadeIn {
    from { opacity: 0; filter: blur(10px); }
    to { opacity: 1; filter: blur(0); }
}

/* Cleanup redundant sticky CTA from CSS */
.mobile-sticky-cta, .floating-cta { display: none !important; }
