/* ═══════════════════════════════════════════════════
   ClassiFy — Modern Marketplace Design System
   ═══════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Brand */
  --primary:        #4f46e5;
  --primary-light:  #818cf8;
  --primary-dark:   #3730a3;
  --primary-rgb:    79,70,229;
  --accent:         #f59e0b;
  --accent-dark:    #d97706;
  /* Semantic */
  --success:        #10b981;
  --danger:         #ef4444;
  --warning:        #f59e0b;
  --info:           #3b82f6;
  /* Surface */
  --bg:             #f1f5f9;
  --surface:        #ffffff;
  --surface2:       #f8fafc;
  --border:         #e2e8f0;
  --border-focus:   #a5b4fc;
  /* Text */
  --text:           #0f172a;
  --text-muted:     #64748b;
  --text-light:     #94a3b8;
  /* Shadows */
  --shadow-sm:  0 1px 2px rgba(0,0,0,.05);
  --shadow:     0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
  --shadow-md:  0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.05);
  --shadow-lg:  0 20px 25px -5px rgba(0,0,0,.10), 0 8px 10px -6px rgba(0,0,0,.05);
  --shadow-xl:  0 25px 50px -12px rgba(0,0,0,.20);
  /* Misc */
  --radius:     10px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --transition: .2s cubic-bezier(.4,0,.2,1);
}

[data-theme="dark"] {
  --bg:       #0f172a;
  --surface:  #1e293b;
  --surface2: #0f172a;
  --border:   #334155;
  --text:     #f1f5f9;
  --text-muted: #94a3b8;
  --shadow:   0 4px 6px rgba(0,0,0,.3);
  --shadow-md:0 10px 15px rgba(0,0,0,.4);
}

/* ── Reset ── */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html { scroll-behavior:smooth; }
body {
  font-family:'Inter',system-ui,sans-serif;
  font-size:15px;
  line-height:1.6;
  color:var(--text);
  background:var(--bg);
  min-height:100vh;
  display:flex;
  flex-direction:column;
  transition:background var(--transition),color var(--transition);
}
a { color:var(--primary); text-decoration:none; transition:color var(--transition); }
a:hover { color:var(--primary-dark); }
img { max-width:100%; height:auto; display:block; }
ul { list-style:none; }
input,textarea,select,button { font-family:inherit; font-size:inherit; }
button { cursor:pointer; }

/* ── Layout ── */
.container { width:100%; max-width:1240px; margin:0 auto; padding:0 20px; }
main.container { flex:1; padding-top:28px; padding-bottom:60px; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width:6px; height:6px; }
::-webkit-scrollbar-track { background:var(--bg); }
::-webkit-scrollbar-thumb { background:var(--border); border-radius:3px; }
::-webkit-scrollbar-thumb:hover { background:var(--text-muted); }

/* ══════════════════════════════════
   HEADER
══════════════════════════════════ */
header {
  background:var(--surface);
  border-bottom:1px solid var(--border);
  position:sticky;
  top:0;
  z-index:200;
  box-shadow:var(--shadow-sm);
  transition:box-shadow var(--transition);
}
header.scrolled { box-shadow:var(--shadow-md); }

.header-inner {
  display:flex;
  align-items:center;
  gap:16px;
  height:64px;
  padding:0 20px;
  max-width:1240px;
  margin:0 auto;
}

.logo {
  font-size:1.4rem;
  font-weight:800;
  color:var(--text);
  letter-spacing:-.5px;
  flex-shrink:0;
}
.logo span { color:var(--primary); }

.header-search {
  flex:1;
  max-width:460px;
  position:relative;
}
.header-search input {
  width:100%;
  padding:8px 16px 8px 40px;
  border:1.5px solid var(--border);
  border-radius:40px;
  background:var(--surface2);
  color:var(--text);
  transition:border-color var(--transition),box-shadow var(--transition);
}
.header-search input:focus {
  outline:none;
  border-color:var(--primary);
  box-shadow:0 0 0 3px rgba(var(--primary-rgb),.15);
  background:var(--surface);
}
.header-search .search-icon {
  position:absolute;
  left:13px;
  top:50%;
  transform:translateY(-50%);
  color:var(--text-muted);
  pointer-events:none;
}

.header-actions {
  display:flex;
  align-items:center;
  gap:8px;
  margin-left:auto;
}

.lang-btn {
  padding:4px 9px;
  border-radius:6px;
  font-size:.75rem;
  font-weight:600;
  background:var(--surface2);
  color:var(--text-muted);
  border:1px solid var(--border);
  letter-spacing:.5px;
}
.lang-btn.active { background:var(--primary); color:#fff; border-color:var(--primary); }
.lang-btn:hover:not(.active) { background:var(--border); }

.icon-btn {
  width:36px; height:36px;
  border-radius:50%;
  background:var(--surface2);
  border:1px solid var(--border);
  color:var(--text-muted);
  display:inline-flex; align-items:center; justify-content:center;
  font-size:1rem;
  transition:var(--transition);
  position:relative;
}
.icon-btn:hover { background:var(--border); color:var(--text); }
.icon-btn .badge-dot {
  position:absolute;
  top:2px; right:2px;
  width:8px; height:8px;
  background:var(--danger);
  border-radius:50%;
  border:2px solid var(--surface);
}

/* User menu */
.user-menu { position:relative; }
.user-avatar {
  width:36px; height:36px;
  border-radius:50%;
  background:linear-gradient(135deg,var(--primary),var(--primary-light));
  color:#fff;
  font-weight:700;
  font-size:.85rem;
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
  border:2px solid transparent;
  transition:border-color var(--transition);
}
.user-avatar:hover { border-color:var(--primary-light); }
.user-dropdown {
  display:none;
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-lg);
  min-width:200px;
  padding:6px;
  z-index:300;
  animation:dropIn .2s ease;
}
@keyframes dropIn {
  from { opacity:0; transform:translateY(-8px); }
  to   { opacity:1; transform:translateY(0); }
}
.user-dropdown a, .user-dropdown button {
  display:flex; align-items:center; gap:8px;
  padding:9px 12px;
  border-radius:8px;
  color:var(--text);
  font-size:.875rem;
  width:100%;
  background:none; border:none; text-align:left;
  transition:background var(--transition);
}
.user-dropdown a:hover, .user-dropdown button:hover { background:var(--surface2); }
.user-dropdown hr { border:none; border-top:1px solid var(--border); margin:4px 0; }
.user-dropdown .logout-btn { color:var(--danger); }
.user-menu:hover .user-dropdown,
.user-menu:focus-within .user-dropdown { display:block; }

/* Mobile menu */
.mobile-menu-btn {
  display:none;
  background:none; border:none;
  width:36px; height:36px;
  border-radius:8px;
  color:var(--text);
  font-size:1.3rem;
  align-items:center; justify-content:center;
}

/* Nav */
.main-nav { display:flex; gap:2px; }
.main-nav a {
  padding:6px 12px;
  border-radius:8px;
  font-size:.875rem;
  font-weight:500;
  color:var(--text-muted);
  white-space:nowrap;
  transition:var(--transition);
}
.main-nav a:hover, .main-nav a.active { color:var(--text); background:var(--surface2); }

/* ══════════════════════════════════
   BUTTONS
══════════════════════════════════ */
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  padding:9px 20px;
  border-radius:var(--radius);
  font-size:.875rem;
  font-weight:600;
  border:1.5px solid transparent;
  cursor:pointer;
  transition:var(--transition);
  white-space:nowrap;
  text-decoration:none;
}
.btn:hover { text-decoration:none; transform:translateY(-1px); }
.btn:active { transform:translateY(0); }

