:root {
  --primary: #1a365d;
  --primary-dark: #0f2440;
  --success: #1a7f4e;
  --whatsapp: #25d366;
  --bg: #f7f8fa;
  --card-bg: #ffffff;
  --border: #e5e7eb;
  --text: #1a202c;
  --text-muted: #6b7280;
  --radius: 12px;
  --danger: #c53030;

  --cat-purple: #7c3aed;
  --cat-blue: #2563eb;
  --cat-green: #16a34a;
  --cat-amber: #d97706;
  --cat-coral: #e05d44;
  --cat-teal: #0d9488;
  --cat-red: #dc2626;
  --cat-pink: #db2777;
  --cat-gray: #6b7280;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Noto Sans Georgian', 'FiraGO', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-bottom: 64px; /* space for bottom nav on mobile */
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 8px;
}
@media (max-width: 767px) {
  .nav-link-desktop { display: none; }
  .header-actions { gap: 8px; }
  .logo { font-size: 17px; }
  .header-actions .btn-sm { padding: 8px 12px; font-size: 13px; white-space: nowrap; }
}
.logo { font-weight: 800; font-size: 20px; color: var(--primary); }
.header-actions { display: flex; gap: 10px; align-items: center; }
.header-actions .nav-link { font-size: 14px; color: var(--text-muted); padding: 8px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-success { background: var(--success); color: #fff; }
.btn-whatsapp { background: var(--whatsapp); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 12px; font-size: 13px; }
.btn-danger { background: var(--danger); color: #fff; }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  padding: 48px 0 40px;
  text-align: center;
}
.hero h1 { font-size: 28px; margin: 0 0 10px; }
.hero p { opacity: .9; margin: 0 0 22px; }
.hero .hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Category chips */
.chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 14px 0;
  -webkit-overflow-scrolling: touch;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Listing grid */
.listing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 16px 0 32px;
}
@media (min-width: 640px) {
  .listing-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 960px) {
  .listing-grid { grid-template-columns: repeat(4, 1fr); }
}

.listing-card {
  background: var(--card-bg);
  border: .5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: block;
  position: relative;
}
.listing-card .thumb-wrap { position: relative; aspect-ratio: 4/3; background: #eee; }
.listing-card .thumb-wrap img { width: 100%; height: 100%; object-fit: cover; }
.test-banner {
  position: absolute; top: 8px; left: 8px;
  background: #f59e0b; color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 3px 8px; border-radius: 6px;
  z-index: 5; letter-spacing: .2px;
}
.listing-card .fav-btn {
  position: absolute; top: 8px; right: 8px;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,.9);
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer; font-size: 15px;
}
.listing-card .fav-btn.active { color: #e11d48; }
.listing-card .body { padding: 10px; }
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  padding: 3px 8px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.badge-purple { background: var(--cat-purple); }
.badge-blue { background: var(--cat-blue); }
.badge-green { background: var(--cat-green); }
.badge-amber { background: var(--cat-amber); }
.badge-coral { background: var(--cat-coral); }
.badge-teal { background: var(--cat-teal); }
.badge-red { background: var(--cat-red); }
.badge-pink { background: var(--cat-pink); }
.badge-gray { background: var(--cat-gray); }

.listing-card .title { font-size: 14px; font-weight: 700; margin: 0 0 6px; line-height: 1.3; }
.listing-card .meta-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.listing-card .price { font-weight: 800; color: var(--primary); }
.listing-card .share { color: var(--text-muted); }
.listing-card .roi { color: var(--success); font-size: 12px; display: flex; align-items: center; gap: 4px; margin-top: 4px; }

/* Filters */
.filters-bar { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0; align-items: center; }
.filters-bar select, .filters-bar input {
  padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; background: #fff;
}
.search-bar { display: flex; gap: 8px; margin: 14px 0; }
.search-bar input { flex: 1; padding: 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; }

/* Detail page */
.detail-page { max-width: 720px; margin: 0 auto; }
.detail-body { padding: 0 16px; }
.gallery { position: relative; aspect-ratio: 4/3; background: #eee; overflow-x: auto; display: flex; scroll-snap-type: x mandatory; }
.gallery img { flex: 0 0 100%; scroll-snap-align: start; object-fit: cover; width: 100%; height: 100%; }
.gallery-dots { display: flex; gap: 6px; justify-content: center; padding: 8px 0; }
.gallery-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--border); }
.gallery-dots span.active { background: var(--primary); }
@media (min-width: 768px) {
  .detail-page { margin: 24px auto; }
  .gallery-wrap, .gallery { border-radius: var(--radius); overflow: hidden; }
}

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.info-block { background: #fff; border: .5px solid var(--border); border-radius: var(--radius); padding: 14px; }
.info-block .label { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.info-block .value { font-size: 18px; font-weight: 800; }
.info-block.roi .value { color: var(--success); }

.seller-card { display: flex; align-items: center; gap: 12px; padding: 14px; background: #fff; border: .5px solid var(--border); border-radius: var(--radius); margin: 16px 0; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }

.sticky-contact {
  position: sticky;
  bottom: 64px;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  gap: 10px;
  z-index: 40;
}
@media (min-width: 768px) {
  .sticky-contact { position: static; border-top: none; padding: 0; margin: 20px 0 40px; }
  body { padding-bottom: 0; }
}

/* Forms */
.form-page { max-width: 560px; margin: 0 auto; padding: 24px 16px 40px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit;
}
.field textarea { min-height: 120px; resize: vertical; }
.field .hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.field .error { font-size: 12px; color: var(--danger); margin-top: 4px; }

.alert { padding: 12px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.alert-success { background: #e6f4ea; color: var(--success); }
.alert-error { background: #fdecea; color: var(--danger); }
.alert-info { background: #e8f0fe; color: var(--primary); }

/* Bottom nav */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #fff; border-top: 1px solid var(--border);
  display: flex; justify-content: space-around;
  padding: 8px 0 max(8px, env(safe-area-inset-bottom));
  z-index: 60;
}
@media (min-width: 768px) { .bottom-nav { display: none; } body { padding-bottom: 0; } }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--text-muted); padding: 4px 8px; }
.bottom-nav a.active { color: var(--primary); }
.bottom-nav .icon { font-size: 20px; }

/* Cards list (dashboard) */
.status-badge { font-size: 11px; padding: 3px 8px; border-radius: 999px; font-weight: 600; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-active { background: #dcfce7; color: #166534; }
.status-archived { background: #e5e7eb; color: #4b5563; }
.status-rejected { background: #fee2e2; color: #991b1b; }

.table-list { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; }
.table-list th, .table-list td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--border); font-size: 14px; }
.table-list th { text-align: right; background: #f3f4f6; font-size: 12px; color: var(--text-muted); }
.table-list td:first-child, .table-list th:first-child { text-align: right; }

.empty-state { text-align: center; padding: 60px 16px; color: var(--text-muted); }

.section-title { font-size: 18px; font-weight: 800; margin: 24px 0 12px; }

.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0; }
.stat-box { background: #fff; border: .5px solid var(--border); border-radius: var(--radius); padding: 14px; text-align: center; }
.stat-box .num { font-size: 22px; font-weight: 800; color: var(--primary); }
.stat-box .lbl { font-size: 12px; color: var(--text-muted); }
