/* ========== RESET & BASE ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
    --primary: #022557;
    --primary-fg: #ffffff;
    --primary-light: #2E3F58;
    --accent: #FD5D06;
    --accent-light: #FF9F5C;
    --accent-fg: #ffffff;
    --bg: #f8fafc;
    --card: #ffffff;
    --border: #CED2DC;
    --muted: #64748b;
    --foreground: #0f172a;
    --destructive: #ef4444;
    --emerald: #10b981;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(2,37,87,0.08);
    --shadow-lg: 0 10px 25px rgba(2,37,87,0.12);
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'DejaVu Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body { font-family: var(--font-body); background: var(--bg); color: var(--foreground); line-height: 1.5; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; font-family: inherit; }
img { max-width: 100%; display: block; }
input, select { font-family: inherit; font-size: 14px; }

/* ========== UTILITIES ========== */
.container { max-width: 1600px; margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.text-center { text-align: center; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.hidden { display: none !important; }
.block { display: block; }
.relative { position: relative; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ========== HEADER ========== */
.site-header { background: #ffffff; color: var(--foreground); border-bottom: 3px solid var(--accent); }
.site-header .container { padding-top: 16px; padding-bottom: 16px; }
.header-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.header-search { flex: 1; max-width: 600px; }
@media (max-width: 639px) { .header-search { display: none; } }
.logo { display: flex; align-items: center; gap: 12px; }
.logo-icon { padding: 10px; border-radius: var(--radius); background: var(--accent); display: flex; }
.logo-icon svg { width: 24px; height: 24px; fill: var(--accent-fg); stroke: var(--accent-fg); }
.logo h1 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.5px; font-family: var(--font-heading); color: var(--primary); }
.logo h1 span { color: var(--accent); }
.logo p { font-size: 11px; color: var(--muted); }
.header-actions { display: flex; align-items: center; gap: 8px; }

/* ========== BUTTONS ========== */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; transition: all 0.2s; gap: 6px; font-family: var(--font-heading); }
.btn-accent { background: var(--accent); color: var(--accent-fg); }
.btn-accent:hover { background: #e54f00; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(253,93,6,0.3); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--foreground); }
.btn-outline:hover { background: #f1f5f9; border-color: var(--accent-light); }
.btn-ghost { background: transparent; color: var(--primary); }
.btn-ghost:hover { background: rgba(2,37,87,0.06); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-full { width: 100%; }
.btn-lg { padding: 12px 24px; font-size: 15px; }

/* ========== SEARCH ========== */
.search-wrapper { position: relative; }
.search-wrapper svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.search-input { width: 100%; padding: 12px 12px 12px 40px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); color: var(--foreground); font-size: 14px; }
.search-input::placeholder { color: var(--muted); }
.search-input:focus { outline: none; box-shadow: 0 0 0 3px rgba(253,93,6,0.2); }

/* ========== INFO BAR ========== */
.info-bar { background: rgba(253,93,6,0.04); border-bottom: 1px solid var(--border); padding: 12px 0; }
.info-bar .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 24px; font-size: 12px; color: var(--muted); }
.info-bar strong { color: var(--foreground); }
.info-bar svg { width: 14px; height: 14px; color: var(--accent); }

/* ========== STATS ========== */
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 1024px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; display: flex; align-items: center; gap: 12px; transition: all 0.2s; }
.stat-card:hover { border-color: var(--accent-light); box-shadow: var(--shadow); }
.stat-icon { padding: 8px; border-radius: 8px; background: rgba(253,93,6,0.08); }
.stat-icon svg { width: 16px; height: 16px; color: var(--accent); }
.stat-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.stat-value { font-size: 14px; font-weight: 700; font-family: var(--font-heading); }

/* ========== CATEGORY PILLS ========== */
.category-pills { display: flex; flex-wrap: nowrap; gap: 8px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; -ms-overflow-style: none; justify-content: center; }
.category-pills::-webkit-scrollbar { display: none; }
.category-pill { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; white-space: nowrap; flex: 1; justify-content: center; cursor: pointer; transition: all 0.2s; }
.category-pill:hover { background: rgba(253,93,6,0.04); border-color: var(--accent-light); }
.category-pill.active { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.category-pill.active strong { color: var(--accent-fg); }
.category-pill strong { color: var(--foreground); font-family: var(--font-heading); }

/* ========== MAP ========== */
.map-wrapper { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.map-toggle { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: 12px 16px; font-size: 14px; font-weight: 600; background: transparent; font-family: var(--font-heading); }
.map-toggle .left { display: flex; align-items: center; gap: 8px; }
.map-toggle svg { width: 16px; height: 16px; }
.map-container { height: 350px; width: 100%; }
@media (min-width: 1024px) { .map-container { height: 400px; } }

/* ========== LAYOUT ========== */
.main-content { padding: 20px 0; }
.main-content .container { display: flex; flex-direction: column; gap: 20px; }
.content-layout { display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 1024px) { .content-layout { flex-direction: row; } }
.sidebar { width: 100%; flex-shrink: 0; }
@media (min-width: 1024px) { .sidebar { width: 320px; position: sticky; top: 16px; align-self: flex-start; max-height: calc(100vh - 32px); overflow-y: auto; } }
.content-area { flex: 1; min-width: 0; }

/* ========== FILTER SIDEBAR ========== */
.filter-panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.filter-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.filter-header h2 { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; font-family: var(--font-heading); }
.filter-header svg { width: 20px; height: 20px; color: var(--accent); }
.filter-section { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 12px; }
.filter-section-title { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 8px 0; font-size: 14px; font-weight: 600; background: none; cursor: pointer; color: var(--foreground); font-family: var(--font-heading); }
.filter-section-title svg { width: 16px; height: 16px; color: var(--muted); }
.filter-body { padding: 8px 0 12px; }

/* ========== CHIPS/BADGES ========== */
.badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; }
.badge-accent { background: var(--accent); color: var(--accent-fg); }
.badge-outline { background: transparent; border: 1px solid var(--border); color: var(--muted); }
.badge-primary { background: var(--primary); color: var(--primary-fg); opacity: 0.9; }
.badge-destructive { background: var(--destructive); color: white; }
.badge-success { background: rgba(16,185,129,0.15); color: #047857; border: 1px solid rgba(16,185,129,0.3); }
.badge-warning { background: rgba(253,93,6,0.12); color: #c2410c; border: 1px solid rgba(253,93,6,0.3); }
.badge-info { background: rgba(2,37,87,0.08); color: var(--primary); border: 1px solid rgba(2,37,87,0.2); }

.chip { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 6px; font-size: 12px; cursor: pointer; border: 1px solid var(--border); background: transparent; transition: all 0.2s; color: var(--foreground); }
.chip:hover { background: rgba(253,93,6,0.04); border-color: var(--accent-light); }
.chip.active { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }

/* ========== FORM ELEMENTS ========== */
.form-group { margin-bottom: 12px; }
.form-label { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-bottom: 4px; }
.form-select, .form-input { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--foreground); font-size: 14px; }
.form-select:focus, .form-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(253,93,6,0.1); }
.form-switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.form-switch input { opacity: 0; width: 0; height: 0; }
.form-switch .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: var(--border); border-radius: 22px; transition: 0.3s; }
.form-switch .slider::before { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: 0.3s; }
.form-switch input:checked + .slider { background: var(--accent); }
.form-switch input:checked + .slider::before { transform: translateX(18px); }

/* ========== AUCTION CARDS ========== */
.auction-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .auction-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1280px) { .auction-grid { grid-template-columns: repeat(3, 1fr); } }

.auction-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: all 0.3s; display: flex; flex-direction: column; }
.auction-card:hover { box-shadow: var(--shadow-lg); border-color: var(--accent-light); transform: translateY(-2px); }
.auction-card:hover .card-image img { transform: scale(1.05); }

