/* ==========================================================================
   Design System - CoinAfrique Côte d'Ivoire Inspired
   ChicVoiture - Premium Classifieds Platform
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Poppins:wght@400;500;600;700;800;900&display=swap');

:root {
    /* Color Palette - chicVoiture Premium Auto (Bleu & Ciel Harmonieux) */
    --bg-app: #f4f5f6;
    /* Fond gris très clair */
    --bg-card: #ffffff;
    /* Fond de carte blanc pur */
    --text-main: #1e293b;
    /* Texte principal ardoise foncé (Slate 800) */
    --text-secondary: #475569;
    /* Texte secondaire ardoise moyen (Slate 600) */
    --text-muted: #94a3b8;

    --primary: #FE7855;
    /* Orange/Corail chicVoiture */
    --primary-dark: #e0603f;
    /* Orange foncé */
    --primary-light: #fff3f0;
    /* Orange très clair pour les fonds et boutons */
    --secondary: #1A3255;
    /* Bleu Marine Foncé */
    --secondary-light: #eef2f7;
    --accent: #FE7855;
    /* Accent Orange */
    --accent-dark: #e0603f;
    --accent-light: #fff3f0;

    --success: #10b981;
    --danger: #ef4444;
    --whatsapp: #25d366;
    --whatsapp-dark: #128c7e;

    --border: #e2e8f0;
    /* Bordure fine et discrète (Slate 200) */
    --border-light: #f1f5f9;

    --radius: 8px;
    /* Coins moins arrondis pour un effet pro classique */
    --radius-sm: 4px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 8px 20px rgba(37, 99, 235, 0.08);

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Poppins', sans-serif;
    --max-width: 1200px;
    --transition: all 0.2s ease-in-out;
    --transition-fast: all 0.1s ease;
}

