:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --accent: #ec4899;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #0f172a;
    --gray: #64748b;
    --light: #f8fafc;
    --bg-color: #f1f5f9;
    --text-color: #0f172a;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --navbar-bg: rgba(255, 255, 255, 0.85);
    --footer-bg: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);
    --shadow-xl: 0 24px 48px rgba(15, 23, 42, 0.16);
}
body.dark-mode {
    --bg-color: #0f172a;
    --text-color: #f1f5f9;
    --card-bg: #1e293b;
    --border-color: #334155;
    --navbar-bg: rgba(30, 41, 59, 0.85);
    --footer-bg: linear-gradient(135deg, #020617 0%, #0f172a 50%, #020617 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    transition: background 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.container { max-width: 1400px; margin: 0 auto; padding: 0 2rem; }

/* ========== NAVBAR ========== */
.navbar {
    background: var(--navbar-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0.8rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s;
}
.navbar.scrolled { box-shadow: var(--shadow-md); }
.navbar .container { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; }

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.5px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}
.logo i {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.4rem;
}
.logo:hover { transform: scale(1.04); }

.nav-links {
    list-style: none;
    display: flex;
    gap: 0.4rem;
    align-items: center;
    flex-wrap: nowrap;
    margin-left: auto;
}
.nav-links li { display: flex; align-items: center; }

.nav-links > li > a:not([class*="btn-"]) {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.88rem;
    padding: 0.55rem 0.9rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.25s ease;
    white-space: nowrap;
}
.nav-links > li > a:not([class*="btn-"]):hover {
    background: var(--light);
    color: var(--primary);
}
body.dark-mode .nav-links > li > a:not([class*="btn-"]):hover { background: #334155; }

.dark-mode-toggle {
    background: var(--light);
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.55rem 0.85rem;
    border-radius: 10px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
    transition: all 0.25s ease;
    white-space: nowrap;
    font-family: inherit;
}
body.dark-mode .dark-mode-toggle { background: #334155; }
.dark-mode-toggle:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-myads,
.btn-login,
.btn-register,
.btn-post,
.btn-logout {
    padding: 0.55rem 1.1rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.84rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.25s ease;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    line-height: 1;
    font-family: inherit;
}

.btn-myads {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}
.btn-myads:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
}
.btn-myads .badge-count {
    background: rgba(255, 255, 255, 0.3);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
}

.btn-login {
    background: transparent;
    border: 1.5px solid var(--primary);
    color: var(--primary);
}
.btn-login:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.3);
}

.btn-register {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}
.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
}

.btn-post {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.25);
}
.btn-post:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.4);
}

.btn-logout {
    background: transparent;
    border: 1.5px solid var(--danger);
    color: var(--danger);
}
.btn-logout:hover {
    background: var(--danger);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.3);
}

/* ========== PWA INSTALL BUTTON (NAVBAR) ========== */
.btn-install {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
    display: none;
    padding: 0.55rem 1.1rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.84rem;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.25s ease;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    line-height: 1;
    font-family: inherit;
}
.btn-install.show { display: inline-flex; }
.btn-install:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(6, 182, 212, 0.45);
}
.btn-install i { animation: bounce 2s infinite; }
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    width: 42px;
    height: 42px;
    border-radius: 10px;
    font-size: 1.1rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    flex-shrink: 0;
}
.mobile-menu-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.close-mobile-menu {
    display: none;
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--light);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: var(--text-color);
    font-size: 1.1rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    z-index: 1002;
}
body.dark-mode .close-mobile-menu { background: #334155; }

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    backdrop-filter: blur(4px);
}
.menu-overlay.active { opacity: 1; visibility: visible; }

/* ========== HERO ========== */
.hero {
    position: relative;
    padding: 5rem 0 6rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.92) 0%, rgba(139, 92, 246, 0.92) 50%, rgba(236, 72, 153, 0.88) 100%),
                url('./uploads/logo/baneri.png') no-repeat center center;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    text-align: center;
    color: white;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 50%, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}
