:root{
  --bg:#f8f7f5;
  --ink:#1c1c1a;
  --muted:#6f6e6a;
  --line:#dedcd6;
  --accent:#d9622b;
}

*{ box-sizing:border-box; }

html,body{
  margin:0;
  padding:0;
  background:var(--bg);
  color:var(--ink);
  font-family:'Space Mono', monospace;
}

img{ max-width:100%; display:block; }

/* Header */
.site-header{
  position:sticky;
  top:0;
  z-index:20;
  background:var(--bg);
  border-bottom:1px solid var(--ink);
}
.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 20px;
  max-width:1100px;
  margin:0 auto;
}
.logo{
  font-weight:700;
  font-size:18px;
  letter-spacing:1px;
}
.header-controls{
  display:flex;
  gap:8px;
}
.mini-select{
  font-family:'Space Mono', monospace;
  font-weight:700;
  font-size:12px;
  background:#fff;
  border:1px solid var(--ink);
  color:var(--ink);
  padding:6px 8px;
  cursor:pointer;
}
.nav-note{
  text-align:center;
  font-size:11px;
  font-weight:700;
  letter-spacing:0.5px;
  color:var(--muted);
  padding:6px 10px;
  border-top:1px solid var(--line);
}

/* Hero */
.hero{
  text-align:center;
  padding:48px 20px 32px;
  max-width:900px;
  margin:0 auto;
}
.hero-eyebrow{
  font-size:12px;
  font-weight:700;
  letter-spacing:1.5px;
  color:var(--accent);
  margin-bottom:14px;
}
.hero-title{
  font-size:38px;
  line-height:1.15;
  font-weight:700;
  margin:0 0 16px;
  text-transform:uppercase;
}
.hero-title #heroCount{
  color:var(--accent);
}
.hero-copy{
  font-size:14px;
  color:var(--muted);
  line-height:1.6;
  max-width:560px;
  margin:0 auto;
}

/* Search */
.search-section{
  display:flex;
  justify-content:center;
  padding:0 20px 28px;
}
#searchInput{
  width:100%;
  max-width:760px;
  background:#fff;
  border:2px solid var(--ink);
  font-family:'Space Mono', monospace;
  font-size:16px;
  color:var(--ink);
  padding:16px 20px;
  outline:none;
}
#searchInput::placeholder{
  color:var(--muted);
  font-weight:700;
}

/* Browse / categories */
.browse-section{
  padding:0 20px 28px;
  text-align:center;
}
.browse-heading{
  font-size:14px;
  font-weight:700;
  letter-spacing:1px;
  margin:0 0 14px;
}
.cat-grid{
  max-width:340px;
  margin:0 auto;
  max-height:260px;
  overflow-y:auto;
  overflow-x:hidden;
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:6px;
  border:1px solid var(--line);
  background:#fff;
  scroll-snap-type:y proximity;
  -webkit-overflow-scrolling:touch;
}
.cat-btn{
  font-family:'Space Mono', monospace;
  font-weight:700;
  font-size:13px;
  letter-spacing:0.5px;
  text-transform:uppercase;
  background:var(--accent);
  color:#fff;
  border:none;
  padding:12px 14px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  scroll-snap-align:start;
  transition:background 0.15s ease;
}
.cat-btn:hover{
  background:#c1541f;
}
.cat-btn.active{
  background:var(--ink);
}
.cat-btn .n{
  font-weight:700;
  opacity:0.85;
}

/* Grid meta */
.grid-section{
  max-width:1100px;
  margin:0 auto;
  padding:0 20px 60px;
}
.grid-meta{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  border-bottom:1px solid var(--ink);
  padding-bottom:10px;
  margin-bottom:16px;
  font-weight:700;
  font-size:13px;
  letter-spacing:0.5px;
}
#resultCount{
  color:var(--muted);
  font-weight:400;
}

/* Product grid */
.product-grid{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  border-left:1px solid var(--line);
  border-top:1px solid var(--line);
}
.product-card{
  border-right:1px solid var(--line);
  border-bottom:1px solid var(--line);
  background:#fff;
  display:flex;
  flex-direction:column;
  text-decoration:none;
  color:var(--ink);
}
.product-card .thumb{
  aspect-ratio:1/1;
  overflow:hidden;
  background:#eeece7;
}
.product-card .thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.product-card .info{
  padding:10px 12px 14px;
  flex:1;
  display:flex;
  flex-direction:column;
  gap:4px;
}
.product-card .p-name{
  font-size:12px;
  font-weight:700;
  line-height:1.3;
}
.product-card .p-cat{
  font-size:10px;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:0.5px;
}
.product-card .p-price{
  font-size:13px;
  font-weight:700;
  color:var(--accent);
  margin-top:auto;
}

@media (max-width:900px){
  .product-grid{ grid-template-columns:repeat(3, 1fr); }
  .hero-title{ font-size:28px; }
}
@media (max-width:600px){
  .product-grid{ grid-template-columns:repeat(2, 1fr); }
  .hero-title{ font-size:22px; }
  .header-inner{ flex-direction:column; gap:10px; align-items:flex-start; }
}

/* Empty state */
.empty-state{
  text-align:center;
  padding:60px 20px;
  color:var(--muted);
}
.empty-state button{
  margin-top:14px;
  font-family:'Space Mono', monospace;
  font-weight:700;
  background:var(--ink);
  color:#fff;
  border:none;
  padding:10px 18px;
  cursor:pointer;
}

/* Footer */
.site-footer{
  border-top:1px solid var(--ink);
  padding:24px 20px 40px;
  text-align:center;
  font-size:11px;
  color:var(--muted);
}
.rates-note{
  margin-top:6px;
  font-size:10px;
}
