.toppc-cfg {
  --toppc-accent: #008186;
  --toppc-ink: #16181d;
  --toppc-muted: #6b7280;
  --toppc-line: #e5e7eb;
  --toppc-bg: #ffffff;
  --toppc-soft: #f6f7f9;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
  color: var(--toppc-ink);
  font-size: 15px;
  max-width: 1200px;
  margin: 0 auto;
}
.toppc-cfg *, .toppc-cfg *::before, .toppc-cfg *::after { box-sizing: border-box; }
.toppc-cfg button { font: inherit; color: inherit; }

.toppc-cfg__steps { display: flex; flex-direction: column; gap: 10px; }
.toppc-step { border: 1px solid var(--toppc-line); border-radius: 12px; background: var(--toppc-bg); overflow: hidden; }
.toppc-step.is-open { border-color: var(--toppc-ink); }
.toppc-step__head {
  width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: none; border: 0; cursor: pointer; text-align: left;
}
.toppc-step__num {
  flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--toppc-soft); font-weight: 700; font-size: 14px;
}
.toppc-step.is-done .toppc-step__num { background: var(--toppc-accent); color: #fff; }
.toppc-step__titles { display: flex; flex-direction: column; min-width: 0; }
.toppc-step__label { font-weight: 700; }
.toppc-step__chosen { color: var(--toppc-muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toppc-step__body { padding: 0 16px 16px; }
.toppc-step__search {
  width: 100%; padding: 10px 12px; margin-bottom: 12px; border: 1px solid var(--toppc-line);
  border-radius: 8px; font: inherit;
}
.toppc-step__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.toppc-step__empty { color: var(--toppc-muted); margin: 0; }
.toppc-step__clear { margin-top: 12px; background: none; border: 0; padding: 0; color: var(--toppc-muted); text-decoration: underline; cursor: pointer; }

.toppc-opt {
  display: flex; gap: 12px; align-items: center; padding: 10px; text-align: left; cursor: pointer;
  background: var(--toppc-bg); border: 1px solid var(--toppc-line); border-radius: 10px;
  transition: border-color .15s, box-shadow .15s;
}
.toppc-opt:hover:not(:disabled) { border-color: var(--toppc-ink); }
.toppc-opt.is-selected { border-color: var(--toppc-accent); box-shadow: 0 0 0 2px var(--toppc-accent) inset; }
.toppc-opt.is-blocked { opacity: .5; cursor: not-allowed; }
.toppc-opt[hidden] { display: none; }
.toppc-opt__img { flex: none; width: 56px; height: 56px; border-radius: 8px; background: var(--toppc-soft); overflow: hidden; display: grid; place-items: center; }
.toppc-opt__img img { width: 100%; height: 100%; object-fit: contain; }
.toppc-opt__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.toppc-opt__name { font-weight: 600; line-height: 1.3; }
.toppc-opt__note { font-size: 13px; line-height: 1.35; color: #374151; font-weight: 500; }
.toppc-opt__meta { font-size: 13px; color: var(--toppc-muted); }
.toppc-opt__reason { font-size: 13px; color: var(--toppc-accent); }

.toppc-cfg__summary {
  position: sticky; top: 96px; border: 1px solid var(--toppc-line); border-radius: 12px;
  padding: 18px; background: var(--toppc-bg);
}
.toppc-cfg__summary h2 { margin: 0 0 12px; font-size: 18px; }
.toppc-cfg__list { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.toppc-cfg__list li { display: flex; flex-direction: column; font-size: 14px; }
.toppc-cfg__list li span { color: var(--toppc-muted); font-size: 12px; }
.toppc-cfg__list li.is-empty strong { color: var(--toppc-muted); font-weight: 400; }
.toppc-cfg__errors p { margin: 0 0 8px; color: var(--toppc-accent); font-size: 14px; }
.toppc-cfg__price { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--toppc-line); }
.toppc-cfg__price strong { font-size: 24px; }
.toppc-cfg__buy {
  width: 100%; padding: 14px; border: 0; border-radius: 10px; cursor: pointer;
  background: var(--toppc-accent); color: #fff !important; font-weight: 700;
}
.toppc-cfg__buy:disabled { background: #c9ccd1; cursor: not-allowed; }
.toppc-cfg__note { margin: 10px 0 0; font-size: 13px; color: var(--toppc-muted); }

@media (max-width: 860px) {
  .toppc-cfg { grid-template-columns: 1fr; }
  .toppc-cfg__summary { position: static; }
  .toppc-step__grid { grid-template-columns: 1fr; }
}
.toppc-cfg__editing { grid-column: 1 / -1; margin: 0; padding: 12px 16px; border-radius: 10px; background: #e6f4f4; color: #00686c; font-size: 14px; }
.toppc-cfg__editing a { color: inherit; font-weight: 600; }

/* Filtry kroku (producent, socket, pojemność…) */
.toppc-filters { display: flex; flex-direction: column; gap: 8px; margin: 0 0 12px; }
.toppc-filters__row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.toppc-filters__label { font-size: 13px; font-weight: 600; color: var(--toppc-muted); min-width: 78px; }
.toppc-filters__chip { padding: 5px 12px; border: 1px solid var(--toppc-line); border-radius: 99px; background: var(--toppc-bg); font-size: 13px !important; font-weight: 600; cursor: pointer; line-height: 1.4; }
.toppc-filters__chip:hover { border-color: var(--toppc-ink); }
.toppc-filters__chip.is-on { background: var(--toppc-accent); border-color: var(--toppc-accent); color: #fff !important; }
.toppc-step__none[hidden] { display: none; }
.toppc-opt__img img { max-width: 100%; height: 100% !important; }
@media (max-width: 860px) { .toppc-filters__label { min-width: 100%; } }

/* Dwa tryby, dopłaty, sortowanie */
.toppc-cfg__main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.toppc-cfg__modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.toppc-cfg__modes[hidden] { display: none; }
.toppc-mode { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; text-align: left; border: 1px solid var(--toppc-line); border-radius: 12px; background: var(--toppc-bg); cursor: pointer; }
.toppc-mode strong { font-size: 16px; }
.toppc-mode span { font-size: 13px; color: var(--toppc-muted); }
.toppc-mode:hover { border-color: var(--toppc-ink); }
.toppc-mode.is-on { border-color: var(--toppc-accent); box-shadow: 0 0 0 2px var(--toppc-accent) inset; background: #f3fafa; }
.toppc-step__tools { display: flex; gap: 10px; margin-bottom: 12px; }
.toppc-step__tools .toppc-step__search { margin: 0; flex: 1; }
.toppc-step__sort { padding: 9px 10px; border: 1px solid var(--toppc-line); border-radius: 8px; font: inherit; font-size: 14px; background: #fff; margin-left: auto; }
.toppc-step__add { margin-left: auto; flex: none; font-size: 14px; font-weight: 700; color: var(--toppc-accent); }
.toppc-opt__add { font-size: 13px; font-weight: 700; color: var(--toppc-ink); margin-top: 2px; }
.toppc-opt__add.is-free { color: var(--toppc-accent); font-weight: 600; }
.toppc-simple__head { cursor: default; }
.toppc-combos { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.toppc-combo { display: flex; flex-direction: column; gap: 3px; padding: 14px; text-align: left; border: 1px solid var(--toppc-line); border-radius: 10px; background: var(--toppc-bg); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.toppc-combo:hover { border-color: var(--toppc-ink); }
.toppc-combo.is-selected { border-color: var(--toppc-accent); box-shadow: 0 0 0 2px var(--toppc-accent) inset; }
.toppc-combo__name { font-size: 16px; line-height: 1.3; margin-bottom: 2px; }
.toppc-combo__spec { font-size: 13px; color: var(--toppc-muted); }
.toppc-combo__price { margin-top: 8px; font-size: 18px; font-weight: 800; color: var(--toppc-accent); }
.toppc-sizes { display: flex; flex-wrap: wrap; gap: 8px; }
.toppc-size { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 110px; padding: 10px 14px; border: 1px solid var(--toppc-line); border-radius: 10px; background: var(--toppc-bg); cursor: pointer; text-align: left; }
.toppc-size strong { font-size: 16px; }
.toppc-size span { font-size: 13px; color: var(--toppc-muted); }
.toppc-size:hover { border-color: var(--toppc-ink); }
.toppc-size.is-selected { border-color: var(--toppc-accent); box-shadow: 0 0 0 2px var(--toppc-accent) inset; }
.toppc-simple__more { margin: 4px 0 0; font-size: 14px; color: var(--toppc-muted); }
.toppc-link { background: none; border: 0; padding: 0; color: var(--toppc-accent) !important; font-weight: 600; text-decoration: underline; cursor: pointer; }
@media (max-width: 600px) { .toppc-cfg__modes { grid-template-columns: 1fr; } .toppc-step__tools { flex-direction: column; } .toppc-step__sort { margin-left: 0; } }
.toppc-step.toppc-simple.is-open { border-color: var(--toppc-line); }

/* Otwarty krok wyraźniejszy niż następne */
.toppc-step.is-open:not(.toppc-simple) { box-shadow: 0 10px 30px rgba(20,23,26,.08); }
.toppc-step.is-open:not(.toppc-simple) .toppc-step__label { font-size: 18px; }
.toppc-step.is-open:not(.toppc-simple) .toppc-step__body { padding: 4px 20px 20px; }
.toppc-step:not(.is-open) .toppc-step__head { padding-top: 11px; padding-bottom: 11px; }

/* Duże karty: obudowy i chłodzenie */
.toppc-step__grid--big { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.toppc-opt--big { flex-direction: column; align-items: stretch; gap: 10px; padding: 10px 10px 12px; }
.toppc-opt--big .toppc-opt__img { position: relative; width: 100%; height: auto; aspect-ratio: 1 / 1; background: #fff; border-radius: 8px; }
.toppc-opt--big .toppc-opt__img img { width: 100%; height: 100% !important; object-fit: contain; }
.toppc-opt--big .toppc-opt__text { padding: 0 4px; }
.toppc-opt__img img { mix-blend-mode: multiply; }
.toppc-zoom { position: absolute; right: 6px; bottom: 6px; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.92); box-shadow: 0 2px 8px rgba(0,0,0,.15); display: grid; place-items: center; color: var(--toppc-ink); cursor: zoom-in; }
.toppc-zoom:hover, .toppc-zoom:focus-visible { background: var(--toppc-accent); color: #fff; outline: none; }

/* Przełącznik: chłodzenie powietrzne / wodne */
.toppc-coolview { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 12px; }
.toppc-coolview__label { font-size: 13px; font-weight: 600; color: var(--toppc-muted); }
.toppc-coolview__seg { display: inline-flex; padding: 3px; border-radius: 99px; background: var(--toppc-soft); border: 1px solid var(--toppc-line); }
.toppc-coolview__seg button { border: 0; background: none; padding: 6px 14px; border-radius: 99px; font-size: 13px !important; font-weight: 600; cursor: pointer; color: var(--toppc-muted) !important; transition: background .15s, color .15s; }
.toppc-coolview__seg button.is-on { background: var(--toppc-accent); color: #fff !important; box-shadow: 0 1px 3px rgba(0,0,0,.15); }

/* Powiększenie zdjęć */
.toppc-lb { width: min(860px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 18px; border: 0; border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,.3); box-sizing: border-box; }
.toppc-lb::backdrop { background: rgba(20,23,26,.7); }
.toppc-lb__x { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #f1f3f5; font-size: 22px; cursor: pointer; z-index: 2; }
.toppc-lb__title { margin: 0 44px 10px 0; font-weight: 700; font-size: 16px; }
.toppc-lb__stage { position: relative; display: flex; align-items: center; justify-content: center; background: #fff; }
.toppc-lb__stage img { max-width: 100%; max-height: calc(100vh - 230px); object-fit: contain; }
.toppc-lb__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); box-shadow: 0 2px 8px rgba(0,0,0,.2); font-size: 26px; line-height: 1; cursor: pointer; }
.toppc-lb__nav[data-d="-1"] { left: 4px; } .toppc-lb__nav[data-d="1"] { right: 4px; }
.toppc-lb__nav[hidden], .toppc-lb__thumbs[hidden] { display: none; }
.toppc-lb__cool { display: flex; justify-content: center; margin-top: 10px; }
.toppc-lb__cool .toppc-coolview { margin: 0; }
.toppc-lb__thumbs { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.toppc-lb__thumbs button { width: 58px; height: 58px; padding: 2px; border: 2px solid transparent; border-radius: 8px; background: #fff; cursor: pointer; }
.toppc-lb__thumbs button.is-on { border-color: #008186; }
.toppc-lb__thumbs img { width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 600px) { .toppc-step__grid--big { grid-template-columns: 1fr 1fr; } }
.toppc-lb { --toppc-accent: #008186; --toppc-ink: #16181d; --toppc-muted: #6b7280; --toppc-line: #e5e7eb; --toppc-bg: #ffffff; --toppc-soft: #f6f7f9; color: var(--toppc-ink); }
.toppc-lb button { font: inherit; }

/* 0.10.4: zdjęcia zawsze mieszczą się w ramce (bez ucinania dołu) */
.toppc-opt__img { position: relative; display: block; }
.toppc-opt__img img, .toppc-opt--big .toppc-opt__img img { position: absolute; inset: 0; box-sizing: border-box; display: block; width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important; margin: 0 !important; object-fit: contain; object-position: center; }
.toppc-opt--big .toppc-opt__img { flex: none; height: 0; padding-bottom: 100%; aspect-ratio: auto; }
.toppc-opt--big .toppc-opt__img img { padding: 6px; }
.toppc-zoom { z-index: 1; }

/* 0.10.5: kółko ładowania zdjęć */
.toppc-opt__img::before, .toppc-lb__stage::before { content: ""; position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border: 2px solid rgba(0,0,0,.12); border-top-color: var(--toppc-accent, #0a7f7a); border-radius: 50%; animation: toppc-spin .8s linear infinite; z-index: 0; pointer-events: none; }
.toppc-opt__img:not(.toppc-opt--big *)::before { width: 16px; height: 16px; margin: -8px 0 0 -8px; }
.toppc-lb__stage::before { width: 34px; height: 34px; margin: -17px 0 0 -17px; border-width: 3px; }
.toppc-opt__img.is-loaded::before, .toppc-lb__stage.is-loaded::before { display: none; }
.toppc-opt__img img, .toppc-lb__stage img { position: relative; z-index: 0; }
.toppc-opt__img img { position: absolute; }
@keyframes toppc-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .toppc-opt__img::before, .toppc-lb__stage::before { animation-duration: 2s; } }

/* 0.12.3: tryb prosty – zwinięte sekcje po wyborze */
.toppc-simple__picked { display: flex; align-items: center; gap: 14px; padding: 4px 0; }
.toppc-simple__picked .toppc-opt__img { width: 72px; height: 72px; background: #fff; border: 1px solid var(--toppc-line); }
.toppc-simple__picked-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.toppc-simple__picked-text span { color: var(--toppc-muted); font-size: 14px; }
.toppc-step__hint { margin: 0; color: var(--toppc-muted); font-size: 14px; }

.toppc-cfg__note--fine, .toppc-step__fine { font-size: 12px; line-height: 1.5; color: var(--toppc-muted); }
.toppc-step__fine { margin: 10px 0 0; }

.toppc-badge-refurb { display:inline-block; margin-left:6px; padding:1px 7px; border-radius:999px; background:#fef3c7; color:#92400e; border:1px solid #fcd34d; font-size:11px; font-weight:700; line-height:1.5; vertical-align:middle; white-space:nowrap; }

.toppc-opt__nocool { position:absolute; z-index:1; left:6px; right:6px; top:6px; padding:3px 8px; border-radius:6px; background:rgba(17,24,39,.78); color:#fff; font-size:11px; font-weight:600; line-height:1.35; text-align:center; pointer-events:none; }
.toppc-step__group { grid-column:1 / -1; margin:14px 0 2px; padding-top:12px; border-top:1px dashed #d1d5db; font-size:13px; font-weight:600; color:#6b7280; }
.toppc-cfg__incl { font-style:normal; font-weight:500; color:#008186; font-size:12px; margin-left:4px; }
.toppc-cfg .toppc-simple__next { display: inline-block; margin-top: 12px; padding: 8px 22px; border: 0; border-radius: 99px; background: var(--toppc-accent); color: #fff !important; font-weight: 700; font-size: 14px; cursor: pointer; }
.toppc-cfg .toppc-simple__next:hover { filter: brightness(1.08); }