.btn-primary { background:var(--primary); color:#fff; border-color:var(--primary); }
.btn-primary:hover { background:var(--primary-dark); border-color:var(--primary-dark); color:#fff; }

.btn-outline { background:transparent; color:var(--primary); border-color:var(--primary); }
.btn-outline:hover { background:var(--primary); color:#fff; }

.btn-ghost { background:transparent; color:var(--text-muted); border-color:var(--border); }
.btn-ghost:hover { background:var(--surface2); color:var(--text); }

.btn-danger { background:var(--danger); color:#fff; border-color:var(--danger); }
.btn-danger:hover { background:#dc2626; color:#fff; }

.btn-success { background:var(--success); color:#fff; border-color:var(--success); }

.btn-sm { padding:6px 14px; font-size:.8rem; }
.btn-lg { padding:12px 28px; font-size:1rem; }
.btn-xl { padding:14px 32px; font-size:1.05rem; border-radius:12px; }
.btn-block { display:flex; width:100%; }
.btn-icon { padding:8px; width:36px; height:36px; border-radius:50%; }

/* ══════════════════════════════════
   HERO
══════════════════════════════════ */
.hero {
  position:relative;
  background:linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #4338ca 70%, #3b82f6 100%);
  color:#fff;
  padding:80px 0 100px;
  overflow:hidden;
}
.hero::before {
  content:'';
  position:absolute; inset:0;
  background:url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
/* Animated blobs */
.hero-blob {
  position:absolute;
  border-radius:50%;
  filter:blur(80px);
  opacity:.15;
  animation:blobFloat 8s ease-in-out infinite;
}
.hero-blob-1 { width:400px; height:400px; background:#818cf8; top:-100px; right:-80px; animation-delay:0s; }
.hero-blob-2 { width:300px; height:300px; background:#f59e0b; bottom:-80px; left:10%; animation-delay:3s; }
.hero-blob-3 { width:250px; height:250px; background:#ec4899; top:50%; left:60%; animation-delay:5s; }
@keyframes blobFloat {
  0%,100% { transform:translate(0,0) scale(1); }
  33%      { transform:translate(20px,-20px) scale(1.05); }
  66%      { transform:translate(-10px,15px) scale(.95); }
}

.hero-content { position:relative; z-index:1; text-align:center; }
.hero h1 {
  font-size:clamp(1.8rem, 5vw, 3.2rem);
  font-weight:800;
  letter-spacing:-.5px;
  line-height:1.2;
  margin-bottom:16px;
}
.hero h1 span { color:#fbbf24; }
.hero-sub {
  font-size:1.1rem;
  opacity:.85;
  max-width:600px;
  margin:0 auto 36px;
  line-height:1.7;
}

.hero-search {
  background:rgba(255,255,255,.12);
  backdrop-filter:blur(12px);
  border:1px solid rgba(255,255,255,.2);
  border-radius:var(--radius-xl);
  padding:8px;
  max-width:680px;
  margin:0 auto;
  display:flex;
  gap:8px;
}
.hero-search input {
  flex:1;
  background:rgba(255,255,255,.15);
  border:1px solid rgba(255,255,255,.2);
  border-radius:var(--radius-lg);
  padding:12px 18px;
  color:#fff;
  font-size:1rem;
  outline:none;
}
.hero-search input::placeholder { color:rgba(255,255,255,.6); }
.hero-search input:focus { border-color:rgba(255,255,255,.5); background:rgba(255,255,255,.2); }
.hero-search .btn-search {
  background:#fff;
  color:var(--primary);
  border:none;
  padding:12px 28px;
  border-radius:var(--radius-lg);
  font-weight:700;
  font-size:1rem;
  transition:var(--transition);
  white-space:nowrap;
  display:flex; align-items:center; gap:6px;
}
.hero-search .btn-search:hover { background:#f1f5f9; transform:none; }

.hero-stats {
  display:flex;
  justify-content:center;
  gap:40px;
  margin-top:40px;
  padding-top:30px;
  border-top:1px solid rgba(255,255,255,.15);
}
.hero-stat { text-align:center; }
.hero-stat-num { font-size:1.8rem; font-weight:800; display:block; }
.hero-stat-label { font-size:.85rem; opacity:.7; }

/* ══════════════════════════════════
   SECTIONS
══════════════════════════════════ */
.section { padding:60px 0; }
.section-title {
  font-size:1.6rem;
  font-weight:800;
  color:var(--text);
  margin-bottom:6px;
  letter-spacing:-.3px;
}
.section-header {
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  margin-bottom:30px;
  flex-wrap:wrap;
  gap:12px;
}
.section-sub { color:var(--text-muted); font-size:.9rem; margin-top:4px; }

/* ══════════════════════════════════
   CATEGORIES
══════════════════════════════════ */
.categories-grid {
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:16px;
}
.category-card {
  border-radius:var(--radius-lg);
  padding:28px 20px;
  text-align:center;
  cursor:pointer;
  transition:var(--transition);
  color:#fff;
  position:relative;
  overflow:hidden;
  text-decoration:none;
}
.category-card::after {
  content:'';
  position:absolute; inset:0;
  background:rgba(255,255,255,0);
  transition:background var(--transition);
}
.category-card:hover { transform:translateY(-4px); box-shadow:var(--shadow-lg); text-decoration:none; }
.category-card:hover::after { background:rgba(255,255,255,.1); }
.category-card:hover .cat-icon { transform:scale(1.15) rotate(-5deg); }

/* Category colors */
.cat-elektronik    { background:linear-gradient(135deg,#4f46e5,#7c3aed); }
.cat-moebel        { background:linear-gradient(135deg,#0891b2,#0369a1); }
.cat-kleidung      { background:linear-gradient(135deg,#db2777,#9d174d); }
.cat-fahrzeuge     { background:linear-gradient(135deg,#d97706,#b45309); }
.cat-immobilien    { background:linear-gradient(135deg,#059669,#047857); }
.cat-jobs          { background:linear-gradient(135deg,#dc2626,#991b1b); }
.cat-sport         { background:linear-gradient(135deg,#7c3aed,#5b21b6); }
.cat-haushalt      { background:linear-gradient(135deg,#0284c7,#075985); }
.cat-default       { background:linear-gradient(135deg,#64748b,#475569); }

.cat-icon {
  font-size:2.4rem;
  display:block;
  margin-bottom:10px;
  transition:transform .3s cubic-bezier(.4,0,.2,1);
}
.cat-name { font-weight:700; font-size:.95rem; margin-bottom:4px; }
.cat-count { font-size:.8rem; opacity:.8; }

/* ══════════════════════════════════
   LISTING CARDS
══════════════════════════════════ */
.listings-grid {
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(260px, 1fr));
  gap:20px;
}
.listing-card {
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  transition:var(--transition);
  position:relative;
  /* Fade-in animation */
  opacity:0;
  transform:translateY(16px);
  animation:cardIn .4s ease forwards;
}
.listing-card:hover {
  transform:translateY(-4px);
  box-shadow:var(--shadow-lg);
  border-color:var(--primary-light);
}
@keyframes cardIn {
  to { opacity:1; transform:translateY(0); }
}
.listing-card:nth-child(1) { animation-delay:.05s; }
.listing-card:nth-child(2) { animation-delay:.10s; }
.listing-card:nth-child(3) { animation-delay:.15s; }
.listing-card:nth-child(4) { animation-delay:.20s; }
.listing-card:nth-child(n+5) { animation-delay:.25s; }

/* Card image */
.card-image-wrap {
  position:relative;
  overflow:hidden;
  aspect-ratio:4/3;
  background:var(--surface2);
}
.card-image-wrap img {
  width:100%; height:100%;
  object-fit:cover;
  transition:transform .4s ease;
}
.listing-card:hover .card-image-wrap img { transform:scale(1.05); }
.no-image-card {
  width:100%; height:100%;
  display:flex; align-items:center; justify-content:center;
  flex-direction:column;
  color:var(--text-light);
  font-size:.85rem;
  gap:8px;
}
.no-image-card svg { width:32px; height:32px; opacity:.4; }

/* Card badges */
.card-badges {
  position:absolute;
  top:10px; left:10px;
  display:flex; flex-direction:column; gap:4px;
}
.badge-tag {
  padding:3px 8px;
  border-radius:6px;
  font-size:.7rem;
  font-weight:700;
  letter-spacing:.3px;
  line-height:1.4;
}
.badge-new      { background:#10b981; color:#fff; }
.badge-top      { background:#f59e0b; color:#fff; }
.badge-sold     { background:#ef4444; color:#fff; }
.badge-reserved { background:#8b5cf6; color:#fff; }

/* Price badge on image */
.card-price-badge {
  position:absolute;
  bottom:10px; left:10px;
  background:rgba(0,0,0,.72);
  backdrop-filter:blur(4px);
  color:#fff;
  padding:4px 10px;
  border-radius:8px;
  font-weight:700;
  font-size:.9rem;
}
.card-price-badge.price-free { background:rgba(16,185,129,.85); }
.card-price-badge.price-vhb::after { content:' VHB'; font-size:.7rem; opacity:.8; }

/* Favorite button */
.fav-btn {
  position:absolute;
  top:10px; right:10px;
  width:32px; height:32px;
  background:rgba(255,255,255,.9);
  backdrop-filter:blur(4px);
  border:none;
  border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  font-size:1rem;
  cursor:pointer;
  transition:var(--transition);
  z-index:1;
  box-shadow:var(--shadow-sm);
}
.fav-btn:hover { transform:scale(1.15); background:#fff; }
.fav-btn.active { background:#ef4444; color:#fff; }
.fav-btn .heart { transition:transform .2s cubic-bezier(.4,0,.2,1); }
.fav-btn.active .heart { transform:scale(1.2); }

/* Card body */
.card-body { padding:14px 16px 16px; flex:1; display:flex; flex-direction:column; }
.card-category-tag {
  display:inline-block;
  padding:2px 8px;
  border-radius:4px;
  font-size:.7rem;
  font-weight:600;
  background:var(--surface2);
  color:var(--primary);
  border:1px solid var(--border);
  margin-bottom:7px;
}
.card-title {
  font-size:.95rem;
  font-weight:600;
  color:var(--text);
  line-height:1.4;
  margin-bottom:8px;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.card-meta {
  display:flex;
  align-items:center;
  justify-content:space-between;
  color:var(--text-muted);
  font-size:.78rem;
  margin-top:auto;
  padding-top:10px;
  border-top:1px solid var(--border);
}
.card-location, .card-date { display:flex; align-items:center; gap:3px; }
.card-condition {
  font-size:.7rem;
  padding:2px 7px;
  border-radius:4px;
  font-weight:500;
  margin-top:4px;
  display:inline-block;
}
.cond-new     { background:#dcfce7; color:#166534; }
.cond-like-new{ background:#dbeafe; color:#1e40af; }
.cond-good    { background:#fef9c3; color:#854d0e; }
.cond-used    { background:#f1f5f9; color:#475569; }
.cond-defective{ background:#fee2e2; color:#991b1b; }

/* View overlay */
.card-view-overlay {
  position:absolute;
  inset:0;
  display:flex; align-items:center; justify-content:center;
  background:rgba(79,70,229,.0);
  transition:background var(--transition);
  pointer-events:none;
  z-index:0;
}
.listing-card:hover .card-view-overlay { background:rgba(79,70,229,.05); }

/* ══════════════════════════════════
   LISTING DETAIL
══════════════════════════════════ */
.breadcrumb {
  display:flex; align-items:center; gap:6px;
  font-size:.82rem;
  color:var(--text-muted);
  margin-bottom:20px;
  flex-wrap:wrap;
}
.breadcrumb a { color:var(--text-muted); }
.breadcrumb a:hover { color:var(--primary); }
.breadcrumb span { opacity:.4; }

.listing-detail-layout {
  display:grid;
  grid-template-columns:1fr 380px;
  gap:30px;
  align-items:start;
}

/* Gallery */
.listing-gallery { position:sticky; top:80px; }
.gallery-main {
  border-radius:var(--radius-lg);
  overflow:hidden;
  aspect-ratio:4/3;
  background:var(--surface2);
  margin-bottom:10px;
  cursor:zoom-in;
  position:relative;
}
.gallery-main img {
  width:100%; height:100%;
  object-fit:cover;
  transition:transform .4s ease;
}
.gallery-main:hover img { transform:scale(1.03); }
.gallery-nav {
  position:absolute;
  top:50%; transform:translateY(-50%);
  width:100%; display:flex; justify-content:space-between; padding:0 10px;
  pointer-events:none;
}
.gallery-nav-btn {
  width:36px; height:36px;
  background:rgba(0,0,0,.5);
  backdrop-filter:blur(4px);
  color:#fff; border:none;
  border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
  pointer-events:all;
  transition:var(--transition);
}
.gallery-nav-btn:hover { background:rgba(0,0,0,.75); }
.gallery-thumbs {
  display:flex; gap:8px; overflow-x:auto; padding-bottom:4px;
  scrollbar-width:thin;
}
.gallery-thumb {
  flex-shrink:0;
  width:70px; height:52px;
  border-radius:8px;
  overflow:hidden;
  border:2px solid transparent;
  cursor:pointer;
  transition:var(--transition);
}
.gallery-thumb.active { border-color:var(--primary); }
.gallery-thumb img { width:100%; height:100%; object-fit:cover; }
.gallery-no-image {
  border-radius:var(--radius-lg);
  aspect-ratio:4/3;
  background:var(--surface2);
  display:flex; flex-direction:column;
  align-items:center; justify-content:center;
  color:var(--text-light);
  gap:8px;
  font-size:.9rem;
}
.gallery-no-image svg { width:40px; opacity:.3; }

/* Listing info sidebar */
.listing-info-card {
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:24px;
  position:sticky;
  top:80px;
}
.detail-price {
  font-size:2rem;
  font-weight:800;
  color:var(--primary);
  letter-spacing:-.5px;
  margin-bottom:4px;
}
.detail-price-type { font-size:.85rem; color:var(--text-muted); margin-bottom:16px; }

.detail-chips {
  display:flex; flex-wrap:wrap; gap:6px;
  margin-bottom:18px;
}
.detail-chip {
  padding:5px 12px;
  border-radius:20px;
  font-size:.8rem;
  font-weight:500;
  display:flex; align-items:center; gap:5px;
}
.chip-condition { background:var(--surface2); border:1px solid var(--border); color:var(--text); }
.chip-shipping  { background:#dcfce7; color:#166534; border:1px solid #bbf7d0; }
.chip-new-badge { background:#fef3c7; color:#92400e; border:1px solid #fde68a; }

.detail-location {
  display:flex; align-items:center; gap:7px;
  color:var(--text-muted);
  font-size:.9rem;
  margin-bottom:16px;
  padding-bottom:16px;
  border-bottom:1px solid var(--border);
}
.detail-meta {
  display:grid; grid-template-columns:1fr 1fr;
  gap:10px;
  margin-bottom:20px;
  font-size:.82rem;
}
.detail-meta-item { display:flex; flex-direction:column; gap:2px; }
.detail-meta-item strong { color:var(--text); font-size:.85rem; }
.detail-meta-item span { color:var(--text-muted); }

/* Contact box */
.contact-box { border-radius:var(--radius-lg); overflow:hidden; }
.contact-box-header {
  background:linear-gradient(135deg,var(--primary),var(--primary-dark));
  padding:16px 20px;
  color:#fff;
}
.contact-box-header .seller-name { font-weight:700; font-size:1rem; }
.contact-box-header .seller-member { font-size:.8rem; opacity:.8; margin-top:2px; }
.contact-box-avatar {
  width:44px; height:44px;
  border-radius:50%;
  background:rgba(255,255,255,.25);
  display:flex; align-items:center; justify-content:center;
  font-size:1.2rem; font-weight:700; color:#fff;
}
.seller-header-row { display:flex; align-items:center; gap:12px; }
.contact-box-body { padding:16px; background:var(--surface); border:1px solid var(--border); border-top:none; border-radius:0 0 var(--radius-lg) var(--radius-lg); }
.contact-box-body textarea {
  width:100%;
  padding:10px 14px;
  border:1.5px solid var(--border);
  border-radius:var(--radius);
  resize:vertical;
  min-height:90px;
  font-size:.9rem;
  color:var(--text);
  background:var(--surface2);
  transition:border-color var(--transition);
  margin-bottom:12px;
}
.contact-box-body textarea:focus { outline:none; border-color:var(--primary); }

/* Detail actions */
.detail-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; }

/* Description section */
.description-section {
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:28px;
  margin-top:24px;
}
.description-section h2 { font-size:1.1rem; font-weight:700; margin-bottom:14px; }
.description-text {
  white-space:pre-wrap;
  line-height:1.8;
  color:var(--text);
  font-size:.95rem;
}

/* ══════════════════════════════════
   LISTINGS PAGE (Browse)
══════════════════════════════════ */
.listings-layout {
  display:grid;
  grid-template-columns:260px 1fr;
  gap:28px;
  align-items:start;
}
.sidebar {
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:20px;
  position:sticky;
  top:80px;
}
.sidebar-title { font-weight:700; font-size:.9rem; margin-bottom:14px; color:var(--text); }
.sidebar-section { margin-bottom:20px; padding-bottom:20px; border-bottom:1px solid var(--border); }
.sidebar-section:last-child { border-bottom:none; margin-bottom:0; padding-bottom:0; }
.sidebar-label { font-size:.8rem; font-weight:600; color:var(--text-muted); margin-bottom:8px; text-transform:uppercase; letter-spacing:.4px; }

.filter-select {
  width:100%;
  padding:8px 12px;
  border:1.5px solid var(--border);
  border-radius:var(--radius);
  background:var(--surface2);
  color:var(--text);
  font-size:.875rem;
  cursor:pointer;
  transition:border-color var(--transition);
}
.filter-select:focus { outline:none; border-color:var(--primary); }

.price-range-inputs { display:flex; gap:8px; }
.price-range-inputs input {
  flex:1;
  padding:8px 10px;
  border:1.5px solid var(--border);
  border-radius:var(--radius);
  background:var(--surface2);
  color:var(--text);
  font-size:.85rem;
  min-width:0;
}
.price-range-inputs input:focus { outline:none; border-color:var(--primary); }

.checkbox-list { display:flex; flex-direction:column; gap:8px; }
.checkbox-item { display:flex; align-items:center; gap:8px; cursor:pointer; font-size:.875rem; }
.checkbox-item input[type=checkbox] { accent-color:var(--primary); width:15px; height:15px; }

.listings-main-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:20px;
  flex-wrap:wrap;
  gap:12px;
}
.listings-count { font-size:.9rem; color:var(--text-muted); }
.listings-count strong { color:var(--text); font-weight:600; }

.sort-select {
  padding:7px 32px 7px 12px;
  border:1.5px solid var(--border);
  border-radius:var(--radius);
  background:var(--surface);
  color:var(--text);
  font-size:.875rem;
  cursor:pointer;
  appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 10px center;
}
.sort-select:focus { outline:none; border-color:var(--primary); }

/* ══════════════════════════════════
   PAGINATION
══════════════════════════════════ */
.pagination {
  display:flex; justify-content:center; align-items:center;
  gap:4px; margin-top:40px; flex-wrap:wrap;
}
.page-btn {
  min-width:38px; height:38px;
  border-radius:var(--radius);
  border:1.5px solid var(--border);
  background:var(--surface);
  color:var(--text);
  font-size:.875rem;
  font-weight:500;
  display:flex; align-items:center; justify-content:center;
  padding:0 10px;
  cursor:pointer;
  transition:var(--transition);
  text-decoration:none;
}
.page-btn:hover { border-color:var(--primary); color:var(--primary); }
.page-btn.active { background:var(--primary); border-color:var(--primary); color:#fff; }
.page-btn:disabled { opacity:.4; cursor:default; }

/* ══════════════════════════════════
   FORMS
══════════════════════════════════ */
.form-group { margin-bottom:18px; }
.form-label {
  display:block;
  font-size:.85rem;
  font-weight:600;
  color:var(--text);
  margin-bottom:6px;
}
.form-label .required { color:var(--danger); margin-left:2px; }
.form-control {
  width:100%;
  padding:10px 14px;
  border:1.5px solid var(--border);
  border-radius:var(--radius);
  background:var(--surface);
  color:var(--text);
  font-size:.9rem;
  transition:border-color var(--transition),box-shadow var(--transition);
}
.form-control:focus {
  outline:none;
  border-color:var(--primary);
  box-shadow:0 0 0 3px rgba(var(--primary-rgb),.12);
}
.form-control:disabled { opacity:.5; background:var(--surface2); }
.form-hint { font-size:.78rem; color:var(--text-muted); margin-top:4px; }
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
textarea.form-control { resize:vertical; min-height:120px; }
.form-check { display:flex; align-items:center; gap:8px; font-size:.9rem; cursor:pointer; }
.form-check input { accent-color:var(--primary); width:16px; height:16px; }

/* ── Auth cards ── */
.auth-card {
  max-width:440px;
  margin:40px auto;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-xl);
  padding:40px;
  box-shadow:var(--shadow-lg);
}
.auth-card h1 { font-size:1.5rem; font-weight:800; margin-bottom:6px; }
.auth-sub { color:var(--text-muted); font-size:.9rem; margin-bottom:28px; }
.auth-footer { margin-top:20px; text-align:center; font-size:.875rem; color:var(--text-muted); }
.auth-divider { position:relative; text-align:center; margin:20px 0; }
.auth-divider::before { content:''; position:absolute; top:50%; left:0; right:0; border-top:1px solid var(--border); }
.auth-divider span { background:var(--surface); padding:0 12px; position:relative; font-size:.8rem; color:var(--text-muted); }

/* ── Page-level create form ── */
.create-listing-layout {
  display:grid;
  grid-template-columns:1fr 300px;
  gap:28px;
  align-items:start;
}
.form-card {
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:28px;
}
.form-card h2 { font-size:1rem; font-weight:700; margin-bottom:18px; padding-bottom:14px; border-bottom:1px solid var(--border); }

.image-upload-area {
  border:2px dashed var(--border);
  border-radius:var(--radius-lg);
  padding:32px;
  text-align:center;
  cursor:pointer;
  transition:var(--transition);
  color:var(--text-muted);
  position:relative;
}
.image-upload-area:hover { border-color:var(--primary); color:var(--primary); background:rgba(var(--primary-rgb),.03); }
.image-upload-area input[type=file] { position:absolute; inset:0; opacity:0; cursor:pointer; }
.image-upload-icon { font-size:2rem; margin-bottom:8px; }
.upload-preview { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.upload-thumb {
  width:80px; height:60px;
  border-radius:8px;
  object-fit:cover;
  border:1px solid var(--border);
}

/* ══════════════════════════════════
   ALERTS / TOAST
══════════════════════════════════ */
.alert {
  padding:12px 16px;
  border-radius:var(--radius);
  font-size:.875rem;
  margin-bottom:16px;
  display:flex; align-items:center; gap:10px;
}
.alert-error   { background:#fef2f2; color:#991b1b; border:1px solid #fecaca; }
.alert-success { background:#f0fdf4; color:#166534; border:1px solid #bbf7d0; }
.alert-info    { background:#eff6ff; color:#1e40af; border:1px solid #bfdbfe; }
.alert-warning { background:#fffbeb; color:#92400e; border:1px solid #fde68a; }
.alert p + p { margin-top:4px; }

/* Toast */
.toast-container {
  position:fixed;
  bottom:24px;
  right:24px;
  z-index:9999;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.toast {
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:12px 18px;
  box-shadow:var(--shadow-lg);
  font-size:.875rem;
  font-weight:500;
  color:var(--text);
  display:flex; align-items:center; gap:10px;
  min-width:240px;
  max-width:360px;
  animation:toastIn .3s ease;
}
.toast.toast-exit { animation:toastOut .3s ease forwards; }
@keyframes toastIn  { from { opacity:0; transform:translateX(20px); } }
@keyframes toastOut { to   { opacity:0; transform:translateX(20px); } }
.toast-icon { font-size:1.1rem; flex-shrink:0; }
.toast-success .toast-icon::before { content:'✓'; color:var(--success); }
.toast-error   .toast-icon::before { content:'✕'; color:var(--danger); }
.toast-info    .toast-icon::before { content:'ℹ'; color:var(--info); }

/* ══════════════════════════════════
   PROFILE
══════════════════════════════════ */
.profile-layout {
  display:grid;
  grid-template-columns:300px 1fr;
  gap:24px;
  align-items:start;
}
.profile-sidebar {
  display:flex; flex-direction:column; gap:12px;
}
.profile-card {
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:24px;
  text-align:center;
}
.profile-avatar {
  width:72px; height:72px;
  border-radius:50%;
  background:linear-gradient(135deg,var(--primary),var(--primary-light));
  color:#fff;
  font-size:1.8rem; font-weight:700;
  display:flex; align-items:center; justify-content:center;
  margin:0 auto 12px;
}
.profile-name { font-weight:700; font-size:1.1rem; }
.profile-username { color:var(--text-muted); font-size:.85rem; margin-bottom:16px; }
.profile-stats { display:flex; gap:20px; justify-content:center; }
.profile-stat { text-align:center; }
.profile-stat-num { font-weight:700; font-size:1.1rem; color:var(--primary); }
.profile-stat-label { font-size:.75rem; color:var(--text-muted); }

/* Listing list items */
.listings-list { display:flex; flex-direction:column; gap:12px; }
.listing-list-item {
  display:flex; gap:14px; align-items:flex-start;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:14px;
  transition:var(--transition);
}
.listing-list-item:hover { border-color:var(--primary-light); box-shadow:var(--shadow); }
.list-item-img {
  width:80px; height:60px;
  flex-shrink:0;
  border-radius:8px;
  overflow:hidden;
  background:var(--surface2);
}
.list-item-img img { width:100%; height:100%; object-fit:cover; }
.list-item-info { flex:1; min-width:0; }
.list-item-title { font-weight:600; font-size:.9rem; color:var(--text); margin-bottom:4px; }
.list-item-price { font-weight:700; color:var(--primary); font-size:.9rem; }
.list-item-meta { display:flex; align-items:center; gap:8px; margin-top:4px; flex-wrap:wrap; }

/* ══════════════════════════════════
   MESSAGES
══════════════════════════════════ */
.tabs {
  display:flex; gap:0;
  border-bottom:2px solid var(--border);
  margin-bottom:24px;
}
.tab-link {
  padding:10px 18px;
  font-size:.875rem;
  font-weight:500;
  color:var(--text-muted);
  border-bottom:2px solid transparent;
  margin-bottom:-2px;
  transition:var(--transition);
  cursor:pointer;
  text-decoration:none;
  display:flex; align-items:center; gap:6px;
}
.tab-link:hover { color:var(--text); }
.tab-link.active { color:var(--primary); border-bottom-color:var(--primary); font-weight:600; }

.message-card {
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:18px;
  margin-bottom:12px;
  transition:var(--transition);
  border-left:3px solid transparent;
}
.message-card:hover { box-shadow:var(--shadow); }
.message-card.unread { border-left-color:var(--primary); background:rgba(var(--primary-rgb),.03); }
.msg-header { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:8px; }
.msg-header h3 { font-size:.9rem; font-weight:600; }
.msg-time { font-size:.78rem; color:var(--text-muted); }
.msg-preview { font-size:.85rem; color:var(--text-muted); line-height:1.5; }
.msg-listing { font-size:.78rem; color:var(--primary); margin-bottom:6px; }

.conversation { display:flex; flex-direction:column; gap:16px; }
.msg-bubble { max-width:72%; }
.msg-bubble.sent { align-self:flex-end; }
.msg-bubble.received { align-self:flex-start; }
.msg-bubble-body {
  padding:12px 16px;
  border-radius:var(--radius-lg);
  font-size:.9rem;
  line-height:1.6;
}
.msg-bubble.sent .msg-bubble-body { background:var(--primary); color:#fff; border-bottom-right-radius:4px; }
.msg-bubble.received .msg-bubble-body { background:var(--surface2); border:1px solid var(--border); border-bottom-left-radius:4px; }
.msg-bubble-meta { font-size:.72rem; color:var(--text-muted); margin-top:4px; padding:0 4px; }
.msg-bubble.sent .msg-bubble-meta { text-align:right; }
.msg-reply-box { margin-top:24px; }
.msg-reply-box textarea { min-height:80px; }

/* ══════════════════════════════════
   STATIC PAGES
══════════════════════════════════ */
.static-page { max-width:760px; }
.static-page h1 { font-size:1.8rem; font-weight:800; margin-bottom:6px; }
.page-subtitle { color:var(--text-muted); margin-bottom:30px; font-size:.9rem; }
.static-page h2 { font-size:1.05rem; font-weight:700; margin:28px 0 10px; color:var(--primary); }
.static-page p, .static-page li { line-height:1.8; color:var(--text); font-size:.95rem; margin-bottom:8px; }
.static-page ul { margin-left:20px; list-style:disc; }

/* How It Works */
.hiw-steps {
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(220px, 1fr));
  gap:20px;
  margin:32px 0;
}
.hiw-step {
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:28px 20px;
  text-align:center;
  transition:var(--transition);
}
.hiw-step:hover { transform:translateY(-4px); box-shadow:var(--shadow-md); border-color:var(--primary-light); }
.hiw-step-icon { font-size:2.5rem; margin-bottom:14px; }
.hiw-step h3 { font-size:1rem; font-weight:700; color:var(--primary); margin-bottom:8px; }
.hiw-step p { font-size:.875rem; color:var(--text-muted); line-height:1.7; }

/* Contact */
.contact-grid { display:grid; grid-template-columns:1fr 300px; gap:28px; align-items:start; }
.contact-form-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); padding:28px; }
.contact-info-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); padding:24px; }
.contact-info-item { display:flex; gap:12px; margin-bottom:16px; font-size:.9rem; align-items:flex-start; }
.contact-info-icon { font-size:1.2rem; flex-shrink:0; margin-top:2px; }

/* ══════════════════════════════════
   FOOTER
══════════════════════════════════ */
footer {
  background:var(--text);
  color:#94a3b8;
  padding:50px 0 24px;
  margin-top:auto;
}
.footer-grid {
  display:grid;
  grid-template-columns:1.5fr 1fr 1fr 1fr;
  gap:40px;
  margin-bottom:40px;
}
.footer-brand .logo { font-size:1.4rem; margin-bottom:10px; display:block; }
.footer-brand p { font-size:.875rem; line-height:1.7; }
.footer-col h4 { font-size:.85rem; font-weight:700; color:#f1f5f9; margin-bottom:12px; letter-spacing:.3px; text-transform:uppercase; }
.footer-col li { margin-bottom:8px; }
.footer-col a { color:#94a3b8; font-size:.875rem; transition:color var(--transition); }
.footer-col a:hover { color:#fff; text-decoration:none; }
.footer-bottom {
  padding-top:24px;
  border-top:1px solid rgba(255,255,255,.08);
  display:flex; justify-content:space-between; align-items:center;
  flex-wrap:wrap; gap:12px;
  font-size:.8rem;
}
.footer-links { display:flex; gap:20px; }
.footer-links a { color:#64748b; }
.footer-links a:hover { color:#94a3b8; }

/* ══════════════════════════════════
   EMPTY STATE
══════════════════════════════════ */
.empty-state {
  text-align:center;
  padding:64px 20px;
  color:var(--text-muted);
}
.empty-state-icon { font-size:3rem; margin-bottom:16px; opacity:.4; }
.empty-state h3 { font-size:1.1rem; font-weight:600; color:var(--text); margin-bottom:8px; }
.empty-state p { font-size:.9rem; margin-bottom:24px; max-width:360px; margin-left:auto; margin-right:auto; }

/* ══════════════════════════════════
   BADGES / CHIPS
══════════════════════════════════ */
.badge { padding:2px 8px; border-radius:6px; font-size:.72rem; font-weight:600; display:inline-flex; align-items:center; }
.badge-success { background:#dcfce7; color:#166534; }
.badge-danger  { background:#fee2e2; color:#991b1b; }
.badge-primary { background:#ede9fe; color:#4c1d95; }
.badge-warning { background:#fef9c3; color:#854d0e; }
.badge-muted   { background:var(--surface2); color:var(--text-muted); border:1px solid var(--border); }
.badge-count   { background:var(--danger); color:#fff; border-radius:20px; padding:0 6px; font-size:.7rem; min-width:18px; text-align:center; }

/* ══════════════════════════════════
   UTILITY
══════════════════════════════════ */
.text-center { text-align:center; }
.text-right  { text-align:right; }
.text-muted  { color:var(--text-muted); }
.text-primary{ color:var(--primary); }
.text-success{ color:var(--success); }
.text-danger { color:var(--danger); }
.font-bold   { font-weight:700; }
.font-medium { font-weight:500; }
.mt-4  { margin-top:4px; }
.mt-8  { margin-top:8px; }
.mt-12 { margin-top:12px; }
.mt-16 { margin-top:16px; }
.mt-20 { margin-top:20px; }
.mt-32 { margin-top:32px; }
.mt-40 { margin-top:40px; }
.mb-8  { margin-bottom:8px; }
.mb-16 { margin-bottom:16px; }
.mb-24 { margin-bottom:24px; }
.gap-8 { gap:8px; }
.flex  { display:flex; }
.items-center { align-items:center; }
.justify-between { justify-content:space-between; }
.flex-wrap { flex-wrap:wrap; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }

/* Skeleton loader */
.skeleton {
  background:linear-gradient(90deg, var(--surface2) 25%, var(--border) 50%, var(--surface2) 75%);
  background-size:200% 100%;
  animation:shimmer 1.5s infinite;
  border-radius:var(--radius);
}
@keyframes shimmer { to { background-position:-200% 0; } }

/* Scroll reveal */
.reveal { opacity:0; transform:translateY(20px); transition:opacity .5s ease, transform .5s ease; }
.reveal.visible { opacity:1; transform:translateY(0); }

/* ══════════════════════════════════
   RESPONSIVE
══════════════════════════════════ */
@media (max-width:1100px) {
  .listing-detail-layout { grid-template-columns:1fr; }
  .listing-gallery { position:static; }
  .listing-info-card { position:static; }
  .footer-grid { grid-template-columns:1fr 1fr; }
}
@media (max-width:900px) {
  .categories-grid { grid-template-columns:repeat(4, 1fr); }
  .listings-layout { grid-template-columns:1fr; }
  .sidebar { position:static; }
  .create-listing-layout { grid-template-columns:1fr; }
  .profile-layout { grid-template-columns:1fr; }
  .contact-grid { grid-template-columns:1fr; }
  .footer-grid { grid-template-columns:1fr 1fr 1fr; }
}
@media (max-width:768px) {
  .hero { padding:50px 0 70px; }
  .hero h1 { font-size:1.7rem; }
  .hero-stats { gap:24px; }
  .header-search { display:none; }
  .main-nav { display:none; }
  .mobile-menu-btn { display:flex; }
  .categories-grid { grid-template-columns:repeat(2, 1fr); }
  .listings-grid { grid-template-columns:repeat(2, 1fr); }
  .form-row { grid-template-columns:1fr; }
  .footer-grid { grid-template-columns:1fr 1fr; }
  .hiw-steps { grid-template-columns:1fr 1fr; }
}
@media (max-width:480px) {
  .hero h1 { font-size:1.4rem; }
  .hero-search { flex-direction:column; }
  .hero-stats { gap:16px; }
  .hero-stat-num { font-size:1.3rem; }
  .listings-grid { grid-template-columns:1fr; }
  .categories-grid { grid-template-columns:repeat(2, 1fr); }
  .auth-card { padding:24px 18px; margin:20px auto; }
  .footer-grid { grid-template-columns:1fr; }
  .hiw-steps { grid-template-columns:1fr; }
  .footer-bottom { flex-direction:column; text-align:center; }
}

/* Mobile nav overlay */
.mobile-nav {
  display:none;
  position:fixed; inset:0;
  background:var(--surface);
  z-index:500;
  padding:20px;
  flex-direction:column;
  gap:4px;
  animation:slideInLeft .25s ease;
}
.mobile-nav.open { display:flex; }
@keyframes slideInLeft { from { transform:translateX(-100%); } }
.mobile-nav-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:20px; }
.mobile-nav a {
  padding:12px 16px;
  border-radius:var(--radius);
  font-size:1rem;
  font-weight:500;
  color:var(--text);
  display:block;
}
.mobile-nav a:hover { background:var(--surface2); text-decoration:none; }

/* Lightbox */
.lightbox {
  display:none;
  position:fixed; inset:0;
  background:rgba(0,0,0,.95);
  z-index:1000;
  align-items:center; justify-content:center;
}
.lightbox.open { display:flex; }
.lightbox img { max-width:90vw; max-height:90vh; object-fit:contain; border-radius:8px; }
.lightbox-close {
  position:absolute; top:20px; right:20px;
  background:rgba(255,255,255,.1); border:none; color:#fff;
  width:40px; height:40px; border-radius:50%;
  font-size:1.2rem; cursor:pointer; display:flex; align-items:center; justify-content:center;
}

/* ═══════════════════════════════════════════
   NEW COMPONENTS (added in redesign)
═══════════════════════════════════════════ */

/* ── main > container fix ── */
main { flex:1; }
.container { width:100%; max-width:1240px; margin:0 auto; padding:0 20px; }

/* ── Nav / Header fixes ── */
.user-menu-wrap { position:relative; }
.user-avatar-btn {
  width:36px; height:36px; border-radius:50%;
  background:linear-gradient(135deg,var(--primary),var(--primary-light));
  color:#fff; font-weight:700; font-size:.85rem;
  border:none; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
}
.user-dropdown { display:none; position:absolute; top:calc(100% + 8px); right:0;
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius-lg); box-shadow:var(--shadow-lg);
  min-width:200px; padding:6px; z-index:300; }
.user-dropdown.open { display:block; animation:dropIn .18s ease; }
.user-dropdown a { display:flex; align-items:center; gap:8px; padding:9px 12px;
  border-radius:8px; color:var(--text); font-size:.875rem; }
.user-dropdown a:hover { background:var(--surface2); }
.user-dropdown hr { border:none; border-top:1px solid var(--border); margin:4px 0; }
.lang-switch { display:flex; gap:4px; }
.lang-switch a { padding:4px 9px; border-radius:6px; font-size:.75rem; font-weight:600;
  background:var(--surface2); color:var(--text-muted); border:1px solid var(--border); }
.lang-switch a.active { background:var(--primary); color:#fff; border-color:var(--primary); }
.theme-toggle { width:36px; height:36px; border-radius:50%; background:var(--surface2);
  border:1px solid var(--border); color:var(--text-muted); cursor:pointer;
  display:flex; align-items:center; justify-content:center; transition:var(--transition); }
.theme-toggle:hover { background:var(--border); color:var(--text); }
.mobile-menu-btn { display:none; flex-direction:column; gap:5px; background:none; border:none;
  padding:8px; cursor:pointer; }
.mobile-menu-btn span { display:block; width:22px; height:2px; background:var(--text);
  border-radius:2px; transition:var(--transition); }
.hide-mobile { }

/* ── Hero stats ── */
.hero-stats { display:flex; justify-content:center; gap:40px; margin-top:36px;
  padding-top:28px; border-top:1px solid rgba(255,255,255,.15); flex-wrap:wrap; }
.stat { text-align:center; color:#fff; }
.stat strong { display:block; font-size:1.8rem; font-weight:800; }
.stat { font-size:.85rem; opacity:.75; }

/* ── Card image link ── */
.card-image-link { display:block; position:relative; overflow:hidden; aspect-ratio:4/3; background:var(--surface2); }
.card-image-link img { width:100%; height:100%; object-fit:cover; transition:transform .35s ease; display:block; }
.listing-card:hover .card-image-link img { transform:scale(1.05); }
.card-image-link .no-image { width:100%; height:100%; display:flex; align-items:center; justify-content:center; flex-direction:column; color:var(--text-light); font-size:2rem; }
.card-image-link .badge { position:absolute; top:10px; left:10px; padding:3px 8px; border-radius:6px; font-size:.7rem; font-weight:700; }
.badge-new { background:#10b981; color:#fff; }
.badge-top { background:#f59e0b; color:#fff; }
.card-image-link .fav-btn { position:absolute; top:10px; right:10px; }

/* ── Card price ── */
.card-price { font-size:1.1rem; font-weight:800; color:var(--primary); margin-bottom:6px; display:flex; align-items:center; gap:6px; }
.card-price small { font-size:.7rem; font-weight:500; color:var(--text-muted); }
.price-free { color:var(--success); }

/* ── Card meta ── */
.card-meta { display:flex; gap:8px; flex-wrap:wrap; color:var(--text-muted); font-size:.78rem; margin-top:8px; }
.meta-location { display:flex; align-items:center; gap:3px; }
.meta-cat { background:var(--surface2); border:1px solid var(--border); border-radius:4px; padding:1px 6px; }

/* ── Section alt ── */
.section-alt { background:var(--surface2); }

/* ── HIW section on homepage ── */
.hiw-section { background:linear-gradient(135deg,var(--primary-dark),var(--primary)); color:#fff; }
.hiw-section .section-title { color:#fff; }
.hiw-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:24px; margin-top:40px; }
.hiw-step { text-align:center; }
.hiw-icon { font-size:2.5rem; margin-bottom:16px; }
.hiw-step h3 { font-size:1rem; font-weight:700; color:#fff; margin-bottom:8px; }
.hiw-step p { font-size:.875rem; opacity:.85; }

/* ── HIW page ── */
.hiw-steps-large { display:flex; flex-direction:column; gap:28px; max-width:700px; margin:48px auto; }
.hiw-step-large { display:flex; align-items:flex-start; gap:20px; }
.hiw-step-num { width:52px; height:52px; min-width:52px; border-radius:50%;
  background:var(--primary); color:#fff; font-size:1.4rem; font-weight:800;
  display:flex; align-items:center; justify-content:center; }
.hiw-step-body h3 { font-size:1.15rem; font-weight:700; margin-bottom:6px; }
.hiw-step-body p { color:var(--text-muted); }

/* ── Category hero ── */
.category-hero { display:flex; align-items:center; gap:20px; padding:32px 28px;
  border-radius:var(--radius-xl); color:#fff; margin-bottom:32px; }
.cat-hero-icon { font-size:3rem; }
.category-hero h1 { font-size:1.8rem; font-weight:800; margin-bottom:4px; }
.category-hero p { opacity:.85; }

/* ── Filter sidebar ── */
.filter-sidebar { }
.filter-card { background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius-lg); padding:20px; position:sticky; top:80px; }
.filter-title { font-weight:700; font-size:1rem; margin-bottom:18px; }
.sort-links { display:flex; flex-direction:column; gap:4px; }
.sort-link { padding:8px 12px; border-radius:8px; font-size:.875rem; color:var(--text-muted); transition:var(--transition); }
.sort-link.active, .sort-link:hover { background:var(--primary); color:#fff; }

/* ── Listings header bar ── */
.listings-header-bar { display:flex; justify-content:space-between; align-items:center; margin-bottom:20px; flex-wrap:wrap; gap:12px; }
.listings-page-title { font-size:1.4rem; font-weight:800; }
.results-count { color:var(--text-muted); font-size:.875rem; }
.price-range-row { display:flex; align-items:center; gap:8px; }

/* ── Auth ── */
.auth-wrap { min-height:80vh; display:flex; align-items:center; justify-content:center; padding:40px 20px; }
.auth-card { width:100%; max-width:440px; padding:40px; }
.auth-logo { text-align:center; margin-bottom:24px; }
.auth-title { font-size:1.5rem; font-weight:800; text-align:center; margin-bottom:28px; }
.auth-form { display:flex; flex-direction:column; gap:16px; }
.auth-links { text-align:center; margin-top:20px; font-size:.875rem; color:var(--text-muted); }
.auth-links a { color:var(--primary); font-weight:600; }

/* ── Listing detail wrap ── */
.listing-detail-wrap { padding-bottom:60px; }
.listing-detail-grid { display:grid; grid-template-columns:1fr 380px; gap:30px; align-items:start; margin-bottom:40px; }

/* Gallery */
.gallery-main { border-radius:var(--radius-lg); overflow:hidden; aspect-ratio:4/3;
  background:var(--surface2); margin-bottom:10px; position:relative; cursor:zoom-in; }
.gallery-main img { width:100%; height:100%; object-fit:cover; transition:transform .35s ease; display:block; }
.gallery-main:hover img { transform:scale(1.03); }
.gallery-thumbs { display:flex; gap:8px; overflow-x:auto; padding-bottom:4px; }
.gallery-thumb { flex-shrink:0; width:70px; height:52px; border-radius:8px;
  object-fit:cover; border:2px solid transparent; cursor:pointer; transition:var(--transition); }
.gallery-thumb.active { border-color:var(--primary); }
.no-image-large { width:100%; aspect-ratio:4/3; background:var(--surface2);
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  color:var(--text-light); border-radius:var(--radius-lg); font-size:3rem; gap:12px; }
.fav-btn-large { top:12px!important; right:12px!important; width:40px!important; height:40px!important; font-size:1.2rem!important; }

/* Listing info panel */
.listing-detail-title { font-size:1.5rem; font-weight:800; margin:8px 0 16px; line-height:1.3; }
.listing-price-box { margin-bottom:16px; }
.price-hero { font-size:2rem; font-weight:800; color:var(--primary); }
.price-type-label { display:block; font-size:.85rem; color:var(--text-muted); margin-top:2px; }
.listing-tags { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px; }
.tag { padding:5px 12px; border-radius:20px; font-size:.8rem; font-weight:600; }
.tag-condition { background:var(--surface2); border:1px solid var(--border); }
.tag-category  { background:rgba(var(--primary-rgb),.1); color:var(--primary); border:1px solid rgba(var(--primary-rgb),.2); }
.tag-shipping  { background:#dcfce7; color:#166534; border:1px solid #bbf7d0; }
.tag-pickup    { background:#fef9c3; color:#854d0e; border:1px solid #fde68a; }
.listing-meta-list { list-style:none; margin-bottom:20px; display:flex; flex-direction:column; gap:8px; font-size:.875rem; }
.listing-meta-list li { display:flex; gap:8px; }
.meta-label { font-weight:600; }
.listing-actions-row { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:20px; }
.fav-btn-text { background:none; border:1.5px solid var(--border); color:var(--text-muted);
  padding:8px 16px; border-radius:var(--radius); cursor:pointer; font-size:.875rem;
  font-weight:600; transition:var(--transition); display:flex; align-items:center; gap:6px; }
.fav-btn-text:hover, .fav-btn-text.active { border-color:var(--danger); color:var(--danger); background:rgba(239,68,68,.05); }

/* Contact box */
.contact-box { background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius-lg); padding:20px; margin-bottom:16px; }
.contact-box h3 { font-size:1rem; font-weight:700; margin-bottom:14px; }
.contact-box-login, .contact-box-owner { text-align:center; padding:20px; }
.contact-box-login p { color:var(--text-muted); margin-bottom:12px; }
.seller-card { display:flex; align-items:center; gap:12px; padding:16px;
  background:var(--surface2); border-radius:var(--radius-lg); border:1px solid var(--border); }
.seller-avatar { width:44px; height:44px; border-radius:50%;
  background:linear-gradient(135deg,var(--primary),var(--primary-light));
  color:#fff; font-weight:700; font-size:1.1rem;
  display:flex; align-items:center; justify-content:center; }
.seller-details { display:flex; flex-direction:column; gap:2px; }
.seller-details strong { font-size:.9rem; }
.seller-details span { font-size:.8rem; color:var(--text-muted); }
.listing-description-section { background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius-lg); padding:28px; margin-bottom:40px; }
.listing-description-section h2 { font-size:1.1rem; font-weight:700; margin-bottom:14px; }
.description-body { white-space:pre-wrap; line-height:1.8; font-size:.95rem; }
.similar-section { margin-top:40px; }

/* Print dropdown */
.dropdown-wrap { position:relative; }
.dropdown-menu { display:none; position:absolute; top:calc(100%+6px); left:0;
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg);
  box-shadow:var(--shadow-lg); padding:6px; min-width:140px; z-index:200; }
.dropdown-menu.open { display:block; animation:dropIn .15s ease; }
.dropdown-menu a { display:block; padding:8px 14px; border-radius:8px; font-size:.875rem;
  color:var(--text); transition:background var(--transition); }
.dropdown-menu a:hover { background:var(--surface2); }

/* ── Messages ── */
.messages-page { padding-bottom:60px; }
.tabs { display:flex; gap:4px; border-bottom:2px solid var(--border); margin-bottom:28px; }
.tab-btn { padding:10px 18px; border:none; background:none; font-size:.9rem; font-weight:500;
  color:var(--text-muted); cursor:pointer; border-bottom:2px solid transparent; margin-bottom:-2px;
  transition:var(--transition); display:flex; align-items:center; gap:6px; }
.tab-btn.active { color:var(--primary); border-bottom-color:var(--primary); }
.messages-list { display:flex; flex-direction:column; gap:8px; }
.message-card { display:flex; align-items:center; gap:14px; padding:16px 18px;
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg);
  transition:var(--transition); cursor:pointer; text-decoration:none; color:inherit; }
.message-card:hover { border-color:var(--primary-light); box-shadow:var(--shadow); }
.message-card.unread { border-left:3px solid var(--primary); }
.message-avatar { width:44px; height:44px; min-width:44px; border-radius:50%;
  background:linear-gradient(135deg,var(--primary),var(--primary-light));
  color:#fff; font-weight:700; display:flex; align-items:center; justify-content:center; }
.message-body-preview { flex:1; min-width:0; }
.message-row { display:flex; justify-content:space-between; align-items:center; margin-bottom:3px; }
.message-listing-title { font-size:.8rem; color:var(--text-muted); margin-bottom:3px; }
.message-preview { font-size:.875rem; color:var(--text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.unread-dot { width:10px; height:10px; border-radius:50%; background:var(--primary); flex-shrink:0; }

/* ── Conversation / Chat ── */
.conversation-page { padding-bottom:60px; }
.conversation-thread { display:flex; flex-direction:column; gap:16px; margin-bottom:32px; }
.chat-bubble { max-width:75%; }
.chat-sent { align-self:flex-end; }
.chat-received { align-self:flex-start; }
.chat-meta { display:flex; align-items:center; gap:8px; font-size:.78rem; color:var(--text-muted); margin-bottom:4px; }
.chat-sent .chat-meta { flex-direction:row-reverse; }
.chat-text { padding:12px 16px; border-radius:16px; line-height:1.6; font-size:.9rem; }
.chat-sent .chat-text { background:var(--primary); color:#fff; border-radius:16px 4px 16px 16px; }
.chat-received .chat-text { background:var(--surface); border:1px solid var(--border); border-radius:4px 16px 16px 16px; }
.reply-box { padding:24px; }
.reply-box h3 { font-size:1rem; font-weight:700; margin-bottom:14px; }

/* ── Profile ── */
.profile-page { padding-bottom:60px; }
.profile-header-card { display:flex; align-items:center; gap:20px; padding:28px; margin-bottom:24px; flex-wrap:wrap; }
.profile-avatar { width:72px; height:72px; border-radius:50%;
  background:linear-gradient(135deg,var(--primary),var(--primary-light));
  color:#fff; font-size:1.8rem; font-weight:800;
  display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.profile-info { flex:1; }
.profile-info h1 { font-size:1.4rem; font-weight:800; margin-bottom:4px; }
.profile-stats { display:flex; gap:24px; margin-left:auto; }
.stat-item { text-align:center; }
.stat-item strong { display:block; font-size:1.4rem; font-weight:800; color:var(--primary); }
.stat-item span { font-size:.8rem; color:var(--text-muted); }
.profile-grid { display:grid; grid-template-columns:380px 1fr; gap:24px; align-items:start; }
.card-heading { font-size:1.1rem; font-weight:700; margin-bottom:20px; }
.card-heading-row { display:flex; justify-content:space-between; align-items:center; margin-bottom:20px; }
.my-listings-list { display:flex; flex-direction:column; gap:10px; }
.my-listing-item { display:flex; align-items:center; gap:12px; padding:10px;
  background:var(--surface2); border-radius:var(--radius); }
.my-listing-thumb { width:56px; height:42px; object-fit:cover; border-radius:6px; }
.no-image-sm { width:56px; height:42px; background:var(--border); border-radius:6px;
  display:flex; align-items:center; justify-content:center; font-size:1.2rem; }
.my-listing-info { flex:1; display:flex; flex-direction:column; gap:3px; }
.my-listing-info a { font-size:.875rem; font-weight:600; color:var(--text); }
.price-tag { font-size:.8rem; color:var(--primary); font-weight:700; }
.status-badge { font-size:.7rem; padding:2px 7px; border-radius:4px; font-weight:600; }
.status-success { background:#dcfce7; color:#166534; }
.status-muted { background:var(--surface2); color:var(--text-muted); border:1px solid var(--border); }
.my-listing-actions { flex-shrink:0; }
.empty-state-small { text-align:center; padding:30px 20px; color:var(--text-muted); }

/* ── Contact page ── */
.contact-page { padding-bottom:60px; }
.contact-grid { display:grid; grid-template-columns:1fr 280px; gap:24px; align-items:start; }
.contact-form-card { padding:32px; }
.contact-info-card { padding:24px; }
.contact-list { list-style:none; display:flex; flex-direction:column; gap:10px; font-size:.9rem; }

/* ── Create listing ── */
.create-listing-page { padding-bottom:60px; max-width:800px; }
.form-card { padding:32px; }
.form-section { margin-bottom:28px; padding-bottom:28px; border-bottom:1px solid var(--border); }
.form-section:last-child { border-bottom:none; }
.form-section-title { font-size:1rem; font-weight:700; margin-bottom:18px; }
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.form-actions { display:flex; gap:12px; flex-wrap:wrap; padding-top:8px; }
.checkbox-label { display:flex; align-items:center; gap:10px; cursor:pointer; font-size:.9rem; }
.checkbox-label input[type=checkbox] { accent-color:var(--primary); width:16px; height:16px; }
.form-group-checkbox { display:flex; align-items:flex-end; padding-bottom:4px; }
.file-upload-area { border:2px dashed var(--border); border-radius:var(--radius-lg);
  padding:32px; text-align:center; cursor:pointer; transition:var(--transition); }
.file-upload-area:hover { border-color:var(--primary); background:rgba(var(--primary-rgb),.03); }
.file-input { display:none; }
.file-upload-label { cursor:pointer; display:flex; flex-direction:column; align-items:center; gap:8px; }
.upload-icon { font-size:2rem; }
.image-preview-grid { display:flex; gap:10px; flex-wrap:wrap; margin-top:12px; }
.preview-thumb { width:80px; height:60px; border-radius:8px; overflow:hidden; border:2px solid var(--border); }
.preview-thumb img { width:100%; height:100%; object-fit:cover; }
.existing-images { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:16px; }
.existing-img-item { position:relative; }
.existing-img-item img { width:80px; height:60px; object-fit:cover; border-radius:8px; }
.delete-img-label { font-size:.72rem; color:var(--danger); cursor:pointer; display:flex; align-items:center; gap:3px; }

/* ── Scroll reveal ── */
.reveal { opacity:0; transform:translateY(20px); transition:opacity .5s ease, transform .5s ease; }
.reveal.revealed { opacity:1; transform:translateY(0); }

/* ── Pagination ── */
.pagination { display:flex; gap:4px; justify-content:center; margin-top:32px; flex-wrap:wrap; }

/* ── Empty state ── */
.empty-state { text-align:center; padding:60px 20px; }
.empty-icon { font-size:3rem; margin-bottom:16px; }
.empty-state h3 { font-size:1.2rem; font-weight:700; margin-bottom:8px; }
.empty-state p { color:var(--text-muted); margin-bottom:20px; }

/* ── Toast ── */
.toast { position:fixed; bottom:24px; right:24px; background:var(--text); color:var(--surface);
  padding:12px 20px; border-radius:var(--radius-lg); font-size:.875rem; font-weight:500;
  box-shadow:var(--shadow-lg); z-index:9999; opacity:0; transform:translateY(20px);
  transition:opacity .3s ease, transform .3s ease; pointer-events:none; max-width:320px; }
.toast.show { opacity:1; transform:translateY(0); }
.toast-success { background:var(--success); }
.toast-error   { background:var(--danger); }

/* ── Lightbox ── */
.lb-close,.lb-prev,.lb-next { position:absolute; background:rgba(255,255,255,.15);
  backdrop-filter:blur(4px); border:none; color:#fff; cursor:pointer;
  border-radius:50%; display:flex; align-items:center; justify-content:center;
  font-size:1.4rem; transition:var(--transition); }
.lb-close { top:20px; right:20px; width:40px; height:40px; }
.lb-prev,.lb-next { top:50%; transform:translateY(-50%); width:48px; height:48px; }
.lb-prev { left:20px; }
.lb-next { right:20px; }
.lb-close:hover,.lb-prev:hover,.lb-next:hover { background:rgba(255,255,255,.3); }

/* ── Alerts ── */
.alert { padding:12px 18px; border-radius:var(--radius); font-size:.875rem; margin-bottom:16px; }
.alert-error { background:#fee2e2; color:#991b1b; border:1px solid #fecaca; }
.alert-success { background:#dcfce7; color:#166534; border:1px solid #bbf7d0; }
.alert-auto { transition:opacity .4s ease; }

/* ── Forms ── */
.form-group { display:flex; flex-direction:column; gap:6px; margin-bottom:16px; }
.form-group:last-child { margin-bottom:0; }
.form-group label { font-size:.875rem; font-weight:500; color:var(--text); }
.form-control {
  width:100%; padding:10px 14px;
  border:1.5px solid var(--border);
  border-radius:var(--radius);
  background:var(--surface);
  color:var(--text);
  font-size:.9rem;
  transition:border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus { outline:none; border-color:var(--primary); box-shadow:0 0 0 3px rgba(var(--primary-rgb),.12); }
textarea.form-control { resize:vertical; min-height:100px; }
select.form-control { cursor:pointer; }

/* ── Card ── */
.card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); }
.card + .card { margin-top:0; }

/* ── Footer ── */
.site-footer { background:var(--text); color:rgba(255,255,255,.85); padding:60px 0 0; }
.footer-grid { display:grid; grid-template-columns:2fr 1fr 1fr 1fr; gap:40px; padding-bottom:48px; }
.footer-brand .logo { color:#fff; font-size:1.3rem; display:inline-block; margin-bottom:12px; }
.footer-brand .logo span { color:var(--primary-light); }
.footer-brand p { font-size:.875rem; opacity:.7; line-height:1.7; }
.footer-social { display:flex; gap:12px; margin-top:16px; }
.footer-social a { color:rgba(255,255,255,.6); transition:color var(--transition); }
.footer-social a:hover { color:#fff; }
.footer-col h4 { font-size:.85rem; font-weight:700; text-transform:uppercase; letter-spacing:.5px; color:#fff; margin-bottom:14px; }
.footer-col ul { display:flex; flex-direction:column; gap:8px; }
.footer-col ul a { color:rgba(255,255,255,.65); font-size:.875rem; transition:color var(--transition); }
.footer-col ul a:hover { color:#fff; }
.footer-bottom { border-top:1px solid rgba(255,255,255,.1); padding:20px 0;
  display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px;
  font-size:.8rem; color:rgba(255,255,255,.5); }
.footer-bottom-links { display:flex; gap:16px; }
.footer-bottom-links a { color:rgba(255,255,255,.5); }
.footer-bottom-links a:hover { color:#fff; }

/* ── Page header ── */
.page-header { display:flex; align-items:center; gap:16px; margin-bottom:28px; flex-wrap:wrap; }
.page-header h1 { font-size:1.6rem; font-weight:800; }
.page-header p { color:var(--text-muted); }

/* ── Misc ── */
.text-center { text-align:center; }
.text-muted { color:var(--text-muted); }
.mt-8 { margin-top:8px; }
.mt-16 { margin-top:16px; }
.mt-20 { margin-top:20px; }
.mt-40 { margin-top:40px; }
.mb-20 { margin-bottom:20px; }
.w-full { width:100%; }
.badge { background:var(--danger); color:#fff; border-radius:10px; padding:1px 7px;
  font-size:.7rem; font-weight:700; }

/* ── btn-xs ── */
.btn-xs { padding:4px 10px; font-size:.75rem; border-radius:6px; }
.btn-warning { background:var(--warning); color:#fff; border-color:var(--warning); }

/* ── Admin CSS additions ── */
.stats-grid-6 { display:grid; grid-template-columns:repeat(6,1fr); gap:16px; margin-bottom:32px; }
.admin-grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:28px; margin-top:28px; }
.admin-section-title { font-size:1rem; font-weight:700; margin-bottom:12px; color:var(--text); }
.admin-page-title { font-size:1.5rem; font-weight:800; margin-bottom:24px; }
.admin-table-wrap { overflow-x:auto; border-radius:var(--radius-lg); border:1px solid var(--border); }
.admin-table { width:100%; border-collapse:collapse; font-size:.875rem; }
.admin-table th { background:var(--surface2); padding:10px 14px; text-align:left; font-size:.78rem; font-weight:600; text-transform:uppercase; letter-spacing:.4px; color:var(--text-muted); border-bottom:1px solid var(--border); }
.admin-table td { padding:10px 14px; border-bottom:1px solid var(--border); vertical-align:middle; }
.admin-table tr:last-child td { border-bottom:none; }
.admin-table tr:hover td { background:var(--surface2); }
.badge-status { padding:3px 9px; border-radius:5px; font-size:.72rem; font-weight:700; }
.badge-status.active { background:#dcfce7; color:#166534; }
.badge-status.inactive { background:#fee2e2; color:#991b1b; }
.stat-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg);
  padding:18px; display:flex; align-items:center; gap:14px; }
.stat-icon { font-size:1.8rem; }
.stat-body { display:flex; flex-direction:column; }
.stat-num { font-size:1.5rem; font-weight:800; }
.stat-blue .stat-num { color:#3b82f6; }
.stat-green .stat-num { color:#10b981; }
.stat-orange .stat-num { color:#f59e0b; }
.stat-purple .stat-num { color:#8b5cf6; }
.stat-teal .stat-num { color:#06b6d4; }
.stat-red .stat-num { color:#ef4444; }
.tools-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(320px,1fr)); gap:20px; }
.tool-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); padding:22px; }
.tool-card h3 { font-size:1rem; font-weight:700; margin-bottom:14px; }
.tool-card h4 { font-size:.875rem; font-weight:600; margin-bottom:8px; color:var(--text-muted); }
.info-table { width:100%; border-collapse:collapse; font-size:.82rem; }
.info-table th { text-align:left; padding:5px 8px; color:var(--text-muted); font-weight:500; width:45%; }
.info-table td { padding:5px 8px; font-weight:600; }
.info-table tr:nth-child(even) td,.info-table tr:nth-child(even) th { background:var(--surface2); border-radius:4px; }
.db-stat-row { display:flex; justify-content:space-between; padding:6px 0; border-bottom:1px solid var(--border); font-size:.875rem; }
.db-stat-row:last-child { border-bottom:none; }
.ext-list { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.ext-badge { padding:3px 10px; border-radius:5px; font-size:.75rem; font-weight:600; }
.ext-ok      { background:#dcfce7; color:#166534; }
.ext-missing { background:#fee2e2; color:#991b1b; }
.admin-form.card { padding:28px; max-width:720px; }
.code-block { background:var(--surface2); border:1px solid var(--border); border-radius:8px;
  padding:12px; font-family:monospace; font-size:.78rem; margin-top:10px; white-space:pre-wrap; max-height:200px; overflow-y:auto; }

/* ── Admin sidebar additions ── */
.sidebar-nav a { display:flex; align-items:center; gap:10px; padding:10px 14px;
  border-radius:8px; color:rgba(255,255,255,.75); font-size:.9rem; margin-bottom:2px;
  transition:var(--transition); }
.sidebar-nav a:hover,.sidebar-nav a.active { background:rgba(255,255,255,.1); color:#fff; }
.sidebar-divider { height:1px; background:rgba(255,255,255,.1); margin:8px 14px; }
.admin-topbar { background:var(--surface); border-bottom:1px solid var(--border);
  padding:0 24px; height:52px; display:flex; align-items:center; justify-content:space-between; }
.admin-topbar-title { font-weight:700; font-size:.95rem; }
.admin-topbar-right { font-size:.875rem; color:var(--text-muted); }
.admin-content { flex:1; display:flex; flex-direction:column; overflow:hidden; }
.admin-main { padding:24px; overflow-y:auto; flex:1; }

/* ── Responsive additions ── */
@media (max-width:1100px) {
  .listing-detail-grid { grid-template-columns:1fr; }
  .stats-grid-6 { grid-template-columns:repeat(3,1fr); }
  .admin-grid-2 { grid-template-columns:1fr; }
  .profile-grid { grid-template-columns:1fr; }
  .footer-grid { grid-template-columns:1fr 1fr; }
  .hiw-grid { grid-template-columns:repeat(2,1fr); }
}
@media (max-width:900px) {
  .listings-layout { grid-template-columns:1fr; }
  .filter-sidebar { position:static; }
  .contact-grid { grid-template-columns:1fr; }
}
@media (max-width:768px) {
  .main-nav { display:none; }
  .main-nav.open { display:flex; flex-direction:column; position:fixed; inset:0;
    background:var(--surface); z-index:500; padding:20px; gap:4px; }
  .main-nav.open ul { display:flex; flex-direction:column; }
  .main-nav.open ul li a { display:block; padding:12px 16px; border-radius:var(--radius);
    font-size:1rem; color:var(--text); }
  .mobile-menu-btn { display:flex; }
  .hide-mobile { display:none!important; }
  .stats-grid-6 { grid-template-columns:repeat(2,1fr); }
  .categories-grid { grid-template-columns:repeat(2,1fr); }
  .form-row { grid-template-columns:1fr; }
  .hiw-grid { grid-template-columns:1fr 1fr; }
  .footer-grid { grid-template-columns:1fr; }
  .hero { padding:60px 0 72px; }
  .hero-stats { gap:24px; }
}
@media (max-width:480px) {
  .categories-grid { grid-template-columns:repeat(2,1fr); }
  .hiw-grid { grid-template-columns:1fr; }
  .stats-grid-6 { grid-template-columns:1fr 1fr; }
  .hero h1 { font-size:1.6rem; }
  .hero-search { flex-direction:column; }
}

/* ── Hero search: style the select and override the search button ── */
.hero-search select {
  background:rgba(255,255,255,.15);
  border:1px solid rgba(255,255,255,.2);
  border-radius:var(--radius-lg);
  padding:12px 18px;
  color:#fff;
  font-size:1rem;
  outline:none;
  cursor:pointer;
  flex:0 0 auto;
  min-width:160px;
  appearance:none;
  -webkit-appearance:none;
}
.hero-search select option { background:#1e1b4b; color:#fff; }
.hero-search .btn,
.hero-search button[type=submit] {
  background:#fff !important;
  color:var(--primary) !important;
  border-color:#fff !important;
  flex-shrink:0;
}
.hero-search .btn:hover,
.hero-search button[type=submit]:hover {
  background:rgba(255,255,255,.92) !important;
}

/* ── Main content spacing: pages with .container directly in <main> ── */
main > .container { padding-top:28px; padding-bottom:60px; }

/* ── Section padding so .section doesn't need container on <main> ── */
.section { padding:60px 0; }

/* ── Scroll reveal: also support .visible for backwards compat ── */
.reveal.visible { opacity:1; transform:translateY(0); }

/* ── Category card text fix (h3 and span match the .cat-name / .cat-count logic) ── */
.category-card h3 { font-weight:700; font-size:.95rem; margin-bottom:4px; }
.category-card span { font-size:.8rem; opacity:.8; display:block; }

/* ── HiW section: dark background text override ── */
.hiw-section { background:linear-gradient(135deg,var(--primary-dark),var(--primary)); color:#fff; }
.hiw-section .section-title,.hiw-section h2 { color:#fff; }

/* ── Print view: ensure QR canvas renders properly ── */
#qrcode canvas { display:block !important; }

/* ── Delete button on listing forms ── */
.delete-listing-btn { display:inline-flex; align-items:center; gap:6px; }

/* ── Admin tools: seed button ── */
.btn-seed { background:var(--accent); color:#fff; border-color:var(--accent); }
.btn-seed:hover { background:var(--accent-dark); color:#fff; }
