/*
Theme Name: Sutuz Wheels
Theme URI: http://sutuz.lk
Author: Malinga & Antigravity
Author URI: http://sutuz.lk
Description: Premium Custom Vehicle Marketplace Theme for sutuz.lk.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: sutuz-wheels
*/

/* ==========================================================================
   SUTUZ.LK - DESIGN SYSTEM & STYLESHEET
   ========================================================================== */

/* 1. Global Variables & Themes */
:root {
    /* Color Palette - HSL based for easy toggle */
    --primary-hue: 256; /* Royal Indigo */
    --accent-hue: 156;  /* Emerald Teal */
    --fav-hue: 350;     /* Pulse Pink / Heart Red */

    /* Accent & Brand Colors */
    --primary: hsl(var(--primary-hue), 85%, 58%);
    --primary-hover: hsl(var(--primary-hue), 85%, 50%);
    --primary-light: hsl(var(--primary-hue), 85%, 96%);
    
    --accent: hsl(var(--accent-hue), 100%, 38%);
    --accent-hover: hsl(var(--accent-hue), 100%, 32%);
    --accent-light: hsl(var(--accent-hue), 50%, 94%);
    
    --fav: hsl(var(--fav-hue), 85%, 58%);
    --fav-light: hsl(var(--fav-hue), 85%, 96%);

    --yellow: #f59e0b;
    --yellow-light: #fef3c7;

    /* Light Theme (Default) */
    --bg-primary: hsl(210, 20%, 99%);
    --bg-secondary: hsl(0, 0%, 100%);
    --bg-tertiary: hsl(210, 20%, 96%);
    --bg-glass: rgba(255, 255, 255, 0.75);
    --border-color: hsl(210, 14%, 90%);
    --border-hover: hsl(210, 14%, 80%);
    
    --text-primary: hsl(222, 47%, 12%);
    --text-secondary: hsl(215, 16%, 45%);
    --text-muted: hsl(215, 16%, 65%);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.08);

    /* Layout metrics */
    --header-height: 72px;
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    /* Dark Theme Override */
    --bg-primary: hsl(222, 40%, 7%);
    --bg-secondary: hsl(222, 35%, 11%);
    --bg-tertiary: hsl(222, 30%, 15%);
    --bg-glass: rgba(15, 23, 42, 0.75);
    --border-color: hsl(222, 25%, 18%);
    --border-hover: hsl(222, 25%, 28%);
    
    --text-primary: hsl(210, 40%, 98%);
    --text-secondary: hsl(215, 20%, 70%);
    --text-muted: hsl(215, 15%, 45%);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 50px -10px rgba(0, 0, 0, 0.5);

    --primary-light: hsl(var(--primary-hue), 30%, 16%);
    --accent-light: hsl(var(--accent-hue), 35%, 12%);
    --fav-light: hsl(var(--fav-hue), 30%, 16%);
}

/* 2. Reset & General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: var(--transition-smooth);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
    background: none;
    transition: var(--transition-smooth);
}

input, select, textarea {
    font-family: inherit;
    outline: none;
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    transition: var(--transition-smooth);
}

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

hr.divider {
    border: none;
    height: 1px;
    background-color: var(--border-color);
    margin: 24px 0;
}

.hidden {
    display: none !important;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--border-radius-sm);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* 3. Helper Classes & Global Layout */
.app-main-container {
    flex: 1;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: calc(var(--header-height) + 24px) 24px 48px;
}

.icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
    display: inline-block;
    vertical-align: middle;
}

/* Primary Button style */
.primary-btn {
    background-color: var(--primary);
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}
.primary-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
}
.primary-btn:active {
    transform: translateY(0);
}
.primary-btn:disabled {
    background-color: var(--text-muted);
    box-shadow: none;
    transform: none;
    cursor: not-allowed;
}

/* Secondary Button style */
.secondary-btn {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 12px 24px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.secondary-btn:hover {
    background-color: var(--border-color);
    transform: translateY(-2px);
}
.secondary-btn:active {
    transform: translateY(0);
}

/* Outline/Icon Button style */
.icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    position: relative;
}
.icon-btn:hover {
    background-color: var(--border-color);
    transform: scale(1.05);
}
.icon-btn .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background-color: var(--fav);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-secondary);
}
.icon-btn .badge-active {
    background-color: var(--accent);
}

.full-width {
    width: 100% !important;
}

