/* =====================================================
   DubaiWheels - Complete Stylesheet
   Font: Syne (headings) + DM Sans (body)
   Theme: Royal Purple
===================================================== */

/* ---- CSS Variables ---- */
:root {
    --navy: #7a0d13;
    --navy-mid: #8f1119;
    --navy-light: #a3141f;
    --navy-card: #6b0c11;
    --gold: #e5171f;
    --gold-light: #ff4d4d;
    --gold-dark: #b30f16;
    --white: #ffffff;
    --off-white: #fdf7f7;
    --gray-100: #f5eded;
    --gray-200: #e8d5d5;
    --gray-400: #b58a8a;
    --gray-600: #7a5555;
    --text-primary: #5c0c11;
    --text-secondary: #7a5555;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --radius: 12px;
    --radius-lg: 20px;
    --shadow: 0 4px 24px rgba(122,13,19,0.12);
    --shadow-lg: 0 8px 48px rgba(122,13,19,0.22);
    --transition: all 0.22s cubic-bezier(.4,0,.2,1);
    --perspective: 1200px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Poppins', sans-serif;
    background: var(--off-white);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main.main-content { flex: 1; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ---- Typography ---- */
h1, h2, h3, h4 { font-family: 'Orbitron', sans-serif; font-weight: 700; line-height: 1.2; }

/* =====================================================
   NAVBAR
===================================================== */
/* ---- TOP INFO BAR ---- */
.topbar {
    background: linear-gradient(90deg, var(--gold-dark) 0%, var(--gold) 55%, #ff6a2b 100%);
    color: var(--white);
    font-size: 0.82rem;
}
.topbar-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 7px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.topbar-contact { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.topbar-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--white);
    font-weight: 500;
    transition: var(--transition);
}
.topbar-item:hover { opacity: 0.82; }
.topbar-social { display: flex; align-items: center; gap: 8px; }
.social-icon {
    width: 27px;
    height: 27px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.18);
    color: var(--white);
    transition: var(--transition);
}
.social-icon:hover { background: var(--white); color: var(--gold); transform: translateY(-2px); }
@media (max-width: 640px) {
    .topbar-container { justify-content: center; padding: 6px 16px; gap: 10px; }
    .topbar-contact { gap: 14px; justify-content: center; }
    .topbar-item { font-size: 0.76rem; }
}

.navbar {
    background: var(--white);
    border-bottom: 3px solid var(--gold);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}
.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 84px;
}
.nav-logo {
    font-family: 'Orbitron', sans-serif;
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--navy);
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-logo-img { height: 62px; width: auto; display: block; }
.footer-logo-img { height: 76px; width: auto; display: block; }
.logo-icon { font-size: 1.3rem; }
.logo-accent { color: var(--gold); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}
.nav-link:hover { color: var(--gold); background: rgba(229,23,31,0.08); }
.nav-post { background: rgba(229,23,31,0.12) !important; color: var(--gold) !important; }
.nav-post:hover { background: rgba(229,23,31,0.22) !important; }
.nav-admin { color: var(--gold) !important; }
.nav-logout { color: #d92626 !important; }
.mobile-menu-btn { display: none; background: none; border: none; color: var(--navy); font-size: 1.5rem; cursor: pointer; }
.mobile-menu { display: none; background: var(--white); border-top: 1px solid var(--gray-200); padding: 16px 24px; }
.mobile-link { display: block; color: var(--text-secondary); padding: 10px 0; border-bottom: 1px solid var(--gray-200); font-size: 0.95rem; }

/* =====================================================
   BUTTONS
===================================================== */
.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--navy);
    padding: 11px 24px;
    border-radius: 10px;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(229,23,31,0.35); background: linear-gradient(135deg, var(--gold-light), var(--gold)); }
.btn-primary:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(229,23,31,0.3); }
.btn-secondary {
    display: inline-block;
    background: transparent;
    color: var(--gray-600);
    padding: 11px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 2px solid var(--gray-200);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}
.btn-secondary:hover { border-color: var(--navy); color: var(--navy); }
.btn-danger {
    display: inline-block;
    background: var(--danger);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}
