/* Cenová kalkulácia */
.calc { padding: clamp(28px, 4vw, 44px) 0 clamp(40px, 5.5vw, 72px); background: var(--white); }
.calc__grid { display: grid; grid-template-columns: 1fr 340px; gap: clamp(24px, 4vw, 56px); align-items: start; }

.steps { list-style: none; margin: 0 0 28px; padding: 0; display: flex; border-top: 1.5px solid var(--ink); }
.steps li {
  flex: 1; padding: 14px 12px 0 0; font: 500 .85rem var(--f-mono); color: var(--muted);
  display: flex; gap: 10px; align-items: center; border-top: 3px solid transparent; margin-top: -2px;
}
.steps li span {
  width: 24px; height: 24px; border: 1.5px solid currentColor; border-radius: 50%;
  display: inline-grid; place-items: center; font-size: .75rem; flex: none;
}
.steps li.is-active { color: var(--ink); border-top-color: var(--red); }
.steps li.is-active span { background: var(--ink); border-color: var(--ink); color: #fff; }
.steps li.is-done { color: var(--ink-2); }
.steps li.is-done span { background: var(--paper-2); }

.panel__h { font-size: 1.05rem; font: 600 .78rem var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 28px 0 12px; }
.panel__h:first-of-type { margin-top: 0; }
.panel__h--big { font: 700 clamp(1.6rem, 3vw, 2.2rem)/1.1 var(--f-sans); text-transform: none; letter-spacing: -0.02em; color: var(--ink); margin: 6px 0 12px; }
.panel__top { margin-bottom: 20px; }
.panel__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.link-back { background: none; border: 0; padding: 0; font: 500 .85rem var(--f-mono); color: var(--muted); cursor: pointer; }
.link-back:hover { color: var(--ink); text-decoration: underline; }

.calc__notice { background: #fdf0f0; border-left: 3px solid var(--red); padding: 14px 16px; margin: 0 0 24px; }

/* dlaždice produktov */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tiles--sm { grid-template-columns: repeat(3, 1fr); }
.tile {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 18px;
  padding: 18px 16px 16px; text-align: left; cursor: pointer;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  font: 600 1rem/1.2 var(--f-sans); color: var(--ink);
  transition: border-color .15s, background .15s, transform .15s;
}
.tile svg { width: 56px; height: 58px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; }
.tile svg .d { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.tile svg .h { stroke: var(--red); stroke-width: 3; stroke-linecap: round; }
.tile svg .t { stroke: var(--muted); stroke-width: 1; }
.tile i { position: absolute; top: 12px; right: 14px; font: 500 1.2rem var(--f-mono); font-style: normal; color: var(--muted); }
.tile:hover { border-color: var(--ink); background: #fff; }
.tile:hover i { color: var(--red); }
.tiles--sm .tile { flex-direction: row; align-items: center; gap: 14px; padding: 14px; }
.tiles--sm .tile svg { width: 38px; height: 40px; }

/* konfigurácia */
.config { display: grid; grid-template-columns: 1fr 300px; gap: 32px; align-items: start; }
.config__preview { margin: 0; position: sticky; top: 104px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; }
.config__preview svg { width: 100%; height: auto; display: block; }
.config__preview figcaption { font: .74rem/1.4 var(--f-mono); color: var(--muted); padding: 8px 4px 2px; border-top: 1px dashed var(--line-2); }
.config__preview .frame, .config__preview .sash { stroke: var(--ink); stroke-width: 1.3; }
.config__preview .glass { stroke: var(--ink-2); stroke-width: .8; }
.config__preview .dpanel { stroke: var(--ink-2); stroke-width: .8; }
.config__preview .mull { stroke: var(--ink); stroke-width: 1.3; }
.config__preview .open { stroke: var(--ink-2); stroke-width: .7; stroke-dasharray: 4 3; fill: none; }
.config__preview .handle { fill: var(--red); }
.config__preview .slat { stroke: var(--ink-2); stroke-width: 1.2; }
.config__preview .ground { stroke: var(--ink); stroke-width: 2; }
.config__preview .fixlbl { font: 600 11px var(--f-mono); fill: var(--ink-2); text-anchor: middle; }
.config__preview .dim line { stroke: var(--red); stroke-width: .9; }
.config__preview .dim text { font: 600 10.5px var(--f-mono); fill: var(--red); text-anchor: middle; }

.fs { border: 0; padding: 0; margin: 0 0 24px; }
.fs legend { font: 600 .78rem var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); margin-bottom: 10px; padding: 0; }
.hint { font-size: .85rem; color: var(--muted); margin: 8px 0 0; }

.dims { display: flex; align-items: flex-end; gap: 10px; }
.dims .field { flex: 1; max-width: 200px; }
.dims__x { font: 500 1.1rem var(--f-mono); color: var(--muted); padding-bottom: 13px; }

.field { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; }
.field > span:first-child { color: var(--ink-2); font-weight: 500; }
.field input, .field textarea {
  width: 100%; font: 400 1rem var(--f-sans); color: var(--ink);
  padding: 12px 12px; border: 1px solid var(--line-2); border-radius: var(--r); background: #fff;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(23,25,27,.08); }
.unit { position: relative; display: block; }
.unit input { padding-right: 44px; font-family: var(--f-mono); font-weight: 500; }
.unit em { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font: .8rem var(--f-mono); font-style: normal; color: var(--muted); }
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--red); background: #fff7f7; }
.check.is-invalid span { color: var(--red-ink); }

.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { position: relative; cursor: pointer; }
.opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.opt span {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; font-size: .93rem;
  border: 1px solid var(--line-2); border-radius: var(--r); background: #fff; transition: border-color .12s, background .12s;
}
.opt span::before {
  content: ""; width: 12px; height: 12px; border: 1.5px solid var(--ink-2); border-radius: 50%; flex: none;
}
.opts--multi .opt span::before { border-radius: 2px; }
.opt input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; }
.opt input:checked + span::before { border-color: #fff; background: radial-gradient(circle, #fff 0 3px, transparent 3.5px); }
.opts--multi .opt input:checked + span::before { background: var(--red); border-color: var(--red); }
.opt input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
.opt:hover span { border-color: var(--ink); }

.stepper { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r); background: #fff; overflow: hidden; }
.stepper button { width: 44px; border: 0; background: var(--paper); font: 500 1.2rem var(--f-mono); cursor: pointer; color: var(--ink); }
.stepper button:hover { background: var(--paper-2); }
.stepper input { width: 64px; text-align: center; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); font: 600 1rem var(--f-mono); padding: 11px 0; }

.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.field--full { grid-column: 1 / -1; }
.field--hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--red); flex: none; }
.form-error { color: var(--red-ink); font-weight: 600; margin: 16px 0 0; }

