/* General Body and Typography */

/* Universal reset for all elements */
* {
    box-sizing: border-box; 
    padding: 0;
    margin: 0;
}

:root {
    /* --- COLOR Theme PALETTE --- */
    --primary-color: #c90b24;    
    --dark-background: #1E1917;   
    --background-color: #f4f4f9; 
    --white: #ffffff;
    --border-color: #e0e0e0;
    --deposit-color: #e67e22; 
}

html {
     scroll-behavior: smooth; 
    font-size: 16px; 
}

body.lightbox-active {
    overflow: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--dark-background);
    line-height: 1.6;
    display: flex; 
    flex-direction: column; 
    min-height: 100vh; 
}

/* FIX: Added .footer-container here so it perfectly centers on large desktop monitors */
.container, .footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem; 
}

/* Default styles for headings */
h1, h2, h3, h4 {
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--dark-background);
}
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }

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

.page-section ul {
    list-style-position: inside;
    padding-left: 0;
}
.page-section ul li {
    margin-bottom: 0.75rem;
}

/* Header and Navigation */
.main-header {
    background-color: var(--primary-color);
    border-bottom: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000; 
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    height: 80px;
}
.logo-container .logo {
    height: 60px;
    border-radius: 10px;
}

.main-nav .navbar {
    display: flex; 
    gap: 25px;
    list-style: none;
}

.main-nav .navbar a {
    color: var(--white);
    font-weight: 500;
    padding: 5px 0;
    position: relative;
    text-decoration: none;
    transition: color 0.3s ease;
}

.main-nav .navbar a:hover,
.main-nav .navbar a.active {
    color: var(--white);
    border-bottom-color: var(--white);
    font-weight: bold;
}

#menu-icon {
    display: none;
    font-size: 2.5rem;
    cursor: pointer;
    color: var(--white);
    transition: transform 0.3s ease;
    background: none;
    border: none;
    padding: 0;
}

/* Main Content Area */
main {
    padding-top: 80px; 
    flex-grow: 1; 
}

/* Homepage Hero Section */
.hero-section {
    background: linear-gradient(to right, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.5) 100%), url('cars/soldcars/mazdamx5.jpg') no-repeat center center/cover;
    height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
}

.hero-content {
    position: relative;
    z-index: 2;  
    padding: 0 1.5rem;
    max-width: 800px;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: #e0e0e0;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-hero {
    padding: 14px 32px;
    font-size: 1.1rem;
    border-radius: 8px;
}

.btn-hero-outline {
    padding: 14px 32px;
    font-size: 1.1rem;
    border-radius: 8px;
    background: transparent;
    border: 2px solid var(--white);
    color: var(--white);
}

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

/* Modern Quick Features Strip (Homepage) */
.quick-features-strip {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.quick-features-grid {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.quick-feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quick-feature-item i {
    font-size: 2.2rem;
    color: var(--primary-color);
}

.quick-feature-item h4 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--dark-background);
}

.quick-feature-item p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.testimonials-section {
    padding: 4rem 0;
    background-color: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}
.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}
.section-header p {
    font-size: 1.1rem;
    color: #555;
    max-width: 600px;
    margin: 0 auto;
}

.reviews-widget-container {
    max-width: 1100px;
    margin: 0 auto;
    overflow-x: hidden;
}

/* --- Inventory Page --- */
#inventory-list {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.vehicle-listing {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    transition: box-shadow 0.3s ease;
}

.vehicle-listing:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.vehicle-listing__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.vehicle-listing__header .vehicle-title {
    font-size: 1.75rem;
    margin: 0;
}

.vehicle-listing__header .vehicle-price {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0;
    white-space: nowrap; 
}

.vehicle-listing__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 2rem;
}

.vehicle-listing--reverse .vehicle-listing__content .vehicle-listing__image-gallery {
    grid-column: 2 / 3;
    grid-row: 1;
}

.vehicle-listing--reverse .vehicle-listing__content .vehicle-listing__details {
    grid-column: 1 / 2;
    grid-row: 1;
}

.vehicle-listing__details {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.vehicle-listing__details .vehicle-description {
    font-size: 0.95rem;
    color: #555;
    margin-top: 0;
}

.vehicle-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 10px;
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.vehicle-specs li {
    background-color: var(--background-color);
    padding: 12px;
    border-radius: 8px;
    display: flex;
    flex-direction: column; 
    align-items: center;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
}

.vehicle-specs i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 5px;
    margin-right: 0; 
}

