@import url('https://fonts.googleapis.com/css2?family=Google+Sans:opsz,wght@17..18,400;17..18,500;17..18,700&family=Inter:wght@400;500;600;700;800&display=swap');

/* ==================== Admin Sidebar Overlay ==================== */
.sidebar-overlay.active { display: block; }

/* ==================== Base Reset ==================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { overflow-x: hidden; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
    font-family: 'Google Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1a1a2e;
    line-height: 1.65;
    background: #f8fafc;
    overflow-x: hidden;
    width: 100%;
    font-size: 18px;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 17px; }

/* ==================== Container ==================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==================== Navigation ==================== */
.header {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
    padding: 0 24px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    max-height: 36px;
    overflow: hidden;
    flex-shrink: 0;
}
.logo img {
    display: block;
    height: 36px !important;
    max-height: 36px !important;
    width: auto !important;
    max-width: 160px;
    object-fit: contain;
}
.nav { display: flex; gap: 4px; }
.nav a {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    color: #4b5563;
    transition: all 0.2s;
}
.nav a:hover { background: #f3f4f6; color: #1a1a2e; }
.nav a.active { background: #0068c8; color: white; }
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
}
.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #4b5563;
    transition: all 0.3s;
}

/* ==================== Hero ==================== */
.hero {
    background: linear-gradient(135deg, #0a1628 0%, #1e3a5f 100%);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
    min-height: auto;
    display: flex;
    align-items: center;
}
.hero-bg-image {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.3;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 {
    font-size: 54px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 16px;
    word-break: break-word;
}
.hero h1 span { color: #3b82f6; display: block; }
.hero p {
    font-size: 22px;
    color: rgba(255,255,255,0.95);
    max-width: 520px;
    margin-bottom: 36px;
    line-height: 1.7;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s;
}
.btn-primary {
    background: #0068c8;
    color: white;
    box-shadow: 0 4px 16px rgba(0,104,200,0.35);
}
.btn-primary:hover { background: #0056a8; }
.btn-outline { border: 2px solid white; color: white; }
.btn-outline:hover { background: rgba(255,255,255,0.1); }
.btn-sm { padding: 10px 20px; font-size: 15px; }

/* ==================== Search Card ==================== */
.search-section { padding: 56px 0; background: white; }
.search-section h2 {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 28px;
}
.search-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    border: 1px solid #e5e7eb;
    padding: 28px;
    max-width: 1100px;
    margin: 0 auto;
}
.filter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.form-select, .form-input {
    width: 100%;
    height: 50px;
    padding: 0 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
    color: #374151;
    font-size: 16px;
}
.form-select:focus, .form-input:focus {
    outline: none;
    border-color: #0068c8;
    box-shadow: 0 0 0 3px rgba(0,104,200,0.1);
}

/* ==================== Car Cards ==================== */
.section { padding: 72px 0; }
.section-header { text-align: center; margin-bottom: 48px; }
.eyebrow {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #0068c8;
    display: block;
    margin-bottom: 10px;
}
.section-header h2 { font-size: 40px; font-weight: 800; margin-bottom: 10px; }
.section-header p { color: #374151; font-size: 18px; }

.car-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
@media (min-width: 768px) {
    .car-grid { grid-template-columns: repeat(4, 1fr); }
}
.car-card {
    background: white;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.3s;
}
.car-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.1);
}
.car-card-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
}
.car-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.car-card:hover .car-card-image img { transform: scale(1.05); }
.car-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.car-card-placeholder svg { width: 64px; height: 64px; color: #6b7280; }
.badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: white;
    z-index: 2;
}
.badge-new { background: #10b981; }
.badge-used { background: #f59e0b; }
.video-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 2;
}

.car-card-body { padding: 10px; }
.car-brand {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 4px;
}
.car-title {
    font-size: 20px;
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 10px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.car-price-value {
    font-size: 24px;
    font-weight: 800;
    color: #0068c8;
    margin-bottom: 12px;
}
.car-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 16px;
}
.car-specs span {
    font-size: 15px;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 6px;
}
.car-specs svg { width: 16px; height: 16px; color: #6b7280; }
.btn-enquire {
    display: block;
    width: 100%;
    padding: 12px;
    background: #0068c8;
    color: white;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s;
}
.btn-enquire:hover { background: #0056a8; }

/* ==================== Stats Bar ==================== */
.stats-bar {
    background: linear-gradient(90deg, #0068c8, #00b8d4);
    padding: 48px 0;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
}
.stat-number { font-size: 42px; font-weight: 800; color: white; }
.stat-label { font-size: 16px; color: rgba(255,255,255,0.9); margin-top: 6px; }

/* ==================== Feature cards - Why US ==================== */
.feature-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* ==================== Car Detail Modal ==================== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 1000px;
    width: 100%;
    height: 70vh;
    max-height: 70vh;
    overflow: hidden;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s;
}
.modal-overlay.active .modal-content { transform: scale(1); }
.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: none;
    cursor: pointer;
}
.modal-body { display: grid; grid-template-columns: 55% 45%; height: 100%; grid-template-rows: 1fr; }
.modal-gallery { background: #f9fafb; position: relative; overflow: hidden; display: flex; flex-direction: column; height: 100%; }
.modal-main-image {
    flex: 1;
    position: relative;
    width: 100%;
    min-height: 0;
    padding: 10px;
    box-sizing: border-box;
}
.modal-main-image img { width: 100%; height: 100%; object-fit: contain; display: block; }
.video-play-btn {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 64px; height: 64px;
    background: rgba(0,0,0,0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: 3px solid white;
    cursor: pointer;
}
.video-badge-corner {
    position: absolute;
    top: 12px; right: 12px;
    width: 36px; height: 36px;
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 5;
    cursor: pointer;
}
.modal-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    flex-shrink: 0;
}
.modal-thumb {
    width: 64px; height: 64px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    flex-shrink: 0;
}
.modal-thumb.active { border-color: #0068c8; }
.modal-thumb img { width: 100%; height: 100%; object-fit: cover; }
.modal-info { padding: 28px; display: flex; flex-direction: column; overflow-y: auto; min-height: 0; scrollbar-width: none; -ms-overflow-style: none; }
.modal-info .btn { margin-top: auto; }
.modal-info .btn.btn-whatsapp { margin-top: 0; }
.modal-info .car-brand { margin-bottom: 6px; }
.modal-info h2 { font-size: 28px; font-weight: 800; margin-bottom: 12px; }
.modal-price { font-size: 32px; font-weight: 800; color: #0068c8; margin-bottom: 20px; }
/* ==================== Video Modal ==================== */
.video-modal { background: rgba(0,0,0,0.92); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.video-modal .modal-content { max-width: 1200px; width: 95%; max-height: 90vh; background: black; border-radius: 12px; position: relative; overflow: hidden; }
.video-wrapper { position: relative; padding-bottom: 56.25%; }
.video-wrapper video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: 12px; }

/* ==================== Enquiry Form (deprecated, kept for compatibility) ==================== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 15px; font-weight: 500; color: #374151; margin-bottom: 6px; }
.form-group label .required { color: #ef4444; }
.form-textarea { width: 100%; padding: 12px 14px; border: 1px solid #e5e7eb; border-radius: 10px; background: #f9fafb; resize: vertical; min-height: 100px; font-size: 16px; }
.form-textarea:focus { outline: none; border-color: #0068c8; box-shadow: 0 0 0 3px rgba(0,104,200,0.1); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ==================== Footer ==================== */
.footer { background: #0a1628; color: rgba(255,255,255,0.9); padding: 56px 0 24px; font-size: 16px; }
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer h4 {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.75);
    margin-bottom: 20px;
}
.footer a { display: block; margin-bottom: 10px; transition: color 0.2s; font-size: 16px; }
.footer a:hover { color: white; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    text-align: center;
    font-size: 14px;
    color: rgba(255,255,255,0.65);
}

/* ==================== Flash Messages ==================== */
.flash { padding: 14px 18px; border-radius: 10px; font-size: 16px; }
.flash-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.flash-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* ==================== Pagination ==================== */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 10px 16px; border-radius: 10px; font-size: 16px; font-weight: 500; }
.pagination a { background: white; border: 1px solid #e5e7eb; color: #4b5563; }
.pagination a:hover { background: #f3f4f6; }
.pagination span { background: #0068c8; color: white; }

/* ==================== Empty State ==================== */
.empty-state { text-align: center; padding: 72px 20px; color: #6b7280; }
.empty-state svg { width: 72px; height: 72px; margin: 0 auto 20px; color: #d1d5db; }

/* ==================== Admin ==================== */
.admin-layout { display: flex; min-height: 100vh; width: 100%; overflow-x: hidden; }
.admin-sidebar {
    width: 260px;
    background: #0a1628;
    color: white;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 200;
    transition: transform 0.3s ease;
}
.admin-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.admin-sidebar-header img { max-width: 160px; height: 36px; object-fit: contain; display: block; margin: 0 auto; }
.admin-sidebar-header span { font-weight: 700; font-size: 14px; }
.admin-nav { flex: 1; padding: 12px; overflow-y: auto; }
.admin-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    transition: all 0.2s;
    margin-bottom: 4px;
}
.admin-nav a:hover, .admin-nav a.active { background: #0068c8; color: white; }
.admin-nav a svg { width: 18px; height: 18px; }
.admin-sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.admin-sidebar-footer p { font-size: 12px; color: rgba(255,255,255,0.4); margin-bottom: 8px; }
.admin-sidebar-footer a { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,0.6); font-size: 14px; }
.admin-main { flex: 1; background: #f3f4f6; overflow: auto; margin-left: 260px; min-height: 100vh; }
.admin-header {
    background: white;
    padding: 16px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.admin-header h1 { font-size: 22px; font-weight: 700; }
.admin-content { padding: 24px; }
.admin-section { background: white; border-radius: 12px; border: 1px solid #e5e7eb; overflow: hidden; }
.admin-section-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.admin-table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 700px; }
table.admin-table th {
    text-align: left;
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}
table.admin-table td { padding: 12px 20px; border-bottom: 1px solid #f3f4f6; vertical-align: middle; }
table.admin-table tr:hover td { background: #f9fafb; }
table.admin-table th input[type="checkbox"] { width: 18px; height: 18px; }
.status-badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.status-new { background: #dbeafe; color: #1e40af; }
.status-read { background: #fef3c7; color: #92400e; }
.status-replied { background: #d1fae5; color: #065f46; }
.status-active { background: #d1fae5; color: #065f46; }
.status-sold { background: #fee2e2; color: #991b1b; }
.status-hidden { background: #f3f4f6; color: #4b5563; }
.btn-icon { padding: 6px; border-radius: 6px; color: #6b7280; display: inline-flex; }
.btn-icon:hover { background: #f3f4f6; }
.btn-icon.delete:hover { background: #fee2e2; color: #ef4444; }
.admin-menu-toggle { display: none; background: none; border: none; padding: 8px; cursor: pointer; }
.admin-menu-toggle svg { width: 24px; height: 24px; color: #374151; }
.sidebar-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 150; }
.form-section { background: white; border-radius: 12px; border: 1px solid #e5e7eb; padding: 24px; margin-bottom: 16px; }
.form-section h3 { font-size: 13px; font-weight: 700; text-transform: uppercase; color: #6b7280; letter-spacing: 0.08em; margin-bottom: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tabs-nav { display: flex; gap: 4px; background: white; border-radius: 12px; padding: 6px; border: 1px solid #e5e7eb; margin-bottom: 24px; }
.tabs-nav a { flex: 1; text-align: center; padding: 10px 16px; border-radius: 8px; font-size: 14px; font-weight: 500; color: #6b7280; text-decoration: none; }
.tabs-nav a.active { background: #0068c8; color: white; }

/* ==================== Responsive ==================== */

/* Tablet */
@media (max-width: 1024px) {
    .filter-grid { grid-template-columns: repeat(2, 1fr); }
    .modal-body { grid-template-columns: 1fr 1fr; }
    .modal-gallery { max-height: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .feature-cards-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile */
@media (max-width: 768px) {
    .hamburger { display: flex; }
    .nav { position: absolute; top: 64px; left: 0; right: 0; background: white; flex-direction: column; padding: 16px; border-bottom: 1px solid #e5e7eb; display: none; z-index: 99; }
    .nav.open { display: flex; }
    .hero { padding: 64px 0; min-height: auto; }
    .hero h1 { font-size: 32px; }
    .hero p { font-size: 16px; }
    .filter-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid .stat-number { font-size: 30px; }
    .footer-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr !important; }
    .feature-cards-grid { grid-template-columns: 1fr; }

    /* Admin sidebar mobile */
    .admin-sidebar { transform: translateX(-100%); }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-main { margin-left: 0; }
    .admin-menu-toggle { display: block; }

    /* Admin filter bar - full width stacked */
    .admin-section-header { flex-direction: column; align-items: stretch; }
    .admin-section-header .filter-bar,
    .admin-section-header form.filter-bar { display: flex; flex-direction: column; width: 100%; }
    .admin-section-header .filter-bar > *,
    .admin-section-header form.filter-bar > * { width: 100% !important; }
    .admin-section-header h2 { margin-bottom: 8px; }

    /* Modal mobile layout - centered with 30px margin */
    .modal-overlay { padding: 70px 10px; align-items: center; }
    .modal-content {
        height: auto;
        max-height: calc(100vh - 140px);
        border-radius: 16px;
        overflow-y: auto;
    }
    .modal-body {
        display: flex;
        flex-direction: column;
    }
    .modal-gallery {
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
    }
    .modal-main-image {
        min-height: 200px;
        max-height: 40vh;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f9fafb;
    }
    .modal-main-image img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        display: block;
    }
    .modal-thumbnails {
        flex-wrap: wrap;
        overflow-x: visible;
        padding: 8px 12px;
        gap: 6px;
    }
    .modal-thumb {
        width: 48px;
        height: 48px;
    }
    .modal-info {
        padding: 16px 20px;
    }
    .modal-close {
        top: 8px;
        right: 8px;
        background: rgba(0,0,0,0.5);
        color: white;
    }

    .video-modal { padding: 0; }
    .video-modal .modal-content { width: 100%; max-width: 100%; max-height: 100vh; border-radius: 0; }

    .section { padding: 48px 0; }
    .section-header h2 { font-size: 26px; }
    .container { padding: 0 16px; }

    /* Admin content full width on mobile */
    .admin-content { padding: 16px; }
    .admin-header { padding: 12px 16px; }
    .admin-header h1 { font-size: 18px; }

    /* Table horizontal scroll */
    table.admin-table { min-width: 600px; font-size: 14px; }
    table.admin-table th,
    table.admin-table td { padding: 10px 12px; }
}

/* Small mobile */
@media (max-width: 480px) {
    .hero h1 { font-size: 26px; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .stats-grid .stat-number { font-size: 26px; }
    .btn { padding: 12px 24px; font-size: 15px; }
    .modal-main-image { height: 200px; }
    .modal-title { font-size: 22px; }
    .modal-price { font-size: 26px; }
}

/* Body scroll lock when modal open */
body.modal-open {
    overflow: hidden;
    width: 100%;
    touch-action: none;
}
/* Unified site refinements */
.logo img { height: 38px; width: auto; max-width: 180px; object-fit: contain; }
.logo svg { width: 32px; height: 32px; color: #0068c8; }
.footer-logo { height: 36px; max-width: 180px; object-fit: contain; margin-bottom: 16px; }
.page { min-height: 70vh; padding: 40px 0 72px; }
.page h1 { font-size: 36px; margin-bottom: 18px; }
.result-count { color: #374151; margin: 20px 0; font-size: 16px; }

/* Feature cards */
.feature-card {
    background: #f8fafc;
    border-radius: 14px;
    padding: 36px 28px;
    text-align: center;
    border: 1px solid #e5e7eb;
    transition: all 0.3s;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.08);
}
.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #ebf4fc;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}
.feature-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}
.feature-card p {
    font-size: 16px;
    color: #374151;
    line-height: 1.6;
}

/* Modal layout refinements */
.modal-brand {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 6px;
}
.modal-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 12px;
    color: #1a1a2e;
}

/* Video thumb active state */
.modal-thumb.video-thumb.active {
    border-color: #ef4444;
}

/* WhatsApp button - consistent across all locations */
.btn-whatsapp {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px;
    width: 100%;
    padding: 14px 24px !important;
    background: #25D366 !important;
    color: white !important;
    border-radius: 10px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-align: center !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    border: none !important;
    font-family: inherit !important;
    line-height: 1.4 !important;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3) !important;
    margin: 0 !important;
}
.btn-whatsapp:hover { background: #1ebe57 !important; box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4) !important; }
.btn-whatsapp svg { color: white; fill: currentColor; }

/* Description box in modal */
.description-box { margin-top: 16px; padding-top: 16px; border-top: 1px solid #e5e7eb; }
.description-box h3 { font-size: 16px; font-weight: 700; color: #1a1a2e; margin-bottom: 8px; }
.description-box p { font-size: 15px; color: #374151; line-height: 1.7; }

/* Modal info scrollbar hide */
@media (min-width: 769px) {
    .modal-info::-webkit-scrollbar { display: none; }
}

/* Loading state */
.loading { padding: 48px; text-align: center; color: #6b7280; font-size: 16px; }

/* Lightbox - Full Width with Bottom Navigation */
.lightbox {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.95);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
}
.lightbox.active { opacity: 1; visibility: visible; }

.lightbox-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    flex-shrink: 0;
}
.lightbox-counter {
    color: white;
    font-size: 14px;
    font-weight: 500;
}
.lightbox-close {
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    color: white;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.3); }

.lightbox-viewport {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}
.lightbox-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    box-sizing: border-box;
    overflow: hidden;
    isolation: isolate;
}
.lightbox-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    display: block;
    transition: transform 0.2s;
}
.lightbox-slide video {
    max-width: 100%;
    max-height: 100%;
    border-radius: 4px;
}

.lightbox-bottom {
    padding: 12px 16px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-shrink: 0;
}
.lightbox-nav-btn {
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(255,255,255,0.12);
    color: white;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.lightbox-nav-btn:hover { background: rgba(255,255,255,0.25); }
.lightbox-nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.lightbox-hint {
    color: rgba(255,255,255,0.6);
    font-size: 13px;
}

/* Pinch zoom support */
.lightbox-slide img.pinched {
    transform: scale(var(--pinch-scale, 1));
    transition: none;
}

/* Modal main image as clickable container */
#modalMainImage {
    cursor: pointer;
}
#modalMainImage:hover::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.05);
    pointer-events: none;
}

/* Homepage section when no featured cars */
.no-featured {
    text-align: center;
    padding: 48px 20px;
    color: #6b7280;
}

/* Video thumbnail dark background */
.modal-thumb.video-thumb {
    background: #1a1a2e;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Admin content desktop max-width override */
.admin-content.wide { max-width: none; }

/* About / Contact grid responsive */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 40px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; max-width: 1000px; margin: 0 auto; }

@media (max-width: 768px) {
    .about-grid { grid-template-columns: 1fr !important; }
    .contact-grid { grid-template-columns: 1fr !important; gap: 24px; }
}

/* Admin settings form improvements */
.settings-form .form-grid { grid-template-columns: repeat(3, 1fr); }
.settings-form .form-group.full-width { grid-column: 1 / -1; }
.settings-form .form-group.half-width { grid-column: span 1; }

@media (max-width: 1024px) {
    .settings-form .form-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .settings-form .form-grid { grid-template-columns: 1fr; }
}


/* Modal contact buttons */
.modal-contact-buttons { display: flex; flex-direction: column; gap: 10px; margin: 10px 5px 0; }
.modal-contact-buttons .btn-contact { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 600; font-size: 14px; border-radius: 10px; padding: 10px 14px; border: none; cursor: pointer; text-decoration: none; box-sizing: border-box; }
.btn-contact.btn-wa { background: #25d366; color: white; }
.btn-contact.btn-wa:hover { background: #1ebe57; }
.btn-contact.btn-phone { background: #0068c8; color: white; }
.btn-contact.btn-phone:hover { background: #0055a3; }
.btn-contact.btn-wechat { background: #07c160; color: white; }
.btn-contact.btn-wechat:hover { background: #06a050; }
.btn-contact svg { fill: currentColor; color: white; }
