/* Import Google Font Figtree */
@import url('https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,300..900;1,300..900&display=swap');

/* CSS Variables */
:root {
    --font-main: 'Figtree', system-ui, -apple-system, sans-serif;
    --color-primary: #be281b;
    --color-primary-hover: #9e1f14;
    --color-dark: #16171b;
    --color-dark-card: #202126;
    --color-bg-light: #f5f6f8;
    --color-card-bg: #f8f9fa;
    --color-text: #16171b;
    --color-muted: #626773;
    --color-border: #e2e4e9;
    --color-badge-bg: #fde8e7;
    --color-badge-text: #be281b;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --container-width: 1440px;
}

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

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    padding-top: 80px;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg-light);
    color: var(--color-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 4.5rem;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.6rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

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

.btn-dark {
    background-color: var(--color-dark);
    color: #ffffff;
}

.btn-dark:hover {
    background-color: #2c2d33;
}

.btn-white {
    background-color: #ffffff;
    color: var(--color-dark);
}

.btn-white:hover {
    background-color: #f0f0f0;
}

.btn-text {
    background: transparent;
    color: var(--color-text);
    font-weight: 600;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Header */
.site-header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--color-border);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.header-top-bar {
    background-color: #121212;
    color: #ffffff;
    padding: 0.85rem 0;
    font-size: 0.825rem;
    border-bottom: 1px solid #27272a;
}

.top-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Left Contact Section */
.top-bar-left {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.top-bar-link {
    color: #ffffff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    transition: opacity 0.2s ease;
}

.top-bar-link:hover {
    opacity: 0.8;
}

.top-bar-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

/* Right Bank & Reg Section */
.top-bar-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
    color: #f4f4f5;
    letter-spacing: 0.2px;
}

.top-bar-row {
    display: flex;
    gap: 1.5rem;
}

.top-bar-row strong {
    color: #ffffff;
    font-weight: 700;
}

.brand-logo {
    display: flex;
    align-items: center;
    max-height: 67px;
    overflow: hidden;
}

.site-logo {
    height: 67px !important;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    display: block;
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    font-weight: 500;
    color: var(--color-text);
}

.nav-link.active {
    color: var(--color-primary);
    font-weight: 700;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.globe-icon {
    color: #121212;
}

.lang-dropdown {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid var(--color-border);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    background: #ffffff;
}

.lang-dropdown select {
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-toggle span {
    width: 24px;
    height: 2px;
    background-color: var(--color-dark);
}

/* Hero Section */
.hero-section {
    padding: 4rem 0 3rem;
}

/* Hero Grid Layout (Desktop 2-Column) */
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
    align-items: center;
}

.hero-image-wrapper {
    width: 100%;
    max-height: 450px;
    border-radius: 16px;
    overflow: hidden;
    background-color: #f4f4f5;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-badge {
    display: inline-block;
    background-color: var(--color-badge-bg);
    color: var(--color-badge-text);
    font-size: 0.8rem;
    font-weight: 400;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    letter-spacing: 0.5px;
    margin-bottom: 1.25rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    max-width: 648px;
    margin-bottom: 1.25rem;
    letter-spacing: -1px;
}

.hero-subtitle {
    color: var(--color-muted);
    font-size: 1.1rem;
    max-width: 620px;
    margin-bottom: 2rem;
}

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

/* Section Common Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.section-header h2 {
    font-size: 1.35rem;
    font-weight: 700;
}

.see-all-link {
    font-size: 0.85rem;
    color: var(--color-muted);
}

/* Shared Dark Gradient Utility */
.dark-card {
    background: linear-gradient(180deg, #121212 0%, #333333 100%);
    border-radius: 16px;
    color: #ffffff;
}

/* Section Grid Layout */
.category-search-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 1.5rem;
    align-items: start;
    margin: 2.5rem 0;
}

/* Category Header */
.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.category-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

/* Category Cards & Circular Icons */
.category-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    width: 100%;
}

/* Base Category Card Styles (Desktop & Mobile) */
.category-card {
    background: #18181b;
    border-radius: 16px;
    padding: 24px 16px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: transform 0.2s ease;
    width: 100%;
    /* <--- ADD THIS */
    min-width: 0;
    /* <--- ADD THIS (prevents mobile overflow) */
}

.category-card span {
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
}

.category-card:hover {
    transform: translateY(-2px);
}

.icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.icon-circle img {
    width: 22px;
    height: 22px;
    filter: brightness(0) invert(1);
}

/* Search Form */
.search-form {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.search-input {
    flex: 1;
    padding: 0.85rem 1.25rem;
    border-radius: 12px;
    border: 1px solid #e4e4e7;
    background-color: #f4f4f6;
    font-size: 0.95rem;
}

.search-input::placeholder {
    color: #a1a1aa;
}

.promo-banner-card {
    height: 140px;
    width: 100%;
}

/* Latest Arrivals Section & Vehicles */
.latest-section {
    padding: 2.5rem 0;
}

/* Standard 4-Column Grid for Home Page */
.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

/* Strict 3-Column Grid for Stocks Page (Next to Filter Sidebar) */
.stocks-grid-wrap .vehicle-grid {
    grid-template-columns: repeat(3, 1fr);
}

/* Card Structure & Flex Alignments */
.vehicle-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
}

.vehicle-image-wrap {
    width: 100%;
    height: 200px;
    background-color: #e2e4e9;
    overflow: hidden;
}

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

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

.vehicle-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7rem;
}