/* 4. App Header */
.app-header {
    height: var(--header-height);
    background-color: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: var(--transition-smooth);
}
.header-container {
    max-width: 1280px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Logo styling */
.logo-container {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 24px;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
}
.logo-accent {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}
.logo-text {
    color: var(--text-primary);
}
.logo-dot {
    color: var(--accent);
}

/* Header Buttons styling */
.header-btn {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}
.header-btn:hover {
    background-color: var(--border-color);
}

.location-selector-btn .icon {
    color: var(--accent);
}

/* Header Search Bar styling */
.header-search-bar {
    flex: 1;
    max-width: 500px;
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    overflow: hidden;
    background-color: var(--bg-tertiary);
}
.header-search-bar input {
    flex: 1;
    border: none;
    background: none;
    padding: 8px 16px;
    font-size: 14px;
}
.search-submit-btn {
    width: 48px;
    background: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}
.search-submit-btn:hover {
    color: var(--primary);
}
.icon-search {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Header CTAs */
.post-ad-btn {
    background-color: var(--accent);
    color: #fff;
    padding: 10px 20px;
    border-radius: 24px;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}
.post-ad-btn:hover {
    background-color: var(--accent-hover);
    transform: scale(1.03);
}

/* Mobile specific elements */
.mobile-search-bar {
    display: none;
    padding: 12px 16px;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    z-index: 99;
}
.mobile-search-inner {
    display: flex;
    background-color: var(--bg-tertiary);
    border-radius: 20px;
    overflow: hidden;
    width: 100%;
}
.mobile-search-inner input {
    flex: 1;
    border: none;
    background: none;
    padding: 8px 16px;
    font-size: 14px;
}
.mobile-search-inner button {
    padding: 0 16px;
    color: var(--text-secondary);
}

/* Theme Icons Toggle helper */
[data-theme="light"] .moon-icon { display: none; }
[data-theme="light"] .sun-icon { display: block; }
[data-theme="dark"] .sun-icon { display: none; }
[data-theme="dark"] .moon-icon { display: block; }


/* 5. Home View Layout */
.hero-section {
    background: linear-gradient(135deg, hsl(var(--primary-hue), 85%, 60%), hsl(var(--primary-hue), 60%, 40%));
    padding: 60px 40px;
    border-radius: var(--border-radius-md);
    color: #fff;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.45) 0%, rgba(16, 185, 129, 0) 70%);
    pointer-events: none;
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 640px;
}
.hero-section h1 {
    font-size: 42px;
    line-height: 1.15;
    margin-bottom: 16px;
    color: #fff;
}
.hero-section p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 24px;
}
.hero-quick-search {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}
.hero-quick-search a {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.15);
    padding: 4px 12px;
    border-radius: 12px;
    backdrop-filter: blur(4px);
}
.hero-quick-search a:hover {
    background-color: #fff;
    color: var(--primary);
}

.section-title {
    font-size: 24px;
    margin-bottom: 24px;
    position: relative;
    padding-left: 14px;
}
.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 4px;
    border-radius: 2px;
    background-color: var(--accent);
}

/* Category Grid */
.categories-grid-section {
    margin-bottom: 48px;
}
.categories-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 16px;
}
.category-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}
.category-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}
.category-icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-tertiary);
    color: var(--primary);
}
.category-card:hover .category-icon-wrapper {
    background-color: var(--primary-light);
}
.category-card span {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Slider / Featured listings styling */
.featured-ads-section {
    margin-bottom: 48px;
}
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.premium-badge-tag {
    background: linear-gradient(135deg, var(--yellow), #f59e0b);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 0.05em;
    display: inline-block;
}
.featured-carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.featured-carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 10px 4px;
    width: 100%;
}
.featured-carousel::-webkit-scrollbar {
    display: none;
}
.carousel-control {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 10;
}
.carousel-control.prev { left: -20px; }
.carousel-control.next { right: -20px; }
.carousel-control:hover {
    background-color: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Listings Cards */
.listing-card {
    min-width: 280px;
    flex: 1 0 280px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
}
.listing-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-hover);
}
.card-img-wrapper {
    height: 180px;
    position: relative;
    overflow: hidden;
    background-color: var(--bg-tertiary);
}
.card-img-wrapper img {
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease;
}
.listing-card:hover .card-img-wrapper img {
    transform: scale(1.08);
}
.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
}
.card-fav-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}
.card-fav-btn:hover {
    color: var(--fav);
    transform: scale(1.1);
}
.card-fav-btn.is-favorite {
    color: var(--fav) !important;
}