/* About Page Specifics */
.about-content-wrapper {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

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

.about-feature-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.about-feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.about-feature-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: inline-block;
}

.about-feature-card h4 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: var(--dark-background);
}

.about-feature-card p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

/* Contact Page Specifics */
.modern-contact-grid {
    grid-template-columns: 1.5fr 1fr; 
    gap: 3rem;
}

.contact-form-section {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.contact-info-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    position: sticky;
    top: 100px; 
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-info-item:last-child {
    margin-bottom: 0;
}

.contact-info-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    background: rgba(201, 11, 36, 0.1); 
    padding: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-info-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
    color: var(--dark-background);
}

/* ==================================
SINGLE VEHICLE PAGE STYLES (Split Layout)
================================== */

.back-link {
    display: inline-flex; 
    align-items: center; 
    gap: 5px; 
    margin-bottom: 1.5rem; 
    font-weight: 600; 
    color: #555;
    transition: color 0.3s ease;
}
.back-link:hover {
    color: var(--primary-color);
}

/* The magic grid that splits the page */
.vehicle-details-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 3rem;
    align-items: start; 
}

/* --- Left Column: Images --- */
.vehicle-gallery-section .vehicle-listing__image-gallery {
    margin: 0;
    gap: 1rem;
}

.vehicle-gallery-section .main-img {
    height: auto;
    max-height: 550px;
}

/* Make thumbnails fit nicely based on 5 per row */
.vehicle-gallery-section .vehicle-listing__thumbnails {
    grid-template-columns: repeat(5, 1fr);
}


/* --- Right Column: Sticky Box --- */
.vehicle-info-section {
    position: sticky; 
    top: 100px; 
    background: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); 
}

.vehicle-info-section .vehicle-title {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.vehicle-info-section .vehicle-price {
    font-size: 1.8rem;
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.vehicle-specs-sidebar {
    grid-template-columns: repeat(2, 1fr); 
    margin-bottom: 2rem;
}

.vehicle-description-box {
    margin-bottom: 2.5rem;
}

.vehicle-description-box h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #333;
}

.vehicle-description-box p {
    font-size: 1rem;
    line-height: 1.7;
    color: #555;
}

.btn-enquire-full {
    display: block;
    width: 100%;
    font-size: 1.2rem;
    padding: 16px;
}


/* General Gallery Styles */
.vehicle-listing__image-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.vehicle-listing__image {
    position: relative;
    cursor: pointer;
}

.vehicle-listing__image .main-img {
    width: 100%;
    border-radius: 8px;
    object-fit: cover;
    display: block;
    border: 1px solid var(--border-color);
}

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

.vehicle-listing__thumbnails .thumbnail-btn {
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    width: 100%;
}

.vehicle-listing__thumbnails .thumbnail-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease, opacity 0.3s ease;
    opacity: 0.7;
}

.vehicle-listing__thumbnails .thumbnail-img:hover {
    opacity: 1;
}

.vehicle-listing__thumbnails .thumbnail-img.active {
    border-color: var(--primary-color);
    opacity: 1;
}


/* ==================================
   MODERN FOOTER (FIXED GRID)
================================== */
.main-footer {
     background-color: var(--dark-background);
    color: var(--white);
    padding: 4rem 0 2rem 0;
    margin-top: auto; 
    border-top: 4px solid var(--primary-color);
}

.modern-footer-grid {
    display: grid !important; 
    grid-template-columns: 2fr 1fr 1.5fr 1fr; 
    gap: 3rem; 
    width: 100%;
}

.footer-column {
    text-align: left;
    margin-bottom: 1.5rem;
}

.footer-column h4 {
    font-size: 1.2rem;
    color: var(--white);
    font-weight: bold;
    border-bottom: 2px solid var(--white);
    margin-bottom: 0.5rem;
    display: inline-block;
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column ul a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.footer-column ul a:hover {
    border-bottom: var(--white) 2px solid;
    font-weight: bold;
}

.footer-copyright {
    text-align: center;
    padding-top: 1.5rem;
    color: var(--white);
    font-size: 0.9rem;
}

.social-icon {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background-color: rgba(255,255,255,0.1);
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-icon i {
  font-size: 1.5rem;
  color: #fff;
}

.social-icon.facebook:hover {
 transform: translateY(-3px); 
}

/* Lightbox Styles */
#lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

#lightbox-overlay.lightbox-hidden {
    display: none;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 10;  
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
}
.lightbox-close:hover {
    color: #bbb;
}

.lightbox-content {
    position: relative;
    width: 100%;
    max-width: 100vw;
    max-height: 75vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-main-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; 
}

.lightbox-prev, .lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 30px;
    transition: 0.3s ease;
    user-select: none; 
    background-color: rgba(0,0,0,0.3);
    border: none;
}
.lightbox-prev { left: 0; }
.lightbox-next { right: 0; }
.lightbox-prev:hover, .lightbox-next:hover {
    background-color: rgba(0,0,0,0.8);
}

