*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: #0a0c0e;
  color: #e8e8e8;
  min-height: 100vh;
}

/* Header & Hero Branding Section */
header {
  background: radial-gradient(circle at top center, #14241b 0%, #0d1210 50%, #0a0c0e 100%);
  border-bottom: 1px solid #1c2720;
  padding: 40px 24px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 20px;
}

header img.logo {
  height: 160px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(57, 230, 110, 0.25));
  mix-blend-mode: screen;
  border-radius: 0;
}

.brand-text {
  text-align: left;
}

.brand-text .sub-title {
  font-size: 1rem;
  letter-spacing: 4px;
  color: #a0a0a0;
  font-weight: 500;
  text-transform: uppercase;
}

.brand-text h1 {
  font-size: 2.2rem;
  font-weight: 900;
  color: #39e66e;
  letter-spacing: 1px;
  text-transform: uppercase;
  line-height: 1.1;
  text-shadow: 0 0 20px rgba(57, 230, 110, 0.2);
}

.brand-text .main-title {
  color: #ffffff;
}

/* Sticky Controls Section */
.controls {
  padding: 14px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  background: rgba(15, 18, 16, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #1a261f;
  position: sticky;
  top: 0;
  z-index: 100;
}

.search-wrap {
  position: relative;
  flex-grow: 1;
  max-width: 320px;
}

.controls input[type="text"] {
  width: 100%;
  background: #141a16;
  border: 1px solid #28382d;
  color: #e8e8e8;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  outline: none;
  transition: all 0.2s ease;
}

.controls input[type="text"]:focus {
  border-color: #39e66e;
  box-shadow: 0 0 8px rgba(57, 230, 110, 0.3);
}

select {
  background: #141a16;
  border: 1px solid #28382d;
  color: #e8e8e8;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

select:focus {
  border-color: #39e66e;
}

.cat-dropdown {
  position: relative;
}

.cat-trigger {
  background: #141a16;
  border: 1px solid #28382d;
  color: #e8e8e8;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.cat-trigger:hover, .cat-dropdown.open .cat-trigger {
  border-color: #39e66e;
}

.cat-arrow { margin-left: 6px; font-size: 0.75rem; }

.cat-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: #141a16;
  border: 1px solid #28382d;
  border-radius: 10px;
  padding: 6px;
  min-width: 200px;
  max-height: 320px;
  overflow-y: auto;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
}

.cat-dropdown.open .cat-menu { display: block; }

.cat-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.82rem;
  color: #88a090;
  cursor: pointer;
  transition: all 0.15s;
}

.cat-option:hover { background: #1e2a20; color: #e8e8e8; }
.cat-option.active { color: #39e66e; }

.cat-check {
  width: 16px;
  font-size: 0.75rem;
  color: #39e66e;
  flex-shrink: 0;
}

.cat-count {
  margin-left: auto;
  opacity: 0.5;
  font-size: 0.75rem;
}

/* Stats Counter */
.stats {
  padding: 14px 24px 0;
  font-size: 0.82rem;
  color: #6b8574;
  font-weight: 500;
}

/* Grid Layout */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
  padding: 16px 24px 40px;
}

/* Cards */
.card {
  background: #111713;
  border: 1px solid #1f2b22;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.card:hover {
  border-color: #39e66e;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 0 10px rgba(57, 230, 110, 0.15);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.card-title {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.4;
  color: #f0f0f0;
  flex: 1;
}

.badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #7a9483;
}

.card-site {
  color: #a0b5a7;
  font-size: 0.78rem;
  font-weight: 500;
}

.card-price {
  font-weight: 700;
  color: #39e66e;
}

/* Progress bar */
.progress-wrap {
  background: #1a241c;
  border-radius: 6px;
  height: 6px;
  overflow: hidden;
  margin-bottom: 4px;
}

.progress-bar {
  height: 100%;
  border-radius: 6px;
  background: #e63946;
  transition: width 0.3s;
}

.progress-bar.low { background: #39e66e; }
.progress-bar.mid { background: #f39c12; }
.progress-bar.high { background: #e63946; }

.sold-label {
  font-size: 0.75rem;
  color: #7a9483;
  font-weight: 500;
}

.closing {
  font-size: 0.78rem;
}
.closing.urgent { color: #e63946; font-weight: 700; }
.closing.soon { color: #f39c12; font-weight: 600; }
.closing.ok { color: #7a9483; }

.loading {
  text-align: center;
  padding: 80px 24px;
  color: #7a9483;
  font-size: 0.95rem;
}

.empty {
  text-align: center;
  padding: 80px 24px;
  color: #7a9483;
  font-size: 0.95rem;
  grid-column: 1 / -1;
}

/* Category badge colours */
.cat-car       { background: #1a354a; color: #5ba3d9; }
.cat-house     { background: #1a3a24; color: #5bd98a; }
.cat-cash      { background: #263816; color: #a8d95b; }
.cat-golf      { background: #18382b; color: #5bd9a8; }
.cat-watch     { background: #3b2814; color: #d9a85b; }
.cat-tech      { background: #191c3d; color: #5b8ad9; }
.cat-tech_phones { background: #211a3d; color: #7b6ad9; }
.cat-house_tech  { background: #162c3b; color: #5bbad9; }
.cat-gaming    { background: #2e173b; color: #a85bd9; }
.cat-holiday   { background: #3b1717; color: #d95b5b; }
.cat-motorbike { background: #3b2414; color: #d9885b; }
.cat-instant   { background: #3b3914; color: #d9d95b; }
.cat-whiskey   { background: #3b1717; color: #d97a5b; }
.cat-home      { background: #163636; color: #5bd9c8; }
.cat-tools     { background: #2f2e14; color: #c8d95b; }
.cat-farm      { background: #1c3616; color: #7ad95b; }
.cat-toys      { background: #3b172a; color: #d95ba8; }
.cat-voucher   { background: #3b171f; color: #d95b7a; }
.cat-bike      { background: #162c3d; color: #5baad9; }
.cat-general   { background: #222c25; color: #9ab0a0; }