/* =========================================================================
   Konfigurator mebli — style
   ========================================================================= */

:root {
  --bg: #f6f3ee;
  --surface: #fffdfa;
  --card: #ffffff;
  --ink: #1a1917;
  --ink-soft: #3c3934;
  --muted: #736d64;
  --line: #e5dfd4;
  --line-soft: #efeae1;
  --accent: #9a6234;
  --accent-ink: #7c4d27;
  --accent-soft: #f6ede3;
  --ok: #2f6b4f;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(31, 24, 17, 0.05);
  --shadow-md: 0 8px 24px rgba(45, 35, 24, 0.07);
  --shadow-lg: 0 26px 60px rgba(45, 35, 24, 0.12);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -0.015em; }
p { margin: 0; }
button { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 10px;
}

/* ------------------------------------------------------------------ button */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: #fff;
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
  transition: transform 0.14s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 2px 10px rgba(26, 25, 23, 0.18);
}
.btn-primary:hover { background: #2c2a26; }

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { background: #fff; border-color: #d6cec1; }

.btn-soft {
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-color: transparent;
}
.btn-soft:hover { background: #f1e3d5; }

.btn-lg { height: 50px; padding: 0 26px; font-size: 15px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn svg { width: 16px; height: 16px; fill: currentColor; }

.icon-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
}
.icon-btn:hover { background: #f5f1ea; }

/* ------------------------------------------------------------------ header */

.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 66px;
  padding: 0 clamp(16px, 4vw, 40px);
  background: rgba(246, 243, 238, 0.86);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background:
    linear-gradient(140deg, #d9c3a6 0%, #a97a4c 48%, #6d4a2a 100%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 3px;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  border-right-color: transparent;
  border-bottom-color: transparent;
  transform: rotate(-8deg);
}
.brand-name { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }

.head-nav { display: flex; gap: 22px; margin-left: 8px; }
.head-nav a { font-size: 13.5px; color: var(--muted); padding: 6px 0; transition: color 0.15s; }
.head-nav a:hover { color: var(--ink); }

.head-actions { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.head-phone { font-size: 13.5px; font-weight: 550; letter-spacing: 0.01em; }
.head-phone:hover { color: var(--accent-ink); }

/* -------------------------------------------------------------------- hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(32px, 5vw, 72px) clamp(16px, 4vw, 40px) clamp(24px, 3vw, 44px);
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.3rem, 4.6vw, 3.9rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin-bottom: 18px;
}
.hero h1 span { display: inline-block; color: var(--accent-ink); font-style: italic; }

.lead { color: var(--muted); font-size: clamp(14.5px, 1.1vw, 16px); max-width: 46ch; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  list-style: none;
  padding: 22px 0 0;
  margin: 26px 0 0;
  border-top: 1px solid var(--line);
}
.hero-stats li { display: flex; flex-direction: column; gap: 2px; }
.hero-stats strong { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.hero-stats span { font-size: 12px; color: var(--muted); }

.hero-visual { position: relative; }
.hero-stage {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  background:
    radial-gradient(120% 90% at 70% 10%, #fffdf8 0%, #f1ece3 55%, #e7e0d3 100%);
  border: 1px solid #ece5d8;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.hero-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 5%; opacity: 0; transition: opacity 0.6s ease; }
.hero-stage.ready img { opacity: 1; }
.hero-stage::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 8%;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(60, 45, 30, 0.16), rgba(60, 45, 30, 0));
  filter: blur(2px);
}

.hero-badge {
  position: absolute;
  left: 18px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 253, 250, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(8px);
}
.hero-badge strong { display: block; font-size: 12.5px; }
.hero-badge small { color: var(--muted); font-size: 11.5px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(47, 107, 79, 0.15); }

/* --------------------------------------------------------------- workbench */

.workbench {
  position: relative;
  display: grid;
  grid-template-columns: 396px minmax(0, 1fr);
  max-width: 1360px;
  margin: 10px auto clamp(32px, 5vw, 64px);
  height: calc(100dvh - 92px);
  min-height: 640px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  scroll-margin-top: 76px;
}

/* ------------------------------------------------------------------- panel */

.panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--line-soft);
  background: var(--surface);
}

.panel-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
  display: grid;
  gap: 12px;
  align-content: start;
  scrollbar-width: thin;
  scrollbar-color: #d8d0c3 transparent;
}
.panel-scroll::-webkit-scrollbar { width: 9px; }
.panel-scroll::-webkit-scrollbar-thumb { background: #ded6c9; border-radius: 9px; border: 3px solid var(--surface); }

.card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 14px 14px 15px;
}
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head h2 { font-size: 13.5px; font-weight: 650; letter-spacing: 0.01em; }
.card-hint { font-size: 11px; color: var(--muted); }
.card-note { font-size: 11.5px; color: var(--muted); margin-top: 10px; line-height: 1.45; }

/* -------------------------------------------------------------- produkty -- */

.product-list { display: grid; gap: 7px; }

.product-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 11px;
  padding: 7px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.product-card:hover { border-color: #d9d0c1; background: #fdfbf7; }
.product-card.active { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px rgba(154, 98, 52, 0.18); }

.product-thumb {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 9px;
  overflow: hidden;
  background: linear-gradient(160deg, #f3eee5, #e8e1d4);
}
.product-thumb img { width: 100%; height: 100%; object-fit: contain; }

.thumb-skeleton {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.6) 50%, transparent 80%);
  background-size: 220% 100%;
  animation: shimmer 1.4s infinite linear;
}
@keyframes shimmer { from { background-position: 160% 0; } to { background-position: -60% 0; } }

.product-meta { display: grid; gap: 1px; min-width: 0; }
.product-cat { font-size: 10px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.product-meta strong { font-size: 13px; font-weight: 600; }
.product-sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.product-check {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 10px;
  color: transparent;
  background: #fff;
}
.product-card.active .product-check { background: var(--accent); border-color: var(--accent); color: #fff; }

/* --------------------------------------------------------------- pola ----- */

.field-list { display: grid; gap: 14px; }
.field { display: grid; gap: 7px; }
.field-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.field-head label, .field-head > span { font-size: 12.5px; font-weight: 550; color: var(--ink-soft); }

.num { display: inline-flex; align-items: center; gap: 4px; }
.num input {
  width: 66px;
  height: 30px;
  padding: 0 7px;
  text-align: right;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
.num input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(154, 98, 52, 0.13); }
.num span { font-size: 11px; color: var(--muted); }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 20px;
  background: transparent;
  cursor: pointer;
  margin: 0;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 99px;
  background: #eae3d8;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent);
  box-shadow: 0 1px 4px rgba(60, 40, 20, 0.18);
  transition: transform 0.12s;
}
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.1); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 99px; background: #eae3d8; }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); }
input[type="range"]:disabled { opacity: 0.4; cursor: not-allowed; }

.presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip-btn {
  height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
  cursor: pointer;
  color: var(--ink-soft);
}
.chip-btn:hover { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }

/* ------------------------------------------------------------- pasy frontu */

.band-list { display: grid; gap: 9px; margin-bottom: 9px; }
.band { border: 1px solid var(--line-soft); border-radius: 12px; padding: 9px 10px 11px; background: #fdfbf7; }

.band-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.band-title { font-size: 12px; font-weight: 600; }
.band-title em { font-style: normal; color: var(--muted); font-weight: 400; margin-left: 4px; font-size: 11px; }
.band-actions { display: flex; gap: 3px; }
.band-actions button {
  width: 23px;
  height: 23px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}
.band-actions button:hover:not(:disabled) { color: var(--ink); border-color: #d5cbba; }
.band-actions button:disabled { opacity: 0.3; cursor: not-allowed; }

.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 3px; background: #f0eae0; border-radius: 9px; }
.segmented button {
  height: 27px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  font-size: 11.5px;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
}
.segmented button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 550; }

.band-fields { display: grid; gap: 7px; margin-top: 9px; }
.mini-field { display: grid; grid-template-columns: 1fr; gap: 2px; }
.mini-field > span { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); }
.mini-field output { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 550; }

/* --------------------------------------------------------------- swatche -- */

.swatch-block + .swatch-block { margin-top: 13px; }
.swatch-head { display: flex; justify-content: space-between; font-size: 11.5px; margin-bottom: 7px; }
.swatch-head span { color: var(--muted); }
.swatch-head em { font-style: normal; font-weight: 550; }

.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; }
.swatch {
  display: grid;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.14s, box-shadow 0.14s, transform 0.14s;
}
.swatch:hover { transform: translateY(-1px); border-color: #d6cbbb; }
.swatch.active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(154, 98, 52, 0.16); }
.swatch .chip {
  height: 34px;
  border-radius: 7px;
  background: var(--chip);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.07);
}
.chip-wood {
  background-image:
    repeating-linear-gradient(92deg, rgba(0, 0, 0, 0.055) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.07) 0 2px, transparent 2px 9px),
    linear-gradient(160deg, rgba(255, 255, 255, 0.4), transparent 55%),
    var(--chip);
}
.swatch-label { font-size: 9.5px; line-height: 1.2; color: var(--muted); text-align: center; }
.swatches-sm { grid-template-columns: repeat(4, 1fr); }
.swatches-sm .chip { height: 26px; }

