/* Konfigurator broni – wersja z wizualizacją, wg design/konfigurator.png (1817 px).
   Wersja prosta ma własny, zamrożony arkusz: prosty/style.css. */
:root {
  --green: #1a4033; --green-2: #24503f; --green-soft: #eef3f1; --ink: #1c211f; --muted: #6c7470; --muted-2: #9aa19d;
  --line: #e3e7e4; --line-2: #d4d9d6; --page: #f7f8f7; --card: #ffffff; --opt: #f5f6f5; --stage: #f9f9f9;
  --radius: 10px; --shadow: 0 6px 24px rgba(20, 30, 25, .07); --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', 'Segoe UI', Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--sans); color: var(--ink); background: var(--page); font-size: 14px; line-height: 1.45; overflow-x: hidden; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
a { color: inherit; }
.ico { width: 100%; height: 100%; display: block; }
[data-ico], .ico-wrap { display: inline-flex; width: 18px; height: 18px; flex: 0 0 auto; }

/* ===== nagłówek ===== */
.hdr { display: flex; align-items: center; gap: 24px; height: 56px; padding: 0 44px 0 64px; background: #fff; border-bottom: 1px solid var(--line); position: relative; z-index: 5; }
.hdr__brand { display: flex; align-items: center; gap: 26px; flex: 0 0 auto; }
.hdr__logo img { height: 42px; width: auto; }
.hdr__title { font-size: 12px; font-weight: 500; letter-spacing: .02em; text-transform: uppercase; color: var(--ink); padding-left: 22px; border-left: 1px solid var(--line); line-height: 30px; }
.hdr__nav { display: flex; gap: 29px; margin-left: auto; margin-right: auto; padding-left: 110px; }
.hdr__nav a { font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .02em; text-decoration: none; }
.hdr__nav a:hover { color: var(--green); }
.hdr__tools { display: flex; align-items: center; gap: 22px; }
.hdr__search { display: flex; align-items: center; gap: 8px; }
.hdr__search input { border: 0; outline: 0; background: transparent; font: inherit; font-size: 12px; width: 92px; color: var(--ink); }
.hdr__search input::placeholder { color: var(--muted-2); }
.hdr__ico { width: 18px; height: 18px; color: var(--ink); }
.hdr__sep { width: 1px; height: 18px; background: var(--line-2); }
.hdr__contact { display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 600; text-decoration: none; }
.hdr__contact:last-of-type { font-weight: 500; }
.hdr__cart .hdr__ico { width: 20px; height: 20px; }

/* ===== układ ===== */
.page { display: grid; grid-template-columns: minmax(0, 1fr) 514px; gap: 28px; padding: 16px 25px 30px 64px; align-items: start; max-width: 1920px; margin: 0 auto; }
.main { min-width: 0; }

/* ===== kroki ===== */
.steps { display: flex; align-items: center; height: 54px; margin: -6px 0 14px; }
.steps__item { display: flex; align-items: center; gap: 16px; background: none; border: 0; padding: 0 0 0; height: 54px; cursor: pointer; position: relative; flex: 0 0 auto; }
.steps__item:disabled { cursor: not-allowed; opacity: .55; }
.steps__num { width: 31px; height: 31px; border-radius: 50%; border: 1px solid var(--line-2); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 500; color: var(--ink); background: #fff; }
.steps__label { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #3b423f; }
.steps__line { flex: 0 1 52px; height: 1px; background: var(--line-2); margin: 0 14px; min-width: 16px; }
.steps__item.is-active .steps__num { background: var(--green); border-color: var(--green); color: #fff; font-weight: 600; }
.steps__item.is-active .steps__label { color: var(--ink); font-weight: 700; }
.steps__item.is-active::after { content: ""; position: absolute; left: 0; right: -18px; bottom: 0; height: 3px; background: var(--green); border-radius: 2px; }
.steps__item.is-done .steps__num { border-color: var(--green); color: var(--green); }

/* ===== karta z podglądem ===== */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.viewer { position: relative; background: linear-gradient(180deg, #fbfbfb 0%, var(--stage) 100%); height: 246px; overflow: hidden; }
.viewer__frame { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.viewer__zoom { width: min(960px, 80%); transition: transform .45s cubic-bezier(.2, .7, .2, 1); will-change: transform; }
.preview { position: relative; width: 100%; aspect-ratio: 950 / 216; }
.preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.preview::after { content: ""; position: absolute; left: 12%; right: 20%; bottom: -14%; height: 18%; background: radial-gradient(ellipse at center, rgba(0, 0, 0, .16) 0%, rgba(0, 0, 0, .05) 45%, transparent 70%); pointer-events: none; }
.viewer.is-zoomed .preview::after { display: none; }
.preview .preview__label { width: 100%; height: auto; top: 50%; bottom: auto; transform: translateY(-50%); }
.preview__empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 14px; }
.viewer__btn { position: absolute; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 3px 12px rgba(0, 0, 0, .12); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink); z-index: 2; }
.viewer__btn [data-ico] { width: 18px; height: 18px; }
.viewer__btn:hover { background: var(--green); color: #fff; }
.viewer__btn--prev { left: 20px; top: 50%; transform: translateY(-50%); }
.viewer__btn--next { right: 20px; top: 50%; transform: translateY(-50%); }
.viewer__btn--fs { right: 20px; top: 20px; }
.viewer__btn--fs [data-ico] { width: 16px; height: 16px; }
.viewer__dots { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 9px; z-index: 2; }
.viewer__dot { width: 16px; height: 5px; border-radius: 3px; border: 0; padding: 0; background: #cdd1ce; cursor: pointer; }
.viewer__dot.is-active { width: 25px; background: var(--green); }
.viewer__note { position: absolute; right: 22px; bottom: 11px; font-size: 11px; color: var(--muted-2); z-index: 2; }
.viewer__label { position: absolute; left: 20px; top: 24px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); z-index: 2; }

/* ===== nazwa + cena ===== */
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding: 12px 16px 16px 0; margin: 0 30px 0 31px; border-bottom: 1px solid var(--line); }
.head__title { font-family: var(--serif); font-weight: 700; font-size: 37px; line-height: 1.1; margin: 0; color: #1f2a26; letter-spacing: -.005em; }
.head__desc { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.head__price { text-align: right; flex: 0 0 auto; padding-bottom: 2px; }
.head__label { display: block; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.head__value { display: block; font-family: var(--serif); font-weight: 700; font-size: 41px; line-height: 1.05; color: var(--green); white-space: nowrap; }

/* ===== wybrane opcje ===== */
.chosen-head { display: flex; align-items: center; gap: 16px; padding: 16px 30px 10px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--green); }
.chosen-head [data-ico] { width: 20px; height: 20px; color: var(--ink); }
.chosen { list-style: none; margin: 0; padding: 0 30px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 20px; }
.opt { display: flex; align-items: center; gap: 18px; background: var(--opt); border-radius: 6px; padding: 8px 14px 8px 20px; min-height: 42px; }
.opt__ico { width: 28px; height: 28px; flex: 0 0 28px; color: #2a302d; }
.opt__txt { display: flex; flex-direction: column; min-width: 0; }
.opt__label { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.opt__val { font-size: 12.5px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.opt__price { font-size: 12px; font-weight: 700; color: var(--green); line-height: 1.3; }
.opt__price--side { margin-left: auto; padding-left: 10px; white-space: nowrap; font-size: 11.5px; }
.actions { display: flex; justify-content: flex-end; gap: 14px; padding: 16px 30px 26px; }

/* ===== przyciski ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: 4px; padding: 0 22px; height: 32px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; border: 1px solid transparent; transition: background .15s, color .15s, border-color .15s; }
.btn [data-ico] { width: 14px; height: 14px; }
.btn--outline { background: #fff; border-color: var(--green); color: var(--green); min-width: 238px; }
.btn--outline:hover { background: var(--green-soft); }
.btn--primary { background: var(--green); color: #fff; border-color: var(--green); }
.btn--primary:hover { background: var(--green-2); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ===== panel po prawej ===== */
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); position: sticky; top: 16px; display: flex; flex-direction: column; max-height: calc(100vh - 96px); margin-top: 4px; overflow: hidden; }
.panel__inner { overflow-y: auto; padding: 14px 20px 20px 22px; flex: 1 1 auto; scrollbar-width: thin; }
.group { margin-bottom: 26px; }
.group__head { display: flex; align-items: center; gap: 16px; padding: 12px 0 13px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.group__ico { width: 26px; height: 26px; flex: 0 0 26px; color: var(--ink); }
.group__title { font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.group__sel { margin-left: auto; font-size: 11.5px; color: var(--muted-2); text-align: right; max-width: 45%; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.tile { position: relative; display: flex; flex-direction: column; align-items: stretch; text-align: left; background: #fff; border: 2px solid transparent; border-radius: 8px; padding: 8px 8px 16px; cursor: pointer; box-shadow: 0 2px 10px rgba(20, 30, 25, .07); transition: border-color .15s, box-shadow .15s, transform .15s; }
.tile:hover { box-shadow: 0 6px 18px rgba(20, 30, 25, .12); transform: translateY(-1px); }
.tile.is-selected { border-color: var(--green); box-shadow: none; }
/* 11.10: kafle kwadratowe, cały obrazek widoczny (ikony opcji i zdjęcia modeli są kwadratowe 180/720 px – wcześniej kadr 213/128 „cover” ucinał je z prawej) */
.tile__img { width: 100%; aspect-ratio: 1 / 1; border-radius: 6px; background: #f1f2f1 center / contain no-repeat; margin-bottom: 16px; }
.tile__img--rifle { background-color: #f0f0ef; background-size: contain; background-position: center; }
.tile__img--hand { background-color: #f3f4f3; background-size: cover; background-position: center; aspect-ratio: 213 / 92; }
.tile__img--none { display: flex; align-items: center; justify-content: center; color: #c5cac7; padding: 12% 0; }
.tile__img--none .ico { width: 34%; height: auto; max-height: 100%; }
.opt.is-more { display: none; }
.opt-more .btn { width: 100%; }
.tile__name { font-size: 14.5px; font-weight: 700; color: var(--ink); padding: 0 8px; line-height: 1.35; }
.tile__price { font-size: 14.5px; font-weight: 700; color: var(--green); padding: 12px 8px 0; }
.tile__price.is-zero { color: var(--muted-2); font-weight: 500; }
.tile__desc { font-size: 13px; color: var(--muted); padding: 12px 8px 0; line-height: 1.4; }
.tile__mark { position: absolute; top: 9px; right: 9px; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid #c9cecb; background: #fff; display: flex; align-items: center; justify-content: center; }
.tile__mark.is-on { background: var(--green); border-color: #fff; color: #fff; padding: 4px; box-shadow: 0 0 0 1px var(--green); }
.tile--rifles .tile__mark:not(.is-on) { display: none; }
.tile--weapon { padding: 16px; }
.panel__foot { display: flex; align-items: center; gap: 16px; background: var(--green-soft); border-top: 1px solid var(--line); padding: 24px 20px 24px 22px; flex: 0 0 auto; }
.panel__total { display: flex; flex-direction: column; margin-right: auto; }
.panel__total span { font-size: 13px; color: var(--muted); }
.panel__total strong { font-size: 24px; font-weight: 700; color: var(--green); white-space: nowrap; }
.btn--nav { height: 52px; min-width: 126px; font-size: 12px; }
.btn--nav.btn--outline { min-width: 126px; }
.btn--nav.btn--primary { min-width: 152px; }
.hint { color: var(--muted); font-size: 13px; }

/* ===== podsumowanie + formularz ===== */
.summary table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 22px; }
.summary td { padding: 7px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.summary td:first-child { color: var(--muted); width: 38%; }
.summary td:last-child { text-align: right; white-space: nowrap; font-weight: 600; }
.summary tr.total td { font-weight: 700; color: var(--green); font-size: 15px; border-bottom: 0; padding-top: 12px; }
.form { display: flex; flex-direction: column; gap: 12px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; color: var(--muted); }
.form input, .form textarea { font: inherit; font-size: 14px; border: 1px solid var(--line-2); border-radius: 6px; padding: 10px 12px; color: var(--ink); }
.form textarea { min-height: 80px; resize: vertical; }
.form .consent { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 500; }
.form .btn { height: 46px; }
.msg { padding: 10px 12px; border-radius: 6px; font-size: 13px; }
.msg--ok { background: var(--green-soft); color: var(--green); }
.msg--err { background: #fbeceb; color: #9b2c24; }

/* ===== pełny ekran ===== */
.fs { position: fixed; inset: 0; z-index: 50; background: #fff; display: flex; flex-direction: column; }
.fs[hidden] { display: none; }
body.fs-open { overflow: hidden; }
.fs__bar { display: flex; align-items: center; gap: 22px; padding: 18px 28px; border-bottom: 1px solid var(--line); }
.fs__title { font-family: var(--serif); font-size: 24px; font-weight: 700; }
.fs__view { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.fs__close { margin-left: auto; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-2); background: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.fs__close [data-ico] { width: 18px; height: 18px; }
.fs__stage { flex: 1 1 auto; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at center, #fff 0%, #f4f5f4 100%); }
.fs__zoom { width: min(94vw, calc((100vh - 170px) * 4.4)); transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
.fs .viewer__btn--prev, .fs .viewer__btn--next { width: 52px; height: 52px; }
.fs__dots { position: absolute; bottom: 26px; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 6px; font-size: 13px; z-index: 60; }

/* ===== komputer: strona mieści się w oknie – lewa część przewija się w środku, panel z Wstecz/Dalej zawsze widoczny ===== */
@media (min-width: 1101px) {
  body { height: 100vh; overflow: hidden; }
  .page { height: calc(100vh - 56px); align-items: stretch; padding-bottom: 16px; }
  .main { height: 100%; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; padding-right: 8px; margin-right: -8px; }
  .steps { position: sticky; top: 0; z-index: 3; background: var(--page); margin-top: -16px; padding-top: 16px; height: 70px; }
  .panel { position: relative; top: 0; height: 100%; max-height: none; margin-top: 0; }
}

/* ===== laptop ===== */
@media (max-width: 1600px) {
  .page { grid-template-columns: minmax(0, 1fr) 460px; padding-left: 32px; gap: 22px; }
  .hdr { padding: 0 28px 0 32px; }
  .hdr__nav { padding-left: 20px; gap: 22px; }
  .hdr__contact:last-of-type span:last-child { display: none; }
  .chosen { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel__foot { gap: 10px; padding: 20px 18px; }
  .panel__total span { white-space: nowrap; }
  .panel__total strong { font-size: 22px; }
  .btn--nav { padding: 0 14px; }
  .btn--nav.btn--outline { min-width: 108px; }
  .btn--nav.btn--primary { min-width: 124px; }
  .steps__label { font-size: 10.5px; }
  .steps__item { gap: 10px; }
  .steps__line { margin: 0 8px; }
}
@media (max-width: 1280px) {
  .hdr__search, .hdr__sep { display: none; }
  .head__title { font-size: 31px; }
  .head__value { font-size: 34px; }
}
/* ===== tablet / telefon: jedna kolumna ===== */
@media (max-width: 1100px) {
  .page { grid-template-columns: 1fr; padding: 12px 16px 24px; }
  .panel { position: static; max-height: none; margin-top: 0; }
  .panel__inner { overflow: visible; }
  .panel__foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; box-shadow: 0 -6px 18px rgba(20, 30, 25, .08); }
  body { padding-bottom: 104px; }
  .panel { overflow: visible; }
  .hdr { padding: 0 16px; gap: 14px; }
  .hdr__nav { display: none; }
  .hdr__tools { margin-left: auto; gap: 16px; }
  .hdr__contact span:last-child { display: none; }
  .steps { overflow-x: auto; scrollbar-width: none; }
  .steps__line { min-width: 12px; }
}
@media (max-width: 700px) {
  .hdr__title { display: none; }
  .hdr__logo img { height: 36px; }
  .viewer { height: 170px; }
  .viewer__zoom { width: 84%; }
  .viewer__btn { width: 34px; height: 34px; }
  .viewer__btn--prev { left: 8px; } .viewer__btn--next { right: 8px; }
  .viewer { height: 190px; }
  .viewer__dots { bottom: 30px; }
  .viewer__note { left: 12px; right: 12px; bottom: 8px; text-align: center; font-size: 10px; }
  .head { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 16px 14px; margin: 0 8px; }
  .head__price { text-align: left; }
  .head__title { font-size: 27px; }
  .head__value { font-size: 30px; }
  .chosen-head { padding: 14px 16px 8px; }
  .chosen { grid-template-columns: 1fr; padding: 0 16px; }
  .actions { flex-direction: column; padding: 14px 16px 18px; }
  .btn--outline { min-width: 0; width: 100%; }
  .steps__label { display: none; }
  .steps__item.is-active .steps__label { display: inline; }
  .steps__item.is-active::after { right: 0; }
  .panel__inner { padding: 8px 14px 14px; }
  .tiles { gap: 10px; }
  .tile__name, .tile__price { font-size: 13.5px; }
  .tile__desc { font-size: 12.5px; }
  .panel__foot { padding: 10px 14px 12px; gap: 8px 10px; display: grid; grid-template-columns: 1fr 1fr; }
  body { padding-bottom: 118px; }
  .panel__total { grid-column: 1 / -1; flex-direction: row; align-items: baseline; justify-content: space-between; margin: 0; }
  .panel__total strong { font-size: 20px; }
  .btn--nav { height: 44px; min-width: 0 !important; padding: 0 12px; width: 100%; }
  .form .row { grid-template-columns: 1fr; }
  .fs__title { font-size: 18px; }
  .fs__zoom { width: 96vw; }
}
