:root {
  --bg: #f6f5f0;
  --card: #ffffff;
  --ink: #14211b;
  --muted: #5d6b64;
  --line: #e2e0d6;
  --green: #06370b;
  --green-2: #0c4a14;
  --ball: #d9ef3f;
  --wa: #1fa855;
  --wa-dark: #178a45;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
main { flex: 1; padding-bottom: 56px; }

/* Header */
.site-header { background: var(--green); color: #fff; position: sticky; top: 0; z-index: 10; }
.bar { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.05rem; text-decoration: none; letter-spacing: .09em; text-transform: uppercase; }
.brand img { height: 30px; width: auto; }
nav { display: flex; gap: 4px; margin-left: auto; }
nav a { text-decoration: none; padding: 7px 12px; border-radius: 999px; font-weight: 600; font-size: .95rem; opacity: .85; white-space: nowrap; }
nav a:hover { opacity: 1; }
nav a.active { background: rgba(255,255,255,.14); opacity: 1; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 13px 22px;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn-small { padding: 8px 14px; font-size: .9rem; white-space: nowrap; }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: var(--wa-dark); }
.btn-ball { background: var(--ball); color: var(--green); }
.btn-ball:hover { filter: brightness(.95); }
.btn-ghost { background: transparent; color: var(--green); box-shadow: inset 0 0 0 2px var(--green); }
.btn-ghost:hover { background: rgba(6,55,11,.06); }
.btn-block { width: 100%; }

/* Hero */
.hero {
  background: var(--green-2); color: #fff; border-radius: var(--radius);
  margin: 20px 0; padding: 28px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.eyebrow { text-transform: uppercase; letter-spacing: .22em; font-size: .78rem; font-weight: 700; color: var(--ball); margin-bottom: 10px; }
.hero h1 { font-size: clamp(1.5rem, 4vw, 2.2rem); max-width: 22ch; }
.hero p { margin: 8px 0 0; opacity: .85; max-width: 48ch; }

/* Filters */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.search { flex: 1 1 220px; }
input, select, textarea {
  font: inherit; color: inherit; width: 100%;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px;
}
input:focus, select:focus, textarea:focus, .chip:focus-visible, .btn:focus-visible { outline: 2px solid var(--green-2); outline-offset: 2px; }
.filters select { width: auto; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 999px; padding: 8px 14px; font: inherit; font-size: .92rem; font-weight: 600; cursor: pointer;
}
.chip small { color: var(--muted); font-weight: 500; margin-left: 4px; }
.chip.on { background: var(--green); border-color: var(--green); color: #fff; }
.chip.on small { color: rgba(255,255,255,.7); }
.chip.na { border-style: dashed; color: var(--muted); }
.chip.on.na { color: rgba(255,255,255,.75); }

/* Grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; display: flex; flex-direction: column;
  transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(20,33,27,.09); }
.thumb { aspect-ratio: 1; background: #fff; position: relative; }
.thumb img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.badge {
  position: absolute; top: 10px; left: 10px; background: var(--ball); color: var(--green);
  font-size: .72rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em;
}
.badge-out { background: #2b2f2c; color: #fff; }
.card.sold .thumb img { opacity: .45; }
.card-body { padding: 12px 14px 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; flex: 1; }
.vendor { color: var(--muted); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.card-title { font-weight: 650; font-size: .97rem; line-height: 1.3; }
.price { font-weight: 800; margin-top: auto; padding-top: 6px; }
.empty { text-align: center; color: var(--muted); padding: 50px 0; }
.count { color: var(--muted); font-size: .9rem; margin: 0 0 12px; }

/* Product page */
.back { display: inline-block; margin: 18px 0 12px; color: var(--muted); text-decoration: none; font-weight: 600; }
.back:hover { color: var(--ink); }
.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; align-items: start; }
.gallery-main { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); aspect-ratio: 1; position: relative; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; padding: 16px; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.thumbs button { flex: none; width: 64px; height: 64px; padding: 4px; background: #fff; border: 2px solid var(--line); border-radius: 10px; cursor: pointer; }
.thumbs button.on { border-color: var(--green); }
.thumbs img { width: 100%; height: 100%; object-fit: contain; }
.info h1 { font-size: clamp(1.4rem, 3.5vw, 2rem); margin: 4px 0 10px; }
.info .price { font-size: 1.6rem; padding: 0; }
.stock { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: .9rem; margin-top: 8px; }
.stock::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.stock.in { color: #17803d; }
.stock.low { color: #b45f06; }
.stock.out { color: #b3261e; }
.opt { margin-top: 18px; }
.opt-label { font-size: .85rem; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.opt-label b { color: var(--ink); }
.opt .chips { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
.actions { display: grid; gap: 10px; margin-top: 24px; }
.note { color: var(--muted); font-size: .88rem; margin: 10px 0 0; }
.desc { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.desc p { margin: 0 0 12px; }
.desc h2, .desc h3, .desc h4 { font-size: 1.05rem; margin: 18px 0 8px; }
.desc ul, .desc ol { padding-left: 20px; margin: 0 0 12px; }

/* Stringing form */
.form-page { max-width: 640px; margin: 0 auto; }
.form-page h1 { font-size: clamp(1.5rem, 4vw, 2.1rem); margin: 26px 0 6px; }
.form-page > p { color: var(--muted); margin: 0 0 20px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 16px; }
.field label, .field .label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 6px; }
.field .hint { font-weight: 500; color: var(--muted); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: .95rem; cursor: pointer; }
.check input { width: 18px; height: 18px; flex: none; }
textarea { min-height: 84px; resize: vertical; }
.estimate { background: var(--bg); border-radius: 10px; padding: 12px 14px; font-weight: 600; }
[hidden] { display: none !important; }

/* Price list */
.pricelist { margin-top: 44px; scroll-margin-top: 76px; }
.pricelist h2 { font-size: 1.4rem; }
.pricelist .search { margin: 14px 0 4px; }
.pl-group { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-top: 14px; overflow: hidden; }
.pl-group h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 12px 16px 8px; }
.pl-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%;
  padding: 11px 16px; border: 0; border-top: 1px solid var(--line); background: none;
  font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.pl-group > .pl-row:first-child { border-top: 0; }
.pl-row.static { cursor: default; }
button.pl-row:hover { background: rgba(6,55,11,.05); }
.pl-name { font-weight: 600; }
.pl-name small { display: block; font-weight: 400; color: var(--muted); font-size: .82rem; }
.pl-name em { font-style: normal; font-weight: 500; color: var(--muted); }
.pl-price { font-weight: 800; white-space: nowrap; }
#sform { scroll-margin-top: 76px; }
.form-page > p a { color: var(--green); font-weight: 600; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 22px 0; color: var(--muted); font-size: .88rem; }
.site-footer .wrap { display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: center; }
.footer-logo { width: 96px; height: auto; border-radius: 8px; }
.site-footer strong { color: var(--ink); }

@media (max-width: 760px) {
  .product { grid-template-columns: 1fr; gap: 20px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card-body { padding: 10px 11px 12px; }
  .card-title { font-size: .9rem; }
  .hero { padding: 22px 18px; }
  #chat-link { display: none; }
  .brand { font-size: .9rem; gap: 8px; }
  .brand img { height: 26px; }
}
@media (max-width: 480px) {
  #brand-name { display: none; }
  .brand img { height: 30px; }
  nav a { padding: 7px 10px; font-size: .9rem; }
}