.done { padding: 8px 0; }
.summary-pre { white-space: pre-wrap; font: .85rem/1.5 var(--f-mono); background: var(--paper); border: 1px solid var(--line); padding: 16px; border-radius: var(--r); margin-top: 20px; }

/* košík */
.cart { position: sticky; top: 104px; }
.cart__in { background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--ink); border-radius: 0 0 var(--r) var(--r); padding: 20px; }
.cart__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.cart__head h2 { font-size: 1.15rem; margin: 0; }
.cart__count { font: 600 .8rem var(--f-mono); background: var(--ink); color: #fff; min-width: 24px; height: 24px; display: inline-grid; place-items: center; border-radius: 12px; padding: 0 7px; }
.cart__list { list-style: none; margin: 0; padding: 0; }
.cart__list li { padding: 14px 0; border-bottom: 1px dashed var(--line-2); }
.cart__row { display: flex; justify-content: space-between; gap: 10px; }
.cart__qty { font: 600 .85rem var(--f-mono); white-space: nowrap; }
.cart__list p { font-size: .84rem; color: var(--ink-2); margin: 4px 0 6px; line-height: 1.45; }
.cart__acts { display: flex; gap: 14px; }
.cart__acts button { background: none; border: 0; padding: 0; font: 500 .78rem var(--f-mono); color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.cart__acts button:hover { color: var(--red-ink); }
.cart__empty { color: var(--muted); font-size: .92rem; margin: 6px 0 16px; }
.cart__next { width: 100%; justify-content: center; margin-top: 16px; }
.cart__next:disabled { opacity: .35; cursor: not-allowed; }
.cart__help { font-size: .85rem; color: var(--muted); margin: 14px 0 0; text-align: center; }

@media (max-width: 1080px) {
  .calc__grid { grid-template-columns: 1fr; }
  .cart { position: static; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .config { grid-template-columns: 1fr; }
  .config__preview { position: static; order: -1; max-width: 230px; }
  .tiles--sm { grid-template-columns: 1fr; }
  .fgrid { grid-template-columns: 1fr; }
  .steps li { font-size: .72rem; gap: 6px; }
}
