:root {
    /* Color Palette - Premium Dark & Red (Primary Theme) */
    --bg-dark: #0A0A0B;
    --bg-card: #141416;
    --primary: #CC0000;
    --primary-hover: #A30000;
    --text-main: #FFFFFF;
    --text-muted: #A0A0A5;
    --accent: #FF3D3D;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --bg-input: #1a1a1c;
    
    /* Typography */
    --font-main: 'Outfit', sans-serif;
    
    /* Spacing & Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --header-height: 80px;
}

/* Light Theme Variables */
[data-theme="light"] {
    --bg-dark: #F5F5F7;
    --bg-card: #FFFFFF;
    --text-main: #1D1D1F;
    --text-muted: #6E6E73;
    --glass: rgba(0, 0, 0, 0.03);
    --glass-border: rgba(0, 0, 0, 0.08);
    --bg-input: #FFFFFF;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

ul { list-style: none; }
a { text-decoration: none; color: inherit; transition: var(--transition); }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-padding {
    padding: 80px 0;
}

.glass {
    background: var(--glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

/* Typography Helpers */
span { color: var(--primary); }
h1, h2, h3 { font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(204, 0, 0, 0.2);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.btn-icon {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
}

.btn-icon:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--glass-border);
    border-color: var(--primary);
}

/* Header */
.header {
    height: var(--header-height);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: #000000 !important; /* Header always black */
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.nav-link {
    color: #FFFFFF !important; /* Force white text for header */
}

.logo {
    color: #FFFFFF !important;
    display: flex;
    align-items: center;
}

.logo img {
    height: 70px; /* Increased from 60px */
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

.logo:hover img {
    transform: scale(1.05);
}

.nav-list {
    display: flex;
    gap: 2rem;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background-color: var(--text-main);
    transition: var(--transition);
    border-radius: 2px;
}

/* Hero Slider */
.hero {
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero-slider {
    height: 100%;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
}

.slide.active {
    opacity: 1;
}

.slide-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.4);
}

.slide-content {
    position: relative;
    z-index: 1;
}

.slide-content h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin: 1rem 0;
}

.sidebar-header h2 {
    display: flex;
    align-items: center;
}

.sidebar-header .logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.sidebar-header span {
    color: var(--primary);
}

.badge {
    background: var(--primary);
    padding: 0.4rem 1rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Filters */
.search-section {
    margin-top: -60px;
    position: relative;
    z-index: 10;
}

.search-container {
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) auto;
    gap: 1.5rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.filter-group select {
    background: var(--bg-input);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 0.8rem;
    border-radius: 8px;
    outline: none;
}

/* Schedule */
.schedule-container {
    padding: 4rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.schedule-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 1rem;
    border-radius: 8px;
    outline: none;
}

.input-group input:focus {
    border-color: var(--primary);
}

/* Slider Controls */
.slider-controls {
    position: absolute;
    bottom: 40px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    z-index: 10;
}

.slider-controls button {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.slider-controls button:hover {
    color: var(--primary);
}

.dots {
    display: flex;
    gap: 0.8rem;
}

.dot {
    width: 30px;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background: var(--primary);
    width: 50px;
}

/* Inventory Grid */
.car-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

@media (max-width: 1100px) {
    .car-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
    .car-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .car-grid { grid-template-columns: 1fr; }
}

.car-card {
    background: var(--bg-card);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

.car-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
}

.car-image {
    height: 220px;
    overflow: hidden;
}

.car-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.car-details {
    padding: 1.5rem;
}

.car-info-top {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.car-year {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.car-details h3 {
    font-size: 1.2rem;
    margin-top: 0.2rem;
}

.car-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin: 1.5rem 0;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide.active .slide-content * {
    animation: fadeInUp 0.8s ease forwards;
}

.slide.active .slide-content h1 { animation-delay: 0.2s; }
.slide.active .slide-content p { animation-delay: 0.4s; }
.slide.active .slide-content .hero-btns { animation-delay: 0.6s; }

/* Services */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.service-card {
    padding: 3rem 2rem;
    text-align: center;
    transition: var(--transition);
}

.service-card:hover {
    background: rgba(204, 0, 0, 0.05);
    border-color: var(--primary);
    transform: translateY(-5px);
}

.service-card i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background: #050505;
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 2.5fr;
    gap: 2rem;
}

.footer-brand p {
    margin: 1.5rem 0;
    color: var(--text-muted);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--glass);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
}

.social-links a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.footer-links h3, .footer-contact h3 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.footer-contact i {
    color: var(--primary);
}

.footer-bottom {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.footer-credits {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.footer-credits a:hover {
    color: var(--primary);
}

.admin-login-link {
    font-size: 1rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.admin-login-link:hover {
    color: var(--primary);
    transform: rotate(45deg);
}

/* Responsive */
.filter-actions {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

/* Cookie Popup */
.cookie-popup {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    width: 90%;
    max-width: 600px;
    padding: 1.5rem 2rem;
    border-radius: 12px;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    opacity: 0;
    transition: all 0.5s ease;
    border: 1px solid var(--glass-border);
}

.cookie-popup.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.cookie-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    width: 100%;
}

.cookie-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.cookie-content a {
    color: var(--primary);
    text-decoration: none;
}

/* Floating WhatsApp */
.whatsapp-floating-wrapper {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
}

.whatsapp-btn-main {
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(204, 0, 0, 0.4);
    transition: var(--transition);
}

.whatsapp-btn-main:hover {
    transform: scale(1.1) rotate(5deg);
    background: var(--primary-hover);
}

.whatsapp-chat-box {
    width: 320px;
    border-radius: 16px;
    overflow: hidden;
    display: none;
    flex-direction: column;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    animation: slideUp 0.3s ease;
}

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

.whatsapp-chat-box.active {
    display: flex;
}

.chat-header {
    background: var(--primary);
    padding: 1.2rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.chat-header i {
    font-size: 1.5rem;
}

.chat-header div {
    display: flex;
    flex-direction: column;
}

.chat-header strong {
    font-size: 1rem;
    display: block;
}

.chat-header span {
    font-size: 0.75rem;
    opacity: 0.8;
}

.chat-header button {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.7;
}

.chat-body {
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.1);
    min-height: 80px;
}

.chat-body p {
    background: white;
    color: #333;
    padding: 0.8rem 1rem;
    border-radius: 12px 12px 12px 0;
    font-size: 0.85rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.chat-footer {
    padding: 1rem;
    display: flex;
    gap: 0.5rem;
    border-top: 1px solid var(--glass-border);
}

.chat-footer input {
    background: var(--glass);
    padding: 0.7rem;
    font-size: 0.85rem;
}

.chat-footer button {
    background: var(--primary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

@media (max-width: 768px) {
    .cookie-popup {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1.5rem;
    }
    .cookie-content {
        flex-direction: column;
        gap: 1rem;
    }
    .whatsapp-btn-main {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    .whatsapp-chat-box {
        width: calc(100vw - 4rem);
    }
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    .nav-list, .nav-actions { display: none; }
    .menu-toggle { display: flex; }
    .slide-content h1 { font-size: 2.5rem; }
    .schedule-container { grid-template-columns: 1fr; gap: 2rem; padding: 2rem; }
    .search-container { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr; gap: 2rem; }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    width: 100%;
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 2.5rem;
    animation: modalSlide 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: rotate(90deg);
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 1rem;
}

/* Gallery inside Modal */
.modal-gallery {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.main-image {
    width: 100%;
    height: 350px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnails {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.thumb {
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    opacity: 0.6;
}

.thumb:hover, .thumb.active {
    opacity: 1;
    border-color: var(--primary);
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Modal Info & Tabs */
.modal-header {
    margin-bottom: 2rem;
}

.modal-header h2 {
    font-size: 2rem;
    margin: 0.5rem 0;
}

.modal-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.tab-btn.active {
    color: var(--text-main);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
}

.tab-content {
    display: none;
    min-height: 150px;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

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

.tab-content p {
    color: var(--text-muted);
    line-height: 1.8;
}

.accessories-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.accessories-list li {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.accessories-list li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #28a745; /* Success Green */
}

.modal-actions {
    margin-top: 3rem;
}

/* Responsive Modal */
@media (max-width: 900px) {
    .modal-grid { grid-template-columns: 1fr; gap: 2rem; }
    .modal-content { padding: 1.5rem; }
    .main-image { height: 250px; }
}

/* Map Section Styles */
.map-container {
    padding: 3rem;
}

.map-wrapper {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    /* "Dark mode" filter that makes reds more vivid */
    filter: invert(90%) hue-rotate(180deg) brightness(0.8) contrast(1.5) saturate(1.8);
}

/* Ensure icons and buttons in header also stay white in light mode */
[data-theme="light"] .header .btn-icon, 
[data-theme="light"] .header .btn-outline {
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="light"] .header .menu-toggle span {
    background-color: #FFFFFF;
}
.wa-link {
    color: var(--primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.wa-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}
