/* ============================================================
   VEX SKLEP — design tokens & base
   Endorsed sub-brand of VEX Systems. Inherits ink/red/type from
   vex-shared.jsx, but background is warm (not B2B cold gray) —
   money changes hands here, warmth reads as trustworthy.
   See AI_OPERATING_SYSTEM/07_ORG/SPEC_VEX_SKLEP_v1.md §5.
   ============================================================ */

:root {
  /* inherited VEX identity */
  --ink: #0b0b0e;
  --ink-2: #3c3c44;
  --muted: #6e6e78;
  --vex-red: #e63329;

  /* sklep-specific surface (warm, not B2B #f3f3f5) */
  --bg: #f6f6f4;
  --surface: #ffffff;
  --line: #e6e4df;
  --line-2: #d8d5cd;

  /* semantic */
  --ok: #0f9d6b;
  --warn: #b5760a;
  --danger: #e63329;

  /* radii */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* shadow */
  --shadow-sm: 0 1px 2px rgba(11,11,14,0.05), 0 1px 1px rgba(11,11,14,0.04);
  --shadow-md: 0 8px 24px rgba(11,11,14,0.08);
  --shadow-lg: 0 24px 60px rgba(11,11,14,0.14);

  /* type */
  --font-display: 'Manrope', 'Inter', sans-serif;
  --font-ui: 'Inter', 'Manrope', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* motion */
  --ease: cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body { font-size: 15px; line-height: 1.5; }
a { color: inherit; }
::selection { background: var(--vex-red); color: #fff; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
}

h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; letter-spacing: -0.02em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: var(--r-pill);
  font-family: var(--font-ui); font-weight: 700; font-size: 14px;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform 120ms var(--ease), background 160ms var(--ease), border-color 160ms var(--ease), box-shadow 160ms var(--ease);
  white-space: nowrap; line-height: 1;
}
.btn:active { transform: scale(0.97); }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.btn-primary { background: var(--vex-red); color: #fff; box-shadow: 0 10px 24px rgba(230,51,41,0.28); }
.btn-primary:hover { background: #cf2b22; }
.btn-primary:disabled { background: #d8d5cd; color: #9a988f; box-shadow: none; cursor: not-allowed; }
.btn-secondary { background: var(--ink); color: #fff; }
.btn-secondary:hover { background: #24242b; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: rgba(11,11,14,0.03); border-color: var(--ink-2); }
.btn-block { width: 100%; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn-lg { min-height: 52px; padding: 0 28px; font-size: 15px; }

/* ---------- Inputs ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field-hint { font-size: 12px; color: var(--muted); }
.field-error { font-size: 12px; color: var(--danger); font-weight: 600; }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 0 14px; border-radius: var(--r-sm);
  border: 1.5px solid var(--line-2); background: #fff; color: var(--ink);
  font-family: var(--font-ui); font-size: 14.5px;
  transition: border-color 140ms var(--ease), box-shadow 140ms var(--ease);
}
.textarea { padding: 12px 14px; min-height: 96px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(11,11,14,0.08);
}
.input.has-error, .select.has-error { border-color: var(--danger); }
.input:disabled { background: #f6f6f4; color: var(--muted); }

/* ---------- Chip filter ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 16px; border-radius: var(--r-pill);
  border: 1.5px solid var(--line-2); background: #fff; color: var(--ink-2);
  font-size: 13.5px; font-weight: 600; cursor: pointer; user-select: none;
  transition: all 140ms var(--ease); white-space: nowrap;
}
.chip:hover { border-color: var(--ink-2); color: var(--ink); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip .chip-count { font-family: var(--font-mono); font-size: 11px; opacity: 0.6; }

/* ---------- Card ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.3px;
  padding: 4px 10px; border-radius: var(--r-pill);
}
.badge-dot { width: 6px; height: 6px; border-radius: 999px; flex-shrink: 0; }
.badge-order { background: rgba(11,11,14,0.05); color: var(--ink-2); }
.badge-order .badge-dot { background: var(--muted); }
.badge-out { background: rgba(230,51,41,0.08); color: var(--danger); }
.badge-out .badge-dot { background: var(--danger); }

/* ---------- Trust row ---------- */
.trust-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px;
  font-size: 12.5px; color: var(--ink-2);
}
.trust-row a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.trust-row a:hover { color: var(--ink); text-decoration-color: var(--ink-2); }
.trust-row .sep { color: var(--line-2); }

/* ---------- Breadcrumbs ---------- */
.crumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.crumbs a { text-decoration: none; color: var(--muted); }
.crumbs a:hover { color: var(--ink); }
.crumbs .crumb-sep { opacity: 0.5; }
.crumbs .crumb-current { color: var(--ink); font-weight: 600; }

/* ---------- Pagination ---------- */
.pager { display: flex; align-items: center; justify-content: center; gap: 6px; }
.pager-btn {
  min-width: 40px; height: 40px; padding: 0 4px; border-radius: var(--r-sm);
  border: 1.5px solid var(--line-2); background: #fff; color: var(--ink-2);
  font-family: var(--font-mono); font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 140ms var(--ease);
}
.pager-btn:hover:not(:disabled) { border-color: var(--ink-2); color: var(--ink); }
.pager-btn.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.pager-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.pager-ellipsis {
  min-width: 24px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 13px; color: var(--muted);
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(11,11,14,0.45);
  display: flex; align-items: center; justify-content: center; z-index: 200; padding: 20px;
  animation: fadeIn 160ms var(--ease);
}
.modal-panel {
  background: #fff; border-radius: var(--r-xl); max-width: 460px; width: 100%;
  box-shadow: var(--shadow-lg); padding: 28px; animation: popIn 200ms var(--ease);
  max-height: 88vh; overflow-y: auto;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; width: 100%; padding: 0 16px; }
.toast {
  display: flex; align-items: center; gap: 10px; background: var(--ink); color: #fff;
  padding: 12px 18px; border-radius: var(--r-pill); font-size: 13.5px; font-weight: 600;
  box-shadow: var(--shadow-lg); animation: toastIn 220ms var(--ease); max-width: 440px;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Price mode switch (netto/brutto) ---------- */
.price-switch {
  display: inline-flex; align-items: center; background: rgba(11,11,14,0.04);
  border: 1px solid var(--line); border-radius: var(--r-pill); padding: 3px; gap: 2px;
}
.price-switch button {
  border: none; background: transparent; border-radius: var(--r-pill);
  padding: 6px 13px; font-size: 12px; font-weight: 700; color: var(--muted);
  cursor: pointer; transition: all 160ms var(--ease); font-family: var(--font-mono);
}
.price-switch button.is-active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }

/* ---------- Product photo frame (packshot on #fafafa) ---------- */
.photo-frame {
  background: #fafafa; border: 1px solid var(--line); border-radius: var(--r-lg);
  aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
}
.photo-frame img { width: 100%; height: 100%; object-fit: contain; padding: 12%; }
.photo-frame.placeholder { flex-direction: column; gap: 8px; color: var(--muted); padding: 10px; text-align: center; }
.photo-frame.placeholder .ph-mono {
  font-family: var(--font-display); font-weight: 800; font-size: 22px; color: var(--line-2);
  letter-spacing: -0.02em;
}
.photo-frame.placeholder .ph-label { font-size: 11px; font-weight: 600; line-height: 1.3; }
.photo-frame.placeholder.is-compact .ph-mono { font-size: 15px; }

/* ---------- Utility ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff;
  padding: 10px 16px; border-radius: 0 0 10px 0; z-index: 999; font-weight: 700;
}
.skip-link:focus { left: 0; }