.card-details {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.card-cat {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 6px;
}
.card-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 8px;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 43px;
}
.card-price {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}
.card-meta {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}
.card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Featured ad highlights */
.listing-card.premium-card {
    border: 2px solid var(--yellow);
}

/* Recent listings feed */
.recent-ads-section {
    margin-bottom: 48px;
}
.recent-ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}
.load-more-container {
    text-align: center;
    margin-top: 36px;
}

/* Stats counter grid */
.stats-banner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 32px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.stats-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.stats-num {
    font-size: 32px;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: var(--primary);
}
.stats-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}


/* 6. Search View Layout */
.search-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    align-items: start;
}
.search-sidebar {
    position: sticky;
    top: calc(var(--header-height) + 24px);
}
.filter-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}
.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.filter-header h3 {
    font-size: 18px;
}
.clear-filters-btn {
    font-size: 13px;
    color: var(--fav);
    font-weight: 600;
}
.clear-filters-btn:hover {
    text-decoration: underline;
}
.filter-divider {
    border: none;
    height: 1px;
    background-color: var(--border-color);
    margin: 16px 0;
}
.filter-group {
    margin-bottom: 20px;
}
.filter-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}
.filter-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.price-range-values {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
}
.filter-select {
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
}

/* Custom Checkboxes */
.checkbox-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.checkbox-container {
    display: block;
    position: relative;
    padding-left: 28px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    user-select: none;
}
.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}
.checkmark {
    position: absolute;
    top: 2px;
    left: 0;
    height: 18px;
    width: 18px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
}
.checkbox-container:hover input ~ .checkmark {
    border-color: var(--primary);
}
.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}
.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}
.checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Toggle Switch */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    cursor: pointer;
}
.toggle-container input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 34px;
}
.toggle-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-muted);
    border-radius: 50%;
    transition: .3s;
}
.toggle-container input:checked + .toggle-slider {
    background-color: var(--accent);
    border-color: var(--accent);
}
.toggle-container input:checked + .toggle-slider:before {
    transform: translateX(18px);
    background-color: #fff;
}
.toggle-label {
    font-size: 13px;
    font-weight: 600;
}

/* Price Inputs */
.price-inputs {
    display: flex;
    gap: 8px;
}
.price-input {
    width: 100%;
    padding: 8px 12px;
    border-radius: var(--border-radius-sm);
    font-size: 13px;
}

/* Search results area header */
.results-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 12px 20px;
}
.results-count {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}
.results-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}
.sorting-wrapper {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sort-select {
    padding: 6px 12px;
    border-radius: var(--border-radius-sm);
}

.view-toggle {
    display: flex;
    background-color: var(--bg-tertiary);
    border-radius: 8px;
    padding: 2px;
    border: 1px solid var(--border-color);
}
.view-toggle-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: var(--text-secondary);
}
.view-toggle-btn.active {
    background-color: var(--bg-secondary);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* Active filter chips */
.filter-chips-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.filter-chip {
    background-color: var(--primary-light);
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.filter-chip:hover {
    background-color: var(--border-color);
    color: var(--fav);
}
.filter-chip button {
    font-size: 14px;
    font-weight: 700;
    color: inherit;
    line-height: 1;
}

/* List layout styling (Search view switcher option) */
.results-listings-grid.list-view-active {
    grid-template-columns: 1fr !important;
}
.results-listings-grid.list-view-active .listing-card {
    flex-direction: row;
    height: 160px;
    min-width: 100%;
}
.results-listings-grid.list-view-active .card-img-wrapper {
    width: 220px;
    height: 100%;
}
.results-listings-grid.list-view-active .card-details {
    padding: 20px;
}
.results-listings-grid.list-view-active .card-title {
    font-size: 18px;
    height: auto;
    margin-bottom: 6px;
}

/* Empty state design */
.empty-state-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 48px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.empty-icon {
    width: 64px;
    height: 64px;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.empty-state-card h3 {
    margin-bottom: 8px;
}
.empty-state-card p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}


/* 7. Product Detail View Layout */
.breadcrumbs {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-weight: 500;
}
.breadcrumbs a {
    color: var(--text-muted);
}
.breadcrumbs a:hover {
    color: var(--primary);
}

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    align-items: start;
}
.detail-main-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.detail-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

/* Detail Gallery */
.gallery-wrapper {
    margin-bottom: 24px;
}
.main-image-viewport {
    height: 420px;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    background-color: var(--bg-tertiary);
    position: relative;
    border: 1px solid var(--border-color);
}
.main-image-viewport img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.detail-badge {
    position: absolute;
    top: 16px;
    left: 16px;
}
.thumbnail-list {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
}
.thumb-item {
    width: 72px;
    height: 54px;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    background-color: var(--bg-tertiary);
    flex-shrink: 0;
}
.thumb-item img {
    width: 100%;
    height: 100%;
}
.thumb-item.active-thumb {
    border-color: var(--primary);
}

/* Detail Header Details */
.detail-listing-header {
    margin-top: 24px;
}
.title-price-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}
.title-price-row h1 {
    font-size: 26px;
    line-height: 1.25;
}
.detail-price-tag {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    white-space: nowrap;
}
.detail-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 12px;
    color: var(--text-secondary);
    font-size: 13px;
}
.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Specifications Table */
.detail-specs-section h3, .detail-description-section h3, .recommended-section h3 {
    font-size: 18px;
    margin-bottom: 16px;
}
.specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.spec-item {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    font-size: 14px;
}
.spec-label {
    color: var(--text-secondary);
    font-weight: 500;
}
.spec-value {
    color: var(--text-primary);
    font-weight: 700;
}

