/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a1a1a;
    --secondary-color: #c9a74d;
    --accent-color: #2c3e50;
    --light-color: #f8f9fa;
    --dark-color: #121212;
    --gray-color: #6c757d;
    --light-gray: #e9ecef;
    --success-color: #28a745;
    --danger-color: #dc3545;
    
    --font-primary: 'Montserrat', sans-serif;
    --font-secondary: 'Playfair Display', serif;
    
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--primary-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-secondary);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.75rem;
}

p {
    margin-bottom: 1rem;
}

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

/* Buttons */
.btn-primary, .btn-secondary, .btn-whatsapp, .btn-book, .btn-view-all {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    gap: 8px;
}

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

.btn-primary:hover {
    background-color: #b8942e;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

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

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-whatsapp {
    background-color: #25D366;
    color: white;
}

.btn-whatsapp:hover {
    background-color: #1da851;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-book {
    background-color: var(--accent-color);
    color: white;
    width: 100%;
    margin-top: 15px;
}

.btn-book:hover {
    background-color: #1a252f;
    transform: translateY(-2px);
}

.btn-view-all {
    background-color: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

.btn-view-all:hover {
    background-color: var(--secondary-color);
    color: var(--dark-color);
    transform: translateY(-2px);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 15px 0;
    transition: var(--transition);
}

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

.logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo-text {
    font-family: var(--font-secondary);
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
    line-height: 1;
}

.logo-subtext {
    font-size: 0.75rem;
    color: var(--light-color);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    color: var(--light-color);
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--secondary-color);
}

.nav-cta {
    display: flex;
    align-items: center;
    gap: 20px;
}

.phone-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--light-color);
    font-weight: 500;
}

.phone-link:hover {
    color: var(--secondary-color);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--light-color);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
                url('https://images.unsplash.com/photo-1503376780353-7e6692767b70?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    color: var(--light-color);
    padding-top: 80px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(201, 167, 77, 0.1) 0%, rgba(44, 62, 80, 0.1) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 600px;
    opacity: 0.8;
}

.hero-cta {
    display: flex;
    gap: 20px;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 3rem;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

/* Section Styles */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.section-header p {
    color: var(--gray-color);
    font-size: 1.1rem;
}

/* Featured Cars */
.featured-cars {
    background-color: var(--light-color);
}

.cars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.car-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.car-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.car-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

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

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

/* Clickable image variant — applied to .car-image when the car has at least
   one photo, so visitors can tap the image (in addition to the badge) to
   open the gallery. role="button" + tabindex="0" in the markup; keyboard
   handler in fleet.js opens on Enter / Space. */
.car-image--clickable {
    cursor: zoom-in;
}

.car-image--clickable:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: -2px;
}

.car-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--secondary-color);
    color: var(--dark-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Photo-count badge sits on the bottom-left of the car image so it doesn't
   collide with the availability badge on the top-right. As a <button>, it's
   keyboard-focusable and has a distinct hover state to telegraph that
   clicking it opens the gallery. */
.car-photo-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    padding: 5px 12px;
    border-radius: 14px;
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1;
    backdrop-filter: blur(2px);
}
.car-photo-badge--btn {
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease, transform 0.15s ease;
}
.car-photo-badge--btn:hover {
    background: rgba(0, 0, 0, 0.85);
    transform: translateY(-1px);
}
.car-photo-badge--btn:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

.car-info {
    padding: 25px;
}

.car-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.car-header h3 {
    margin-bottom: 0;
    font-size: 1.5rem;
}

.car-price {
    text-align: right;
}

.price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    display: block;
}

.period {
    font-size: 0.9rem;
    color: var(--gray-color);
}

.car-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--light-gray);
}

.spec {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-color);
}

.spec i {
    color: var(--secondary-color);
    width: 20px;
}