.card-image { position: relative; overflow: hidden; height: 160px; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.card-badges-left { position: absolute; top: 8px; left: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.card-badges-right { position: absolute; top: 8px; right: 8px; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.card-fav-btn { position: absolute; bottom: 8px; right: 8px; padding: 6px; border-radius: 50%; background: rgba(255,255,255,0.8); backdrop-filter: blur(4px); border: none; cursor: pointer; transition: all 0.2s; }
.card-fav-btn:hover { background: var(--card); }
.card-fav-btn svg { width: 16px; height: 16px; color: var(--muted); transition: all 0.2s; }
.card-fav-btn.active svg { color: var(--destructive); fill: var(--destructive); }

.card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.card-title { font-size: 14px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-family: var(--font-heading); color: var(--primary); }
.card-location { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.card-location svg { width: 12px; height: 12px; flex-shrink: 0; color: var(--accent); }
.card-details { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--muted); }
.card-details span { display: flex; align-items: center; gap: 4px; }
.card-details svg { width: 12px; height: 12px; }

.card-pricing { margin-top: auto; padding: 10px 0; border-top: 1px solid rgba(206,210,220,0.5); }
.card-pricing .old-price { font-size: 12px; color: var(--muted); text-decoration: line-through; }
.card-pricing .new-price { font-size: 18px; font-weight: 700; color: var(--accent); font-family: var(--font-heading); }
.card-pricing .price-label { font-size: 11px; color: var(--muted); }

.card-meta { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.card-meta svg { width: 12px; height: 12px; flex-shrink: 0; }
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.card-cta { margin-top: auto; padding-top: 8px; }
.card-cta .btn { width: 100%; font-size: 12px; }

/* ========== SORT BAR ========== */
.sort-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.sort-bar .results { font-size: 14px; color: var(--muted); }
.sort-select { padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); font-size: 13px; min-width: 180px; }
.sort-select:focus { outline: none; border-color: var(--accent); }

/* ========== PAGINATION ========== */
.pagination { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 24px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 500; border: 1px solid var(--border); color: var(--foreground); transition: all 0.2s; }
.pagination a:hover { background: rgba(253,93,6,0.06); border-color: var(--accent-light); }
.pagination .active { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.pagination .disabled { opacity: 0.5; pointer-events: none; }

/* ========== PREMIUM CTA ========== */
.premium-cta { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); border-radius: var(--radius); padding: 24px; text-align: center; color: var(--primary-fg); margin-top: 24px; }
.premium-cta h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; font-family: var(--font-heading); }
.premium-cta p { font-size: 14px; opacity: 0.8; margin-bottom: 16px; }
.premium-cta .actions { display: flex; flex-direction: column; gap: 12px; align-items: center; }
@media (min-width: 640px) { .premium-cta .actions { flex-direction: row; justify-content: center; } }

/* ========== MODAL ========== */
.modal-overlay { position: fixed; inset: 0; background: rgba(2,37,87,0.5); display: none; align-items: center; justify-content: center; z-index: 1000; padding: 16px; backdrop-filter: blur(4px); }
.modal-overlay.active { display: flex; }
.modal { background: var(--card); border-radius: var(--radius); padding: 24px; width: 100%; max-width: 420px; max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.modal-header .icon { padding: 8px; border-radius: 8px; background: rgba(253,93,6,0.1); }
.modal-header .icon svg { width: 20px; height: 20px; color: var(--accent); }
.modal-header h3 { font-size: 18px; font-weight: 600; font-family: var(--font-heading); }
.modal-desc { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.modal form .form-group { margin-bottom: 12px; }

/* ========== EMPTY STATE ========== */
.empty-state { text-align: center; padding: 80px 20px; }
.empty-state svg { width: 48px; height: 48px; color: var(--accent-light); margin: 0 auto 16px; }
.empty-state h3 { font-size: 18px; font-weight: 600; margin-bottom: 4px; font-family: var(--font-heading); }
.empty-state p { font-size: 14px; color: var(--muted); }

/* ========== FOOTER ========== */
.site-footer { border-top: 1px solid var(--border); padding: 32px 0 24px; margin-top: 32px; text-align: center; }
.site-footer .brand { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 12px; }
.site-footer .brand svg { width: 20px; height: 20px; color: var(--accent); }
.site-footer .brand span { font-size: 18px; font-weight: 700; font-family: var(--font-heading); }
.site-footer .brand .dot { color: var(--accent); }
.site-footer .disclaimer { font-size: 12px; color: var(--muted); max-width: 480px; margin: 0 auto 12px; }
.site-footer .copy { font-size: 10px; color: var(--muted); }

/* ========== SUBSCRIPTION PAGE ========== */
.sub-page { max-width: 520px; margin: 0 auto; padding: 40px 16px; }
.sub-price { font-size: 48px; font-weight: 700; color: var(--accent); font-family: var(--font-heading); }
.sub-price small { font-size: 16px; color: var(--muted); font-weight: 400; }
.features-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.features-card h3 { font-size: 18px; font-weight: 600; margin-bottom: 16px; font-family: var(--font-heading); }
.feature-item { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.feature-item .icon { padding: 6px; border-radius: 50%; background: rgba(253,93,6,0.1); }
.feature-item .icon svg { width: 16px; height: 16px; color: var(--accent); }
.feature-item .check { margin-left: auto; }
.feature-item .check svg { width: 16px; height: 16px; color: var(--accent); }

/* ========== TOAST ========== */
.toast { position: fixed; bottom: 20px; right: 20px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow-lg); z-index: 2000; transform: translateY(100px); opacity: 0; transition: all 0.3s; max-width: 360px; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast-title { font-size: 14px; font-weight: 600; margin-bottom: 2px; font-family: var(--font-heading); }
.toast-message { font-size: 13px; color: var(--muted); }

/* ========== MOBILE RESPONSIVE ========== */
@media (max-width: 639px) {
    .hide-mobile { display: none !important; }
    .logo h1 { font-size: 1rem; }
    .logo p { font-size: 9px; }
    .logo img { height: 38px !important; }
    .logo a { gap: 8px !important; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 640px) {
    .hide-desktop { display: none !important; }
}
@media (max-width: 1023px) {
    .hide-tablet { display: none !important; }
}


/* ========== MOBILE MENU ========== */
.mobile-menu-btn { display: none; }
@media (max-width: 639px) { .mobile-menu-btn { display: inline-flex; } }

.mobile-menu { position: fixed; inset: 0; z-index: 9999; display: none !important; visibility: hidden; }
.mobile-menu.open { display: block !important; visibility: visible; }
.mobile-menu-overlay { position: absolute; inset: 0; background: rgba(2,37,87,0.5); backdrop-filter: blur(4px); }
.mobile-menu-panel { position: absolute; top: 0; right: 0; width: 300px; max-width: 85vw; height: 100%; background: var(--card); overflow-y: auto; box-shadow: -4px 0 20px rgba(0,0,0,0.15); display: flex; flex-direction: column; }
.mobile-menu-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.mobile-menu-close { background: none; border: none; font-size: 28px; color: var(--muted); cursor: pointer; line-height: 1; }
.mobile-menu-search { display: flex; gap: 8px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.mobile-menu-search .form-input { flex: 1; padding: 10px 12px; }
.mobile-menu-nav { padding: 12px 0; border-bottom: 1px solid var(--border); }
.mobile-menu-nav a { display: flex; align-items: center; gap: 12px; padding: 12px 20px; font-size: 14px; font-weight: 500; color: var(--foreground); transition: background 0.2s; }
.mobile-menu-nav a:hover { background: rgba(253,93,6,0.04); }
.mobile-menu-nav a svg { color: var(--accent); flex-shrink: 0; }
.mobile-menu-filters { padding: 16px 20px; }
.mobile-menu-section-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); margin-bottom: 12px; }
.mobile-menu-filters .form-group { margin-bottom: 12px; }
.mobile-menu-filters .form-label { font-size: 12px; color: var(--muted); margin-bottom: 4px; display: block; }
.mobile-menu-filters .form-select { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; background: var(--bg); }