.lightbox-info {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background-color: rgba(0,0,0,0.5);
    padding: 5px 15px;
    border-radius: 5px;
    font-size: 0.9rem;
}

.lightbox-thumbnails-container {
    margin-top: 15px;
    width: 100%;
    max-width: 90vw;
    display: flex;
    justify-content: flex-start; 
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0; 
    scroll-behavior: smooth;
}

.lightbox-thumbnails-container .thumb-btn {
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
}

.lightbox-thumbnails-container img {
    height: 80px;
    width: auto;
    flex-shrink: 0; 
    object-fit: cover;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s ease, transform 0.3s ease;
    border: 2px solid transparent;
}
.lightbox-thumbnails-container img:hover {
    opacity: 1;
    transform: scale(1.05);
}
.lightbox-thumbnails-container img.active {
    opacity: 1;
    border-color: var(--primary-color);
}


/* --- Contact Page --- */
.contact-header {
    text-align: center;
    margin-bottom: 2rem;
}

.contact-container {
    display: grid;
    grid-template-columns: 2fr auto 1fr; 
    gap: 3rem;
    align-items: flex-start;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    background-color: var(--white); 
    color: var(--dark-background); 
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
   background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2016%2016'%20fill%3D'%231E1917'%3E%3Cpath%20d%3D'M8%2011.25a.75.75%200%200%201-.53-.22l-4-4a.75.75%200%201%201%201.06-1.06L8%209.94l3.47-3.47a.75.75%200%201%201%201.06%201.06l-4%204a.75.75%200%200%201-.53.22Z'%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 35px;
}

.contact-divider-vertical {
    width: 1px;
    background-color: var(--border-color);
    height: 100%;
    min-height: 250px;
}

.contact-divider-horizontal {
    display: none; 
    width: 100%;
    height: 1px;
    background-color: var(--border-color);
    margin: 2rem 0;
}


.contact-details-section h3 {
    font-weight: bold;
    color: var(--dark-background);
    margin-bottom: 1rem;
}

.contact-details-section p {
    margin: 0.5rem 0;
}

.contact-details-section .phone-number {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Confirmation Modal  */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-overlay.modal-hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background-color: var(--white);
    padding: 2rem 3rem;
    border-radius: 8px;
    text-align: center;
    position: relative;
    max-width: 400px;
    width: 90%;
    transform: scale(1);
    transition: transform 0.3s ease;
}

.modal-hidden .modal-content {
    transform: scale(0.9);
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s ease;
    background: none;
    border: none;
}

.modal-close:hover {
    color: var(--dark-background);
}

.modal-icon {
    font-size: 5rem;
    color: #28a745; 
    margin-bottom: 1rem;
}

.modal-content h2 {
    margin-bottom: 0.5rem;
}

.modal-content p {
    color: #555;
    margin-bottom: 0;
}

/* Featured & Sold Vehicles*/
.featured-vehicles-section,
.sold-vehicles-section {
    padding: 3rem 0;
    background-color: var(--background-color);
}

.featured-vehicles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));  
    gap: 1.5rem;
}

.vehicle-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.vehicle-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.vehicle-card-img {
    display: block;
    text-decoration: none;
    background-color: #f8f8f8;
    aspect-ratio: 16 / 10;
}

.vehicle-card-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.vehicle-card-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.vehicle-card .vehicle-title {
    font-size: 1.25rem;
    color: var(--dark-background);
    margin-bottom: 0.5rem;
}

.vehicle-card .vehicle-price {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.vehicle-card-actions {
    margin-top: auto;
}

/* Fading effect on the edges of the scrolling "Sold Cars" carousel */
.sold-carousel-viewport {
    width: 100%;
    overflow: hidden;
    position: relative;
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

@keyframes slide {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); } 
}