/* ==========================================================================
   Base Resets & Typography
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-app);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.25;
}

.text-gradient {
    color: var(--primary);
    background: none;
    -webkit-text-fill-color: initial;
}

img {
    max-width: 100%;
    height: auto;
}

/* ==========================================================================
   Layout Containers
   ========================================================================== */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.grid {
    display: grid;
    gap: 24px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

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

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

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Header / Navigation - CoinAfrique Style
   ========================================================================== */
.main-header {
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-main-row {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.header-main-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.header-logo-wrapper {
    flex-shrink: 0;
}

.header-logo-wrapper .logo {
    font-size: 22px;
    color: var(--text-main);
}

.header-logo-wrapper .logo-icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
    border-radius: var(--radius-sm) !important;
    background: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* Logo */
.logo {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.5px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: white;
    border-radius: var(--radius-sm);
    font-size: 16px;
}

/* Header Search */
.header-search-wrapper {
    flex: 1;
    max-width: 520px;
    display: flex;
    justify-content: center;
}

.header-search-form {
    display: flex;
    width: 100%;
    border: 2px solid var(--border);
    background: var(--bg-app);
    border-radius: var(--radius-full);
    overflow: hidden;
    transition: var(--transition);
}

.header-search-form:focus-within {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.header-search-form input {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px 20px;
    font-size: 14px;
    background: transparent;
    font-family: var(--font-sans);
    color: var(--text-main);
}

.header-search-form input::placeholder {
    color: var(--text-muted);
}

.header-search-btn {
    background: var(--primary);
    color: #ffffff;
    border: none;
    outline: none;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 0 var(--radius-full) var(--radius-full) 0;
}

.header-search-btn:hover {
    background: var(--primary-dark);
}

/* Header Actions */
.header-actions-box {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

/* Déposer Button - CoinAfrique amber CTA */
.btn-deposer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 700;
    color: white !important;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-deposer:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: white !important;
}

/* Favorites Heart */
.action-heart {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    cursor: pointer;
    /* padding: 8px; */
    border-radius: var(--radius-full);
}

.action-heart:hover {
    color: #ef4444;
    background: #fef2f2;
    transform: scale(1.1);
}

/* Auth Action Links */
.action-auth {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition);
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
}

.action-auth:hover {
    color: var(--primary);
    background: var(--primary-light);
}

/* Single Row Header styling */
.header-nav-and-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    margin: 0 32px;
    justify-content: center;
}

.header-nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-nav-link {
    font-weight: 700;
    font-size: 13.5px;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    white-space: nowrap;
}

.header-nav-link:hover, .header-nav-link.active {
    color: var(--primary);
    background: var(--primary-light);
}

.header-search-toggle-container {
    display: flex;
    align-items: center;
    margin-left: 8px;
}

.search-toggle-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.header-search-expanded-form {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    transform-origin: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 50;
    display: flex;
    align-items: center;
}

.header-search-expanded-form.active {
    transform: translateY(-50%) scaleY(1);
    opacity: 1;
    visibility: visible;
}

.header-search-expanded-form input {
    width: 100%;
    padding: 10px 40px 10px 40px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: var(--bg-app);
    outline: none;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    font-family: var(--font-sans);
}

.header-search-expanded-form input:focus {
    border-color: var(--primary);
    background: white;
}

.search-input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    pointer-events: none;
}

.search-close-btn {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

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

.action-icon-btn {
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
    text-decoration: none;
}

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

/* Responsive Header */
@media (max-width: 1024px) {
    .header-main-container {
        flex-wrap: wrap;
        gap: 12px;
    }

    .header-search-wrapper {
        order: 3;
        width: 100%;
        max-width: 100%;
    }

    .header-actions-box {
        gap: 10px;
    }

    .nav-link {
        padding: 10px 12px;
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .header-main-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
    }

    .nav-menu {
        gap: 0;
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .nav-menu::-webkit-scrollbar {
        display: none;
    }

    .nav-link {
        white-space: nowrap;
        padding: 10px 14px;
    }
}

/* ==========================================================================
   Buttons - Rounded, Modern, CoinAfrique-inspired
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border);
    background: transparent;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary {
    background: var(--primary);
    color: white !important;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
    color: white !important;
}

.btn-secondary {
    background: #ffffff;
    border-color: var(--border);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: var(--bg-app);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.btn-accent {
    background: var(--primary);
    color: white !important;
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.btn-accent:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: white !important;
}

.btn-danger {
    background: #fef2f2;
    color: var(--danger);
    border-color: #fecaca;
}

.btn-danger:hover {
    background: var(--danger);
    color: white !important;
    border-color: var(--danger);
    transform: translateY(-2px);
}

/* WhatsApp & Call Buttons */
.btn-whatsapp {
    background: var(--whatsapp) !important;
    color: white !important;
    border-color: var(--whatsapp) !important;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.25);
    font-weight: 700;
    border-radius: var(--radius-sm);
    font-size: 15px;
    padding: 14px 24px;
}

.btn-whatsapp:hover {
    background: var(--whatsapp-dark) !important;
    border-color: var(--whatsapp-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
    color: white !important;
}

.btn-call {
    background: #10b981 !important;
    color: white !important;
    border-color: #10b981 !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.2);
    font-weight: 700;
    border-radius: var(--radius-sm);
    font-size: 15px;
    padding: 14px 24px;
}

.btn-call:hover {
    background: #059669 !important;
    border-color: #059669 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
    color: white !important;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 700;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    padding: 48px 0 32px 0;
    text-align: center;
    margin-bottom: 40px;
    border: none;
}

.hero h1 {
    font-size: 42px;
    line-height: 1.15;
    margin-bottom: 12px;
    font-weight: 800;
}

.hero p {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 28px auto;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 28px;
    }

    .hero p {
        font-size: 15px;
    }
}

/* ==========================================================================
   Search Card - Rounded pill-style
   ========================================================================== */
.search-card {
    background: #ffffff;
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: 28px 32px;
    max-width: 950px;
    margin: 0 auto;
}

.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: flex-end;
}

.form-group {
    flex: 1 1 180px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
}

.form-control {
    background: var(--bg-app);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: var(--text-main);
    font-size: 14px;
    transition: var(--transition);
    font-family: var(--font-sans);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.form-control::placeholder {
    color: var(--text-muted);
}

/* ==========================================================================
   Listing Cards - CoinAfrique-style rounded cards
   ========================================================================== */
.card {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--border-light);
}

.card-img-wrapper {
    position: relative;
    padding-top: 62%;
    background: var(--bg-app);
    overflow: hidden;
}

.card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.card:hover .card-img {
    transform: scale(1.05);
}

.card-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    border-radius: var(--radius-full);
    z-index: 2;
    letter-spacing: 0.3px;
}

.tag-auto {
    background: var(--primary);
}

.tag-real-estate {
    background: #7c3aed;
}

.card-price {
    font-weight: 800;
    font-size: 14px;
    color: var(--primary);
    font-family: var(--font-sans);
}

.card-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-main);
}

.card-location {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 12px;
    margin-top: auto;
    border-top: 1px solid var(--border-light);
    font-size: 12px;
    color: var(--text-secondary);
}

.spec-item {
    background: var(--bg-app);
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 11px;
}

/* ==========================================================================
   Category Grid on Home - CoinAfrique circles
   ========================================================================== */