/* Description Text */
.description-body {
    font-size: 15px;
    color: var(--text-secondary);
    white-space: pre-line;
    line-height: 1.7;
}

/* Safety Tips Box */
.safety-tips-card {
    background-color: var(--primary-light);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 24px;
}
.tips-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.safety-icon {
    width: 24px;
    height: 24px;
    color: var(--primary);
}
.safety-tips-card h4 {
    color: var(--primary);
    font-size: 16px;
}
.safety-tips-card ul {
    padding-left: 20px;
}
.safety-tips-card li {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* Similar Items recommendations */
.recommended-section {
    margin-top: 24px;
}

/* Seller sidebar */
.detail-sidebar {
    position: sticky;
    top: calc(var(--header-height) + 24px);
}
.seller-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}
.seller-profile-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}
.seller-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background-color: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
}
.seller-details h4 {
    font-size: 16px;
    line-height: 1.25;
}
.seller-status {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    background-color: var(--accent-light);
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-block;
    margin-top: 4px;
}
.seller-member-since {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.seller-rating-row {
    font-size: 13px;
    margin-bottom: 24px;
}
.stars {
    color: var(--yellow);
    display: inline;
}
.reviews-count {
    color: var(--text-secondary);
}

.seller-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.seller-actions button {
    width: 100%;
}
.fav-toggle-btn {
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    padding: 12px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.fav-toggle-btn:hover {
    background-color: var(--bg-tertiary);
}
.fav-toggle-btn .heart-outline {
    color: var(--text-muted);
}
.fav-toggle-btn .heart-filled {
    color: var(--fav);
}


/* 8. Post Ad Wizard Layout */
.wizard-container {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
    box-shadow: var(--shadow-sm);
}
.wizard-header {
    text-align: center;
    margin-bottom: 32px;
}
.wizard-header p {
    color: var(--text-secondary);
}

/* Stepper Progress bar */
.wizard-progress-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 2;
    cursor: pointer;
}
.step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}
.step-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}
.step-line {
    flex: 1;
    height: 3px;
    background-color: var(--border-color);
    margin-top: -24px;
    z-index: 1;
}

/* Active Step Indicators colors */
.step-indicator.active .step-num {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}
.step-indicator.active .step-title {
    color: var(--primary);
}
.step-indicator.completed .step-num {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.step-indicator.completed .step-title {
    color: var(--accent);
}
.step-line.completed {
    background-color: var(--accent);
}

/* Step Wizard Panels */
.wizard-step-panel {
    display: none;
    animation: fadeIn 0.4s ease;
}
.wizard-step-panel.active-step {
    display: block;
}
.wizard-step-panel h3 {
    font-size: 20px;
    margin-bottom: 24px;
    text-align: center;
}

/* Step 1 categories grid select */
.wizard-categories-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.wizard-cat-select-btn {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}
.wizard-cat-select-btn:hover {
    border-color: var(--primary);
    background-color: var(--primary-light);
}
.wizard-cat-select-btn.selected {
    border-color: var(--primary);
    background-color: var(--primary-light);
    box-shadow: 0 0 0 2px var(--primary);
}
.wizard-cat-select-btn span {
    font-weight: 700;
    font-size: 14px;
}

/* Wizard Form */
.wizard-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.form-row {
    display: flex;
    gap: 20px;
}
.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.form-group.full-width {
    flex: none;
    width: 100%;
}
.wizard-input, .wizard-select, .wizard-textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
}
.wizard-input:focus, .wizard-select:focus, .wizard-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.form-group small {
    color: var(--text-secondary);
    font-size: 11px;
}

