/* --- ENHANCED STYLES V2 --- */

/* --- 1. Core Setup & CSS Variables --- */
:root {
    --color-background: #0D0D0D;
    --color-surface-1: rgba(30, 30, 30, 0.5);
    --color-surface-2: rgba(45, 45, 45, 0.7);
    --color-text-primary: #F5F5F5;
    --color-text-secondary: #A0A0A0;
    --color-brand-red: #FF0033;
    --color-brand-blue: #00A8FF;
    --font-primary: 'Roboto', sans-serif;
    --glow-red: 0 0 15px rgba(255, 0, 51, 0.6), 0 0 5px rgba(255, 0, 51, 0.8);
    --glow-blue: 0 0 15px rgba(0, 168, 255, 0.6), 0 0 5px rgba(0, 168, 255, 0.8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-background);
    color: var(--color-text-primary);
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- 2. Advanced Global & Utility Styles --- */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    text-align: center;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.btn-red {
    background: var(--color-brand-red);
    color: #fff;
    box-shadow: var(--glow-red);
}
.btn-red:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 20px rgba(255, 0, 51, 0.4);
    text-decoration: none;
}

.btn-blue {
    background: var(--color-brand-blue);
    color: #fff;
    width: 100%;
    box-shadow: var(--glow-blue);
}
.btn-blue:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(0, 168, 255, 0.4);
    text-decoration: none;
}