.category-card {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-xs);
}

.category-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.category-card:hover svg {
    transform: scale(1.1);
}

.category-card svg {
    transition: var(--transition);
}

.category-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-light);
    margin: 0 auto 16px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary);
    border-radius: var(--radius-full);
    border: none;
}

/* ==========================================================================
   Section Headers
   ========================================================================== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
    margin-top: 40px;
    padding-bottom: 0;
    border-bottom: none;
}

.section-header h2 {
    font-size: 24px;
    font-weight: 800;
}

.section-header p {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 4px;
}

/* ==========================================================================
   Forms & Authentication
   ========================================================================== */
.form-box {
    max-width: 480px;
    margin: 48px auto;
    background: #ffffff;
    border: none;
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-md);
}

.form-box h2 {
    font-size: 24px;
    margin-bottom: 6px;
    text-align: center;
}

.form-box .subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 28px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* =========================================
   GARAGE FORM GRID LAYOUT
   ========================================= */
.garage-form-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    align-items: start;
}

.form-main-col {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-side-col {
    position: sticky;
    top: 24px;
}

.form-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    padding: 24px;
}

.form-section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    transition: all 0.2s;
    background: var(--bg-body);
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
    background: var(--bg-card);
}

.form-error {
    color: #ef4444;
    font-size: 12px;
    margin-top: 6px;
    display: block;
}

.expertise-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 12px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    background: var(--bg-body);
}

.expertise-checkbox:hover {
    background: var(--bg-hover);
    border-color: var(--border);
}

.expertise-checkbox span {
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
}

@media (max-width: 992px) {
    .garage-form-grid {
        grid-template-columns: 1fr;
    }

    .form-side-col {
        position: static;
    }
}

@media (max-width: 500px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-box .btn {
    width: 100%;
    margin-top: 16px;
}

.form-footer-text {
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 20px;
}

.form-footer-text a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: underline;
}

/* ==========================================================================
   Details Page - Listing Show
   ========================================================================== */
.details-container {
    padding: 24px 0 60px 0;
}

.details-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 28px;
}

@media (max-width: 900px) {
    .details-grid {
        grid-template-columns: 1fr;
    }
}

.gallery-wrapper {
    background: #ffffff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    border: none;
}

.gallery-main {
    position: relative;
    padding-top: 58%;
}

.gallery-main img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.details-content h1 {
    font-size: 28px;
    margin-bottom: 8px;
    line-height: 1.3;
}

.details-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.details-price {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 20px;
    padding: 12px 20px;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    width: fit-content;
    border: none;
}

.details-section {
    background: #ffffff;
    border: none;
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-xs);
}

.details-section h3 {
    font-size: 18px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-light);
    color: var(--text-main);
}

/* Specs Table */
.specs-table {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

@media (max-width: 600px) {
    .specs-table {
        grid-template-columns: 1fr;
    }
}

.spec-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg-app);
    border-radius: var(--radius-sm);
    font-size: 14px;
    border: none;
}

.spec-row span:first-child {
    color: var(--text-muted);
    font-weight: 500;
}

.spec-row span:last-child {
    font-weight: 700;
    color: var(--text-main);
}

/* Energy Badge */
.energy-rating-badge {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 12px;
    color: white;
    border-radius: 6px;
}

/* ==========================================================================
   Contact Seller Widget (Sidebar)
   ========================================================================== */
.sidebar-widget {
    background: #ffffff;
    border: none;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
}

.sidebar-widget h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--text-main);
}

.seller-profile {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    background: var(--bg-app);
    padding: 14px;
    border-radius: var(--radius-sm);
    border: none;
}

.avatar-placeholder {
    width: 44px;
    height: 44px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: white;
    border-radius: var(--radius-full);
}

.seller-info h4 {
    font-size: 15px;
    font-family: var(--font-sans);
    font-weight: 700;
}

.seller-info p {
    font-size: 12px;
    color: var(--text-muted);
}

/* WhatsApp / Call contact block styling */
.contact-actions-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.contact-actions-block .btn {
    width: 100%;
    justify-content: center;
}