/* Image Uploading Dropzone */
.image-uploader-dropzone {
    border: 2px dashed var(--border-color);
    background-color: var(--bg-tertiary);
    border-radius: var(--border-radius-md);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    margin-bottom: 24px;
}
.image-uploader-dropzone:hover {
    border-color: var(--primary);
    background-color: var(--primary-light);
}
.upload-icon {
    width: 48px;
    height: 48px;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.browse-link {
    color: var(--primary);
    font-weight: 700;
}

/* Uploaded previews */
.uploaded-previews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 16px;
}
.preview-thumb-container {
    height: 80px;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
}
.preview-thumb-container img {
    width: 100%;
    height: 100%;
}
.delete-preview-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Premium Ad pricing Selector banner */
.premium-selector-card {
    background-color: var(--yellow-light);
    border: 1px solid var(--yellow);
    border-radius: var(--border-radius-md);
    padding: 20px;
    margin-top: 24px;
    color: #92400e;
}
.premium-checkbox-row {
    margin-bottom: 6px;
}
.premium-checkbox-row .checkmark {
    border-color: #f59e0b;
}
.checkbox-title {
    font-weight: 700;
    font-size: 15px;
    color: #92400e;
}
.premium-desc {
    font-size: 12px;
    margin-left: 28px;
}

/* Wizard actions footer buttons */
.wizard-buttons-row {
    display: flex;
    justify-content: space-between;
    margin-top: 32px;
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
}

/* Success Card UI */
.success-screen-card {
    text-align: center;
    padding: 32px 0;
}
.success-icon-anim {
    width: 64px;
    height: 64px;
    background-color: var(--accent);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    margin: 0 auto 20px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
    animation: scaleUp 0.5s ease-out;
}
.success-screen-card h3 {
    font-size: 24px;
    margin-bottom: 12px;
}
.success-screen-card p {
    color: var(--text-secondary);
    margin-bottom: 32px;
}
.success-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}


/* 9. Personal Dashboard Layout */
.dashboard-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
    align-items: start;
}
.dashboard-sidebar {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.dashboard-user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-tertiary);
}
.dashboard-user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
}
.dashboard-user-info h3 {
    font-size: 15px;
    line-height: 1.25;
}
.dashboard-menu {
    list-style: none;
    padding: 8px 0;
}
.dashboard-menu li {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.dashboard-menu li:hover {
    background-color: var(--bg-tertiary);
    color: var(--primary);
}
.dashboard-menu li.active {
    background-color: var(--primary-light);
    color: var(--primary);
    border-left: 4px solid var(--primary);
    padding-left: 16px;
}
.dashboard-menu li .icon {
    width: 18px;
    height: 18px;
}

/* Dashboard views */
.dashboard-panel {
    display: none;
    animation: fadeIn 0.4s ease;
}
.dashboard-panel.active-panel {
    display: block;
}
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.panel-header h2 {
    font-size: 22px;
}

/* Dashboard ads lists styling */
.dashboard-ads-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.dash-ad-item {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}
.dash-ad-item-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.dash-ad-img {
    width: 80px;
    height: 60px;
    border-radius: var(--border-radius-sm);
    background-color: var(--bg-tertiary);
}
.dash-ad-info h4 {
    font-size: 16px;
    margin-bottom: 4px;
}
.dash-ad-info p {
    font-size: 13px;
    color: var(--text-secondary);
}
.dash-ad-price {
    font-weight: 700;
    color: var(--primary);
    margin-top: 2px;
    font-size: 14px;
}
.dash-ad-actions {
    display: flex;
    gap: 8px;
}
.dash-ad-actions button {
    padding: 8px 12px;
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    font-weight: 600;
}
.btn-delete-ad {
    background-color: var(--fav-light);
    color: var(--fav);
}
.btn-delete-ad:hover {
    background-color: var(--fav);
    color: #fff;
}
.btn-view-ad {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Analytics layout */
.analytics-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}
.stat-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}
.stat-card h3 {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 12px;
}
.stat-value {
    font-size: 28px;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: var(--primary);
    margin-bottom: 4px;
}
.stat-trend {
    font-size: 12px;
    font-weight: 700;
}
.trend-up { color: var(--accent); }
.trend-down { color: var(--fav); }