.sold-carousel-track {
    display: flex;
    gap: 1.5rem;
    animation: slide 30s linear infinite; 
}

.sold-carousel-viewport:hover .sold-carousel-track {
    animation-play-state: paused; 
}

.sold-carousel-track .vehicle-card {
    flex-basis: 350px; 
    flex-shrink: 0;
}

.sold-carousel-track .vehicle-card .vehicle-title {
    font-size: 1rem; 
}

.vehicle-card.is-sold .vehicle-card-img {
    position: relative;
    overflow: hidden;
}

/* "SOLD" banner on sold vehicle cards */
.vehicle-card.is-sold .vehicle-card-img::before,
.vehicle-card.is-deposit .vehicle-card-img::before,
.vehicle-listing.is-deposit .vehicle-listing__image::before {
    position: absolute;
    top: 25px;
    left: -60px; 
    width: 240px; 
    transform: rotate(-45deg);
    color: var(--white);
    padding: 8px 0;
    font-weight: 500;
    z-index: 10;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    text-transform: uppercase;
    pointer-events: none;
    letter-spacing: 1px;
}

/* Sold Specific */
.vehicle-card.is-sold .vehicle-card-img::before {
    content: 'SOLD';
    background-color: rgba(195, 12, 48, 0.9);
    font-size: 1.1rem;
}

/* Deposit Taken Specific */
.vehicle-card.is-deposit .vehicle-card-img::before,
.vehicle-listing.is-deposit .vehicle-listing__image::before {
    content: 'DEPOSIT TAKEN';
    background-color: var(--deposit-color);
    font-size: 0.75rem; 
}

.vehicle-card-img, .vehicle-listing__image {
    position: relative;
    overflow: hidden;
}

.vehicle-card.is-sold .vehicle-card-actions {
    display: none;
}


/* --- BUTTON STYLES --- */
.btn,
.btn-enquire,
.btn-submit,
.btn-details {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn:hover,
.btn-enquire:hover,
.btn-submit:hover,
.btn-details:hover {
    background-color: #A00000;
}

.btn-enquire { margin-top: auto; }
.btn-details { width: 100%; margin-top: auto; }
.btn-submit { width: auto; padding: 12px 30px; font-size: 1rem; }

/* --- INVENTORY FILTER STYLES --- */
.inventory-filters {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-end;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.filter-group {
    flex: 1;
    min-width: 150px;
}

.filter-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--dark-background);
}

.filter-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
}

.btn-clear {
    background: transparent;
    color: #555;
    border: 1px solid #ccc;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-clear:hover {
    background: #eee;
    color: var(--dark-background);
}

/* --- MODERN SLIDE-OUT FILTER PANEL --- */
#filter-toggle-btn {
    margin-bottom: 2rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    background-color: var(--dark-background); 
}

#filter-toggle-btn:hover {
    background-color: var(--primary-color); 
}

.filter-overlay {
    position: fixed;
    top: 80px; 
    left: 0;
    width: 100%;
    height: calc(100vh - 80px); 
    background: rgba(0, 0, 0, 0.6);
    z-index: 999; 
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.filter-overlay.active {
    opacity: 1;
    visibility: visible;
}

.filter-panel {
    position: fixed;
    top: 80px; 
    left: 0;
    width: 320px;
    max-width: 85vw;
    height: calc(100vh - 80px); 
    background-color: var(--background-color);
    z-index: 999; 
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 15px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
}

.filter-panel.active {
    transform: translateX(0); 
}

.filter-panel-header {
    background-color: var(--primary-color); 
    color: var(--white);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-panel-header h3 {
    margin: 0;
    color: var(--white);
    font-size: 1.5rem;
}

#close-filter-btn {
    color: var(--white);
    font-size: 2rem;
    transition: transform 0.3s ease;
}

#close-filter-btn:hover {
    transform: rotate(90deg); 
}

.inventory-filters-modern {
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: auto;
}

/* --- INLINE IMAGE GALLERY ARROWS (INVENTORY PAGE) --- */
.listing-prev,
.listing-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 12px;
    color: white;
    font-weight: bold;
    font-size: 24px;
    transition: all 0.3s ease;
    user-select: none;
    background-color: rgba(0,0,0,0.4);
    opacity: 0; /* Hidden by default, appear on hover */
    z-index: 5;
    border: none;
}

