/* ============================================================
   style.css — Car Classified Website
   Main Stylesheet
============================================================ */

:root {
    --primary: #e63946;
    --primary-dark: #c5303d;
    --secondary: #1d3557;
    --accent: #ffb703;
    --premium-gold: #f4a300;
    --success: #2a9d8f;
    --danger: #e63946;
    --warning: #f4a300;
    --text-dark: #1a1a1a;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --radius: 10px;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 24px rgba(0,0,0,0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-dark);
    background: var(--bg-light);
    line-height: 1.6;
}

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

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-align: center;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-whatsapp { background: #25d366; color: white; }
.btn-whatsapp:hover { background: #1ea952; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-block { display: block; width: 100%; }

/* ===== NAVBAR ===== */
.navbar { background: white; box-shadow: var(--shadow); position: sticky; top: 0; z-index: 100; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; }
.nav-logo { 
    font-size: 22px; 
    font-weight: 700; 
    color: var(--secondary); 
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.nav-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; }
.nav-toggle span { width: 24px; height: 3px; background: var(--text-dark); border-radius: 2px; }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a { font-weight: 500; color: var(--text-dark); transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-dropdown { position: relative; }
.nav-user { display: flex; align-items: center; gap: 4px; cursor: pointer; }
.badge-premium-sm { background: var(--premium-gold); color: white; font-size: 10px; padding: 2px 6px; border-radius: 4px; }
.dropdown-menu {
    display: none; position: absolute; right: 0; top: 100%; background: white;
    box-shadow: var(--shadow-hover); border-radius: var(--radius); min-width: 180px;
    padding: 8px 0; margin-top: 8px;
}
.nav-dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu li a { display: block; padding: 10px 16px; }
.dropdown-menu li a:hover { background: var(--bg-light); }
.dropdown-menu .divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ===== FLASH MESSAGES ===== */
.flash-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.alert { padding: 14px 18px; border-radius: var(--radius); margin: 16px 0; display: flex; align-items: flex-start; gap: 10px; }
.alert-success { background: #d1f5ed; color: #0c6b5d; border: 1px solid #a3e8d8; }
.alert-error { background: #fde2e2; color: #a3262f; border: 1px solid #f8b9bd; }
.alert-info { background: #dce9f9; color: #1e4d8c; border: 1px solid #b0cdf2; }
.alert-warning { background: #fef3cd; color: #8a6500; border: 1px solid #fadc7c; }
.alert p { margin: 2px 0; }

/* ===== HERO ===== */
.hero { background: linear-gradient(135deg, var(--secondary), #2a4a7a); color: white; padding: 60px 0 50px; text-align: center; }
.hero-title { font-size: 36px; font-weight: 700; margin-bottom: 10px; }
.hero-subtitle { font-size: 16px; opacity: 0.9; margin-bottom: 30px; }
.hero-search { display: flex; max-width: 700px; margin: 0 auto; gap: 8px; background: white; padding: 8px; border-radius: var(--radius); }
.hero-search-input { flex: 2; border: none; padding: 12px; font-size: 15px; border-radius: 6px; }
.hero-search-select { flex: 1; border: none; padding: 12px; font-size: 15px; border-radius: 6px; background: var(--bg-light); }
.hero-search input:focus, .hero-search select:focus { outline: 2px solid var(--primary); }
.quick-filters { margin-top: 20px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.quick-filters a { background: rgba(255,255,255,0.15); padding: 8px 16px; border-radius: 20px; font-size: 14px; transition: background 0.2s; }
.quick-filters a:hover { background: rgba(255,255,255,0.3); }

/* ===== LISTINGS SECTION ===== */
.listings-section { padding: 50px 0; }
.listings-section-alt { background: white; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.section-header h2 { font-size: 24px; font-weight: 700; }
.section-tag { background: var(--premium-gold); color: white; padding: 4px 12px; border-radius: 20px; font-size: 13px; font-weight: 600; }
.section-link { color: var(--primary); font-weight: 600; }

.cars-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ===== CAR CARD ===== */
.car-card {
    background: white; border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow); transition: all 0.25s ease; border: 1px solid var(--border);
}
.car-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.car-card-premium { border: 2px solid var(--premium-gold); }
.car-card-img-wrap { position: relative; aspect-ratio: 4/3; overflow: hidden; background: #eee; }
.car-card-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: 10px; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 700; }
.badge-premium { left: 10px; background: var(--premium-gold); color: white; }
.badge-new { right: 10px; background: var(--success); color: white; }
.badge-normal  { background: #e5e7eb; color: var(--text-muted); padding: 4px 10px; border-radius: 6px; font-size: 12px; }
.badge-owner   { background: #dcfce7; color: #166534; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.badge-dealer  { background: #e0f2fe; color: #075985; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.owner-trust-note { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px; padding: 8px 12px; font-size: 13px; color: #166534; margin-bottom: 12px; }
.car-card-seller-tag { margin-top: 6px; }
.cst-owner  { background: #dcfce7; color: #166534; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; }
.cst-dealer { background: #e0f2fe; color: #075985; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; }
.car-card-body { padding: 16px; }
.car-card-title { font-size: 16px; font-weight: 600; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.car-card-price { font-size: 18px; font-weight: 700; color: var(--primary); margin-bottom: 10px; }
.negotiable-tag { font-size: 11px; background: var(--bg-light); color: var(--text-muted); padding: 2px 8px; border-radius: 10px; margin-left: 6px; font-weight: 500; }
.car-card-meta { display: flex; gap: 12px; font-size: 13px; color: var(--text-muted); margin-bottom: 10px; flex-wrap: wrap; }
.car-card-footer { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); border-top: 1px solid var(--border); padding-top: 10px; }

/* ===== CTA SECTION ===== */
.cta-section { background: var(--secondary); color: white; padding: 50px 0; text-align: center; }
.cta-section h2 { font-size: 28px; margin-bottom: 12px; }
.cta-section p { opacity: 0.9; margin-bottom: 24px; max-width: 500px; margin-inline: auto; }

/* ===== FOOTER ===== */
.footer { background: #15233f; color: #c5cde0; padding: 40px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; padding-bottom: 30px; }
.footer-col h4 { color: white; margin-bottom: 14px; font-size: 16px; }
.footer-col p { font-size: 14px; margin-bottom: 8px; line-height: 1.6; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { font-size: 14px; }
.footer-col ul li a:hover { color: white; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 16px 0; text-align: center; font-size: 13px; }

/* ===== AUTH PAGES ===== */
.auth-page { min-height: 70vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card { background: white; border-radius: var(--radius); box-shadow: var(--shadow); padding: 40px; max-width: 440px; width: 100%; }
.auth-card-wide { max-width: 560px; }
.auth-logo { text-align: center; font-size: 22px; font-weight: 700; color: var(--secondary); text-decoration: none; display: flex; align-items: center;
			justify-content: center; gap: 8px; margin-bottom: 20px;}
.auth-title { text-align: center; font-size: 24px; margin-bottom: 6px; }
.auth-subtitle { text-align: center; color: var(--text-muted); margin-bottom: 24px; font-size: 14px; }
.auth-form .form-group { margin-bottom: 18px; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 14px; }
.auth-footer a { color: var(--primary); font-weight: 600; }
.demo-creds { margin-top: 20px; background: var(--bg-light); border-radius: 8px; padding: 12px; font-size: 12px; color: var(--text-muted); }
.label-link { float: right; font-size: 12px; font-weight: 500; color: var(--primary); }
.input-password-wrap { position: relative; }
.toggle-password { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; }
.plan-info-box { margin-top: 20px; background: #fff8e6; border-radius: 8px; padding: 16px; font-size: 13px; }
.plan-info-box ul { margin: 8px 0 8px 18px; list-style: disc; }
.plan-info-box a { color: var(--primary); font-weight: 600; }

/* ===== FORMS (general) ===== */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 14px; font-weight: 600; }
.form-group input, .form-group select, .form-group textarea {
    padding: 11px 14px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.full-width { margin-bottom: 16px; }
.form-check label { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: 13px; }
.hint { font-size: 12px; color: var(--text-muted); }

/* ===== FORM PAGE (listing forms) ===== */
.form-page { padding-top: 30px; padding-bottom: 60px; }
.page-header { margin-bottom: 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.page-header h2 { font-size: 24px; }
.text-center { text-align: center; flex-direction: column; }
.month-counter { background: #dce9f9; padding: 12px 18px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; }
.month-counter a { color: var(--primary); font-weight: 600; }
.listing-form { background: white; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.form-section { margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.form-section:last-of-type { border-bottom: none; }
.form-section-title { font-size: 16px; margin-bottom: 16px; color: var(--secondary); }
.form-actions { display: flex; gap: 12px; }

/* ===== IMAGE UPLOAD ===== */
.image-upload-area { border: 2px dashed var(--border); border-radius: var(--radius); padding: 20px; }
.image-upload-area.drag-over { border-color: var(--primary); background: #fef2f2; }
.upload-placeholder { display: flex; flex-direction: column; align-items: center; cursor: pointer; padding: 30px; text-align: center; }
.upload-icon { font-size: 40px; margin-bottom: 10px; }
.image-preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin-top: 16px; }
.img-preview-item { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; }
.img-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.primary-tag { position: absolute; bottom: 4px; left: 4px; background: var(--premium-gold); color: white; font-size: 10px; padding: 2px 6px; border-radius: 4px; }
.img-delete-checkbox { position: absolute; top: 4px; right: 4px; background: rgba(255,255,255,0.9); font-size: 10px; padding: 2px 6px; border-radius: 4px; display: flex; gap: 4px; align-items: center; }

/* ===== DASHBOARD ===== */
.dashboard-page { padding-top: 30px; padding-bottom: 60px; }
.dash-welcome { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.dash-welcome h2 { font-size: 24px; }
.dash-welcome p { color: var(--text-muted); font-size: 14px; }
.limit-reached-badge { background: #fde2e2; color: var(--danger); padding: 10px 16px; border-radius: 8px; font-size: 13px; }
.limit-reached-badge a { font-weight: 700; margin-left: 6px; }

.plan-banner { padding: 14px 20px; border-radius: var(--radius); margin-bottom: 20px; font-size: 14px; }
.plan-banner-premium { background: #fff4d6; color: #8a6500; }
.plan-banner-free { background: #dce9f9; color: #1e4d8c; }
.plan-banner a { color: var(--primary); font-weight: 600; margin-left: 6px; }

.stats-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 30px; }
.stat-card { background: white; border-radius: var(--radius); padding: 18px; text-align: center; box-shadow: var(--shadow); }
.stat-icon { font-size: 24px; margin-bottom: 6px; }
.stat-num { font-size: 22px; font-weight: 700; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.stat-green .stat-num { color: var(--success); }
.stat-yellow .stat-num { color: var(--warning); }
.stat-blue .stat-num { color: #1e4d8c; }
.stat-purple .stat-num { color: #7c3aed; }
.stat-red .stat-num { color: var(--danger); }

.dash-section { background: white; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 24px; }
.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.qa-card { background: white; border-radius: var(--radius); padding: 20px; text-align: center; font-weight: 600; box-shadow: var(--shadow); transition: all 0.2s; }
.qa-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }

/* ===== TABLES ===== */
.table-wrap { overflow-x: auto; background: white; border-radius: var(--radius); box-shadow: var(--shadow); }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { background: var(--bg-light); text-align: left; padding: 12px 16px; font-size: 13px; font-weight: 600; color: var(--text-muted); }
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
.data-table tr:last-child td { border-bottom: none; }
.td-car { display: flex; align-items: center; gap: 10px; }
.td-thumb { width: 48px; height: 48px; border-radius: 6px; object-fit: cover; }
.td-thumb-empty { display: flex; align-items: center; justify-content: center; background: var(--bg-light); font-size: 20px; }
.td-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-link { color: var(--primary); font-size: 13px; font-weight: 600; background: none; border: none; cursor: pointer; }
.text-danger { color: var(--danger) !important; }
.text-success { color: var(--success) !important; }
.text-muted { color: var(--text-muted); }

.status-pill { padding: 4px 10px; border-radius: 14px; font-size: 12px; font-weight: 600; }
.status-active { background: #d1f5ed; color: #0c6b5d; }
.status-pending { background: #fef3cd; color: #8a6500; }
.status-hidden { background: #e5e7eb; color: var(--text-muted); }
.status-rejected, .status-deleted { background: #fde2e2; color: #a3262f; }

/* ===== FILTER TABS ===== */
.filter-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.tab { padding: 8px 18px; background: white; border-radius: 20px; font-size: 14px; font-weight: 500; box-shadow: var(--shadow); }
.tab-active { background: var(--primary); color: white; }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state p { margin-bottom: 16px; font-size: 15px; }

/* ===== SEARCH PAGE ===== */
.search-page { padding-top: 30px; padding-bottom: 60px; }
.search-layout { display: grid; grid-template-columns: 260px 1fr; gap: 24px; }
.filter-sidebar { background: white; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); align-self: start; }
.filter-group { margin-bottom: 18px; }
.filter-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.filter-group select, .filter-group input { width: 100%; padding: 9px 12px; border: 1.5px solid var(--border); border-radius: 6px; font-size: 13px; }
.filter-range { display: flex; gap: 8px; }
.sort-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; background: white; padding: 12px 16px; border-radius: 8px; box-shadow: var(--shadow); font-size: 14px; }
.sort-bar select { padding: 6px 10px; border-radius: 6px; border: 1px solid var(--border); }

/* ===== PAGINATION ===== */
.pagination-wrap { margin-top: 24px; text-align: center; }
.pagination { display: inline-flex; gap: 6px; }
.pagination li a { display: inline-block; padding: 8px 14px; background: white; border-radius: 6px; box-shadow: var(--shadow); font-size: 14px; }
.pagination li.active a { background: var(--primary); color: white; }
.page-info { margin-top: 10px; font-size: 13px; color: var(--text-muted); }

/* ===== DETAIL PAGE ===== */
.detail-page { padding-top: 24px; padding-bottom: 60px; }
.breadcrumb { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }
.breadcrumb a { color: var(--primary); }
.detail-layout { display: grid; grid-template-columns: 1fr 360px; gap: 30px; }
.detail-main { min-width: 0; overflow: hidden; }

/* ---- Gallery ---- */
.gallery { width: 100%; }
.gallery-main {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    border-radius: var(--radius);
    overflow: hidden;
    background: #111;
    margin-bottom: 10px;
    cursor: zoom-in;
}
.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.gallery-zoom-hint {
    position: absolute;
    bottom: 10px;
    right: 12px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 20px;
    pointer-events: none;
}
/* Thumbs strip */
.gallery-thumbs-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    padding-bottom: 6px;
}
.gallery-thumbs-wrap::-webkit-scrollbar { height: 4px; }
.gallery-thumbs-wrap::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
.gallery-thumbs {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    width: max-content;
}
.gallery-thumb {
    width: 80px;
    height: 58px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
    border: 2px solid transparent;
    opacity: 0.75;
    transition: opacity 0.2s, border-color 0.2s;
}
.gallery-thumb:hover,
.gallery-thumb.active { border-color: var(--primary); opacity: 1; }

/* ---- Lightbox ---- */
.lb-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.94);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.lb-overlay.open { display: flex; }
.lb-img-wrap {
    position: relative;
    max-width: 95vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lb-img-wrap img {
    max-width: 95vw;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 4px;
    user-select: none;
}
.lb-close {
    position: fixed;
    top: 14px;
    right: 18px;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    line-height: 1;
    z-index: 10001;
}
.lb-prev, .lb-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: none;
    font-size: 26px;
    padding: 10px 16px;
    cursor: pointer;
    border-radius: 4px;
    z-index: 10001;
    transition: background 0.2s;
}
.lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,0.3); }
.lb-prev { left: 10px; }
.lb-next { right: 10px; }
.lb-counter {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    margin-top: 10px;
}
.detail-title-block { margin: 20px 0; }
.detail-title-block h1 { font-size: 26px; margin-bottom: 8px; }
.detail-price { font-size: 26px; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.detail-meta { font-size: 13px; color: var(--text-muted); }
.detail-section { background: white; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-bottom: 20px; }
.detail-section h3 { font-size: 17px; margin-bottom: 16px; }
.specs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.spec-item { display: flex; flex-direction: column; gap: 4px; }
.spec-item span { font-size: 12px; color: var(--text-muted); }
.spec-item strong { font-size: 14px; }
.detail-description { font-size: 14px; line-height: 1.7; color: #374151; }

.detail-sidebar { align-self: start; }
.dealer-card { background: white; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.dealer-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.dealer-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--bg-light); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.dealer-card-header h4 { font-size: 15px; }
.dealer-card-header p { font-size: 12px; color: var(--text-muted); }
.dealer-contact-buttons { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.dealer-card hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.dealer-card h4 { font-size: 14px; margin-bottom: 10px; }
.inquiry-form { display: flex; flex-direction: column; gap: 10px; }
.inquiry-form input, .inquiry-form textarea { padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 6px; font-size: 13px; font-family: inherit; }
.safety-tips { background: white; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.safety-tips h4 { font-size: 14px; margin-bottom: 10px; }
.safety-tips ul { list-style: disc; margin-left: 18px; font-size: 13px; color: var(--text-muted); }
.safety-tips ul li { margin-bottom: 6px; }

/* ===== PLANS PAGE ===== */
.plans-page { padding-top: 40px; padding-bottom: 60px; }
.plans-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 30px 0 50px; }
.plan-card { background: white; border-radius: var(--radius); padding: 28px; text-align: center; box-shadow: var(--shadow); position: relative; border: 2px solid transparent; }
.plan-card-popular { border-color: var(--premium-gold); transform: scale(1.03); }
.plan-popular-tag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--premium-gold); color: white; font-size: 11px; padding: 4px 12px; border-radius: 12px; font-weight: 700; }
.plan-name { font-size: 17px; margin-bottom: 12px; }
.plan-price { font-size: 32px; font-weight: 700; color: var(--primary); }
.plan-currency { font-size: 18px; }
.plan-duration { font-size: 14px; color: var(--text-muted); font-weight: 400; }
.plan-per-month { font-size: 12px; color: var(--text-muted); margin-bottom: 18px; }
.plan-features { text-align: left; margin-bottom: 22px; }
.plan-features li { font-size: 13px; padding: 6px 0; color: #374151; }
.plans-faq { max-width: 700px; margin: 0 auto; }
.plans-faq h3 { margin-bottom: 16px; }
.faq-item { background: white; border-radius: 8px; padding: 16px; margin-bottom: 10px; box-shadow: var(--shadow); }
.faq-item strong { display: block; margin-bottom: 6px; font-size: 14px; }
.faq-item p { font-size: 13px; color: var(--text-muted); }

/* ===== PURCHASE PAGE ===== */
.purchase-summary, .payment-instructions { background: white; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px; }
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; }
.summary-total { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 12px; font-size: 16px; }
.upi-box { background: var(--bg-light); padding: 16px; border-radius: 8px; margin-top: 10px; font-size: 14px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .cars-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(3, 1fr); }
    .quick-actions { grid-template-columns: repeat(2, 1fr); }
    .search-layout { grid-template-columns: 1fr; }
    .detail-layout { grid-template-columns: 1fr; }
    .detail-main { min-width: 0; max-width: 100%; overflow: hidden; }
    .plans-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .nav-links {
        display: none; position: absolute; top: 100%; left: 0; right: 0;
        background: white; flex-direction: column; padding: 16px; box-shadow: var(--shadow);
        gap: 12px;
    }
    .nav-links.show { display: flex; }
    .hero-search { flex-direction: column; }
    .cars-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
    .specs-grid { grid-template-columns: repeat(2, 1fr); }
    .plans-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .page-header { flex-direction: column; align-items: flex-start; }
	
	.footer-col ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .footer-col ul li { margin-bottom: 0; }
}

@media (max-width: 480px) {
    .cars-grid { grid-template-columns: 1fr; }
    .hero-title { font-size: 26px; }

    /* Dashboard welcome bar */
    .dash-welcome { flex-direction: column; align-items: flex-start; gap: 10px; }
    .dash-welcome h2 { font-size: 19px; line-height: 1.4; word-break: break-word; }
    .dash-welcome p { font-size: 12.5px; }
    .limit-reached-badge { width: 100%; }
    .dash-welcome .btn { width: 100%; text-align: center; }

    .plan-banner { font-size: 13px; padding: 12px 14px; }

    .stats-grid { gap: 10px; }
    .stat-card { padding: 14px 10px; }
    .stat-icon { font-size: 20px; }
    .stat-num { font-size: 18px; }
    .stat-label { font-size: 11px; }

    .quick-actions { grid-template-columns: 1fr 1fr; gap: 10px; }
    .qa-card { padding: 14px; font-size: 13px; }
}

/* ===== RECENT LISTINGS / DATA TABLE -> CARD LAYOUT ON MOBILE ===== */
@media (max-width: 700px) {
    .table-wrap { overflow-x: visible; box-shadow: none; background: transparent; border-radius: 0; }
    .data-table thead { display: none; }
    .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }

    .data-table tr {
        background: white;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        padding: 14px 16px;
        margin-bottom: 14px;
    }
    .data-table tr:last-child { margin-bottom: 0; }

    .data-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        padding: 9px 0;
        border-bottom: 1px dashed var(--border);
        font-size: 13.5px;
        text-align: right;
    }
    .data-table td:last-child { border-bottom: none; }

    .data-table td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 12px;
        color: var(--text-muted);
        text-align: left;
        margin-right: 12px;
        flex-shrink: 0;
    }

    /* Car cell: image + title, full width, no label row */
    .data-table td.td-cell-car {
        display: block;
        text-align: left;
        padding: 0 0 12px;
        border-bottom: 1px solid var(--border);
        margin-bottom: 8px;
    }
    .data-table td.td-cell-car::before { content: none; }
    .data-table .td-car { justify-content: flex-start; }
    .data-table .td-car span, .data-table .td-car strong { font-size: 14.5px; }

    /* Actions cell: button row, no label */
    .data-table td.td-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 16px;
        padding-top: 10px;
    }
    .data-table td.td-actions::before { content: none; }
    .data-table .btn-link { font-size: 13.5px; }
}

/* ===== MODAL ===== */
.modal-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    align-items: center; justify-content: center; z-index: 1000;
}
.modal-box { background: white; border-radius: var(--radius); padding: 24px; max-width: 400px; width: 90%; }
.modal-box h4 { margin-bottom: 14px; }
.modal-box textarea { width: 100%; padding: 10px; border: 1.5px solid var(--border); border-radius: 6px; margin-bottom: 14px; font-family: inherit; }
.modal-actions { display: flex; gap: 10px; }
