/* Buki Trading – B2B catalogue. System fonts only (no external requests, DSGVO). */
:root {
  --ink: #14213d;
  --ink-2: #2b3a5c;
  --text: #1d2433;
  --muted: #5d6779;
  --line: #d8dde5;
  --panel: #f2f4f7;
  --paper: #ffffff;
  --kraft: #a8743a;
  --kraft-soft: #f6ede2;
  --wa: #157a3d;
  --wa-hover: #10652f;
  --focus: #2f6fde;
  --radius: 4px;
  --max: 1240px;
  --font: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--paper);
}
img, svg { display: block; }
a { color: var(--ink-2); }
a:hover { color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Top bar ---------- */
.topbar { background: var(--ink); color: #dfe5ef; font-size: 13px; }
.topbar .wrap { display: flex; gap: 20px; align-items: center; min-height: 36px; }
.topbar .facts { display: flex; gap: 18px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.topbar .facts li { display: flex; align-items: center; gap: 6px; }
.topbar .facts svg { width: 14px; height: 14px; color: #f0c48a; flex: none; }
.topbar .right { margin-left: auto; display: flex; gap: 14px; align-items: center; }
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { text-decoration: underline; color: #fff; }
.lang { display: inline-flex; border: 1px solid #44557a; border-radius: var(--radius); overflow: hidden; }
.lang button { background: none; border: 0; color: #c9d2e1; padding: 2px 9px; cursor: pointer; font-size: 12px; font-weight: 600; }
.lang button[aria-pressed="true"] { background: #fff; color: var(--ink); }

/* ---------- Header ---------- */
.header { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 20; }
.header .wrap { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 38px; height: 38px; }
.brand-name { font-weight: 700; font-size: 20px; letter-spacing: -0.01em; line-height: 1.1; }
.brand-sub { display: block; font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.search { flex: 1; max-width: 520px; position: relative; }
.search input {
  width: 100%; height: 40px; padding: 0 12px 0 38px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
}
.search input:focus { background: #fff; border-color: var(--ink-2); outline: none; box-shadow: 0 0 0 3px rgba(47,111,222,.18); }
.search svg { position: absolute; left: 12px; top: 12px; width: 16px; height: 16px; color: var(--muted); }
.header-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--radius);
  border: 1px solid transparent; font-weight: 600; font-size: 14px;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--ink-2); color: #fff; }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: var(--wa-hover); color: #fff; }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink-2); color: var(--ink); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; }
.count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--kraft); color: #fff; font-size: 12px; line-height: 20px; text-align: center;
}

.catnav { border-top: 1px solid var(--line); background: #fff; }
.catnav ul { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: none; }
.catnav button {
  background: none; border: 0; border-bottom: 2px solid transparent;
  padding: 10px 12px; font-size: 14px; font-weight: 500; color: var(--ink-2); cursor: pointer; white-space: nowrap;
}
.catnav button:hover { color: var(--ink); }
.catnav button[aria-pressed="true"] { border-bottom-color: var(--kraft); color: var(--ink); font-weight: 600; }

/* ---------- Intro ---------- */
.intro { background: var(--panel); border-bottom: 1px solid var(--line); }
.intro .wrap { display: grid; grid-template-columns: 1.35fr 1fr; gap: 40px; padding-top: 34px; padding-bottom: 34px; align-items: start; }
.intro h1 { font-size: 34px; line-height: 1.15; letter-spacing: -0.015em; color: var(--ink); margin: 0 0 12px; max-width: 22ch; }
.intro p.lead { font-size: 16px; color: var(--muted); margin: 0 0 20px; max-width: 58ch; }
.intro .ctas { display: flex; gap: 10px; flex-wrap: wrap; }
.checks { margin: 22px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; font-size: 14px; }
.checks li { display: flex; gap: 8px; align-items: flex-start; }
.checks svg { width: 18px; height: 18px; color: var(--wa); flex: none; margin-top: 1px; }

.process { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.process h2 { font-size: 15px; margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--ink); }
.process ol { margin: 0; padding: 4px 16px 8px; list-style: none; counter-reset: step; }
.process li { counter-increment: step; display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.process li:last-child { border-bottom: 0; }
.process li::before {
  content: counter(step); width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid var(--kraft); color: var(--kraft); font-weight: 700; font-size: 13px;
  display: grid; place-items: center;
}
.process strong { display: block; font-size: 14px; color: var(--ink); }
.process span { font-size: 13px; color: var(--muted); }

/* ---------- Catalogue ---------- */
.catalogue .wrap { display: grid; grid-template-columns: 220px 1fr; gap: 28px; padding-top: 28px; padding-bottom: 40px; }
.filters { font-size: 14px; }
.filters fieldset { border: 0; margin: 0 0 20px; padding: 0; }
.filters legend { font-weight: 700; color: var(--ink); padding: 0 0 8px; font-size: 14px; }
.filters label { display: flex; gap: 8px; align-items: center; padding: 3px 0; cursor: pointer; color: var(--text); }
.filters label small { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.filters input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--ink); }
.filters .note { background: var(--kraft-soft); border-left: 3px solid var(--kraft); padding: 10px 12px; font-size: 13px; color: #5b4024; }

.cat-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.cat-head h2 { font-size: 22px; margin: 0; color: var(--ink); }
.cat-head .result { color: var(--muted); font-size: 14px; }
.cat-head .filter-toggle { display: none; margin-left: auto; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: 14px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; display: flex; flex-direction: column; }
.card:hover { border-color: #b7c0cd; }
.card .visual { background: var(--panel); height: 168px; overflow: hidden; display: grid; place-items: center; border-bottom: 1px solid var(--line); position: relative; }
.card .visual svg.icon { width: 64px; height: 64px; color: var(--ink-2); }
.card .visual.photo { background: #fff; height: 168px; }
.card .visual img { width: 100%; height: 100%; object-fit: contain; padding: 14px; }
.card .tag { position: absolute; z-index: 1; top: 8px; left: 8px; background: #fff; border: 1px solid var(--line); font-size: 11px; font-weight: 600; color: var(--muted); padding: 1px 7px; border-radius: 3px; }
.card .body { padding: 12px 12px 10px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card .maker { font-size: 12px; color: var(--muted); font-weight: 600; }
.card h3 { font-size: 15px; line-height: 1.3; margin: 0; color: var(--ink); min-height: 2.6em; }
.barcode { margin: 6px 0 2px; height: 46px; display: flex; flex-direction: column; justify-content: flex-end; }
.barcode svg { width: 100%; max-width: 150px; height: 34px; }
.barcode .digits { font-size: 11px; letter-spacing: 0.08em; color: var(--text); font-variant-numeric: tabular-nums; }
.barcode .none { font-size: 12px; color: var(--muted); border: 1px dashed var(--line); padding: 4px 8px; align-self: flex-start; border-radius: 3px; }
.card dl { margin: 6px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: 13px; }
.card dt { color: var(--muted); }
.card dd { margin: 0; text-align: right; font-weight: 600; color: var(--ink); }
.card .buy { display: flex; gap: 6px; padding: 10px 12px 12px; border-top: 1px solid var(--line); }
.qty { width: 64px; height: 34px; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 8px; text-align: right; font-variant-numeric: tabular-nums; }
.card .buy .btn { flex: 1; }
.card .buy .btn.added { background: var(--wa); }
.empty { padding: 40px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }

/* ---------- WhatsApp band ---------- */
.wa-band { background: var(--ink); color: #fff; }
.wa-band .wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; padding-top: 36px; padding-bottom: 36px; align-items: center; }
.wa-band h2 { font-size: 28px; line-height: 1.2; margin: 0 0 10px; letter-spacing: -0.01em; }
.wa-band p { color: #c9d2e1; margin: 0 0 18px; max-width: 56ch; }
.wa-band ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.wa-band li { display: flex; gap: 10px; align-items: flex-start; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 12px 14px; }
.wa-band li svg { width: 20px; height: 20px; color: #f0c48a; flex: none; margin-top: 1px; }
.wa-band li strong { display: block; }
.wa-band li span { color: #c9d2e1; font-size: 14px; }
.wa-band .small { font-size: 12px; color: #9aa7bd; margin-top: 10px; }

/* ---------- Info + FAQ ---------- */
.info .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding-top: 40px; padding-bottom: 40px; }
.info h2 { font-size: 22px; color: var(--ink); margin: 0 0 14px; }
.facts-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.facts-table th, .facts-table td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.facts-table th { width: 42%; color: var(--muted); font-weight: 500; padding-right: 16px; }
details { border-bottom: 1px solid var(--line); }
details summary { cursor: pointer; padding: 12px 0; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; color: var(--kraft); font-weight: 700; font-size: 18px; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { margin: 0 0 14px; color: var(--muted); font-size: 14px; max-width: 64ch; }

/* ---------- Request drawer ---------- */
.scrim { position: fixed; inset: 0; background: rgba(20,33,61,.45); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .2s; }
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(460px, 100%); background: #fff; z-index: 50;
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform .25s ease;
  box-shadow: -8px 0 24px rgba(20,33,61,.18);
}
.drawer.open { transform: none; }
.drawer header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.drawer header h2 { font-size: 18px; margin: 0; color: var(--ink); }
.icon-btn { background: none; border: 0; width: 36px; height: 36px; display: grid; place-items: center; cursor: pointer; border-radius: var(--radius); color: var(--ink); }
.icon-btn:hover { background: var(--panel); }
.icon-btn svg { width: 20px; height: 20px; }
.drawer .content { overflow-y: auto; padding: 16px 18px 24px; flex: 1; }
.req-list { margin: 0 0 18px; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: var(--radius); }
.req-list li { display: grid; grid-template-columns: 1fr 70px 32px; gap: 8px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 14px; }
.req-list li:last-child { border-bottom: 0; }
.req-list .name small { display: block; color: var(--muted); font-size: 12px; }
.req-empty { padding: 16px; color: var(--muted); font-size: 14px; text-align: center; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.form .full { grid-column: 1 / -1; }
.form label { font-size: 13px; font-weight: 600; color: var(--ink); display: flex; flex-direction: column; gap: 4px; }
.form label span.opt { font-weight: 400; color: var(--muted); }
.form input, .form select, .form textarea { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; font-weight: 400; font-size: 14px; background: #fff; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--ink-2); outline: none; box-shadow: 0 0 0 3px rgba(47,111,222,.18); }
.form textarea { min-height: 70px; resize: vertical; }
.form .check { flex-direction: row; align-items: flex-start; gap: 8px; font-weight: 400; color: var(--text); }
.form .check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--ink); }
.form-error { color: #b42318; font-size: 13px; min-height: 1em; margin: 6px 0 0; }
.drawer footer { border-top: 1px solid var(--line); padding: 14px 18px; display: grid; gap: 8px; }
.drawer footer .hint { font-size: 12px; color: var(--muted); margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: #0f1930; color: #b9c3d4; font-size: 14px; }
.site-footer .wrap { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 32px; padding-top: 34px; padding-bottom: 20px; }
.site-footer h3 { color: #fff; font-size: 14px; margin: 0 0 10px; }
.site-footer a { color: #dfe5ef; }
.site-footer address { font-style: normal; line-height: 1.7; }
.site-footer ul { list-style: none; margin: 0; padding: 0; line-height: 1.9; }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid #26334f; padding-top: 14px; font-size: 12px; color: #8592a8; }

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 30; width: 54px; height: 54px; border-radius: 50%;
  background: var(--wa); color: #fff; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
.wa-float:hover { background: var(--wa-hover); color: #fff; }
.wa-float svg { width: 28px; height: 28px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; z-index: 60;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius); font-size: 14px;
  transition: opacity .2s, transform .2s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Legal pages ---------- */
.legal-page .wrap { max-width: 820px; padding-top: 32px; padding-bottom: 48px; }
.legal-page h1 { color: var(--ink); font-size: 30px; margin: 0 0 20px; }
.legal-page h2 { color: var(--ink); font-size: 18px; margin: 28px 0 8px; }
.legal-page p, .legal-page li { max-width: 72ch; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .intro .wrap, .wa-band .wrap, .info .wrap { grid-template-columns: 1fr; gap: 24px; }
  .catalogue .wrap { grid-template-columns: 1fr; }
  .filters { display: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
  .filters.open { display: block; }
  .cat-head .filter-toggle { display: inline-flex; }
  .site-footer .wrap { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .topbar .facts li:nth-child(n+2), .topbar .right > a { display: none; }
  .topbar .facts { flex-wrap: nowrap; min-width: 0; }
  .topbar .facts li span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar .facts li { min-width: 0; }
  .header .wrap { flex-wrap: wrap; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .header-actions .btn-wa span { display: none; }
  .intro h1 { font-size: 27px; }
  .checks { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card .buy { flex-direction: column; }
  .card .buy .btn { flex: none; }
  .card dl { grid-template-columns: 1fr; gap: 0; }
  .card dd { text-align: left; margin-bottom: 4px; }
  .qty { width: 100%; }
  .wa-band h2 { font-size: 23px; }
  .site-footer .wrap { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
}
@media (max-width: 340px) {
  .grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