.btn-danger:hover { background: #dc2626; }
.btn-full { width: 100%; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-sm { padding: 7px 16px; font-size: 0.85rem; }

/* =====================================================
   FLASH MESSAGES
===================================================== */
.flash {
    padding: 14px 24px;
    text-align: center;
    font-weight: 500;
    font-size: 0.95rem;
}
.flash-success { background: #dcfce7; color: #166534; border-bottom: 2px solid #bbf7d0; }
.flash-error { background: #fee2e2; color: #991b1b; border-bottom: 2px solid #fecaca; }

/* =====================================================
   HERO SECTION
===================================================== */
.hero {
    padding: 80px 24px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1600px;
}

/* Compact hero for sub-pages (workshops, etc.) — shorter, and the
   background panel sits flat instead of on the 3D prism so content
   stays vertically centered and never clips behind the navbar. */
.hero-compact {
    min-height: 340px;
    padding: 56px 24px 48px;
    perspective: none;
}
.hero-compact .hero-slider { transform-style: flat; }
.hero-compact .hero-slide { transform: none !important; opacity: 1; visibility: visible; }
.hero-compact .hero-title { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 10px; }
.hero-compact .hero-sub { margin-bottom: 26px; }
.hero-compact .hero-search { margin-bottom: 0; }
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 60% 40%, rgba(229,23,31,0.18) 0%, transparent 60%);
    pointer-events: none;
    z-index: 1;
}

/* ---- Hero Slider: real 3D rotating prism (3 faces) ---- */
.hero-slider {
    position: absolute;
    inset: 0;
    z-index: 0;
    transform-style: preserve-3d;
    transition: transform 1.1s cubic-bezier(.65,0,.35,1);
    transform: rotateY(0deg);
}
.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
}
.hero-slide-1 {
    background-image: linear-gradient(180deg, rgba(90,10,15,0.4) 0%, rgba(60,6,10,0.78) 100%), url('https://images.pexels.com/photos/8869203/pexels-photo-8869203.jpeg?auto=compress&cs=tinysrgb&w=1600');
    background-size: cover;
    background-position: center;
    transform: rotateY(0deg) translateZ(320px);
}
.hero-slide-2 {
    background-image: linear-gradient(180deg, rgba(90,10,15,0.4) 0%, rgba(60,6,10,0.78) 100%), url('https://images.pexels.com/photos/8622791/pexels-photo-8622791.jpeg?auto=compress&cs=tinysrgb&w=1600');
    background-size: cover;
    background-position: center;
    transform: rotateY(120deg) translateZ(320px);
}
.hero-slide-3 {
    background-image: linear-gradient(180deg, rgba(90,10,15,0.4) 0%, rgba(60,6,10,0.78) 100%), url('https://images.pexels.com/photos/18346535/pexels-photo-18346535.jpeg?auto=compress&cs=tinysrgb&w=1600');
    background-size: cover;
    background-position: center;
    transform: rotateY(240deg) translateZ(320px);
}
.hero-slide-icon { font-size: 4.5rem; margin-bottom: 8px; filter: drop-shadow(0 8px 24px rgba(0,0,0,0.35)); opacity: 0.5; }
.hero-slide-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    object-position: center;
    display: block;
    z-index: 0;
}

.hero-content { position: relative; z-index: 2; max-width: 760px; margin: 0 auto; }

.slide-dots {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 3;
}
.slide-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: var(--transition);
}
.slide-dot.active { background: var(--gold-light); width: 24px; border-radius: 6px; }
.slide-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    color: var(--white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    z-index: 3;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.slide-arrow:hover { background: var(--gold); color: var(--white); }
.slide-arrow.prev { left: 20px; }
.slide-arrow.next { right: 20px; }
@media (max-width: 640px) { .slide-arrow { display: none; } }
.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    color: var(--white);
    margin-bottom: 16px;
    line-height: 1.1;
}
.hero-accent { color: var(--gold); }
.hero-sub { color: #e5e5e5; font-size: 1.1rem; margin-bottom: 36px; text-shadow: 0 2px 8px rgba(0,0,0,0.4); }

/* Search Bar */
.hero-search {
    display: flex;
    gap: 8px;
    background: white;
    border-radius: var(--radius-lg);
    padding: 8px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.25);
    max-width: 680px;
    margin: 0 auto 28px;
}
.search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px 16px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    background: transparent;
    color: var(--text-primary);
}
.search-btn {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--navy);
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.search-btn:hover { transform: scale(1.03); }

/* City Pills */
.city-pills { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* Buy / Rent mode toggle */
.mode-toggle {
    display: inline-flex;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 50px;
    padding: 4px;
    margin-bottom: 22px;
}
.mode-toggle-btn {
    padding: 8px 26px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--white);
    transition: var(--transition);
}
.mode-toggle-btn.active { background: var(--gold); color: var(--white); box-shadow: 0 4px 14px rgba(229,23,31,0.4); }

/* Rent badge on car cards */
.rent-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--navy);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    padding: 4px 10px;
    border-radius: 50px;
    z-index: 2;
}
.price-suffix { font-size: 0.7rem; font-weight: 500; color: var(--text-secondary); margin-left: 2px; }
.workshop-category-tag {
    display: inline-block;
    background: rgba(229,23,31,0.1);
    color: var(--gold);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 3px 10px;
    border-radius: 50px;
    margin-bottom: 8px;
}
.city-pill {
    background: rgba(255,255,255,0.08);
    color: var(--gray-400);
    padding: 7px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(255,255,255,0.12);
    transition: var(--transition);
}
.city-pill:hover, .city-pill.active {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
    font-weight: 700;
}

/* =====================================================
   LISTINGS SECTION (Grid + Sidebar)
===================================================== */
.listings-section { padding: 40px 24px; }
.listings-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 24px 60px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    align-items: start;
}

/* FILTER SIDEBAR */
.filter-sidebar {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 88px;
}
.filter-title {
    font-size: 1rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gray-100);
    color: var(--navy);
}
.filter-group { margin-bottom: 16px; }
.filter-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}
.filter-group input,
.filter-group select {
    width: 100%;
    padding: 9px 12px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
    background: white;
}
.filter-group input:focus,
.filter-group select:focus { border-color: var(--gold); }

/* LISTINGS HEADER */
.listings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.listings-header h2 { font-size: 1.2rem; color: var(--navy); }

/* CAR GRID */
.car-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* PAGINATION */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 40px;
    flex-wrap: wrap;
}
.page-link {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--white);
    color: var(--text-primary);
    border: 1px solid var(--gray-200);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}