/* ==========================================================================
   Seller Dashboard
   ========================================================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.stats-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .stats-bar {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    background: #ffffff;
    border: none;
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xs);
}

.stat-card h4 {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    font-family: var(--font-sans);
    font-weight: 600;
}

.stat-card .stat-value {
    font-size: 30px;
    font-weight: 800;
    color: var(--text-main);
}

.dashboard-table-wrapper {
    background: #ffffff;
    border: none;
    border-radius: var(--radius);
    overflow: hidden;
    margin-top: 16px;
    box-shadow: var(--shadow-xs);
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
}

.dashboard-table th {
    background: var(--bg-app);
    border-bottom: 2px solid var(--border);
    padding: 14px 16px;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 700;
    text-transform: uppercase;
    text-align: left;
    letter-spacing: 0.5px;
}

.dashboard-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
}

.dashboard-listing-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dashboard-listing-img {
    width: 52px;
    height: 40px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: none;
}

.dashboard-listing-title {
    font-weight: 700;
    font-size: 14px;
}

.dashboard-listing-category {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 700;
    border-radius: var(--radius-full);
    border: none;
}

.badge-active {
    background: #ecfdf5;
    color: #059669;
}

.badge-sold {
    background: #fef2f2;
    color: var(--danger);
}

.badge-unavailable {
    background: #f1f5f9;
    color: var(--text-secondary);
}

.actions-cell {
    display: flex;
    gap: 8px;
}

/* ==========================================================================
   Alerts
   ========================================================================== */
.alert {
    padding: 14px 20px;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: var(--radius-sm);
    border: none;
}

.alert-success {
    background: #ecfdf5;
    color: #059669;
}

.alert-danger {
    background: #fef2f2;
    color: var(--danger);
}

.invalid-feedback {
    color: var(--danger);
    font-size: 12px;
    margin-top: 4px;
    font-weight: 600;
}

/* ==========================================================================
   Catalog / Filter Sidebar
   ========================================================================== */
.catalog-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    padding: 24px 0;
    align-items: start;
}

@media (max-width: 900px) {
    .catalog-layout {
        grid-template-columns: 1fr;
    }
}

.filter-sidebar {
    background: #ffffff;
    border: none;
    border-radius: var(--radius-lg);
    padding: 24px;
    height: fit-content;
    box-shadow: var(--shadow);
}

.filter-sidebar::-webkit-scrollbar {
    display: none;
}

.filter-sidebar h3 {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
    color: var(--text-main);
}

.filter-section {
    margin-bottom: 16px;
}

.filter-section h4 {
    font-size: 13px;
    margin-bottom: 8px;
    color: var(--primary);
    font-family: var(--font-sans);
    font-weight: 700;
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination-wrapper {
    margin-top: 32px;
    display: flex;
    justify-content: center;
}

.pagination-nav {
    display: flex;
    gap: 6px;
}

.pagination-item {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: #ffffff;
    font-weight: 600;
    font-size: 13px;
    transition: var(--transition);
    color: var(--text-secondary);
}

.pagination-item:hover,
.pagination-item.active {
    background: var(--primary);
    color: white !important;
    border-color: var(--primary);
}

/* ==========================================================================
   Footer - Clean, modern
   ========================================================================== */
footer {
    border-top: none;
    padding: 32px 0;
    margin-top: 60px;
    background: var(--secondary);
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 400;
}

footer p {
    margin-bottom: 4px;
}

footer a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
}

footer a:hover {
    color: var(--accent);
}

/* ==========================================================================
   Auto-scroll Slider Styles
   ========================================================================== */
.slider-outer-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 8px 4px;
}

.slider-track {
    display: flex;
    gap: 24px;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

.slider-card {
    flex: 0 0 280px !important;
    width: 280px !important;
    height: 390px !important;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .slider-outer-wrapper {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .slider-outer-wrapper::-webkit-scrollbar {
        display: none;
    }

    .slider-track {
        transform: none !important;
    }

    .slider-controls {
        display: none !important;
    }
}

/* ==========================================================================
   Homepage Two-Column Layout (Sidebar)
   ========================================================================== */
.homepage-split-layout {
    display: flex;
    gap: 32px;
    margin-top: 24px;
    align-items: flex-start;
}

.homepage-main-column {
    flex: 1;
    min-width: 0;
}

.homepage-sidebar {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-ad-card {
    border: none;
    border-radius: var(--radius-lg);
    background: #ffffff;
    text-align: center;
    position: relative;
    padding: 0;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.sidebar-ad-header {
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin: 14px auto 8px auto;
    width: fit-content;
    padding-bottom: 4px;
}

.sidebar-ad-img {
    width: 100%;
    height: auto;
    display: block;
}

.sidebar-ad-body {
    padding: 18px 20px 22px;
}

.sidebar-ad-body h4 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
}

.sidebar-ad-body p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 14px;
}

.sidebar-newsletter-card {
    border: none;
    border-radius: var(--radius-lg);
    padding: 24px;
    background: var(--secondary);
    color: white;
    box-shadow: var(--shadow-md);
}

.sidebar-newsletter-card h4 {
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
    color: white;
}

.sidebar-newsletter-card p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
    margin-bottom: 16px;
}

.sidebar-newsletter-card input {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    border-radius: var(--radius-sm) !important;
}

.sidebar-newsletter-card input::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
}