/* SVG Analytics Graph area */
.chart-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}
.chart-card h3 {
    font-size: 16px;
    margin-bottom: 24px;
}
.chart-container-svg {
    height: 240px;
    width: 100%;
}

/* Profile settings forms style */
.settings-form {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}
.settings-input {
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
}


/* 10. Live Chat Layout */
.chat-container-layout {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    height: 550px;
    display: grid;
    grid-template-columns: 280px 1fr;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

/* Chat contacts list sidebar */
.chat-contacts-sidebar {
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}
.chat-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-tertiary);
}
.contacts-scroll {
    flex: 1;
    overflow-y: auto;
}
.chat-contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition-smooth);
}
.chat-contact-item:hover {
    background-color: var(--bg-tertiary);
}
.chat-contact-item.active-contact {
    background-color: var(--primary-light);
}
.contact-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
}
.contact-meta {
    flex: 1;
    overflow: hidden;
}
.contact-name-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}
.contact-name {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.contact-time {
    font-size: 11px;
    color: var(--text-muted);
}
.contact-preview-text {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Messaging pane styling */
.chat-messaging-pane {
    display: flex;
    flex-direction: column;
    background-color: var(--bg-secondary);
}
.messaging-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-tertiary);
}
.active-contact-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}
.active-contact-info h4 {
    font-size: 15px;
}
.active-status {
    font-size: 11px;
    color: var(--accent);
    font-weight: 600;
}

/* Chat viewports & balloon bubbles */
.messages-viewport {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background-color: var(--bg-primary);
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.chat-welcome-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    color: var(--text-muted);
    padding: 0 40px;
}
.chat-placeholder-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
}
.chat-welcome-placeholder h3 {
    color: var(--text-primary);
    margin-bottom: 6px;
}

.chat-bubble {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: var(--border-radius-md);
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    box-shadow: var(--shadow-sm);
    animation: slideUp 0.3s ease;
}
.bubble-sent {
    background-color: var(--primary);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}
.bubble-received {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border: 1px solid var(--border-color);
}
.chat-time {
    display: block;
    font-size: 10px;
    margin-top: 6px;
    text-align: right;
    opacity: 0.8;
}
.bubble-received .chat-time {
    color: var(--text-muted);
}

/* Message Input row */
.messages-input-row {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.chat-quick-hints {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.chat-quick-hints::-webkit-scrollbar {
    display: none;
}
.chat-quick-hints button {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}
.chat-quick-hints button:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.input-actions-inner {
    display: flex;
    gap: 12px;
}
.input-actions-inner input {
    flex: 1;
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
}
.send-message-btn {
    width: 44px;
    height: 44px;
    background-color: var(--primary);
    color: #fff;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}
.send-message-btn:hover {
    background-color: var(--primary-hover);
}


/* 11. Modal Overlays */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.active-modal {
    display: flex;
}
.modal-box {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    width: 100%;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.close-modal-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 28px;
    color: var(--text-muted);
    line-height: 1;
    z-index: 10;
}
.close-modal-btn:hover {
    color: var(--fav);
}

/* Modal styles details */
.auth-box {
    max-width: 400px;
    padding: 32px;
}
.auth-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 24px;
}
.auth-tab {
    flex: 1;
    padding-bottom: 12px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-muted);
    text-align: center;
}
.auth-tab.active {
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
    margin-bottom: -2px;
}
.auth-form {
    display: none;
    flex-direction: column;
    gap: 16px;
}
.auth-form.active-form {
    display: flex;
}
.auth-footer-text {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 8px;
}

/* Location modal lists */
.location-box {
    max-width: 500px;
    padding: 32px;
}
.location-box h3 {
    margin-bottom: 4px;
}
.location-box .subtitle {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 24px;
}
.location-list-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.location-picker-item {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}
.location-picker-item:hover {
    background-color: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}


/* 12. Toast notifications */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}
.toast {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-left: 4px solid var(--primary);
    border-radius: 6px;
    padding: 16px 20px;
    box-shadow: var(--shadow-lg);
    font-weight: 600;
    font-size: 14px;
    min-width: 250px;
    max-width: 350px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
    animation: slideInRight 0.3s ease-out;
}
.toast.toast-success { border-left-color: var(--accent); }
.toast.toast-error { border-left-color: var(--fav); }
.toast-close {
    cursor: pointer;
    font-size: 18px;
    color: var(--text-muted);
}
.toast-close:hover { color: var(--text-primary); }