.page-link:hover:not(.disabled) { border-color: var(--gold); color: var(--gold); }
.page-link.active { background: var(--gold); color: var(--white); border-color: var(--gold); }
.page-link.disabled { opacity: 0.4; pointer-events: none; }
.page-ellipsis { color: var(--gray-600); padding: 0 4px; }
.pagination-summary { text-align: center; color: var(--gray-600); font-size: 0.85rem; margin-top: 12px; }

/* CAR CARD */
.car-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.35s cubic-bezier(.22,1,.36,1), box-shadow 0.35s ease;
    position: relative;
    border: 2px solid transparent;
    transform-style: preserve-3d;
    will-change: transform;
}
.car-card:hover {
    box-shadow: 0 24px 55px rgba(0,0,0,0.28), 0 4px 12px rgba(229,23,31,0.15);
    z-index: 5;
}
.car-card.featured { border-color: var(--gold); }
.featured-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--gold);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    padding: 4px 10px;
    border-radius: 50px;
    z-index: 2;
}
.card-img-link { display: block; aspect-ratio: 16/10; overflow: hidden; }
.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.car-card:hover .card-img { transform: scale(1.05); }
.card-body { padding: 16px; }
.card-price {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--gold-dark);
    margin-bottom: 6px;
}
.card-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
    color: var(--navy);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-title a:hover { color: var(--gold-dark); }
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--gray-600);
    margin-bottom: 12px;
}
.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid var(--gray-100);
}
.card-seller { font-size: 0.8rem; color: var(--gray-600); }
.card-view-btn {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--gold-dark);
    font-family: 'Orbitron', sans-serif;
}
.card-view-btn:hover { color: var(--gold); }

/* EMPTY STATE */
.empty-state {
    text-align: center;
    padding: 80px 24px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.empty-icon { font-size: 64px; margin-bottom: 16px; }
.empty-state h3 { font-size: 1.4rem; margin-bottom: 8px; }
.empty-state p { color: var(--gray-600); margin-bottom: 24px; }

/* =====================================================
   LISTING DETAIL PAGE
===================================================== */
.listing-detail-container { max-width: 1200px; margin: 0 auto; padding: 32px 24px; }
.back-btn {
    display: inline-block;
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-bottom: 24px;
    transition: var(--transition);
}
.back-btn:hover { color: var(--navy); }
.listing-detail-grid { display: grid; grid-template-columns: 1fr 380px; gap: 28px; margin-bottom: 48px; }

/* Listing Image */
.listing-img-wrapper { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.listing-main-img { width: 100%; height: 420px; object-fit: cover; }
.featured-badge-lg {
    position: absolute; top: 16px; left: 16px;
    background: var(--gold); color: var(--white);
    font-weight: 700; font-family: 'Orbitron', sans-serif;
    padding: 8px 16px; border-radius: 50px; font-size: 0.9rem;
}

/* Specs Card */
.specs-card, .description-card, .owner-actions {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-top: 20px;
    box-shadow: var(--shadow);
}
.specs-title { font-size: 1rem; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--gray-100); }
.specs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.spec-item { display: flex; flex-direction: column; gap: 3px; padding: 10px; background: var(--gray-100); border-radius: 8px; }
.spec-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gray-600); font-weight: 600; }
.spec-value { font-weight: 700; font-size: 0.95rem; color: var(--navy); }
.description-card h3 { font-size: 1rem; margin-bottom: 12px; }
.description-card p { color: var(--gray-600); line-height: 1.8; font-size: 0.95rem; }
.owner-actions h4 { font-size: 0.9rem; margin-bottom: 12px; color: var(--gray-600); }
.owner-btns { display: flex; gap: 10px; flex-wrap: wrap; }

