/* ===== Design tokens =====
   Color: #14301F forest (primary/trust), #F6F5EF paper (bg), #1F2420 ink (text),
          #B98A34 gold (tax figures / accent), #E7E4D8 line (borders), #7C3B2C brick (CTA)
   Type: 'Space Grotesk' for headings/data, 'Inter' for body — both geometric, no default serif+cream combo
   Layout: ledger — left-aligned, table-forward, search-first hero
*/

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

:root {
  --forest: #14301F;
  --paper: #F6F5EF;
  --ink: #1F2420;
  --gold: #B98A34;
  --line: #DFDCCC;
  --brick: #7C3B2C;
  --card: #FFFFFF;
  --muted: #5C6058;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', -apple-system, sans-serif;
  line-height: 1.55;
  font-size: 16px;
}

h1, h2, h3, .brand, .price {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}

a { color: var(--forest); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 2px;
}

.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }

/* ---- Header ---- */
header.site {
  background: var(--forest);
  color: #fff;
  border-bottom: 3px solid var(--gold);
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; }
header.site .brand { color: #fff; font-size: 1.3rem; }
header.site nav a { color: #EDEAD9; margin-left: 22px; font-size: 0.95rem; }
header.site nav a:hover { color: var(--gold); text-decoration: none; }

/* ---- Hero: search-first, since users land looking for one figure ---- */
.hero { background: var(--forest); color: #fff; padding: 52px 0 90px; position: relative; }
.hero h1 { font-size: 2rem; max-width: 600px; margin-bottom: 10px; }
.hero p { color: #C9D2C6; max-width: 520px; margin-bottom: 26px; }
.search-wrap { position: relative; max-width: 560px; }
.search-box { display: flex; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.25); }
.search-box input {
  flex: 1; border: 0; padding: 16px 18px; font-size: 1rem; font-family: inherit; outline: none;
}
.search-box button {
  background: var(--gold); border: 0; color: #23180A; font-weight: 600;
  padding: 0 24px; cursor: pointer; font-family: inherit;
}
.search-box button:hover { background: #A67A2B; }

/* Live search dropdown */
.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: #fff; border-radius: 8px; box-shadow: 0 14px 34px rgba(0,0,0,0.3);
  overflow: hidden; z-index: 40; display: none; max-height: 380px; overflow-y: auto;
}
.search-results.open { display: block; }
.search-results a {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  color: var(--ink); border-bottom: 1px solid var(--line);
}
.search-results a:last-child { border-bottom: none; }
.search-results a:hover { background: #F4F3EC; text-decoration: none; }
.search-results img { width: 38px; height: 38px; object-fit: cover; border-radius: 6px; background: var(--line); flex-shrink: 0; }
.search-results .sr-name { font-weight: 600; font-size: 0.92rem; }
.search-results .sr-meta { color: var(--muted); font-size: 0.78rem; }
.search-results .sr-price { margin-left: auto; color: var(--gold); font-weight: 600; font-size: 0.88rem; white-space: nowrap; }
.search-empty { padding: 16px; color: var(--muted); font-size: 0.88rem; }

/* ---- Brand grid (e-commerce category tiles) ---- */
.brand-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px;
  margin-top: -46px; position: relative; z-index: 10;
}
.brand-tile {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 18px 14px; text-align: center; box-shadow: 0 6px 18px rgba(20,48,31,0.08);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.brand-tile:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(20,48,31,0.14); text-decoration: none; }
.brand-tile .initial {
  width: 44px; height: 44px; border-radius: 50%; background: var(--forest); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 600; margin: 0 auto 10px;
  font-family: 'Space Grotesk', sans-serif;
}
.brand-tile .bname { font-weight: 600; font-size: 0.92rem; color: var(--ink); }
.brand-tile .bcount { color: var(--muted); font-size: 0.78rem; margin-top: 2px; }

/* ---- Model product-cards (e-commerce style) ---- */
.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.model-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.model-card:hover { transform: translateY(-4px); box-shadow: 0 12px 26px rgba(20,48,31,0.14); text-decoration: none; }
.model-card .thumb { width: 100%; aspect-ratio: 1; object-fit: cover; background: #ECEAE0; display: block; }
.model-card .body { padding: 13px 14px 16px; }
.model-card .brand-tag { color: var(--gold); font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.model-card .mname { color: var(--ink); font-weight: 600; font-size: 0.95rem; margin: 3px 0 8px; line-height: 1.3; }
.model-card .mprice { font-family: 'Space Grotesk', sans-serif; font-weight: 600; color: var(--forest); font-size: 1rem; }
.model-card .mprice small { color: var(--muted); font-weight: 400; font-size: 0.72rem; }
.model-card .mdate { color: var(--muted); font-size: 0.72rem; margin-top: 4px; }

/* ---- Sections ---- */
section { padding: 44px 0; }
section h2 { font-size: 1.4rem; margin-bottom: 18px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; }
.section-head h2 { margin-bottom: 0; }
.section-head a { font-size: 0.88rem; }

/* ---- Update list (dated, not numbered — real sequence by date) ---- */
.update-list { list-style: none; }
.update-list li {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.update-list li:hover { background: rgba(20,48,31,0.03); }
.update-list .model { font-weight: 600; }
.update-list .date { color: var(--muted); font-size: 0.85rem; white-space: nowrap; margin-left: 16px; }

/* ---- Tax figure table (the core content unit) ---- */
.tax-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  padding: 22px; margin: 20px 0;
}
.tax-card .updated { color: var(--muted); font-size: 0.85rem; margin-bottom: 14px; }
table.tax-table { width: 100%; border-collapse: collapse; }
table.tax-table td, table.tax-table th {
  text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--line);
}
table.tax-table th { color: var(--muted); font-weight: 500; font-size: 0.9rem; }
table.tax-table td.amount { font-family: 'Space Grotesk', sans-serif; font-weight: 600; color: var(--gold); font-size: 1.05rem; }

/* ---- Shop ---- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.product-card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.product-card img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--line); }
.product-card .body { padding: 14px; }
.product-card .price { color: var(--gold); font-size: 1.1rem; margin: 6px 0 12px; }
.btn {
  display: inline-block; background: var(--brick); color: #fff; padding: 10px 16px;
  border-radius: 6px; border: 0; font-weight: 600; cursor: pointer; font-family: inherit; font-size: 0.9rem;
}
.btn:hover { background: #663025; text-decoration: none; }
.btn.ghost { background: transparent; border: 1px solid var(--forest); color: var(--forest); }

/* ---- Ad slots ---- */
.ad-slot { margin: 28px 0; text-align: center; color: var(--muted); font-size: 0.75rem; }
.ad-slot .box { background: #ECEAE0; border: 1px dashed var(--line); padding: 30px; border-radius: 6px; }

/* ---- Floating WhatsApp button ---- */
.wa-float {
  position: fixed; bottom: 20px; right: 20px; z-index: 999;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25D366; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  transition: transform 0.15s ease;
}
.wa-float:hover { transform: scale(1.08); text-decoration: none; }

/* ---- Footer ---- */
footer.site { background: var(--ink); color: #A9ACA5; padding: 30px 0; margin-top: 40px; font-size: 0.85rem; }
footer.site a { color: #C9D2C6; }

/* ---- Admin ---- */
.admin-shell { max-width: 640px; margin: 40px auto; padding: 0 20px; }
.admin-shell form { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 24px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 5px; font-family: inherit; font-size: 0.95rem;
}
.admin-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.admin-table td, .admin-table th { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; font-size: 0.9rem; }

@media (max-width: 600px) {
  header.site .wrap { flex-direction: column; align-items: flex-start; gap: 10px; }
  .hero { padding: 40px 0 70px; }
  .hero h1 { font-size: 1.5rem; }
  .brand-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: -38px; }
  .brand-tile { padding: 12px 8px; }
  .brand-tile .initial { width: 36px; height: 36px; font-size: 0.85rem; }
  .brand-tile .bname { font-size: 0.8rem; }
  .model-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .search-results { max-height: 300px; }
  .update-list li { flex-direction: column; align-items: flex-start; }
  .update-list .date { margin-left: 0; }
}