.vehicle-specs {
    margin-bottom: 1.5rem;
    margin-top: auto;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    padding: 0.3rem 0;
}

.spec-row dt {
    color: var(--color-muted);
    font-weight: 600;
    letter-spacing: 0.3px;
}

.spec-row dd {
    font-weight: 700;
}

/* Card Footer Alignment & Overflow Controls */
.vehicle-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--color-border);
    padding-top: 1rem;
    gap: 0.5rem;
}

.price-amount {
    display: block;
    font-size: 1.1rem;
    font-weight: 800;
    white-space: nowrap;
    line-height: 1.2;
}

.price-tax {
    display: block;
    font-size: 0.725rem;
    color: var(--color-muted);
}

.vehicle-card-footer .btn-sm {
    padding: 0.55rem 0.9rem;
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
    border-radius: 8px;
}

.placeholder-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.placeholder-card {
    height: 180px;
    background-color: #e8eaee;
    border-radius: var(--radius-md);
}

/* Callout Section */
.callout-section {
    padding: 3rem 0 5rem;
}

.callout-card {
    background-color: var(--color-dark);
    color: #ffffff;
    border-radius: var(--radius-lg);
    padding: 4rem 2rem;
    text-align: center;
    background-image: radial-gradient(circle at center, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
}

.callout-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.callout-text {
    color: #a0a5b1;
    max-width: 580px;
    margin: 0 auto 2rem;
    font-size: 1rem;
}

/* Footer */
.site-footer {
    background-color: #ffffff;
    border-top: 1px solid var(--color-border);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

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

.footer-col ul li {
    margin-bottom: 0.6rem;
}

.footer-col a {
    color: var(--color-muted);
    font-size: 0.9rem;
}

.footer-col address {
    font-style: normal;
    color: var(--color-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-description {
    color: var(--color-muted);
    font-size: 0.9rem;
    margin: 1rem 0;
    max-width: 320px;
}

.footer-meta {
    font-size: 0.75rem;
    color: var(--color-muted);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.85rem;
    color: var(--color-muted);
}

.designer-credit {
    text-align: center;
    font-size: 0.8rem;
    color: var(--color-muted);
    margin-top: 2rem;
    font-style: italic;
}

.designer-credit span {
    font-weight: 600;
    text-decoration: underline;
}

/* STOCKS PAGE LAYOUT */
.stocks-container {
    padding-top: 2.5rem;
    padding-bottom: 4rem;
}

.stocks-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stocks-top-bar .search-form {
    flex: 1;
    max-width: 540px;
    margin-bottom: 0;
}

.sort-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--color-muted);
}

.sort-wrap label {
    white-space: nowrap;
    font-weight: 600;
}

.sort-select {
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    background-color: #ffffff;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
    outline: none;
    cursor: pointer;
}

.stocks-layout {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
}

.stocks-grid-wrap {
    flex: 1;
    min-width: 0;
}

.results-count {
    font-size: 0.9rem;
    color: var(--color-muted);
    font-weight: 600;
    margin-bottom: 1.25rem;
}

/* Base Desktop Filter Styling */
.filter-sidebar {
    background: #121212;
    color: #ffffff;
    border-radius: 16px;
    padding: 1.5rem;
    width: 300px;
    flex-shrink: 0;
}

.drawer-drag-handle,
.drawer-close-btn,
.floating-filter-trigger,
.filter-backdrop {
    display: none;
}

.filter-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

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

.filter-label {
    display: block;
    font-size: 0.875rem;
    color: #a1a1aa;
    margin-bottom: 0.75rem;
}

.checkbox-grid {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.range-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: #27272a;
    border: 1px solid #3f3f46;
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.85rem;
}

.filter-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #27272a;
}

.btn-reset {
    color: #ffffff;
    text-decoration: underline;
    font-size: 0.9rem;
}

.btn-apply {
    background: #ffffff;
    color: #121212;
    font-weight: 600;
    padding: 0.65rem 2rem;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
}

/* MOBILE NAV DRAWER STYLES (Aligned with main.js) */
#mobileNavOverlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#mobileNavOverlay.active {
    opacity: 1;
    pointer-events: auto;
}

#mobileNavDrawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: #ffffff;
    z-index: 999;
    padding: 2rem 1.5rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

#mobileNavDrawer.active {
    transform: translateX(0);
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .stocks-grid-wrap .vehicle-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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


@media (max-width: 768px) {

    .header-top-bar {
        padding: 0.5rem 0;
    }

    /* Left side: display icons horizontally and hide text labels */
    .top-bar-left {
        flex-direction: row;
        gap: 0.75rem;
        align-items: center;
    }

    .top-bar-left span {
        display: none;
        /* Keeps icons active while hiding text */
    }

    .top-bar-icon {
        width: 18px;
        height: 18px;
    }

    .top-bar-link {
        padding: 4px;
        /* Increases touch target for mobile tapping */
    }

    /* Right side: scale font and gaps so all details fit */
    .top-bar-right {
        gap: 0.2rem;
        font-size: 0.65rem;
        align-items: flex-end;
    }

    .top-bar-row {
        gap: 0.5rem;
        white-space: nowrap;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        /* Stacks layout to 1 column on tablet/mobile */
        gap: 0;
    }

    .hero-image-wrapper {
        display: none !important;
        /* Ensures the image container is completely hidden on mobile */
    }

    /* 1. Prevent section and container from overflowing the screen */
    .category-search-section {
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    .container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
        box-sizing: border-box !important;
    }

    /* 2. Kill the multi-column desktop grid and force single column */
    .category-search-grid {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    /* 3. Force all grid children to respect 100% width boundaries */
    .category-search-grid>* {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    /* FIX 1: Fit all 3 category cards evenly across mobile screens */
    .category-cards {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.5rem !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    .category-card {
        flex: unset !important;
        min-width: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 0.75rem 0.25rem !important;
    }

    /* 1. Prevent the container column from overflowing */
    .search-column {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    /* 2. Stack the input and search button vertically on mobile */
    .search-form {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
    }

    .search-input {
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .search-form .btn {
        width: 100% !important;
    }

    /* 3. Reduce inline horizontal padding on mobile */
    .custom-sourcing-card {
        padding: 20px 16px !important;
    }


    .category-card span {
        color: #ffffff;
        font-weight: 600;
        font-size: 0.95rem;
    }

    /* Position the mobile menu dropdown directly under the header */
    .nav-menu {
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: #ffffff;
        flex-direction: column;
        gap: 1.25rem;
        padding: 1.5rem 2rem;
        border-bottom: 1px solid var(--color-border);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
        display: none;
        z-index: 99;
    }

    .nav-menu.active {
        display: flex;
    }

    .header-actions .btn-dark {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .vehicle-grid,
    .stocks-grid-wrap .vehicle-grid {
        grid-template-columns: 1fr;
    }

    .placeholder-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
    }

    .stocks-top-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .stocks-top-bar .search-form {
        max-width: 100%;
    }

    /* FIX 2: Stop text inputs from stretching mobile containers */
    input[type="text"],
    input[type="search"],
    .search-form input {
        min-width: 0 !important;
    }

    .sort-wrap {
        justify-content: space-between;
    }

    .stocks-layout {
        flex-direction: column;
    }

    /* Stocks Mobile Filter Backdrop */
    .filter-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(4px);
        z-index: 998;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    .filter-backdrop.active {
        opacity: 1;
        pointer-events: auto;
    }
}

/* Mobile Bottom Sheet Drawer */
@media (max-width: 768px) {
    .filter-sidebar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-height: 85vh;
        border-radius: 24px 24px 0 0;
        z-index: 999;
        overflow-y: auto;
        transform: translateY(100%);
        transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3);
        padding: 1.25rem 1.5rem 2rem;
    }

    .filter-sidebar.open {
        transform: translateY(0);
    }

    /* Drawer Top Handle & Header */
    .drawer-drag-handle {
        display: block;
        width: 36px;
        height: 4px;
        background: #3f3f46;
        border-radius: 2px;
        margin: 0 auto 1rem;
    }

    .filter-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .drawer-close-btn {
        display: block;
        background: none;
        border: none;
        color: #a1a1aa;
        font-size: 1.75rem;
        line-height: 1;
        cursor: pointer;
    }
}

/* Floating Bottom Filter Button */
@media (max-width: 768px) {
    .floating-filter-trigger {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        position: fixed;
        bottom: 24px;
        left: 50%;
        transform: translateX(-50%);
        background: #121212;
        color: #ffffff;
        padding: 0.75rem 1.5rem;
        border-radius: 9999px;
        border: 1px solid rgba(255, 255, 255, 0.15);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
        font-weight: 500;
        font-size: 0.9rem;
        z-index: 90;
        cursor: pointer;
    }

    /* Sticky Footer Buttons inside Drawer */
    .filter-actions {
        position: sticky;
        bottom: -2rem;
        background: #121212;
        margin: 1.5rem -1.5rem -2rem;
        padding: 1rem 1.5rem 1.5rem;
    }

    /* Prevent body scrolling when filter open */
    body.filter-open {
        overflow: hidden;
    }
}

/* =========================================
   VEHICLE DETAILS PAGE ADDITIONS
   ========================================= */

.details-container {
    padding-top: 2rem;
    padding-bottom: 5rem;
}

.breadcrumbs {
    font-size: 0.9rem;
    color: var(--color-muted);
    margin-bottom: 2rem;
}

.breadcrumbs span {
    color: var(--color-text);
}

.details-top-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3.5rem;
    margin-bottom: 4rem;
}

/* Gallery Left Side */
.main-image-container {
    width: 100%;
    aspect-ratio: 16 / 10;
    max-height: 480px;
    overflow: hidden;
    border-radius: 12px;
    background: #1a1a1a;
    position: relative;
}

/* Gallery Navigation Arrows */
.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

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

.prev-arrow {
    left: 12px;
}

.next-arrow {
    right: 12px;
}

.thumbnail-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

.thumb-box {
    height: 90px;
    background-color: #f4f4f6;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

/* Summary Right Side */
.stock-id {
    font-size: 0.85rem;
    color: var(--color-muted);
}

.details-title {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0.5rem 0 1.5rem;
}

.details-price h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
}

.tax-note {
    display: block;
    font-size: 0.9rem;
    color: var(--color-muted);
    margin-bottom: 2rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.btn-whatsapp {
    background-color: #25D366;
    color: #fff;
    flex: 1;
    font-size: 1rem;
    gap: 0.5rem;
}

.btn-whatsapp:hover {
    background-color: #1ebc59;
}

.action-buttons .btn-dark {
    flex: 1;
    font-size: 1rem;
}

.quick-summary {
    margin-bottom: 2.5rem;
}

.quick-summary h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #121212;
}

.quick-summary ul {
    list-style: none;
    color: var(--color-muted);
    line-height: 1.8;
}

.btn-call {
    width: 100%;
    background-color: var(--color-dark);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
}

/* Accordions */
.accordions-wrap {
    max-width: 900px;
}

.custom-accordion {
    border-bottom: 1px solid var(--color-border);
    padding: 1.5rem 0;
}

.custom-accordion summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.custom-accordion summary::-webkit-details-marker {
    display: none;
}

.accordion-content {
    padding-top: 1.5rem;
    color: var(--color-text);
    font-size: 1rem;
    line-height: 1.6;
}

.spec-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem 2rem;
}

.status-highlight {
    font-weight: 600;
    margin-bottom: 1rem;
}

.detail-list {
    padding-left: 1.5rem;
    color: var(--color-muted);
}

.detail-list li {
    margin-bottom: 0.5rem;
}

.detail-list strong {
    color: var(--color-text);
}

/* Details Page Responsive */
@media (max-width: 1024px) {
    .details-top-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .spec-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
    }

    .main-image-container {
        height: 240px;
        aspect-ratio: unset;
    }

    .thumbnail-row {
        grid-template-columns: repeat(4, 1fr);
    }

    .thumb-box:last-child {
        display: none;
    }
}