.swatch-block.is-disabled { opacity: 0.45; pointer-events: none; }

/* --------------------------------------------------------------- uchwyty -- */

.handle-types { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 13px; }
.tile {
  display: grid;
  gap: 3px;
  justify-items: start;
  padding: 9px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.14s, background 0.14s;
}
.tile:hover { border-color: #d6cbbb; }
.tile.active { border-color: var(--accent); background: var(--accent-soft); }
.tile-name { font-size: 11.5px; font-weight: 550; line-height: 1.25; }
.tile-price { font-size: 10px; color: var(--muted); }

/* ------------------------------------------------------------- przełącznik */

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; font-size: 12.5px; cursor: pointer; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch { width: 38px; height: 22px; border-radius: 99px; background: #e2dbcf; position: relative; transition: background 0.18s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); transition: transform 0.18s; }
.switch-row input:checked + .switch { background: var(--ok); }
.switch-row input:checked + .switch::after { transform: translateX(16px); }
.switch-row input:focus-visible + .switch { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------------------------------------------------------------- wycena -- */

.price-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.price-lines li { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; }
.price-lines span { display: grid; color: var(--muted); }
.price-lines em { font-style: normal; font-size: 10.5px; color: #9c9488; }
.price-lines b { font-weight: 550; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink-soft); }

.price-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px dashed var(--line);
}
.price-total span { font-size: 12.5px; color: var(--muted); }
.price-total strong { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

.summary-counts { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.summary-counts span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 99px;
  background: #f4efe7;
  font-size: 10.5px;
  color: var(--muted);
}
.summary-counts b { font-size: 11.5px; color: var(--ink); font-weight: 600; }

/* -------------------------------------------------------------- panel foot */

.panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 -8px 20px rgba(60, 45, 30, 0.04);
}
.panel-foot-price { display: grid; }
.panel-foot-price span { font-size: 10px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.panel-foot-price strong { font-size: 19px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.panel-foot-price small { font-size: 10px; color: var(--muted); }
.panel-foot-actions { display: flex; gap: 6px; }
.panel-foot-actions .btn { height: 38px; padding: 0 13px; font-size: 12.5px; }
.panel-foot-actions .btn-ghost span { display: none; }

/* ------------------------------------------------------------------ scena */

.stage {
  position: relative;
  min-height: 0;
  background:
    radial-gradient(120% 80% at 62% 4%, #fffefa 0%, #f5f2ea 46%, #eae4d8 100%);
  overflow: hidden;
}

.stage-canvas { position: absolute; inset: 0; }
.stage-canvas canvas { display: block; width: 100%; height: 100%; touch-action: none; }

.stage-head {
  position: absolute;
  top: 20px;
  left: 22px;
  z-index: 3;
  max-width: min(58%, 420px);
  pointer-events: none;
}
.stage-eyebrow { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 4px; }
.stage-head h2 { font-family: var(--serif); font-size: clamp(20px, 2vw, 27px); letter-spacing: -0.02em; line-height: 1.15; }
.stage-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.stage-meta span {
  padding: 3px 9px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.9);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
  backdrop-filter: blur(6px);
}
.stage-meta .stage-lead { color: var(--muted); }

.stage-tools {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(8px);
}
.stage-tools button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 11.5px;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
}
.stage-tools button:hover { background: #f4efe7; color: var(--ink); }
.stage-tools button.active { background: var(--ink); color: #fff; }
.stage-tools svg { width: 14px; height: 14px; fill: currentColor; }
.tool-sep { width: 1px; height: 18px; background: var(--line); margin: 0 3px; }

.stage-hint {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  z-index: 3;
  text-align: center;
  font-size: 11px;
  color: #8c8378;
  pointer-events: none;
}

.stage-loading {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  text-align: center;
  padding: 24px;
  font-size: 12.5px;
  color: var(--muted);
  background: #f2eee6;
}
.stage-loading span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #ded5c6;
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* -------------------------------------------------------------- sekcje ---- */

.section { max-width: 1280px; margin: 0 auto; padding: clamp(40px, 6vw, 84px) clamp(16px, 4vw, 40px); }
.section-alt { background: linear-gradient(180deg, rgba(255, 253, 250, 0.9), rgba(246, 243, 238, 0)); }
.section-head { max-width: 620px; margin-bottom: 34px; }
.section-head h2 { font-family: var(--serif); font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.12; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.steps li { padding: 22px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line-soft); box-shadow: var(--shadow-sm); }
.step-num { font-family: var(--serif); font-size: 26px; color: #d8c6ad; display: block; margin-bottom: 8px; }
.steps h3 { font-size: 15.5px; font-weight: 600; margin-bottom: 6px; }
.steps p { font-size: 13.5px; color: var(--muted); }

.section-split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(24px, 5vw, 64px); align-items: start; }
.section-split h2 { font-family: var(--serif); font-size: clamp(1.6rem, 2.7vw, 2.2rem); margin-bottom: 14px; line-height: 1.15; }
.section-split p { color: var(--muted); max-width: 56ch; font-size: 14.5px; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }

.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.feature-list li { padding: 16px 18px; border-radius: 14px; background: #fff; border: 1px solid var(--line-soft); display: grid; gap: 3px; }
.feature-list strong { font-size: 13.5px; font-weight: 600; }
.feature-list span { font-size: 12.5px; color: var(--muted); }

.contact { align-items: stretch; }
.contact-list { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; }
.contact-list li { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 9px; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; max-width: 380px; }
.contact-list span { color: var(--muted); }
.contact-list em { font-style: normal; }

.contact-card {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 11px;
}
.contact-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 2px; }

label { display: grid; gap: 5px; font-size: 12px; color: var(--muted); }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 13.5px;
  color: var(--ink);
}
textarea { resize: vertical; min-height: 44px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(154, 98, 52, 0.12); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-note { font-size: 11px; color: var(--muted); }
.form-note.error { color: #a4382f; }

.check { display: flex; align-items: flex-start; gap: 9px; font-size: 12px; color: var(--ink-soft); }
.check input { width: 15px; height: 15px; margin: 2px 0 0; accent-color: var(--accent); }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; padding: 0; border: 0; }

/* ------------------------------------------------------------------ stopka */

.site-foot {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  max-width: 1280px;
  margin: 0 auto;
  padding: 26px clamp(16px, 4vw, 40px) 40px;
  border-top: 1px solid var(--line);
}
.foot-brand { display: flex; align-items: center; gap: 10px; }
.foot-brand strong { display: block; font-size: 13.5px; }
.foot-brand small { font-size: 11px; color: var(--muted); }
.foot-note { font-size: 11.5px; color: var(--muted); margin-left: auto; }
.foot-link { font-size: 12px; color: var(--accent-ink); }

/* ------------------------------------------------------------------ modale */

.modal {
  border: 0;
  padding: 0;
  border-radius: 18px;
  width: min(560px, calc(100vw - 28px));
  max-height: min(88vh, 780px);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.modal-wide { width: min(760px, calc(100vw - 24px)); }
.modal::backdrop { background: rgba(26, 22, 17, 0.42); backdrop-filter: blur(3px); }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-soft);
}
.modal-head h2 { font-size: 16px; font-weight: 600; }
.modal-body { padding: 18px 20px 22px; overflow-y: auto; max-height: calc(88vh - 64px); display: grid; gap: 14px; }
.modal-lead { font-size: 12.5px; color: var(--muted); }

/* eksport 3D (PaletteCAD) */
.export-option {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 15px 16px; border-radius: 14px; background: #fff; border: 1px solid var(--line-soft);
}
.export-option + .export-option { margin-top: 10px; }
.export-option strong { display: block; font-size: 13.5px; font-weight: 600; }
.export-option p { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.export-option .btn { flex: 0 0 auto; white-space: nowrap; }
.export-note { margin-top: 14px; padding: 13px 15px; border-radius: 12px; background: #f8f4ee; font-size: 12px; line-height: 1.5; color: var(--muted); }
.export-note strong { color: var(--ink); font-weight: 600; }
.export-note em { font-style: normal; color: var(--ink); }
@media (max-width: 560px) {
  .export-option { flex-direction: column; align-items: stretch; }
  .export-option .btn { width: 100%; }
}

/* wymiana parametrów z PaletteCAD */
.pc-steps { margin: 0 0 16px; padding-left: 20px; font-size: 12.5px; color: var(--muted); line-height: 1.55; display: grid; gap: 5px; }
.pc-steps em { font-style: normal; color: var(--ink); }
.pc-file { display: block; cursor: pointer; }
.pc-file input { display: block; width: 100%; font-size: 12.5px; padding: 12px; border: 1px dashed var(--line); border-radius: 12px; background: #fff; }
.pc-file span { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
.pc-file input { margin-bottom: 0; }
.pc-file span { display: none; }
.pc-info { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-size: 13px; }
.pc-info strong { font-weight: 600; }
.pc-info span { font-size: 11.5px; color: var(--muted); }
.pc-info em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--muted); }
.pc-map { margin-top: 12px; display: grid; gap: 8px; }
.pc-row { display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 10px; font-size: 12.5px; }
.pc-row span { color: var(--muted); }
.pc-row select { padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: 12.5px; }
.pc-unit { margin-top: 12px; display: flex; align-items: center; gap: 14px; font-size: 12.5px; color: var(--muted); }
.pc-unit label { display: inline-flex; align-items: center; gap: 5px; color: var(--ink); }
.pc-pack { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.pc-file-sm input { padding: 9px; font-size: 12px; }
.pc-pack-hint { margin: 0; font-size: 11.5px; line-height: 1.5; color: var(--muted); }
.pc-pack-hint code { font-size: 11px; padding: 1px 4px; border-radius: 4px; background: rgba(0,0,0,.05); }
.pc-pack .btn { justify-self: start; }

.order-summary { padding: 14px; border-radius: 12px; background: #f8f4ee; border: 1px solid var(--line-soft); }
.os-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.os-head strong { display: block; font-size: 14px; }
.os-head span { font-size: 12px; color: var(--muted); }
.os-head b { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; white-space: nowrap; }
.order-summary dl { display: grid; gap: 4px; margin: 12px 0 0; padding-top: 11px; border-top: 1px dashed var(--line); }
.order-summary dl div { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; }
.order-summary dt { color: var(--muted); }
.order-summary dd { margin: 0; text-align: right; }

.os-done { display: grid; justify-items: center; text-align: center; gap: 7px; padding: 12px; }
.os-check { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(47, 107, 79, 0.12); color: var(--ok); font-size: 19px; }
.os-done strong { font-size: 15px; }
.os-done p { font-size: 12.5px; color: var(--muted); max-width: 40ch; }

.order-form { display: grid; gap: 11px; }

.table-wrap { max-height: 46vh; overflow: auto; border: 1px solid var(--line-soft); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
thead th {
  position: sticky;
  top: 0;
  background: #f6f2eb;
  text-align: left;
  padding: 8px 10px;
  font-weight: 600;
  font-size: 11px;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
tbody td { padding: 7px 10px; border-bottom: 1px solid var(--line-soft); font-variant-numeric: tabular-nums; }
tbody tr:nth-child(even) { background: #fcfaf6; }
tbody td:nth-child(n + 5) { text-align: right; }

/* ------------------------------------------------------------------ toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 90;
  transform: translate(-50%, 16px);
  padding: 10px 18px;
  border-radius: 99px;
  background: var(--ink);
  color: #fff;
  font-size: 12.5px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* --------------------------------------------------------------- responsywność */

@media (max-width: 1100px) {
  .workbench { grid-template-columns: 356px minmax(0, 1fr); }
  .head-nav { display: none; }
}

@media (max-width: 940px) {
  .hero { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 460px; }
  .hero-stage { aspect-ratio: 4 / 3; }
  .workbench {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
    border-radius: 18px;
    margin-inline: 10px;
  }
  .panel { border-right: 0; border-top: 1px solid var(--line-soft); }
  .stage { height: 54vh; min-height: 360px; order: -1; }
  .panel-scroll { max-height: none; overflow: visible; }
  .panel-foot { position: sticky; bottom: 0; z-index: 6; }
  .section-split, .steps { grid-template-columns: 1fr; }
  .stage-head { max-width: 62%; }
}

@media (max-width: 620px) {
  .site-head { gap: 12px; padding-inline: 14px; }
  .head-phone { display: none; }
  .head-actions .btn { height: 38px; padding: 0 14px; font-size: 13px; }
  .hero-stats { gap: 18px; }
  .workbench { margin-inline: 0; border-radius: 0; border-left: 0; border-right: 0; }
  .stage-tools { top: auto; bottom: 40px; right: 50%; transform: translateX(50%); }
  .stage-hint { bottom: 12px; font-size: 10px; }
  .stage-head { top: 14px; left: 14px; max-width: 80%; }
  .handle-types { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .panel-foot { padding: 10px 12px; }
  .panel-foot-actions .btn-ghost span { display: none; }
  .foot-note { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
}
