:root {
  --accent: #0b3d91;
  --accent-light: #eaf1fb;
  --accent-dark: #072a66;
  --border: #d0d7de;
  --text: #1f2328;
  --muted: #57606a;
  --bg: #ffffff;
  --stripe: #f6f8fa;
  --warn: #b26a00;
  --warn-bg: #fff8e1;
  --ok: #116329;
  --ok-bg: #dafbe1;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  color: var(--text); background: var(--bg); font-size: 14px; line-height: 1.5;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Top navigation ────────────────────────────────────────────────────── */
header.topnav {
  display: flex; align-items: center; gap: 20px;
  padding: 12px 20px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: #fff; z-index: 50;
}
header.topnav .brand { font-weight: 700; color: var(--accent); font-size: 16px; }
header.topnav nav { display: flex; gap: 20px; flex: 1; margin-left: 24px; }
header.topnav nav a { color: var(--text); font-size: 14px; }
header.topnav nav a:hover { color: var(--accent); text-decoration: none; }
header.topnav nav a.disabled { color: var(--muted); cursor: not-allowed; }
header.topnav .right { display: flex; gap: 12px; align-items: center; }
header.topnav .right a { color: var(--text); font-size: 14px; }
header.topnav .right a.btn-cta {
  background: var(--ok); color: #fff; padding: 6px 14px; border-radius: 4px; font-weight: 600;
}
header.topnav .right a.btn-cta:hover { background: #0d4d1f; text-decoration: none; }
header.topnav .right a.cart { color: var(--accent); font-weight: 600; }

/* ─── Main + hero ───────────────────────────────────────────────────────── */
main { max-width: 1280px; margin: 0 auto; padding: 20px; }
section.hero { padding: 20px 0 30px; }
section.hero h1 { margin: 0 0 8px; font-size: 26px; }
section.hero .hero-sub { color: var(--muted); font-size: 15px; margin: 0; max-width: 700px; }
a.link { color: var(--accent); font-weight: 600; }

/* ─── Category tabs ─────────────────────────────────────────────────────── */
.cat-tabs {
  display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin: 0 0 24px;
  overflow-x: auto; white-space: nowrap;
}
.cat-tabs a {
  padding: 12px 20px; color: var(--muted); font-weight: 600;
  border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.cat-tabs a:hover { color: var(--accent); text-decoration: none; }
.cat-tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }
.cat-tabs .count { color: var(--muted); font-weight: 400; margin-left: 6px; font-size: 12px; }
.cat-tabs a.active .count { color: var(--accent); }

/* ─── Pills ─────────────────────────────────────────────────────────────── */
.pill {
  display: inline-block; padding: 2px 8px; border-radius: 3px;
  font-size: 11px; font-weight: 600; letter-spacing: .03em; margin-right: 6px;
}
.pill-fg { background: var(--ok-bg); color: var(--ok); border: 1px solid #a4dfb0; }
.pill-qc { background: #fff1d6; color: #7a4d00; border: 1px solid #f5c26b; }

/* ─── Lot grid + cards ──────────────────────────────────────────────────── */
.lot-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.lot-card {
  background: #fff; border: 1px solid var(--border); border-radius: 6px;
  overflow: hidden;
}
.lot-hdr {
  padding: 12px 16px; background: var(--stripe); display: flex;
  align-items: center; gap: 16px; flex-wrap: wrap;
}
.lot-title { flex: 1; min-width: 200px; font-size: 15px; }
.lot-title a { color: var(--text); }
.lot-title a:hover { color: var(--accent); text-decoration: none; }
.lot-meta { display: flex; gap: 16px; align-items: center; }
.lot-meta .qty { color: var(--muted); font-size: 13px; }
.lot-meta .price { color: var(--accent); font-weight: 700; font-size: 16px; }
.lot-attrs {
  padding: 10px 16px; display: flex; gap: 18px; flex-wrap: wrap;
  color: var(--muted); font-size: 13px; border-top: 1px solid #eaeef2;
}
.lot-attrs b { color: var(--text); font-weight: 600; }
.lot-attrs-2 { background: #fafbfc; }
.lot-actions {
  padding: 10px 16px; display: flex; gap: 10px; flex-wrap: wrap; background: var(--stripe);
  border-top: 1px solid #eaeef2;
}

/* ─── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 14px; border: 1px solid var(--accent); color: var(--accent);
  background: #fff; border-radius: 4px; font-size: 13px; font-weight: 500;
  min-height: 36px; cursor: pointer;
}
.btn:hover { background: var(--accent-light); text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-big { padding: 12px 18px; font-size: 14px; min-height: 44px; }
.btn-sm { padding: 4px 10px; font-size: 12px; min-height: 30px; }

/* ─── Lot detail page ───────────────────────────────────────────────────── */
a.back-link { display: inline-block; margin-bottom: 16px; font-size: 13px; }
.lot-detail { background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 24px; }
.lot-detail-hdr { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 24px; }
.lot-detail-hdr h1 { margin: 8px 0 4px; font-size: 24px; }
.lot-detail-hdr .lot-sub { color: var(--muted); margin: 0; font-size: 14px; }
.price-block { text-align: right; }
.price-block .price { font-size: 30px; font-weight: 800; color: var(--accent); }
.price-block .price .unit { font-size: 14px; font-weight: 400; color: var(--muted); }
.price-block .qty { color: var(--muted); margin: 4px 0 12px; font-size: 13px; }
.price-block .btn { margin-left: 8px; }
.lot-section { margin: 24px 0; }
.lot-section h2 {
  font-size: 15px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
  padding-bottom: 8px; border-bottom: 2px solid var(--accent); margin: 0 0 12px;
}
.spec-grid { display: grid; grid-template-columns: 180px 1fr; gap: 8px 20px; margin: 0; }
.spec-grid dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.spec-grid dd { margin: 0; font-size: 14px; }
.color-table { width: 100%; border-collapse: collapse; }
.color-table th, .color-table td { padding: 10px; text-align: left; border-bottom: 1px solid #eaeef2; }
.color-table th { background: var(--stripe); font-size: 12px; text-transform: uppercase; color: var(--muted); }
.color-table td:last-child { text-align: right; }
.hint { color: var(--muted); font-size: 12px; margin-top: 8px; }
.disclaimer { background: var(--warn-bg); color: var(--warn); padding: 10px 14px; border-radius: 4px; font-size: 12px; margin-top: 12px; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.footer-hint { color: var(--muted); font-size: 12px; margin-top: 24px; }

footer { padding: 24px 20px; text-align: center; color: var(--muted); font-size: 12px; border-top: 1px solid var(--border); margin-top: 40px; }

/* ─── Mobile ────────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  header.topnav { padding: 10px 12px; gap: 8px; flex-wrap: wrap; }
  header.topnav nav { display: none; }
  header.topnav .right { flex-wrap: wrap; }
  main { padding: 12px; }
  section.hero h1 { font-size: 22px; }
  section.hero .hero-sub { font-size: 14px; }
  .lot-hdr { flex-direction: column; align-items: flex-start; gap: 8px; }
  .lot-meta { width: 100%; justify-content: space-between; }
  .lot-attrs { flex-direction: column; gap: 4px; }
  .lot-actions .btn { flex: 1; }
  .lot-detail-hdr { flex-direction: column; }
  .price-block { text-align: left; width: 100%; }
  .price-block .btn { margin: 8px 8px 0 0; }
  .spec-grid { grid-template-columns: 1fr; gap: 4px; }
  .spec-grid dt { margin-top: 8px; }
}