.vehicle-listing__image:hover .listing-prev,
.vehicle-listing__image:hover .listing-next,
.listing-prev:focus-visible,
.listing-next:focus-visible {
    opacity: 1;
}

.listing-prev { left: 5px; border-radius: 0 3px 3px 0;}
.listing-next { right: 5px; border-radius: 3px 0 0 3px;}

.listing-prev:hover,
.listing-next:hover {
    background-color: rgba(0,0,0,0.7);
}


/* ==================================
   RESPONSIVE STYLES (Carefully Scaled for Devices)
================================== */

@media (min-width: 2000px) {
    body { font-size: 20px; }
    .container, .footer-container { max-width: 1600px; }
    .main-nav .navbar a { font-size: 1.15rem; }
    h1 { font-size: 3.5rem; }
    h2 { font-size: 2.75rem; }
    .section-header h2 { font-size: 3.25rem; }
    .vehicle-listing__details .vehicle-description { font-size: 1.1rem; }
}

@media (min-width: 901px) and (max-width: 1024px) {
    .vehicle-specs {
        font-size: 0.8rem; 
        flex-wrap: nowrap; 
    }
    .vehicle-description{ padding-bottom: 1rem; }
}

/* --- MOBILE SPLIT-LAYOUT FALLBACK --- */
@media (max-width: 900px) {
    .vehicle-listing__content {
        grid-template-columns: 1fr; 
    }
    .vehicle-listing--reverse .vehicle-listing__content .vehicle-listing__image-gallery,
    .vehicle-listing--reverse .vehicle-listing__content .vehicle-listing__details {
        grid-column: auto;
        grid-row: auto;
    }
    
    .vehicle-details-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .vehicle-info-section {
        position: static;
        padding: 1.5rem;
        box-shadow: none; 
        border: none;
        background: transparent;
    }

    .modern-contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-info-card {
        position: static;
    }
    
    .about-content-wrapper {
        padding: 1.5rem;
    }

    .modern-footer-grid {
        grid-template-columns: 1fr 1fr; 
        gap: 3rem;
    }
}

/* TABLET AND SMALL LAPTOPS */
@media (max-width: 768px) {
    html { font-size: 15px; } /* Slightly scales everything down globally */
    .container, .footer-container { width: 100%; padding: 1.5rem 1rem; }
    .vehicle-listing { padding: 1rem; }
    .vehicle-listing__content { gap: 1.5rem; }
    .vehicle-description{ padding-bottom: 2rem; }
    .hero-section { height: 60vh; padding: 2rem 1rem; }

    /* Scaled Down Headings */
    h1, .hero-content h1 { font-size: 2rem; } 
    h2, .section-header h2 { font-size: 1.6rem; } 
    h3 { font-size: 1.15rem; }
    p, li, a { font-size: 0.95rem; }

    .vehicle-listing__header .vehicle-title { font-size: 1.2rem; }
    .vehicle-listing__header .vehicle-price { font-size: 1.3rem; }
    .vehicle-card .vehicle-title { font-size: 1.1rem; }
    .vehicle-card .vehicle-price { font-size: 1.2rem; }
    .vehicle-listing__details .vehicle-description { font-size: 0.9rem; }
    .vehicle-specs { font-size: 0.85rem; justify-content: center; }
    
    .btn-hero, .btn-hero-outline { padding: 12px 24px; font-size: 1rem; }
    .btn-enquire, .btn-details { margin-top: 1.5rem; font-size: 0.9rem; }

    .inventory-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem;
    }

    .footer-column h4 { font-size: 1.1rem; }
    .footer-column a, .footer-copyright p { font-size: 0.9rem; }

    #menu-icon { display: block; } 

    .main-nav { position: absolute; top: 80px; left: -100%; width: 100%; background-color: var(--primary-color); transition: left 0.3s ease-in-out; border-bottom: 1px solid var(--border-color); }
    .main-nav.active { left: 0; }
    .main-nav .navbar { flex-direction: column; align-items: center; padding: 0; gap: 0; } 
    .main-nav .navbar li { width: 100%; text-align: center; }
    .main-nav .navbar a { display: block; padding: 1rem; border-bottom: 1px solid #c30c30; }
    .main-nav .navbar a::after { display: none; }
    .main-nav .navbar a:hover, .main-nav .navbar a.active { background-color: var(--white); color: var(--primary-color); }

    .contact-container { grid-template-columns: 1fr; gap: 0; }
    .contact-divider-vertical { display: none; }
    .contact-divider-horizontal { display: block; }
    .contact-details-section { text-align: center; }

    .sold-carousel-track .vehicle-card { flex-basis: 180px; }
    .sold-carousel-track .vehicle-card .vehicle-title { font-size: 0.9rem; }

    .vehicle-card.is-sold .vehicle-card-img::before {
        width: 150px;
        font-size: 0.9rem;
        padding: 4px 0;
        top: 15px;
        left: -35px;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px !important; /* Prevents iOS auto-zoom on forms */
    }

    /* --- MOBILE POP-UP BUBBLE MODAL --- */
    .filter-overlay {
        display: block !important; 
        z-index: 2000; 
    }

    .filter-panel {
        position: fixed;
        top: 50%;
        left: 50%;
        width: 90%; 
        max-width: 400px;
        height: auto; 
        max-height: 85vh; 
        border-radius: 16px; 
        z-index: 2001;
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    }

    .filter-panel.active {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
        visibility: visible;
    }

    .filter-panel-header {
        display: flex; 
        border-radius: 16px 16px 0 0; 
        padding: 1.2rem;
    }

    .inventory-filters-modern {
        padding: 1.5rem;
        overflow-y: auto; 
    }

    .inventory-filters-modern .form-group select {
        font-size: 16px; 
        padding: 12px;
    }

    .modern-footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .footer-column {
        text-align: center;
    }
    
    .footer-contact-list li {
        justify-content: center;
    }
}

