/* styles.css */

/* --- Universal Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html { scroll-behavior: smooth; }
body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #ffffff;
    color: #333;
}
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* === MAIN PAGE STYLES === */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
    url('https://images.unsplash.com/photo-1492144534655-ae79c964c9d7?auto=format&fit=crop&q=80');
    background-size: cover;
    background-position: center;
    color: white;
}
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: rgba(0, 0, 0, 0.3);
}
.logo h1 { font-size: 2rem; font-weight: bold; }
.nav-links { display: flex; list-style: none; gap: 2rem; }
.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}
.nav-links a:hover { color: #ffd700; }
.hero-content {
    height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 5%;
}
.hero-content h2 { font-size: 3.5rem; margin-bottom: 1rem; }
.hero-content p { font-size: 1.2rem; margin-bottom: 2rem; max-width: 600px; }
.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: #ffd700;
    color: black;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: transform 0.3s;
}
.cta-button:hover { transform: translateY(-3px); }
.cars-section { padding: 5rem 5%; background-color: #f4f4f9; }
.cars-section h2 { text-align: center; margin-bottom: 3rem; font-size: 2.5rem; }
.cars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}
.car-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}
.car-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}
.car-image { width: 100%; height: 200px; object-fit: cover; }
.car-details { padding: 1.5rem; }
.car-brand { font-size: 1.4rem; font-weight: bold; margin-bottom: 0.5rem; }
.car-model { color: #666; margin-bottom: 1rem; }
.car-description-short { font-size: 0.9rem; color: #444; margin-bottom: 1rem; }
.car-card-price { font-weight: bold; font-size: 1.2rem; }
footer {
    text-align: center;
    padding: 2rem;
    background-color: #333;
    color: white;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.car-card.visible { animation: fadeInUp 0.8s ease-out forwards; opacity: 0; }
.animate-fadeInUp { animation: fadeInUp 0.8s ease-out forwards; }

/* === DETAIL PAGE STYLES === */
.detail-page-container {
    display: flex;
    max-width: 1300px;
    margin: 0 auto;
    padding: 40px;
    gap: 50px;
    background-color: #fff;
}
.product-column-left { flex: 1.2; min-width: 0; }
.product-column-right {
    flex: 1;
    padding-top: 40px;
    display: flex;
    flex-direction: column;
}
.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #555;
    text-decoration: none;
    font-weight: 500;
}
.back-link:hover { color: #000; }
.gallery-main-image {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 1rem;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: opacity 0.2s ease-in-out;
}

/* ✅ FIXED THUMBNAILS */
.gallery-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.thumbnail-image {
    width: 100px;
    height: 70px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.7;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.thumbnail-image:hover { opacity: 1; }
.thumbnail-image.active {
    border-color: #ffd700;
    opacity: 1;
    transform: scale(1.05);
}
.car-title {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}
.car-description-full {
    font-size: 1rem;
    color: #555;
    margin-bottom: 2.5rem;
}
.features-section { margin-bottom: 2.5rem; }
.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 0.5rem;
}
.features-list {
    list-style-position: inside;
    padding-left: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    list-style-type: '✓  ';
}
.features-list li { font-size: 1rem; }
.pricing-section {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}
.price-label { font-size: 1rem; color: #666; }
.price-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
}
.reserve-button-whatsapp {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 18px;
    background-color: #ffd700;
    color: #1a1a1a;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 8px;
    transition: background-color 0.2s, transform 0.2s;
}
.reserve-button-whatsapp:hover {
    background-color: #e6c300;
    transform: translateY(-2px);
}
.error-message {
    text-align: center;
    padding: 50px;
    font-size: 1.2rem;
}
.error-message a { color: #007bff; }

/* ✅ MOBILE RESPONSIVE */
@media (max-width: 900px) {
    .detail-page-container {
        flex-direction: column;
        padding: 20px;
        gap: 20px;
    }
    .product-column-right { padding-top: 0; }
    .car-title { font-size: 2rem; }
    .pricing-section { margin-top: 1.5rem; }
    .gallery-thumbnails {
        flex-wrap: nowrap;
        overflow-x: auto;
    }
}