/* Price & Seller Card */
.price-card, .seller-card, .safety-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}
.price-amount { font-family: 'Orbitron', sans-serif; font-size: 2rem; font-weight: 800; color: var(--gold-dark); margin-bottom: 8px; }
.listing-title { font-size: 1.1rem; margin-bottom: 8px; line-height: 1.3; }
.listing-location { color: var(--gray-600); font-size: 0.9rem; margin-bottom: 12px; }
.status-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.status-active { background: #dcfce7; color: #166534; }
.status-sold { background: #fee2e2; color: #991b1b; }
.status-deleted { background: var(--gray-200); color: var(--gray-600); }
.status-pending_payment { background: #fef3c7; color: #92400e; }

/* Rent A Car posting fee */
.rent-fee-notice { margin-top: 12px; padding: 12px 16px; border-radius: 10px; background: #fef3c7; color: #92400e; font-size: 0.9rem; line-height: 1.5; }
.rent-fee-notice a { color: #92400e; font-weight: 700; text-decoration: underline; margin-left: 4px; }
.action-btn.pay-btn { background: #fef3c7; color: #92400e; }
.pay-body { padding: 32px 40px; }
.pay-summary { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.pay-fee-row { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; border-top: 2px solid var(--gray-100); border-bottom: 2px solid var(--gray-100); font-size: 1.05rem; }
.pay-fee-row strong { font-family: 'Orbitron', sans-serif; font-size: 1.4rem; color: var(--gold-dark); }
.pay-note { margin: 20px 0 24px; color: var(--gray-600); font-size: 0.9rem; line-height: 1.6; }
@media (max-width: 600px) { .pay-body { padding: 24px 20px; } }

.seller-heading { font-size: 1rem; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--gray-100); }
.seller-name { font-weight: 700; font-size: 1.05rem; margin-bottom: 16px; color: var(--navy); }
.contact-btn {
    display: block;
    text-align: center;
    padding: 13px;
    border-radius: 10px;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 10px;
    transition: var(--transition);
}
.phone-btn { background: var(--gold); color: white; }
.phone-btn:hover { background: var(--gold-dark); }
.whatsapp-btn { background: #25d366; color: white; }
.whatsapp-btn:hover { background: #1da851; }
.seller-note { font-size: 0.8rem; color: var(--gray-600); margin-top: 12px; line-height: 1.5; }

.message-card { background: white; border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 24px; }
.message-card-sub { font-size: 0.85rem; color: var(--text-secondary); margin: -6px 0 14px; }
.message-form { display: flex; flex-direction: column; gap: 10px; }
.message-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.message-form input, .message-form textarea {
    padding: 10px 12px;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9rem;
    width: 100%;
}
.message-form input:focus, .message-form textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(229,23,31,0.12); }
.message-form textarea { resize: vertical; }
@media (max-width: 640px) { .message-form .form-row { grid-template-columns: 1fr; } }
.safety-card h4 { font-size: 0.95rem; margin-bottom: 12px; }
.safety-card li { font-size: 0.85rem; color: var(--gray-600); padding: 4px 0 4px 16px; position: relative; }
.safety-card li::before { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 0.75em; position: absolute; left: 0; top: 6px; color: var(--success); }

/* Related Listings */
.related-section { margin-top: 48px; }
.related-section h2 { font-size: 1.4rem; margin-bottom: 24px; }
.related-grid { grid-template-columns: repeat(3, 1fr); }

/* =====================================================
   FORMS
===================================================== */
.form-page-container { max-width: 820px; margin: 0 auto; padding: 40px 24px; }
.form-card { background: white; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.form-header { background: var(--navy); padding: 32px 40px; color: white; border-bottom: 3px solid var(--gold); }
.form-header h1 { font-size: 1.6rem; color: white; margin-bottom: 6px; }
.form-header p { color: var(--gray-400); }
.listing-form { padding: 32px 40px; }
.form-section { margin-bottom: 32px; padding-bottom: 32px; border-bottom: 2px solid var(--gray-100); }
.form-section:last-of-type { border-bottom: none; }
.type-toggle { display: flex; gap: 12px; flex-wrap: wrap; }
.type-toggle-option {
    flex: 1;
    min-width: 180px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}
.type-toggle-option input { accent-color: var(--gold); width: 18px; height: 18px; }
.type-toggle-option:has(input:checked) { border-color: var(--gold); background: rgba(229,23,31,0.05); }
.section-title { font-size: 1rem; color: var(--navy); margin-bottom: 20px; padding-bottom: 8px; border-bottom: 2px solid var(--gold); display: inline-block; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; font-size: 0.88rem; color: var(--gray-600); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.04em; }
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
    background: white;
    color: var(--text-primary);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(229,23,31,0.12); }
.form-group textarea { resize: vertical; line-height: 1.6; }
.input-disabled { background: var(--gray-100) !important; cursor: not-allowed; color: var(--gray-600); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-hint { font-size: 0.8rem; color: var(--gray-400); margin-top: 4px; display: block; }
.required { color: var(--danger); }

/* Input with AED prefix */
.input-prefix { display: flex; align-items: center; border: 2px solid var(--gray-200); border-radius: 10px; overflow: hidden; transition: var(--transition); }
.input-prefix:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(229,23,31,0.12); }
.prefix-text { background: var(--gray-100); padding: 11px 14px; font-weight: 700; font-size: 0.9rem; color: var(--gray-600); white-space: nowrap; border-right: 2px solid var(--gray-200); }
.input-prefix input { border: none !important; border-radius: 0 !important; box-shadow: none !important; }

/* File Upload */
.file-upload-area {
    border: 2px dashed var(--gray-200);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}
.file-upload-area:hover { border-color: var(--gold); background: rgba(229,23,31,0.03); }
.file-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload-icon { font-size: 40px; margin-bottom: 10px; }
.upload-placeholder p { font-weight: 600; color: var(--navy); }
.upload-placeholder span { font-size: 0.85rem; color: var(--gray-400); }
.image-preview { display: none; max-height: 280px; border-radius: 10px; margin: 0 auto; object-fit: cover; }
.current-image { margin-bottom: 12px; }
.current-image p { font-size: 0.85rem; color: var(--gray-600); margin-bottom: 8px; }
.current-img-thumb { width: 160px; height: 100px; object-fit: cover; border-radius: 8px; border: 2px solid var(--gray-200); }

/* Form Errors */
.form-errors {
    margin: 20px 40px;
    background: #fee2e2;
    border: 2px solid #fecaca;
    border-radius: 10px;
    padding: 14px 18px;
}
.form-errors p { color: #991b1b; font-size: 0.9rem; margin-bottom: 4px; }
.form-success-msg {
    margin: 20px 40px;
    background: #dcfce7;
    border: 2px solid #bbf7d0;
    border-radius: 10px;
    padding: 14px 18px;
}
.form-success-msg p { color: #166534; font-size: 0.9rem; }
.form-actions { display: flex; gap: 12px; justify-content: flex-end; padding-top: 16px; }

/* =====================================================
   AUTH PAGES
===================================================== */
.auth-container { min-height: 80vh; display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { background: white; border-radius: var(--radius-lg); padding: 48px 40px; width: 100%; max-width: 440px; box-shadow: var(--shadow-lg); }
.auth-logo { text-align: center; margin-bottom: 24px; }
.auth-logo span { font-size: 3rem; display: block; margin-bottom: 8px; }
.auth-logo h1 { font-size: 1.4rem; color: var(--navy); }
.auth-logo-img { width: 220px; max-width: 80%; }
.auth-title { font-size: 1.5rem; text-align: center; margin-bottom: 6px; }
.auth-sub { text-align: center; color: var(--gray-600); margin-bottom: 28px; }
.auth-form { display: flex; flex-direction: column; gap: 4px; }
.auth-switch { text-align: center; margin-top: 24px; font-size: 0.9rem; color: var(--gray-600); }
.auth-switch a { color: var(--gold-dark); font-weight: 700; }
.demo-credentials { margin-top: 20px; padding: 14px; background: var(--gray-100); border-radius: 10px; text-align: center; }
.demo-credentials p { font-size: 0.82rem; color: var(--gray-600); }

/* =====================================================
   DASHBOARD
===================================================== */
.dashboard-container, .admin-container { max-width: 1200px; margin: 0 auto; padding: 40px 24px; }
.dashboard-header, .admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; flex-wrap: wrap; gap: 16px; }
.dashboard-header h1, .admin-header h1 { font-size: 1.8rem; }
.dashboard-header p, .admin-header p { color: var(--gray-600); }

.dash-welcome { display: flex; align-items: center; gap: 16px; }
.dash-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
    font-weight: 800;
    font-size: 1.4rem;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(229,23,31,0.3);
}
.dash-quick-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.stat-highlight { border-top-color: var(--danger); }
.unread-dot {
    display: inline-block;
    font-family: 'Poppins', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    background: var(--danger);
    color: white;
    padding: 2px 8px;
    border-radius: 50px;
    vertical-align: middle;
    margin-left: 4px;
}

/* Profile completeness */
.profile-progress-card { background: white; border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 18px 24px; margin-bottom: 28px; }
.profile-progress-head { display: flex; justify-content: space-between; align-items: center; font-size: 0.9rem; font-weight: 600; margin-bottom: 10px; }
.profile-progress-head a { color: var(--gold); font-weight: 700; }
.progress-track { height: 8px; background: var(--gray-100); border-radius: 50px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-light)); border-radius: 50px; transition: width 0.6s ease; }

/* Overview chart */
.overview-grid { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; }
.overview-chart { flex-shrink: 0; }
.overview-legend { display: flex; flex-direction: column; gap: 12px; flex: 1; min-width: 220px; }
.legend-item { font-size: 0.9rem; color: var(--text-secondary); }
.legend-dot { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 8px; }
.legend-item strong { color: var(--text-primary); }

/* Tabs */
.dash-tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--gray-200); margin-bottom: 24px; flex-wrap: wrap; }
.dash-tab {
    padding: 12px 18px;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--gray-600);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
    background: none;
    border-top: none; border-left: none; border-right: none;
    cursor: pointer;
}
.dash-tab:hover { color: var(--gold); }
.dash-tab.active { color: var(--gold); border-bottom-color: var(--gold); }
.dash-tab-panel { display: none; }
.dash-tab-panel.active { display: block; }

/* Type pill (sale/rent) */
.type-pill { font-size: 0.72rem; font-weight: 700; padding: 3px 9px; border-radius: 50px; text-transform: uppercase; letter-spacing: 0.03em; }
.type-pill.type-sale { background: rgba(122,13,19,0.1); color: var(--navy); }
.type-pill.type-rent { background: rgba(229,23,31,0.12); color: var(--gold); }

/* Message inbox */
.message-list { display: flex; flex-direction: column; gap: 14px; }
.inbox-msg { border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 16px 18px; transition: var(--transition); }
.inbox-msg.unread { border-color: var(--gold); background: rgba(229,23,31,0.03); }
.inbox-msg-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.inbox-msg-listing { font-size: 0.85rem; color: var(--gray-600); margin-left: 6px; }
.inbox-msg-listing a { color: var(--gold); font-weight: 600; }
.inbox-msg-date { font-size: 0.78rem; color: var(--gray-600); }
.inbox-msg-body { font-size: 0.92rem; color: var(--text-primary); line-height: 1.6; margin-bottom: 10px; }
.inbox-msg-footer { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 640px) {
    .overview-grid { justify-content: center; text-align: center; }
    .dash-quick-actions { width: 100%; }
    .dash-quick-actions a { flex: 1; text-align: center; }
}
.dash-stats, .admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 40px; }
.dash-stat-card, .admin-stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--gold);
}
.stat-icon { font-size: 2rem; margin-bottom: 8px; }
.stat-number { font-family: 'Orbitron', sans-serif; font-size: 2.5rem; font-weight: 800; color: var(--navy); }
.stat-label { font-size: 0.85rem; color: var(--gray-600); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; margin-top: 4px; }
.dash-section, .admin-section { background: white; border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow); margin-bottom: 28px; }
.dash-section h2, .admin-section h2 { font-size: 1.2rem; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 2px solid var(--gray-100); }