.sidebar-newsletter-card .btn {
    background: white !important;
    color: var(--primary) !important;
    border-color: white !important;
    font-weight: 700;
    border-radius: var(--radius-sm) !important;
}

.sidebar-newsletter-card .btn:hover {
    background: var(--accent-light) !important;
    border-color: var(--accent-light) !important;
    transform: translateY(-1px);
}

@media (max-width: 1200px) {
    .homepage-split-layout {
        gap: 24px;
    }

    .homepage-sidebar {
        width: 100%;
    }
}

@media (max-width: 1024px) {
    .homepage-split-layout {
        flex-direction: column;
        gap: 40px;
    }

    .homepage-sidebar {
        width: 100%;
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .homepage-sidebar {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ==========================================================================
   Transaction badges (Sale vs Rent) - Pills
   ========================================================================== */
.card-purpose {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    z-index: 2;
    border-radius: var(--radius-full);
    letter-spacing: 0.3px;
}

.purpose-sale {
    background: #0284c7;
}

.purpose-rent {
    background: var(--accent);
}

/* ==========================================================================
   Create / Edit Form Panels
   ========================================================================== */
.create-form-panel {
    background: #ffffff;
    border: none;
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.create-form-panel h3 {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-light);
    color: var(--text-main);
}

/* ==========================================================================
   Floating WhatsApp Button (Fixed bottom-right)
   ========================================================================== */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: var(--whatsapp);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 999;
    cursor: pointer;
    transition: var(--transition);
    color: white;
    border: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(37, 211, 102, 0.5);
}

.whatsapp-float svg {
    width: 28px;
    height: 28px;
    fill: white;
}

/* ==========================================================================
   Micro Animations & Polish
   ========================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.card {
    animation: fadeInUp 0.4s ease forwards;
}

/* Smooth scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-app);
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Selection color */
::selection {
    background: rgba(37, 99, 235, 0.15);
    color: var(--primary-dark);
}

/* ==========================================================================
   Mobile-First Styling Refinements (100% Responsive)
   ========================================================================== */
@media (max-width: 768px) {
    .ad-banner-horizontal {
        flex-direction: column !important;
        align-items: stretch !important;
        text-align: center !important;
        padding: 16px 14px !important;
    }

    .ad-banner-horizontal div {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }

    .ad-banner-horizontal a {
        width: 100% !important;
        justify-content: center !important;
    }
}

@media (max-width: 600px) {

    .search-form,
    #global-search-form {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    .search-form input,
    #global-search-form input {
        width: 100% !important;
    }

    .search-form button,
    #global-search-form button {
        width: 100% !important;
        height: 46px !important;
    }
}


/* ==========================================================================
   Hamburger Menu Button
   ========================================================================== */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    flex-shrink: 0;
}

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

.hamburger-line {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: var(--transition);
}

/* Hide desktop-only elements on mobile */
.header-desktop-only {
    display: inline-flex;
}

/* ==========================================================================
   Mobile Search Bar (shown only on mobile, below logo row)
   ========================================================================== */
.mobile-search-bar {
    display: none;
    padding: 8px 0 12px;
    border-top: 1px solid var(--border-light);
    background: #fff;
}

/* ==========================================================================
   Mobile Menu Drawer
   ========================================================================== */
.mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.mobile-menu.is-open {
    display: block;
}

.mobile-menu-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.mobile-menu-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(240px, 70vw);
    height: 100%;
    background: #fff;
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.15);
    padding: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-light);
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 1;
}

.mobile-menu-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-app);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}

.mobile-menu-close:hover {
    background: var(--border);
    color: var(--text-main);
}

.mobile-nav-links {
    list-style: none;
    padding: 10px 0;
    flex: 1;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: var(--primary-light);
    color: var(--primary);
    border-left-color: var(--primary);
}

.mobile-nav-link svg {
    flex-shrink: 0;
    color: currentColor;
}

.mobile-menu-divider {
    height: 1px;
    background: var(--border-light);
    margin: 0 14px 12px;
}

.mobile-menu-actions {
    padding: 0 14px 20px;
}

/* ==========================================================================
   Footer Responsive
   ========================================================================== */
.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-brand .footer-logo {
    font-weight: 800;
    color: white;
    font-size: 20px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
}