.car-features {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.feature-tag {
    background-color: var(--light-gray);
    color: var(--gray-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.view-all {
    text-align: center;
}

/* Why Choose Us */
.why-us {
    background-color: white;
}

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

.feature {
    text-align: center;
    padding: 30px;
    border-radius: 8px;
    transition: var(--transition);
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.8rem;
    color: var(--dark-color);
}

.feature h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.feature p {
    color: var(--gray-color);
}

/* Testimonials */
.testimonials {
    background-color: var(--light-color);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
}

.testimonial {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.testimonial-content {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--light-gray);
}

.testimonial-content p {
    font-style: italic;
    color: var(--gray-color);
    font-size: 1.1rem;
}

.testimonial-author {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.author-info h4 {
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.author-info span {
    color: var(--gray-color);
    font-size: 0.9rem;
}

.rating {
    color: var(--secondary-color);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), 
                url('https://images.unsplash.com/photo-1503376780353-7e6692767b70?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80');
    background-size: cover;
    background-position: center;
    color: var(--light-color);
    text-align: center;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.cta-content h2 {
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Footer */
.footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    color: var(--secondary-color);
    font-size: 1.3rem;
    margin-bottom: 20px;
    font-family: var(--font-primary);
}

.footer-logo {
    margin-bottom: 20px;
}

.footer p {
    opacity: 0.8;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--secondary-color);
    color: var(--dark-color);
    transform: translateY(-3px);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    opacity: 0.8;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    opacity: 1;
    color: var(--secondary-color);
    padding-left: 5px;
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.contact-info i {
    color: var(--secondary-color);
    margin-top: 5px;
}

.contact-info a:hover {
    color: var(--secondary-color);
}

.hours li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hours li:last-child {
    border-bottom: none;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom p {
    opacity: 0.6;
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    opacity: 0.6;
    transition: var(--transition);
}

.footer-links a:hover {
    opacity: 1;
    color: var(--secondary-color);
}

/* Responsive Design */
@media (max-width: 992px) {
    h1 {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 2.2rem;
    }
    
    .hero-title {
        font-size: 3.2rem;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--dark-color);
        flex-direction: column;
        justify-content: flex-start;
        padding: 40px 20px;
        transition: var(--transition);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-links {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        margin-bottom: 30px;
    }
    
    .nav-cta {
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: 15px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .cars-grid {
        grid-template-columns: 1fr;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .hero {
        min-height: 600px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-header p {
        font-size: 1rem;
    }
    
    .feature {
        padding: 20px;
    }
    
    .testimonial {
        padding: 20px;
    }
}

/* Inner Pages */
.page-header {
    padding: 140px 0 70px;
    background: linear-gradient(rgba(18, 18, 18, 0.85), rgba(18, 18, 18, 0.85)),
                url('https://images.unsplash.com/photo-1503376780353-7e6692767b70?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80');
    background-size: cover;
    background-position: center;
    color: var(--light-color);
    text-align: center;
}

.page-header h1 {
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.fleet-filter,
.services-section,
.process-section,
.requirements-section,
.story-section,
.values-section,
.why-choose-section,
.team-section,
.contact-section,
.map-section,
.faq-section,
.legal-section,
.car-details-section {
    background-color: #fff;
}

.fleet-filter {
    background-color: var(--light-color);
}

.filter-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    align-items: end;
}

.filter-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

.filter-group select,
.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    font-family: var(--font-primary);
}

.fleet-grid {
    display: grid;
    /*
      auto-fill (not auto-fit) keeps empty tracks in the row so a single
      published car doesn't stretch to full container width. Cards stay a
      consistent size even when the CRM only has a handful of cars flipped
      to "Show on public website".
    */
    grid-template-columns: repeat(auto-fill, minmax(280px, 320px));
    gap: 24px;
    justify-content: center;
}

.fleet-grid .car-card {
    max-width: 320px;
    width: 100%;
}

.fleet-grid .car-image {
    height: 200px;
}

.empty-state {
    color: var(--gray-color);
}

.pagination {
    margin-top: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.pagination-btn {
    border: 1px solid var(--light-gray);
    background: #fff;
    padding: 10px 14px;
    border-radius: 6px;
    cursor: pointer;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.services-grid,
.values-grid,
.advantages-grid,
.team-grid,
.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.service-card,
.value-card,
.advantage,
.team-member,
.faq-item,
.contact-form-container,
.contact-item,
.car-details-card {
    background: #fff;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    padding: 22px;
    box-shadow: var(--shadow);
}

.service-icon,
.value-icon,
.contact-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary-color);
    color: var(--dark-color);
    margin-bottom: 14px;
}

.service-features {
    list-style: none;
    margin-top: 10px;
}

.service-features li {
    margin-bottom: 8px;
    color: var(--gray-color);
}

.service-features i {
    color: var(--success-color);
    margin-right: 8px;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.step {
    text-align: center;
}

.step-number,
.advantage-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--secondary-color);
    color: var(--dark-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 10px;
}

.requirements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.requirement {
    text-align: center;
    padding: 18px;
}

.requirement i {
    color: var(--secondary-color);
    font-size: 1.6rem;
    margin-bottom: 10px;
}

.story-content,
.contact-grid,
.car-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.story-image img,
.member-image img,
.car-main-image {
    width: 100%;
    border-radius: 8px;
    object-fit: cover;
}

.member-role {
    color: var(--secondary-color);
    font-weight: 600;
}

.contact-details {
    display: grid;
    gap: 14px;
}

.social-contact .social-links {
    margin-top: 10px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 12px;
}

.map-container iframe {
    border-radius: 8px;
}

.faq-question {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    cursor: pointer;
}

.faq-answer {
    display: none;
    margin-top: 10px;
    color: var(--gray-color);
}

.faq-item.active .faq-answer {
    display: block;
}

.checkbox-group {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.legal-content {
    max-width: 900px;
}

.legal-content h2 {
    margin-top: 24px;
}

.car-details-card ul {
    margin: 14px 0 20px 20px;
}

/* ─── Car details page (car-details.html) ─────────────────────────────────
   Populated dynamically by js/details.js after fetching the vehicle
   from Supabase. Main image gets a "click to enlarge" cursor and the
   thumb strip below it lets visitors switch the cover. */

#cd-main-wrap {
    position: relative;
}

.cd-photo-count {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    padding: 5px 12px;
    border-radius: 14px;
    font-size: 0.78rem;
    font-weight: 500;
    pointer-events: none;
}

.cd-thumb-strip {
    margin-top: 14px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.cd-thumb {
    width: 80px;
    height: 60px;
    flex-shrink: 0;
    cursor: pointer;
    padding: 0;
    background: none;
    font: inherit;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    opacity: 0.7;
    transition: opacity 0.15s, border-color 0.15s;
}

.cd-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cd-thumb:hover { opacity: 0.95; }
.cd-thumb:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}
.cd-thumb.active {
    opacity: 1;
    border-color: var(--secondary-color);
}

.cd-tagline {
    color: var(--gray-color);
    margin: 4px 0 16px;
}

.cd-price-block {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--light-gray);
}

.cd-price {
    font-family: var(--font-secondary);
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
    line-height: 1;
}

.cd-period {
    font-size: 0.95rem;
    color: var(--gray-color);
    margin-left: 6px;
}

/* Spec list overrides the .car-details-card ul (which has indent + bullets)
   so we can use icon rows instead. */
.car-details-card ul.cd-spec-list,
.car-details-card ul.cd-includes {
    list-style: none;
    margin: 12px 0 16px 0;
    padding: 0;
}

.cd-spec-list li,
.cd-includes li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 0.95rem;
}

.cd-spec-list li i,
.cd-includes li i {
    width: 18px;
    color: var(--secondary-color);
}

/* "View Details" link on each fleet card. Sits below the Book Now /
   Check Availability buttons. Visually a quiet text link with an icon
   so it doesn't compete with the primary CTA. */
.btn-details {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 8px;
    padding: 10px 16px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary-color);
    background: transparent;
    border: 1px solid var(--secondary-color);
    transition: var(--transition);
}

.btn-details:hover {
    background-color: var(--secondary-color);
    color: var(--dark-color);
}

@media (max-width: 768px) {
    .story-content,
    .contact-grid,
    .car-details-grid {
        grid-template-columns: 1fr;
    }
}

/* Admin */
.admin-section {
    background-color: var(--light-color);
}

.admin-card {
    max-width: 920px;
    margin: 0 auto 24px;
    background: #fff;
    border: 1px solid var(--light-gray);
    border-radius: 10px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.admin-form .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.admin-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.admin-message {
    margin-top: 10px;
    font-weight: 600;
}

.admin-message.ok {
    color: var(--success-color);
}

.admin-message.error {
    color: var(--danger-color);
}

.admin-image-preview {
    width: 100%;
    max-width: 420px;
    border-radius: 8px;
    border: 1px solid var(--light-gray);
}

.hidden {
    display: none !important;
}

.admin-table-wrap {
    margin-top: 14px;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    border: 1px solid var(--light-gray);
    padding: 8px;
    text-align: left;
    vertical-align: middle;
}

.admin-table input,
.admin-table select {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--light-gray);
    border-radius: 4px;
}

.admin-actions {
    display: flex;
    gap: 8px;
}

.btn-sm {
    padding: 8px 10px;
    font-size: 0.9rem;
}

.btn-danger {
    border-color: var(--danger-color);
    color: var(--danger-color);
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal-card {
    width: 100%;
    max-width: 760px;
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow-lg);
}

/* ─── Photo gallery (lightbox) ─────────────────────────────────────────────
   Built dynamically by fleet.js when a multi-photo car badge is clicked.
   The overlay structure is created once on open and only the dynamic
   parts (current image src, counter text, active-thumb class) mutate on
   navigation — keeping styles here lets the browser cache them with the
   rest of the stylesheet. */

.photo-gallery-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.photo-gallery-header {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
    /* Header row is purely informational; clicks pass through to the
       overlay (background-click closes the dialog). */
    pointer-events: none;
}

.photo-gallery-title {
    font-family: "Playfair Display", serif;
    font-size: 18px;
    font-weight: 500;
    max-width: 70%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.photo-gallery-counter {
    font-size: 13px;
    color: #d4af37;
}

.photo-gallery-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Header is pointer-events: none, so re-enable on the close button. */
    pointer-events: auto;
}

.photo-gallery-close:hover {
    background: rgba(255, 255, 255, 0.15);
}

.photo-gallery-stage {
    position: relative;
    max-width: min(90vw, 1200px);
    max-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-gallery-stage img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.photo-gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-gallery-arrow:hover {
    background: rgba(0, 0, 0, 0.75);
}

.photo-gallery-arrow.prev { left: -64px; }
.photo-gallery-arrow.next { right: -64px; }

@media (max-width: 900px) {
    .photo-gallery-arrow.prev { left: 8px; }
    .photo-gallery-arrow.next { right: 8px; }
}

.photo-gallery-thumbs {
    margin-top: 16px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    max-width: 90vw;
    padding-bottom: 4px;
}

/* Thumbnails are <button> elements (keyboard-accessible). The reset
   below neutralises default UA button chrome so they keep the visual
   look of the original divs. */
.photo-gallery-thumb {
    width: 64px;
    height: 48px;
    flex-shrink: 0;
    cursor: pointer;
    padding: 0;
    background: none;
    font: inherit;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    opacity: 0.6;
    transition: opacity 0.15s, border-color 0.15s;
}

.photo-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-gallery-thumb:hover { opacity: 0.9; }
.photo-gallery-thumb:focus-visible {
    outline: 2px solid #d4af37;
    outline-offset: 2px;
}
.photo-gallery-thumb.active {
    opacity: 1;
    border-color: #d4af37;
}