.hero::after {
    content: '🛒';
    font-size: 22rem;
    position: absolute;
    bottom: -100px;
    right: -80px;
    opacity: 0.05;
    pointer-events: none;
}
.hero-content { position: relative; z-index: 2; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.25);
    padding: 0.5rem 1.1rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    color: #fff;
    animation: fadeInDown 0.6s ease;
}
.hero h1 {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0,0,0,0.15);
    animation: fadeInUp 0.7s ease;
}
.hero h1 span {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero p {
    font-size: 1.1rem;
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.6;
    color: rgba(255,255,255,0.95);
    animation: fadeInUp 0.8s ease;
}
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.hero-buttons {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.9s ease;
}
.hero-btn-primary, .hero-btn-secondary {
    padding: 14px 32px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.3s ease;
}
.hero-btn-primary {
    background: white;
    color: var(--primary-dark);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.hero-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}
.hero-btn-secondary {
    background: rgba(255,255,255,0.15);
    color: white;
    border: 1.5px solid rgba(255,255,255,0.4);
    backdrop-filter: blur(10px);
}
.hero-btn-secondary:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-3px);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin-top: 3rem;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease;
}
.hero-stat {
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 1rem 2rem;
    border-radius: 16px;
    min-width: 150px;
    transition: all 0.3s ease;
}
.hero-stat:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-3px);
}
.hero-stat .number {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1;
    margin-bottom: 0.3rem;
}
.hero-stat .label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.85);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========== SEARCH ========== */
.search-section {
    margin-top: -3rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 10;
}
.search-box {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 0.6rem;
    display: flex;
    gap: 0.5rem;
    max-width: 780px;
    margin: 0 auto;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    animation: fadeInUp 0.9s ease;
}
.search-box input {
    flex: 1;
    padding: 1rem 1.4rem;
    border: none;
    border-radius: 14px;
    font-size: 0.95rem;
    outline: none;
    background: transparent;
    color: var(--text-color);
    font-family: inherit;
}
.search-box input::placeholder { color: var(--gray); }
.search-box button {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    padding: 0 2rem;
    border-radius: 14px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.25s ease;
    white-space: nowrap;
}
.search-box button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* ========== ADVANCED FILTERS ========== */
.advanced-filters {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 1.5rem;
    margin-top: 1rem;
    display: none;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
    animation: slideDown 0.3s ease;
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.advanced-filters.active { display: block; }
.advanced-filters h4 {
    margin-bottom: 1.2rem;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.advanced-filters h4 i { color: var(--primary); }
.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.filter-group { display: flex; flex-direction: column; gap: 0.5rem; }
.filter-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.filter-group input,
.filter-group select {
    padding: 0.7rem 0.9rem;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-color);
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}
.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--card-bg);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
.price-range { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.apply-filters-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    font-family: inherit;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.25s ease;
}
.apply-filters-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

input[list]::-webkit-calendar-picker-indicator { opacity: 0.6; cursor: pointer; }

/* ========== FILTER BAR (FIX OVERLAP) ========== */
.filter-bar {
    background: var(--card-bg);
    border-radius: 18px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}
.filter-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}
.filter-title i { color: var(--primary); }

.category-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    flex: 1 1 auto;
    justify-content: center;
    min-width: 0;
}

.filter-chip {
    background: var(--light);
    padding: 0.5rem 1.1rem;
    border-radius: 30px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    border: 1.5px solid transparent;
    color: var(--text-color);
    font-family: inherit;
    transition: all 0.25s ease;
    white-space: nowrap;
}
body.dark-mode .filter-chip { background: #334155; }
.filter-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}
.filter-chip.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* --- Wrapper për sort (parandalon overlap) --- */
.sort-wrapper {
    position: relative;
    flex: 0 0 auto;
    margin-left: auto;
    min-width: 220px;
    max-width: 280px;
}

/* --- Select i sortimit (FIX) --- */
.sort-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    width: 100%;
    height: 44px;
    padding: 0 2.75rem 0 1rem;

    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    background-color: var(--card-bg);
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;

    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    background-size: 16px;
}
.sort-select:hover { border-color: var(--primary); }
.sort-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.sort-select::-ms-expand { display: none; }
.sort-select option {
    padding: 10px;
    color: var(--text-color);
    background: var(--card-bg);
}

/* ========== PRODUCTS ========== */
.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.products-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.products-header h2 i { color: var(--primary); font-size: 1.3rem; }
.products-count {
    font-size: 0.82rem;
    color: var(--gray);
    font-weight: 500;
    background: var(--card-bg);
    padding: 0.4rem 1rem;
    border-radius: 30px;
    border: 1px solid var(--border-color);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.product-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
    border: 1px solid var(--border-color);
    position: relative;
    box-shadow: var(--shadow-sm);
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}
.product-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 220px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}
body.dark-mode .product-image-wrapper {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}
.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.product-card:hover .product-image { transform: scale(1.08); }
.product-badge {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    background: rgba(16, 185, 129, 0.95);
    backdrop-filter: blur(8px);
    color: white;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}