.footer-brand .footer-logo-icon {
    background: var(--primary);
    color: white;
    font-weight: 900;
    padding: 2px 6px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

.footer-brand .footer-tagline {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.footer-contact {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.footer-contact a {
    font-size: 13px;
}

.footer-sep {
    opacity: 0.3;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 16px;
    padding-top: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-bottom p {
    font-size: 12px;
    opacity: 0.6;
}

/* ==========================================================================
   MOBILE-FIRST BREAKPOINTS — Complete Overhaul
   ========================================================================== */

/* ---- Small Phones (≤ 480px) ---- */
@media (max-width: 480px) {
    .container {
        padding: 0 14px;
    }

    /* Header */
    .header-logo-wrapper .logo {
        font-size: 18px;
    }

    .header-logo-wrapper .logo .logo-icon {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }

    /* Hero */
    .hero {
        padding: 28px 0 20px;
        margin-bottom: 28px;
    }

    .hero h1 {
        font-size: 22px;
    }

    .hero p {
        font-size: 13px;
    }

    /* Cards on grid */
    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    /* Slider cards slimmer */
    .slider-card {
        flex: 0 0 240px !important;
        width: 240px !important;
        height: 350px !important;
    }

    /* Details page */
    .details-content h1 {
        font-size: 18px;
    }

    .details-price {
        font-size: 20px;
    }

    /* Section header stack */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    /* Catalog filter toggle */
    #mobile-filter-toggle {
        display: flex !important;
    }

    .filter-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 85vw;
        max-width: 320px;
        height: 100dvh !important;
        z-index: 8000;
        border-radius: 0;
        overflow-y: auto;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .filter-sidebar.mobile-open {
        left: 0;
        box-shadow: 4px 0 30px rgba(0, 0, 0, 0.15);
    }
}

/* ---- Mobile (≤ 768px) ---- */
@media (max-width: 768px) {

    /* Show hamburger, hide desktop nav items */
    .hamburger-btn {
        display: flex;
    }

    .header-desktop-only {
        display: none !important;
    }

    /* Show mobile search bar */
    .mobile-search-bar {
        display: block;
    }

    /* Hide the header search wrapper (we have mobile version) */
    .header-search-wrapper {
        display: none;
    }

    /* Header layout on mobile */
    .header-main-container {
        flex-wrap: nowrap;
        gap: 10px;
        padding: 10px 16px;
    }

    .header-main-row {
        padding: 0;
        border-bottom: none;
    }

    /* Nav row scrollable on mobile */
    .header-navigation-row {
        border-top: 1px solid var(--border-light);
    }

    .nav-menu {
        display: flex;
        width: 100%;
        justify-content: flex-start;
        align-items: center;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .nav-menu::-webkit-scrollbar {
        display: none;
    }

    .nav-link {
        flex: 0 0 auto;
        text-align: center;
        white-space: nowrap;
        padding: 12px 16px;
        font-size: 13px;
    }

    .nav-link.active::after {
        left: 16px;
        right: 16px;
    }

    /* Section headers */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-top: 28px;
        margin-bottom: 16px;
    }

    .section-header h2 {
        font-size: 18px;
    }

    /* Homepage search section padding */
    #home-search-section {
        padding: 20px 14px !important;
        margin-bottom: 24px !important;
    }

    /* Category grid on mobile - 2 cols */
    .home-category-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 12px !important;
    }

    /* Hero */
    .hero {
        padding: 28px 0 20px;
        margin-bottom: 24px;
    }

    .hero h1 {
        font-size: 24px;
    }

    .hero p {
        font-size: 14px;
    }

    /* Slider */
    .slider-outer-wrapper {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        cursor: grab;
    }

    .slider-outer-wrapper::-webkit-scrollbar {
        display: none;
    }

    .slider-track {
        transform: none !important;
    }

    .slider-controls {
        display: none !important;
    }

    /* Catalog layout: sidebar goes to top */
    .catalog-layout {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 16px 0;
    }

    .filter-sidebar {
        position: static;
        top: auto;
    }

    /* Details page: stack columns */
    .details-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    /* Gallery height reduced */
    #listing-image-gallery {
        height: 260px !important;
    }

    .gallery-thumbnails {
        gap: 8px !important;
        margin-bottom: 16px !important;
    }

    .thumb-item {
        width: 56px !important;
        height: 42px !important;
    }

    /* Title */
    .details-content h1 {
        font-size: 20px !important;
    }

    .details-price {
        font-size: 22px !important;
        padding: 10px 16px !important;
    }

    /* Specs table: single column */
    .specs-table {
        grid-template-columns: 1fr !important;
        gap: 8px;
    }

    /* Contact sidebar buttons: wrap in grid on mobile */
    .contact-actions-block {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 10px;
    }

    .contact-actions-block .btn {
        flex: 1 1 calc(50% - 5px) !important;
        min-width: 130px;
        width: auto !important;
        padding: 10px 12px !important;
        font-size: 13px !important;
    }

    /* Form box */
    .form-box {
        margin: 24px auto;
        padding: 24px 18px;
    }



    /* Homepage split layout */
    .homepage-split-layout {
        flex-direction: column;
        gap: 28px;
    }

    .homepage-sidebar {
        width: 100%;
        position: static;
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Footer */
    .footer-top {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .footer-contact {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .footer-sep {
        display: none;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    /* Container padding */
    .container {
        padding: 0 16px;
    }

    /* Details sections */
    .details-section {
        padding: 18px 16px !important;
    }

    /* Publish section */
    #publish-listings-section {
        padding: 24px 16px !important;
    }

    /* Stats bar */
    .stats-bar {
        grid-template-columns: 1fr !important;
    }
}

/* ---- Tablet (768px – 1024px) ---- */
@media (min-width: 769px) and (max-width: 1024px) {
    .header-search-wrapper {
        display: flex;
        order: 3;
        width: 100%;
        max-width: 100%;
        padding: 8px 0;
    }

    .header-main-container {
        flex-wrap: wrap;
        gap: 12px;
    }

    .header-desktop-only {
        display: inline-flex;
    }

    .mobile-search-bar {
        display: none;
    }

    .hamburger-btn {
        display: none;
    }

    .homepage-sidebar {
        width: 100%;
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .catalog-layout {
        grid-template-columns: 210px 1fr;
        gap: 20px;
    }

    .details-grid {
        grid-template-columns: 1.4fr 1fr !important;
    }

    #listing-image-gallery {
        height: 340px !important;
    }
}

/* ---- Large Desktop (> 1024px) ---- */
@media (min-width: 1025px) {
    .hamburger-btn {
        display: none;
    }

    .mobile-search-bar {
        display: none;
    }

    .header-desktop-only {
        display: inline-flex;
    }

    .homepage-sidebar {
        width: 300px;
        flex-shrink: 0;
    }
}

/* ==========================================================================
   Mobile Filter Drawer Overlay (Catalog page)
   ========================================================================== */
.mobile-filter-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 7999;
    backdrop-filter: blur(4px);
}

.mobile-filter-overlay.is-open {
    display: block;
    animation: fadeIn 0.2s ease;
}

@media (max-width: 768px) {
    .filter-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: min(300px, 85vw);
        height: 100dvh !important;
        border-radius: 0;
        overflow-y: auto;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 8000;
        padding: 20px 16px;
    }

    .filter-sidebar.mobile-open {
        left: 0;
        box-shadow: 4px 0 30px rgba(0, 0, 0, 0.15);
    }

    .catalog-layout {
        display: block;
    }
}

/* ==========================================================================
   Mobile Filter Toggle Button (Catalog page)
   ========================================================================== */
.mobile-filter-btn {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-sans);
}