/* 13. App Footer */
.app-footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 40px;
    margin-top: auto;
}
.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 40px;
}
.footer-col h4 {
    font-size: 16px;
    margin-bottom: 20px;
}
.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.footer-col ul a {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}
.footer-col ul a:hover {
    color: var(--primary);
}
.brand-col p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 16px 0 24px;
    max-width: 300px;
}
.copyright {
    font-size: 12px;
    color: var(--text-muted);
}
.newsletter-col p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}
.newsletter-form {
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.newsletter-input {
    flex: 1;
    border: none;
    padding: 10px 14px;
    font-size: 13px;
}
.newsletter-btn {
    background-color: var(--primary);
    color: #fff;
    padding: 0 16px;
    font-weight: 700;
    font-size: 13px;
}
.newsletter-btn:hover {
    background-color: var(--primary-hover);
}


/* 14. Mobile Bottom Nav Menu */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background-color: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-color);
    z-index: 100;
    justify-content: space-around;
    align-items: center;
}
.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    flex: 1;
}
.mobile-nav-item .icon {
    width: 22px;
    height: 22px;
}
.mobile-nav-item.active-nav-item {
    color: var(--primary);
}

/* Post ad circular button on Mobile bottom navigation */
.ad-center-btn {
    position: relative;
    margin-top: -30px;
}
.ad-center-btn .btn-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background-color: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.35);
    border: 4px solid var(--bg-primary);
}
.ad-center-btn .btn-circle .icon {
    width: 24px;
    height: 24px;
}


/* ==========================================================================
   15. Keyframes & Animations
   ========================================================================== */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleUp {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(12px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.animate-pulse {
    animation: ripplePulse 2s infinite;
}

@keyframes ripplePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}


/* ==========================================================================
   16. Media Queries (Responsiveness)
   ========================================================================== */

@media (max-width: 1024px) {
    .app-main-container {
        padding: calc(var(--header-height) + 16px) 16px 80px;
    }
    .search-layout {
        grid-template-columns: 1fr;
    }
    .search-sidebar {
        position: static;
        margin-bottom: 24px;
    }
    .detail-layout {
        grid-template-columns: 1fr;
    }
    .detail-sidebar {
        position: static;
    }
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
    .dashboard-sidebar {
        margin-bottom: 24px;
    }
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Adjust header for mobile */
    .app-header {
        height: 60px;
    }
    .header-container {
        padding: 0 16px;
    }
    :root {
        --header-height: 60px;
    }
    
    .logo-text, .header-search-bar, .location-selector-btn, .header-fav-btn, .header-chat-btn, .post-ad-btn {
        display: none !important;
    }
    .mobile-search-bar {
        display: block;
        top: 60px;
    }
    .app-main-container {
        padding-top: calc(60px + 64px + 16px);
    }

    .hero-section {
        padding: 32px 20px;
        margin-bottom: 24px;
    }
    .hero-section h1 {
        font-size: 28px;
    }
    .hero-section p {
        font-size: 15px;
    }
    .stats-banner {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 16px;
    }

    .mobile-bottom-nav {
        display: flex;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .gallery-wrapper .main-image-viewport {
        height: 280px;
    }
    .title-price-row {
        flex-direction: column;
        gap: 8px;
    }
    .detail-price-tag {
        font-size: 24px;
    }
    .wizard-categories-list {
        grid-template-columns: 1fr;
    }
    .form-row {
        flex-direction: column;
        gap: 16px;
    }
    .chat-container-layout {
        grid-template-columns: 1fr;
    }
    
    /* When active contact is open in chat on mobile, hide sidebar contacts */
    .chat-container-layout.messaging-active .chat-contacts-sidebar {
        display: none;
    }
    .chat-container-layout:not(.messaging-active) .chat-messaging-pane {
        display: none;
    }

    .wizard-container {
        padding: 20px;
    }
    .analytics-cards {
        grid-template-columns: 1fr;
    }
    .location-list-grid {
        grid-template-columns: 1fr;
    }
}