.product-badge.used { background: rgba(245, 158, 11, 0.95); box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3); }
.product-badge.damaged { background: rgba(239, 68, 68, 0.95); box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3); }

.product-content { padding: 1.2rem; position: relative; }
.product-title {
    font-size: 1.02rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
}
.product-description {
    font-size: 0.8rem;
    color: var(--gray);
    margin-bottom: 0.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.45;
}

.car-specs, .property-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.6rem 0;
    font-size: 0.7rem;
}
.car-specs span, .property-specs span {
    background: var(--bg-color);
    padding: 0.3rem 0.7rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--gray);
    font-weight: 500;
    border: 1px solid var(--border-color);
}
.car-specs span i, .property-specs span i { color: var(--primary); font-size: 0.65rem; }

.product-price {
    font-size: 1.35rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0.6rem 0;
    letter-spacing: -0.5px;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    font-size: 0.72rem;
    color: var(--gray);
    gap: 0.5rem;
    flex-wrap: wrap;
}
.product-category {
    background: var(--bg-color);
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border: 1px solid var(--border-color);
}
body.dark-mode .product-category { background: #334155; }

.seller-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.8rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.72rem;
    color: var(--gray);
    gap: 0.5rem;
}
.seller-info span { display: inline-flex; align-items: center; gap: 0.35rem; }
.seller-info i { color: var(--primary-light); font-size: 0.7rem; }

/* ========== CTA ========== */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
    border-radius: 28px;
    padding: 3.5rem 2rem;
    text-align: center;
    margin: 3rem 0;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.3);
}
.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.15) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}
.cta-section h3 {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 0.8rem;
    letter-spacing: -0.5px;
    position: relative;
}
.cta-section p {
    font-size: 1rem;
    opacity: 0.95;
    margin-bottom: 1.8rem;
    position: relative;
}
.cta-section .btn {
    background: white;
    color: var(--primary-dark);
    padding: 14px 36px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.cta-section .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    grid-column: 1/-1;
}
.no-results i {
    font-size: 4rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
}
.no-results h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.no-results p { color: var(--gray); }

/* ========== FOOTER ========== */
.new-footer {
    background: var(--footer-bg);
    color: white;
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
}
.new-footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #6366f1, #10b981, #f59e0b, #ef4444, #6366f1);
    background-size: 200% 100%;
    animation: gradientMove 3s linear infinite;
}
@keyframes gradientMove {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}
.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3.5rem 2rem 3rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
    position: relative;
    z-index: 1;
}
.footer-logo {
    font-size: 1.7rem;
    font-weight: 900;
    background: linear-gradient(135deg, #818cf8 0%, #c4b5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}
.footer-about p {
    color: #94a3b8;
    line-height: 1.7;
    margin-bottom: 1rem;
    font-size: 0.88rem;
}
.footer-social { display: flex; gap: 0.8rem; margin-top: 1rem; }
.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
}
.footer-social a:hover {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    transform: translateY(-3px);
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}
.footer-column h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
}
.footer-column h3 i { color: #818cf8; font-size: 0.85rem; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.7rem; }
.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}
.footer-links a:hover {
    color: #c4b5fd;
    transform: translateX(5px);
}
.footer-links a i { font-size: 0.6rem; color: #6366f1; }
.footer-contact p {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0.9rem;
    color: #94a3b8;
    font-size: 0.85rem;
}
.footer-contact i {
    width: 32px;
    height: 32px;
    background: rgba(99, 102, 241, 0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #818cf8;
    font-size: 0.8rem;
    flex-shrink: 0;
}
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 1.5rem 2rem;
    text-align: center;
    font-size: 0.82rem;
    color: #64748b;
    position: relative;
    z-index: 1;
}
.footer-bottom a { color: #818cf8; text-decoration: none; transition: color 0.2s; }
.footer-bottom a:hover { color: #c4b5fd; }

.floating-element {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}
.floating-element span {
    position: absolute;
    bottom: -50px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
    animation: floatUp 8s infinite;
}
@keyframes floatUp {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    100% { transform: translateY(-100vh) rotate(360deg); opacity: 0; }
}

/* ========== CHAT ========== */
.chat-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
    transition: all 0.3s ease;
    animation: chatPulse 2.5s ease-in-out infinite;
}
@keyframes chatPulse {
    0%, 100% { box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4), 0 0 0 0 rgba(99, 102, 241, 0.4); }
    50% { box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4), 0 0 0 15px rgba(99, 102, 241, 0); }
}
.chat-button:hover { transform: scale(1.1); animation: none; }
.chat-button i { font-size: 26px; color: white; }