/* --- Mobile Floating Filter Button --- */
.floating-filter-trigger {
    display: flex !important;
    background: #18181b !important;
    color: #f4f4f5 !important;
    border: 1px solid #27272a !important;
    padding: 14px 32px !important;
    border-radius: 9999px !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.9) !important;
    cursor: pointer !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    white-space: nowrap !important;
}

.floating-filter-trigger:hover {
    background: #27272a !important;
}

/* Hide on desktop and larger screens */
@media (min-width: 993px) {
    #floatingFilterWrapper {
        display: none !important;
    }
}

/* --- Inquiry Modal Popup Styles --- */
.inquiry-modal-backdrop {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(4px) !important;
    z-index: 2147483647 !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    padding: 16px !important;
}

.inquiry-modal-backdrop.active {
    display: flex !important;
}

.inquiry-modal-content {
    background: #ffffff !important;
    width: 100% !important;
    max-width: 500px !important;
    border-radius: 16px !important;
    padding: 24px !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3) !important;
    animation: modalFadeIn 0.2s ease-out !important;
    box-sizing: border-box !important;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.inquiry-modal-content .modal-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 20px !important;
}

.inquiry-modal-content .modal-header h3 {
    font-size: 1.2rem !important;
    font-weight: 600 !important;
    color: #18181b !important;
    margin: 0 !important;
}

.inquiry-modal-content .close-btn {
    background: none !important;
    border: none !important;
    font-size: 1.75rem !important;
    cursor: pointer !important;
    color: #71717a !important;
    padding: 0 !important;
    line-height: 1 !important;
}

.inquiry-modal-content .form-group {
    margin-bottom: 16px !important;
    text-align: left !important;
}

.inquiry-modal-content label {
    display: block !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    color: #3f3f46 !important;
    margin-bottom: 6px !important;
}

.inquiry-modal-content .form-control {
    width: 100% !important;
    padding: 10px 14px !important;
    border: 1px solid #d4d4d8 !important;
    border-radius: 8px !important;
    font-size: 0.95rem !important;
    outline: none !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
    transition: border-color 0.2s !important;
}

.inquiry-modal-content .form-control:focus {
    border-color: #18181b !important;
}