/* --- Scroll Animations --- */
.reveal {
    position: relative;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- 3. Header --- (REVISED NAVIGATION STYLES) --- */
.top-header { background-color: #111; border-bottom: 1px solid #222; padding: 5px 0; font-size: 13px; }
.top-header .container { display: flex; justify-content: flex-end; align-items: center; }
.top-header a { color: var(--color-text-secondary); margin-left: 15px; transition: color 0.3s; }
.top-header a:hover { color: var(--color-brand-red); text-decoration: none;}

.main-header {
    background-color: rgba(13, 13, 13, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 15px 0;
    border-bottom: 2px solid var(--color-brand-red);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.main-header .container { display: flex; justify-content: space-between; align-items: center; }
.main-header .logo img { height: 45px; filter: drop-shadow(0 0 5px rgba(255,255,255,0.3)); }
.header-search { color: #ccc; } /* Keep this if you have the search */

/* --- ALL NEW MEGA MENU STYLES START HERE --- */
nav .nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

nav .nav-links li {
    position: relative;
}

nav .nav-links a {
    color: var(--color-text-primary);
    padding: 15px 20px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 6px;
    transition: background-color 0.3s, color 0.3s;
}

nav .nav-links a:hover,
nav .nav-links li.active > a {
    background-color: var(--color-surface-1);
    color: #fff;
    text-decoration: none;
}

nav .nav-links a i {
    font-size: 0.7em;
    transition: transform 0.3s ease;
}

nav .nav-links li.active > a i {
    transform: rotate(180deg);
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: auto;
    min-width: 550px;
    padding-top: 20px; /* Space between nav and menu */
    
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.98);
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
    z-index: 1001;
}

nav .nav-links li.active .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.mega-menu-content {
    background: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    border-radius: 12px;
    padding: 30px;
    display: flex;
    gap: 40px;
}

.mega-menu-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mega-menu-column h4 {
    font-size: 1rem;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #444;
}

.mega-menu-column h4 i {
    margin-right: 10px;
    color: var(--color-brand-blue);
}

.mega-menu-column a {
    color: var(--color-text-primary);
    padding: 5px 0;
    font-size: 15px;
    font-weight: 400;
    text-transform: none;
    transition: color 0.3s, padding-left 0.3s;
}

.mega-menu-column a:hover {
    color: var(--color-brand-red);
    padding-left: 10px;
    background: none;
}

.featured-product {
    background: rgba(0,0,0,0.2);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border-left: 1px solid #444;
    min-width: 220px;
}

.featured-product img {
    max-width: 120px;
    margin-bottom: 15px;
}

.featured-product h5 {
    font-size: 1rem;
    margin-bottom: 5px;
}
.featured-product p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: 15px;
}
.btn.btn-small {
    padding: 8px 20px;
    font-size: 12px;
}
/* --- END OF MEGA MENU STYLES --- */
/* --- 4. Cinematic Hero Section --- */
@keyframes subtle-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}
.hero-section {
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.9) 70%), url('images/hero-bg.jpg') no-repeat center center;
    background-size: cover;
    padding: 80px 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
}
.hero-section .container { display: flex; align-items: center; justify-content: space-between; }
.hero-content { flex-basis: 55%; }
.hero-content .brand { font-size: 2rem; font-weight: 300; letter-spacing: 4px; color: var(--color-text-secondary); }
.hero-content h1 { font-size: 6rem; font-weight: 900; line-height: 1; margin: 10px 0; text-shadow: 0 0 30px rgba(0,0,0,0.5); }
.hero-content h2 { font-size: 2.5rem; font-weight: 400; color: #ccc; }
.hero-content p { margin: 25px 0 35px; max-width: 450px; line-height: 1.7; font-size: 1.1rem; color: var(--color-text-secondary); }
.hero-image img { max-width: 100%; height: auto; animation: subtle-float 6s ease-in-out infinite; filter: drop-shadow(0 20px 30px rgba(0,0,0,0.6)); }

/* --- 5. Mid-Content & Location (Glassmorphism) --- */
.mid-content-section {
    background: var(--color-background);
    padding: 80px 0;
    border-bottom: 1px solid #222;
}
.mid-content-section .grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}
.promo-box, .services-box, .location-finder {
    background: var(--color-surface-1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 12px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.promo-box:hover, .services-box:hover, .location-finder:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.promo-box, .services-box { text-align: center; }
.promo-box h3, .services-box h3, .location-finder h3 { margin-bottom: 20px; font-size: 1.8rem; font-weight: 700; }
.promo-box img { max-width: 150px; margin-bottom: 20px; }
.services-box img { width: 100%; border-radius: 8px; margin-bottom: 15px; }
.promo-box .brand { font-weight: bold; font-size: 1.5rem; }
.promo-box p, .services-box p { color: var(--color-text-secondary); }
.location-finder input { width: 100%; padding: 12px; margin-bottom: 15px; border-radius: 5px; background: rgba(0,0,0,0.3); border: 1px solid #444; color: #fff; font-size: 1rem; }
.location-finder p { color: var(--color-text-secondary); margin-bottom: 15px; line-height: 1.6; }

/* --- 6. Product Finder & Interactive Cards --- */
.product-finder-section { background-color: #111; padding: 80px 0; }
.product-finder-section h2 { text-align: center; font-size: 2.5rem; margin-bottom: 50px; }
.finder-wrapper { display: flex; gap: 40px; align-items: flex-start; }
.vehicle-search-form { flex-basis: 25%; background: var(--color-surface-2); padding: 25px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); position: sticky; top: 120px; }
.vehicle-search-form select { width: 100%; padding: 12px; margin-bottom: 15px; background: #333; color: #fff; border: 1px solid #555; border-radius: 5px; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23aaa' class='bi bi-chevron-down' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 15px center; }
.search-by-size { display: block; text-align: center; margin-top: 15px; color: var(--color-text-secondary); }

.product-results { flex-basis: 75%; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.product-card {
    background: var(--color-surface-2);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer;
}
.product-card:hover {
    transform: translateY(-15px) rotateX(5deg);
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}
.product-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: radial-gradient(circle at 50% 0%, rgba(255,255,255,0.1), transparent 70%); opacity: 0; transition: opacity 0.5s; }
.product-card:hover::before { opacity: 1; }
.product-card img { max-width: 180px; height: auto; margin-bottom: 20px; transition: transform 0.5s ease; }
.product-card:hover img { transform: scale(1.1) rotate(-5deg); }
.product-card h4 { font-size: 1.2rem; margin-bottom: 8px; color: var(--color-text-primary); }
.product-card p { color: var(--color-text-secondary); margin-bottom: 15px; }
.product-card .btn-red { position: absolute; bottom: -60px; left: 50%; transform: translateX(-50%); width: 80%; transition: bottom 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); box-shadow: none; }
.product-card:hover .btn-red { bottom: 20px; box-shadow: var(--glow-red); }

.pagination { margin-top: 50px; display: flex; justify-content: space-between; align-items: center; color: var(--color-text-secondary); }
.pagination a { color: var(--color-brand-blue); font-weight: bold; }

/* --- 7. Footer --- */
.main-footer { background-color: #000; color: #777; padding: 30px 0; border-top: 1px solid #222; text-align: center; }
.main-footer .container { display: block; }
.main-footer .footer-links { margin-top: 10px; }
.main-footer .footer-links a { margin: 0 15px; color: #999; transition: color 0.3s; }
.main-footer .footer-links a:hover { color: var(--color-brand-red); text-decoration: none; }