.chat-modal {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 400px;
    height: 600px;
    background: var(--card-bg);
    border-radius: 20px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1001;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.chat-modal.open { display: flex; animation: chatOpen 0.3s ease; }
@keyframes chatOpen { from { opacity: 0; transform: translateY(20px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }

.chat-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 1.1rem 1.3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.chat-header h4 { display: flex; align-items: center; gap: 0.5rem; font-size: 0.95rem; font-weight: 700; }
.chat-header .close-chat {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}
.chat-header .close-chat:hover { background: rgba(255,255,255,0.35); transform: rotate(90deg); }

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: var(--bg-color);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }

.message.user {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    max-width: 85%;
    padding: 0.7rem 1.1rem;
    border-radius: 18px;
    font-size: 0.88rem;
    line-height: 1.5;
}
.message.bot {
    background: var(--card-bg);
    color: var(--text-color);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    max-width: 85%;
    padding: 0.7rem 1.1rem;
    border-radius: 18px;
    border: 1px solid var(--border-color);
    font-size: 0.88rem;
    line-height: 1.55;
}

.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    max-height: 130px;
    overflow-y: auto;
}
.quick-replies::-webkit-scrollbar { width: 4px; }
.quick-replies::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 2px; }
.quick-reply-btn {
    background: var(--bg-color);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.45rem 0.9rem;
    border-radius: 20px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}
.quick-reply-btn:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    border-color: transparent;
}
.quick-reply-btn i { font-size: 0.7rem; }

.chat-input-area {
    padding: 0.8rem 1rem;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.5rem;
}
.chat-input-area input {
    flex: 1;
    padding: 0.7rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    background: var(--bg-color);
    color: var(--text-color);
    outline: none;
    font-family: inherit;
    font-size: 0.88rem;
}
.chat-input-area input:focus { border-color: var(--primary); }
.chat-input-area button {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}
.chat-input-area button:hover { transform: scale(1.05); }

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 0.7rem 1rem;
    background: var(--card-bg);
    border-radius: 18px;
    align-self: flex-start;
    border: 1px solid var(--border-color);
    width: fit-content;
}
.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-8px); opacity: 1; }
}

/* ========== COOKIE CONSENT ========== */
.cookie-banner {
    position: fixed;
    left: 20px;
    bottom: 20px;
    width: 440px;
    max-width: calc(100vw - 40px);
    background: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.3rem 1.4rem;
    box-shadow: var(--shadow-xl);
    z-index: 1100;
    display: none;
}
.cookie-banner.show { display: block; animation: cookieSlideUp 0.4s ease; }
@keyframes cookieSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.cookie-banner h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.cookie-banner h4 i { color: var(--primary); }
.cookie-banner p {
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--gray);
    margin-bottom: 1rem;
}
.cookie-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.cookie-btn {
    flex: 1;
    padding: 0.7rem 1rem;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}
.cookie-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.cookie-btn-accept {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border: none;
}
.cookie-btn-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}
.cookie-btn-decline {
    background: transparent;
    border: 1.5px solid var(--border-color);
    color: var(--text-color);
}
.cookie-btn-decline:hover { border-color: var(--primary); color: var(--primary); }

@media (prefers-reduced-motion: reduce) {
    .cookie-banner.show { animation: none; }
    .cookie-btn { transition: none; }
    .btn-install i { animation: none; }
}

/* ========== PWA INSTALL BAR (BOTTOM) ========== */
#pwaInstallBar {
    position: fixed;
    bottom: 100px;
    left: 20px;
    z-index: 1050;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1rem 1.2rem;
    box-shadow: var(--shadow-xl);
    max-width: 340px;
    display: none;
    animation: pwaSlideUp 0.4s ease;
}
@keyframes pwaSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
#pwaInstallBar .pwa-icon { font-size: 1.8rem; line-height: 1; }
#pwaInstallBar .pwa-title {
    display: block;
    font-size: 0.92rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}