/* Tables */
.dash-table-wrapper { overflow-x: auto; }
.dash-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.dash-table th { background: var(--gray-100); padding: 12px 14px; text-align: left; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gray-600); font-weight: 700; }
.dash-table td { padding: 12px 14px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
.dash-table tr:last-child td { border-bottom: none; }
.dash-table tr:hover td { background: var(--gray-100); }
.row-deleted td { opacity: 0.5; }
.table-car { display: flex; align-items: center; gap: 12px; }
.table-thumb { width: 60px; height: 42px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.table-car-title { font-weight: 600; font-size: 0.88rem; color: var(--navy); }
.table-car-sub { font-size: 0.8rem; color: var(--gray-400); }
.table-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.action-btn { padding: 5px 12px; border-radius: 6px; font-size: 0.8rem; font-weight: 600; cursor: pointer; border: none; transition: var(--transition); display: inline-block; }
.view-btn { background: var(--gray-100); color: var(--navy); }
.view-btn:hover { background: var(--gray-200); }
.edit-btn { background: #dbeafe; color: #1e40af; }
.edit-btn:hover { background: #bfdbfe; }
.delete-btn { background: #fee2e2; color: #991b1b; }
.delete-btn:hover { background: #fecaca; }
.feature-btn { background: #fef9c3; color: #92400e; }
.feature-btn:hover { background: #fde68a; }
.sold-btn { background: #dcfce7; color: #166534; }
.sold-btn:hover { background: #bbf7d0; }
.role-badge { padding: 3px 10px; border-radius: 50px; font-size: 0.78rem; font-weight: 700; }
.role-admin { background: var(--gold); color: var(--white); }
.role-user { background: var(--gray-100); color: var(--gray-600); }
.profile-quick p { margin-bottom: 8px; font-size: 0.95rem; }

/* =====================================================
   FOOTER
===================================================== */
.footer { background: var(--off-white); color: var(--text-secondary); margin-top: auto; border-top: 3px solid var(--gold); }
.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 60px 24px 40px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}
.footer-brand .nav-logo { font-size: 1.3rem; margin-bottom: 12px; }
.footer-brand p { font-size: 0.88rem; line-height: 1.7; color: var(--text-secondary); margin-top: 12px; }
.footer-links h4, .footer-cities h4, .footer-info h4 { font-family: 'Orbitron', sans-serif; font-size: 0.9rem; color: var(--gold); margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.08em; }
.footer-links a, .footer-cities a { display: block; color: var(--text-secondary); font-size: 0.88rem; margin-bottom: 8px; transition: var(--transition); }
.footer-links a:hover, .footer-cities a:hover { color: var(--gold); }
.footer-info p { font-size: 0.88rem; margin-bottom: 8px; }
.footer-bottom { border-top: 1px solid var(--gray-200); padding: 20px 24px; text-align: center; font-size: 0.82rem; color: var(--gray-600); }

/* =====================================================
   RESPONSIVE
===================================================== */
@media (max-width: 1024px) {
    .listings-container { grid-template-columns: 240px 1fr; }
    .listing-detail-grid { grid-template-columns: 1fr 340px; }
    .footer-container { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-menu-btn { display: block; }
    .mobile-menu { display: block; }
    .listings-container { grid-template-columns: 1fr; }
    .filter-sidebar { position: static; }
    .listing-detail-grid { grid-template-columns: 1fr; }
    .listing-right { order: -1; }
    .hero { padding: 50px 24px 40px; }
    .hero-search { flex-direction: column; }
    .form-row { grid-template-columns: 1fr; }
    .form-card { border-radius: 0; }
    .listing-form, .form-header { padding: 24px 20px; }
    .auth-card { padding: 32px 24px; }
    .footer-container { grid-template-columns: 1fr 1fr; gap: 24px; }
    .related-grid { grid-template-columns: 1fr 1fr; }
    .form-errors, .form-success-msg { margin: 12px 20px; }
    .dashboard-header, .admin-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
    .car-grid { grid-template-columns: 1fr; }
    .related-grid { grid-template-columns: 1fr; }
    .footer-container { grid-template-columns: 1fr; }
    .specs-grid { grid-template-columns: 1fr 1fr; }
    .form-actions { flex-direction: column; }
    .city-pills { gap: 6px; }
}

/* Home hero: city-wise search (city dropdown inside the search bar) */
.hero-search-city { max-width: 820px; align-items: center; }
.search-city {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 6px 0 14px;
    border-right: 1px solid var(--gray-200);
    flex: 0 0 auto;
    cursor: pointer;
}
.search-city-icon { font-size: 1rem; }
.search-city-select {
    border: none;
    outline: none;
    background: transparent;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    padding: 10px 4px;
    cursor: pointer;
    min-width: 150px;
}
.search-city-select:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
@media (max-width: 768px) {
    .hero-search-city { align-items: stretch; }
    .search-city { border-right: none; border-bottom: 1px solid var(--gray-200); padding: 4px 10px; }
    .search-city-select { flex: 1; min-width: 0; }
}

/* Font Awesome icons inside flex buttons/links keep a small gap from their text */
.page-link { gap: 6px; }

/* =====================================================
   Listing Photo Gallery (listing page)
===================================================== */
.listing-left { min-width: 0; } /* lets the thumbnail strip scroll instead of widening the page */
.listing-gallery { background: var(--white); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); outline: none; }
.listing-gallery:focus-visible { box-shadow: 0 0 0 3px rgba(229,23,31,0.35), var(--shadow-lg); }
.gallery-stage { position: relative; height: 460px; background: #1a0405; overflow: hidden; }
.gallery-slide {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; opacity: 0; transition: opacity 0.35s ease;
    pointer-events: none;
}
.gallery-slide.active { opacity: 1; pointer-events: auto; }
.gallery-stage .featured-badge-lg { z-index: 3; }
.gallery-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
    width: 46px; height: 64px; border: none; cursor: pointer;
    background: rgba(0,0,0,0.38); color: var(--white); font-size: 1.3rem;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.gallery-arrow:hover, .gallery-arrow:focus-visible { background: var(--gold); outline: none; }
.gallery-arrow.prev { left: 0; border-radius: 0 8px 8px 0; }
.gallery-arrow.next { right: 0; border-radius: 8px 0 0 8px; }
.gallery-counter {
    position: absolute; right: 14px; bottom: 14px; z-index: 3;
    background: rgba(0,0,0,0.62); color: var(--white);
    font-size: 0.85rem; font-weight: 600; padding: 5px 12px; border-radius: 6px;
}
.gallery-counter i { margin-right: 4px; color: var(--gold-light); }
.gallery-thumbs {
    display: flex; gap: 6px; padding: 6px; overflow-x: auto;
    scrollbar-width: thin; scroll-snap-type: x proximity; background: var(--white);
}
.gallery-thumb {
    flex: 0 0 calc((100% - 18px) / 4); aspect-ratio: 4 / 3;
    padding: 0; border: 3px solid transparent; border-radius: 6px;
    overflow: hidden; cursor: pointer; background: var(--gray-100);
    opacity: 0.7; transition: var(--transition); scroll-snap-align: start;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb:hover { opacity: 1; }
.gallery-thumb.active { border-color: var(--gold); opacity: 1; }
@media (max-width: 768px) {
    .gallery-stage { height: 300px; }
    .gallery-arrow { width: 38px; height: 52px; font-size: 1.1rem; }
    .gallery-thumb { flex-basis: calc((100% - 18px) / 4.3); }
}

/* =====================================================
   Multi-photo picker (post / edit ad forms)
===================================================== */
.file-upload-area.is-dragging { border-color: var(--gold); background: rgba(229,23,31,0.05); }
.file-upload-area.is-full { opacity: 0.55; pointer-events: none; }
.photo-picker-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 10px; }
.photo-count {
    font-weight: 700; font-size: 0.85rem; color: var(--white);
    background: var(--gold); padding: 3px 12px; border-radius: 50px; white-space: nowrap;
}
.photo-message {
    display: none; margin-top: 10px; padding: 10px 14px; border-radius: 8px;
    background: rgba(239,68,68,0.08); color: var(--danger); font-size: 0.88rem; font-weight: 500;
}
.photo-preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 12px; }
.photo-preview-grid:empty { display: none; }
.existing-photos { margin: 0 0 16px; }
.photo-preview-item {
    position: relative; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden;
    border: 2px solid var(--gray-200); background: var(--gray-100);
}
.photo-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-cover-tag {
    position: absolute; left: 6px; top: 6px; background: var(--gold); color: var(--white);
    font-size: 0.7rem; font-weight: 700; padding: 2px 8px; border-radius: 4px; text-transform: uppercase;
}
.photo-remove-btn {
    position: absolute; right: 6px; top: 6px; width: 26px; height: 26px; border-radius: 50%;
    border: none; cursor: pointer; background: rgba(0,0,0,0.6); color: var(--white);
    display: flex; align-items: center; justify-content: center; font-size: 0.85rem;
}
.photo-remove-btn:hover { background: var(--danger); }
.existing-photo { cursor: pointer; }
.photo-remove-check {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 8px;
    background: rgba(0,0,0,0.6); color: var(--white); font-size: 0.78rem; font-weight: 600;
    display: flex; align-items: center; gap: 6px;
}
.photo-remove-check input { accent-color: var(--gold); }
.existing-photo.is-removed { border-color: var(--danger); }
.existing-photo.is-removed img { opacity: 0.35; filter: grayscale(1); }
.existing-photo.is-removed .photo-remove-check { background: var(--danger); }
/* Phones: photos first, then price and seller, then the rest (like PakWheels) */
@media (max-width: 768px) {
    .listing-detail-grid { gap: 16px; }
    .listing-left, .listing-right { display: contents; }
    .listing-left > *, .listing-right > * { order: 4; margin-top: 0; margin-bottom: 0; }
    .listing-left > .listing-gallery { order: 1; }
    .listing-right > .price-card { order: 2; }
    .listing-right > .seller-card { order: 3; }
}

/* =====================================================
   BIKES PAGE (/bikes)
===================================================== */
.bk-hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 60%, var(--gold-dark) 100%);
    color: var(--white);
    padding: 52px 24px 120px;
    position: relative;
    overflow: hidden;
}
.bk-hero::after {
    content: '\f21c'; /* fa-motorcycle */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 6%;
    bottom: -30px;
    font-size: 220px;
    color: rgba(255,255,255,0.07);
    pointer-events: none;
}
.bk-hero-inner { max-width: 1040px; margin: 0 auto; position: relative; z-index: 1; }
.bk-hero-title { font-size: clamp(1.6rem, 3.4vw, 2.3rem); margin-bottom: 8px; }
.bk-hero-sub { color: rgba(255,255,255,0.85); font-size: 1rem; }

.bk-wrap { max-width: 1040px; margin: -84px auto 0; padding: 0 24px 40px; position: relative; z-index: 2; }
.bk-search-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 6px 24px 22px;
}
.bk-tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--gray-100); margin-bottom: 18px; }
.bk-tab {
    padding: 14px 2px 12px;
    font-weight: 600;
    color: var(--gray-600);
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
}
.bk-tab.active { color: var(--navy); border-bottom-color: var(--gold); }
a.bk-tab:hover { color: var(--gold-dark); }
.bk-fields, .bk-more { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 12px; }
.bk-more { grid-template-columns: 1fr 1fr; margin-top: 12px; }
.bk-more[hidden] { display: none; }
.bk-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.92rem;
    color: var(--text-primary);
    background: var(--white);
    outline: none;
    transition: var(--transition);
}
.bk-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(229,23,31,0.12); }
.bk-search-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.bk-more-toggle { background: none; border: none; color: var(--gold-dark); font-weight: 600; font-size: 0.9rem; cursor: pointer; font-family: 'Poppins', sans-serif; padding: 4px 0; }
.bk-more-toggle[aria-expanded="true"] i { transform: rotate(180deg); }
.bk-search-btns { display: flex; align-items: center; gap: 16px; }
.bk-clear { color: var(--gray-600); font-weight: 600; font-size: 0.9rem; }
.bk-clear:hover { color: var(--gold-dark); }
.bk-search-btn { color: var(--white); padding: 12px 34px; }

.bk-cta-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 22px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.bk-cta { display: flex; align-items: center; gap: 16px; padding: 18px 24px; transition: var(--transition); }
.bk-cta + .bk-cta { border-left: 1px solid var(--gray-100); }
.bk-cta:hover { background: var(--gray-100); }
.bk-cta:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.bk-cta:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.bk-cta-icon {
    width: 54px; height: 54px; flex-shrink: 0;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(229,23,31,0.1);
    color: var(--gold);
    font-size: 1.5rem;
}
.bk-cta strong { display: block; color: var(--navy); font-size: 1rem; }
.bk-cta small { display: block; color: var(--gray-600); font-size: 0.82rem; }

.bk-section { padding: 44px 24px; }
.bk-section-white { background: var(--white); }
.bk-section-inner { max-width: 1040px; margin: 0 auto; }
.bk-heading { font-size: 1.3rem; color: var(--navy); margin-bottom: 22px; }

.bk-carousel { position: relative; }
.bk-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 3 * 16px) / 4);
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: 4px 2px 8px;
}
.bk-track::-webkit-scrollbar { display: none; }
.bk-model {
    scroll-snap-align: start;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    overflow: hidden;
    background: var(--white);
    transition: var(--transition);
}
.bk-model:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.bk-model-img { display: block; aspect-ratio: 4/3; background: var(--gray-100); overflow: hidden; }
.bk-model-img img { width: 100%; height: 100%; object-fit: cover; }
.bk-model-body { display: block; padding: 12px 14px; }
.bk-model-name { display: block; font-weight: 600; color: var(--navy); }
.bk-model-count { display: block; font-size: 0.82rem; color: var(--success); }
.bk-arrow {
    position: absolute; top: 38%; z-index: 2;
    width: 38px; height: 38px; border-radius: 50%;
    border: 1px solid var(--gray-200);
    background: var(--white);
    color: var(--navy);
    box-shadow: var(--shadow);
    cursor: pointer;
}
.bk-arrow.prev { left: -18px; }
.bk-arrow.next { right: -18px; }
.bk-arrow:hover { color: var(--gold); border-color: var(--gold); }