@media (max-width: 500px) {
    .vehicle-specs {
        display: grid;
        grid-template-columns: 1fr 1fr; 
    }

    .vehicle-description{
        padding-bottom: 0.5rem;
    }
    
    .vehicle-gallery-section .vehicle-listing__thumbnails {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .quick-features-grid {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 1rem;
    }
}

/* SMARTPHONES AND SMALL SCREENS */
@media (max-width: 425px) {
    /* FIX: Scaled base font down from 14px to 12.5px so EVERYTHING shrinks proportionally */
    html { font-size: 12.5px; } 
    
    /* Heavily Scaled Headings for small phones */
    h1, .hero-content h1 { font-size: 1.6rem; } 
    h2, .section-header h2 { font-size: 1.3rem; } 
    h3 { font-size: 1.1rem; }
    p, li, a { font-size: 0.95rem; }
    
    .vehicle-listing__header .vehicle-title { font-size: 1.15rem; }
    .vehicle-listing__header .vehicle-price { font-size: 1.25rem; }
    .vehicle-listing__details .vehicle-description { font-size: 0.9rem; }
    
    .vehicle-specs { font-size: 0.85rem; }
    .vehicle-specs i { font-size: 1.25rem; } 
    
    .hero-section { height: 45vh; padding: 1.5rem 1rem; }
    
    /* Stacking Hero Buttons on Small Screens */
    .hero-buttons { flex-direction: column; width: 100%; align-items: stretch; }
    .btn-hero, .btn-hero-outline { width: 100%; text-align: center; padding: 10px 14px; font-size: 0.95rem; }
    
    /* Scale down the Quick Feature icons slightly */
    .quick-feature-item i { font-size: 1.5rem; }
    .quick-feature-item h4 { font-size: 1rem; }
    .quick-feature-item p { font-size: 0.85rem; }
    
    .footer-column h4 { font-size: 1.1rem; }
    .footer-copyright { font-size: 0.85rem; }
}

@media screen and (orientation: landscape) and (max-height: 600px) {
    #lightbox-overlay { padding: 3px; background-color: rgba(0, 0, 0, 1); }
    .lightbox-content { max-height: 100vh; height: 100vh; width: 100vw; max-width: 100vw; border-radius: 0; }
    .lightbox-main-image { width: 100%; height: 100%; object-fit: contain; }
    .lightbox-thumbnails-container { display: none; }
    .lightbox-close { top: 5px; right: 15px; background: rgba(0,0,0,0.5); padding: 0 12px; border-radius: 4px; z-index: 2005; }
    .lightbox-prev, .lightbox-next { padding: 20px; background-color: rgba(0,0,0,0.2); }
}

button:focus, a:focus, input:focus, textarea:focus, select:focus {
    outline: transparent; 
}

button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 3px solid #ff9800; 
    outline-offset: 2px;
    z-index: 1000;
}

button.bx {
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'boxicons'; 
}