.mobile-filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.mobile-filter-bar {
    display: none;
}

@media (max-width: 768px) {
    .mobile-filter-btn {
        display: flex;
    }

    .mobile-filter-bar {
        display: flex;
    }
}

/* ==========================================================================
   Premium Advertising Placeholder Styling
   ========================================================================== */
.premium-ad-slot {
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    transition: var(--transition);
}

.premium-ad-slot:hover {
    border-color: var(--primary) !important;
    background: var(--primary-light) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Utility: touch-scroll helper */
.touch-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.touch-scroll::-webkit-scrollbar {
    display: none;
}

/* Catalog grid - 4 items per row on desktop */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

@media (max-width: 1400px) {
    .catalog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

@media (max-width: 576px) {
    .catalog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .catalog-grid .card-body {
        padding: 10px;
    }

    .catalog-grid .card-title {
        font-size: 13px;
    }

    .catalog-grid .card-price {
        font-size: 12px;
        padding: 4px 8px;
    }

    .catalog-grid .card-location {
        font-size: 11px;
        margin-bottom: 8px;
    }

    .catalog-grid .card-specs {
        font-size: 10px;
        gap: 4px;
        padding-top: 8px;
        margin-bottom: 8px;
    }

    .catalog-grid .spec-item {
        font-size: 9px;
        padding: 2px 6px;
    }

    .catalog-grid .card-img-wrapper {
        height: 125px;
    }

    .catalog-grid .btn-sm {
        padding: 6px 10px;
        font-size: 11px;
    }
}

/* Subcategory Selector & Items */
.subcategory-selector {
    display: flex;
    gap: 16px;
    width: 100%;
    margin-bottom: 0px;
    padding-bottom: 8px;
}

.subcategory-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1 1 0%;
    min-width: 90px;
    height: 66px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 8px;
    text-decoration: none;
    color: var(--secondary);
    transition: var(--transition);
    box-shadow: var(--shadow-xs);
}

.subcategory-item svg {
    width: 22px !important;
    height: 22px !important;
}

.subcategory-item span {
    font-size: 11px !important;
    margin-top: 4px !important;
}

.subcategory-item:hover {
    border-color: var(--primary) !important;
}

.subcategory-item.active {
    background: var(--primary-light);
    border-color: var(--primary);
}

@media (max-width: 768px) {
    .subcategory-selector {
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .subcategory-selector::-webkit-scrollbar {
        display: none;
    }

    .subcategory-item {
        flex: 0 0 90px;
    }
}

/* ==========================================================================
   Garage/Boutique Listing Cards Redesign (No shadows, epuré)
   ========================================================================== */
.garage-listing-card {
    height: 100%;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: none !important;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.garage-listing-card:hover {
    transform: translateY(-2px);
    border-color: var(--text-muted);
    box-shadow: none !important;
}

.garage-listing-card.is-featured {
    border: 2px solid #fde047;
}

.garage-listing-card .card-img-wrapper {
    height: 160px;
    padding-top: 0 !important;
    position: relative;
    background: #e5e7eb;
    overflow: hidden;
}

.garage-listing-card .carousel-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.garage-listing-card .carousel-slides {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.garage-listing-card .carousel-slides img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
}

.garage-listing-card .carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    z-index: 5;
    font-weight: bold;
}

.garage-listing-card .carousel-nav-btn.prev-btn {
    left: 8px;
}

.garage-listing-card .carousel-nav-btn.next-btn {
    right: 8px;
}

.garage-listing-card .carousel-indicators {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    z-index: 5;
    background: rgba(0, 0, 0, 0.3);
    padding: 3px 6px;
    border-radius: 10px;
}

.garage-listing-card .indicator-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: background-color 0.2s ease;
}

.garage-listing-card .indicator-dot.active {
    background: white;
}

.garage-listing-card .card-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    color: white;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 4;
}