.bk-makes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.bk-make {
    display: flex; flex-direction: column; gap: 2px;
    padding: 14px 16px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    transition: var(--transition);
}
.bk-make:hover, .bk-make.active { border-color: var(--gold); box-shadow: var(--shadow); }
.bk-make-name { font-weight: 600; color: var(--navy); }
.bk-make-count { font-size: 0.8rem; color: var(--gray-600); }

.bk-results-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.bk-results-head .bk-heading { margin-bottom: 0; }
.bk-results-head .btn-primary { color: var(--white); }

.type-pill.type-bike { background: rgba(34,197,94,0.12); color: #15803d; }

@media (max-width: 900px) {
    .bk-track { grid-auto-columns: calc((100% - 2 * 16px) / 3); }
}
@media (max-width: 768px) {
    .bk-hero { padding: 36px 16px 110px; }
    .bk-hero::after { font-size: 140px; }
    .bk-wrap { padding: 0 16px 32px; }
    .bk-search-card { padding: 4px 16px 18px; }
    .bk-fields, .bk-more { grid-template-columns: 1fr; }
    .bk-search-btns { width: 100%; justify-content: flex-end; }
    .bk-cta-row { grid-template-columns: 1fr; }
    .bk-cta + .bk-cta { border-left: none; border-top: 1px solid var(--gray-100); }
    .bk-cta:first-child { border-radius: var(--radius) var(--radius) 0 0; }
    .bk-cta:last-child { border-radius: 0 0 var(--radius) var(--radius); }
    .bk-section { padding: 32px 16px; }
    .bk-track { grid-auto-columns: 62%; }
    .bk-arrow { display: none; }
}