#pwaInstallBar .pwa-desc {
    font-size: 0.8rem;
    color: var(--gray);
    line-height: 1.4;
    display: block;
}
#pwaInstallBar .pwa-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.7rem;
}
#pwaInstallBtn {
    flex: 1;
    padding: 0.55rem 0.9rem;
    border: none;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    font-family: inherit;
}
#pwaInstallBtn:hover { transform: translateY(-1px); }
#pwaLaterBtn {
    padding: 0.55rem 0.9rem;
    border: 1.5px solid var(--border-color);
    border-radius: 9px;
    background: transparent;
    color: var(--text-color);
    font-size: 0.82rem;
    cursor: pointer;
    font-family: inherit;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .navbar .container { padding: 0 1rem; gap: 0.8rem; }
    .nav-links > li > a:not([class*="btn-"]) span:not(.badge-count) { display: none; }
    .nav-links > li > a:not([class*="btn-"]) { padding: 0.55rem 0.7rem; }
    .btn-myads, .btn-login, .btn-register, .btn-post, .btn-logout, .btn-install {
        padding: 0.5rem 0.9rem;
        font-size: 0.8rem;
    }
    .btn-myads span:not(.badge-count), .btn-post span, .btn-logout span, .btn-install span { display: none; }
}

@media (max-width: 768px) {
    .container { padding: 0 1rem; }
    .navbar { padding: 0.7rem 0; }
    .mobile-menu-btn { display: flex; }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: var(--card-bg);
        flex-direction: column;
        align-items: stretch;
        padding: 5rem 1.5rem 2rem;
        gap: 0.5rem;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1001;
        margin-left: 0;
        overflow-y: auto;
    }
    .nav-links.active { right: 0; }
    .nav-links li { width: 100%; }
    .close-mobile-menu { display: flex !important; }

    .nav-links > li > a:not([class*="btn-"]),
    .btn-myads, .btn-login, .btn-register, .btn-post, .btn-logout, .btn-install,
    .dark-mode-toggle {
        width: 100%;
        justify-content: flex-start;
        padding: 0.9rem 1rem;
        font-size: 0.95rem;
        display: flex;
        align-items: center;
        gap: 0.7rem;
    }
    .nav-links > li > a:not([class*="btn-"]) span,
    .btn-myads span:not(.badge-count),
    .btn-post span,
    .btn-logout span,
    .btn-login span,
    .btn-register span,
    .btn-install span,
    .dark-mode-toggle span { display: inline !important; }
    .dark-mode-toggle { justify-content: center; margin-top: 0.5rem; background: var(--light); }
    body.dark-mode .dark-mode-toggle { background: #334155; }

    .hero { padding: 3rem 0 4rem; background-attachment: scroll; }
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 0.95rem; }
    .hero-stats { gap: 0.8rem; }
    .hero-stat { padding: 0.8rem 1.4rem; min-width: 130px; }
    .hero-stat .number { font-size: 1.6rem; }

    .search-section { margin-top: -2rem; }
    .search-box { flex-direction: column; border-radius: 18px; padding: 0.5rem; }
    .search-box input { padding: 0.9rem 1.2rem; }
    .search-box button { padding: 0.9rem; border-radius: 12px; justify-content: center; }
    .advanced-filters { padding: 1.2rem; }

    .products-grid { grid-template-columns: 1fr; gap: 1rem; }
    .products-header h2 { font-size: 1.3rem; }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
    }
    .category-filters {
        overflow-x: auto;
        width: 100%;
        padding-bottom: 0.5rem;
        justify-content: flex-start;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    .filter-chip { font-size: 0.78rem; padding: 0.45rem 0.9rem; }

    .sort-wrapper {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin-left: 0;
    }
    .sort-select { width: 100%; }

    .cta-section { padding: 2.5rem 1.5rem; }
    .cta-section h3 { font-size: 1.5rem; }

    .footer-content { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
    .footer-social { justify-content: center; }
    .footer-contact p { justify-content: center; }
    .footer-column h3 { justify-content: center; }

    .chat-modal { width: calc(100vw - 20px); right: 10px; bottom: 90px; height: 520px; }
    .quick-reply-btn { font-size: 0.72rem; padding: 0.4rem 0.7rem; }
    .chat-button { bottom: 20px; right: 20px; width: 54px; height: 54px; }
    .chat-button i { font-size: 22px; }

    .cookie-banner { left: 10px; right: 10px; bottom: 10px; width: auto; max-width: none; }
    #pwaInstallBar { left: 10px; right: 10px; bottom: 90px; max-width: none; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.6rem; }
    .hero-btn-primary, .hero-btn-secondary { padding: 12px 24px; font-size: 0.85rem; }
    .hero-stats { flex-direction: column; align-items: center; }
    .hero-stat { width: 100%; max-width: 280px; }
}