.garage-listing-card .tag-auto {
    background: var(--primary);
}

.garage-listing-card .tag-part {
    background: var(--secondary);
}

.garage-listing-card .tag-service {
    background: #059669;
}

.garage-listing-card .card-purpose {
    position: absolute;
    top: 12px;
    right: 56px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 10px;
    z-index: 4;
}

.garage-listing-card .sponsorised-tag {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: #eab308;
    color: white;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    z-index: 4;
}

.garage-listing-card .card-body {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.garage-listing-card .card-price {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
}

.garage-listing-card .card-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--secondary);
}

.garage-listing-card .card-location {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.garage-listing-card .card-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.garage-listing-card .btn-details {
    flex: 1;
    justify-content: center;
    font-size: 12px;
    padding: 8px;
    border-radius: var(--radius-sm);
    font-weight: bold;
}

.garage-listing-card .btn-compare {
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-weight: bold;
    cursor: pointer;
}

.garage-listing-card .seller-badge-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    text-decoration: none;
    margin-bottom: 10px;
    transition: background 0.15s;
}

.garage-listing-card .seller-badge-link:hover {
    background: #f1f5f9;
}

.garage-listing-card .seller-logo {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    object-fit: contain;
    flex-shrink: 0;
}

.garage-listing-card .seller-logo-placeholder {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 900;
    color: white;
    flex-shrink: 0;
}

.garage-listing-card .seller-name {
    font-size: 10px;
    font-weight: 700;
    color: var(--secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.garage-listing-card .seller-pro-tag {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: #1e293b;
    color: white;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

/* Vehicles sub-menu dropdown */
.header-nav-dropdown-container {
    position: relative;
    display: inline-block;
}

.header-nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    min-width: 150px;
    z-index: 100;
    margin-top: 12px;
    padding: 6px 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-nav-dropdown-container:hover .header-nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.header-nav-dropdown-menu::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: #fff;
    pointer-events: none;
}

.header-nav-dropdown-menu a {
    display: block;
    padding: 10px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    text-align: left;
}

.header-nav-dropdown-menu a:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.dropdown-chevron {
    transition: transform 0.2s ease;
}

.header-nav-dropdown-container:hover .dropdown-chevron {
    transform: rotate(180deg);
}