/* ============================================================
   KONFIGURATOR OGRODZEŃ – MODERN PREMIUM REDESIGN
   Wklej NA KOŃCU obecnego pliku CSS.
   Nie wymaga zmian w HTML ani JS.
   ============================================================ */

:root {
  --fc-bg: #0a0d10;
  --fc-bg2: #10151a;
  --fc-bg3: #161c22;
  --fc-bg4: #202830;
  --fc-border: rgba(255,255,255,.08);
  --fc-border2: rgba(255,255,255,.14);

  --fc-gold: #d6a96f;
  --fc-gold-dark: #a97942;
  --fc-gold-light: #f1c990;

  --fc-text: #f4f6f8;
  --fc-text2: #aab3bd;
  --fc-text3: #6e7883;
  --fc-white: #fff;
  --fc-green: #63c59a;
  --fc-red: #f06b6b;

  --fc-radius: 14px;
  --fc-radius-lg: 22px;

  --fc-shadow: 0 24px 70px rgba(0,0,0,.42);
  --fc-shadow-sm: 0 10px 30px rgba(0,0,0,.24);
  --fc-trans: all .25s cubic-bezier(.2,.8,.2,1);
}

/* ── Base / tło ───────────────────────────────────────────── */
.fc-root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system,
               BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 15% 0%, rgba(214,169,111,.10), transparent 30%),
    radial-gradient(circle at 90% 10%, rgba(88,120,140,.08), transparent 28%),
    linear-gradient(145deg, #090c0f 0%, #0d1217 48%, #090c0f 100%);
  color: var(--fc-text);
  letter-spacing: -.01em;
  isolation: isolate;
}

.fc-root::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: .28;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

/* ── Przyciski ─────────────────────────────────────────────── */
.fc-btn-primary,
.fc-btn-secondary,
.fc-btn-outline {
  min-height: 46px;
  border-radius: 13px;
  padding: 12px 20px;
  font-weight: 650;
  letter-spacing: .01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.fc-btn-primary {
  color: #17120c;
  background: linear-gradient(135deg, #f0ca91 0%, #d6a96f 48%, #b9854d 100%);
  box-shadow:
    0 10px 28px rgba(214,169,111,.18),
    inset 0 1px 0 rgba(255,255,255,.42);
}

.fc-btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #f7d6a3 0%, #dfb477 48%, #c38e52 100%);
  box-shadow:
    0 16px 36px rgba(214,169,111,.26),
    inset 0 1px 0 rgba(255,255,255,.5);
}

.fc-btn-primary:active:not(:disabled) {
  transform: translateY(0) scale(.98);
}

.fc-btn-secondary,
.fc-btn-outline {
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(12px);
}

.fc-btn-secondary:hover,
.fc-btn-outline:hover {
  transform: translateY(-2px);
  border-color: rgba(214,169,111,.55);
  background: rgba(214,169,111,.08);
  color: var(--fc-gold-light);
}

.fc-btn-link {
  color: var(--fc-text2);
  font-weight: 550;
}

.fc-btn-link:hover {
  color: var(--fc-gold-light);
  transform: translateX(-2px);
}

/* ── Pola ──────────────────────────────────────────────────── */
.fc-input {
  min-height: 48px;
  padding: 12px 15px;
  border-radius: 13px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.09);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}

.fc-input:hover {
  border-color: rgba(255,255,255,.18);
}

.fc-input:focus {
  border-color: rgba(214,169,111,.72);
  box-shadow:
    0 0 0 4px rgba(214,169,111,.10),
    inset 0 1px 0 rgba(255,255,255,.04);
}

/* ── Ekrany kroków ─────────────────────────────────────────── */
.fc-step-layout {
  max-width: 1040px;
  padding: clamp(32px, 5vw, 72px) 28px 80px;
}

.fc-breadcrumb {
  gap: 8px;
  margin-bottom: 30px;
  padding: 8px 12px;
  width: fit-content;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 999px;
  background: rgba(255,255,255,.025);
  backdrop-filter: blur(12px);
}

.fc-breadcrumb-item {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
}

.fc-breadcrumb-item.active {
  color: var(--fc-gold-light);
}

.fc-step-header {
  max-width: 680px;
}

.fc-step-header h2 {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.06;
  letter-spacing: -.045em;
  font-weight: 760;
  margin-bottom: 14px;
}

.fc-step-header p {
  max-width: 600px;
  font-size: 16px;
  line-height: 1.65;
  margin-bottom: 42px;
}

.fc-step-actions {
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.07);
}

/* ── Wybór liczby boków ───────────────────────────────────── */
.fc-sides-grid {
  max-width: 600px;
  gap: 14px;
}

.fc-side-btn {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.09);
  background:
    linear-gradient(145deg, rgba(255,255,255,.07), rgba(255,255,255,.025));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.06),
    0 12px 30px rgba(0,0,0,.16);
  font-size: 24px;
}

.fc-side-btn::after {
  content: "";
  position: absolute;
  inset: auto -20% -55% auto;
  width: 80%;
  height: 80%;
  border-radius: 50%;
  background: rgba(214,169,111,.15);
  filter: blur(22px);
  opacity: 0;
  transition: var(--fc-trans);
}

.fc-side-btn:hover {
  transform: translateY(-4px);
  color: var(--fc-gold-light);
  border-color: rgba(214,169,111,.42);
}

.fc-side-btn:hover::after,
.fc-side-btn.selected::after {
  opacity: 1;
}

.fc-side-btn.selected {
  color: #1b140c;
  border-color: transparent;
  background: linear-gradient(135deg, #f0ca91, #c58e52);
  box-shadow:
    0 16px 34px rgba(214,169,111,.22),
    inset 0 1px 0 rgba(255,255,255,.45);
}

.fc-selected-sides-info,
.fc-cfg-note,
.fc-solar-options {
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(214,169,111,.11), rgba(214,169,111,.035));
  border: 1px solid rgba(214,169,111,.20);
  backdrop-filter: blur(12px);
}

/* ── Suwaki ───────────────────────────────────────────────── */
.fc-sides-sliders {
  gap: 30px;
  padding: 26px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 22px;
  background: rgba(255,255,255,.025);
  box-shadow: var(--fc-shadow-sm);
}

.fc-slider-row label {
  font-size: 14px;
  font-weight: 650;
}

.fc-slider-row label span:last-child {
  border-radius: 10px;
  background: rgba(214,169,111,.10);
  border-color: rgba(214,169,111,.20);
  color: var(--fc-gold-light);
}

input[type="range"].fc-range {
  height: 6px;
  background: linear-gradient(90deg, rgba(214,169,111,.7), rgba(255,255,255,.10));
  border-radius: 999px;
}

input[type="range"].fc-range::-webkit-slider-thumb {
  width: 22px;
  height: 22px;
  border: 4px solid #12171c;
  background: var(--fc-gold-light);
  box-shadow: 0 0 0 2px rgba(214,169,111,.55), 0 7px 18px rgba(0,0,0,.35);
}

/* ── Mapa ─────────────────────────────────────────────────── */
.fc-map-area {
  padding: 24px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 0%, rgba(214,169,111,.06), transparent 45%),
    rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: var(--fc-shadow);
}

#fc-grid-canvas {
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
}

.fc-map-label-btn {
  border-radius: 12px;
  background: rgba(255,255,255,.035);
  border-color: rgba(255,255,255,.09);
}

.fc-map-label-btn.active,
.fc-map-label-btn:hover {
  border-color: rgba(214,169,111,.48);
  background: rgba(214,169,111,.09);
  color: var(--fc-gold-light);
}

/* ── Typy boków ────────────────────────────────────────────── */
.fc-type-row {
  padding: 22px;
  border-radius: 20px;
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.075);
  box-shadow: 0 14px 34px rgba(0,0,0,.12);
}

.fc-type-row-header {
  font-size: 15px;
  color: var(--fc-text);
}

.fc-type-row-header .fc-side-num {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #e5ba80, #a97642);
  color: #17120c;
  box-shadow: 0 7px 18px rgba(214,169,111,.20);
}

.fc-type-opt {
  min-height: 52px;
  border-radius: 13px;
  background: rgba(255,255,255,.035);
  border-color: rgba(255,255,255,.08);
}

.fc-type-opt:hover,
.fc-type-opt.selected {
  transform: translateY(-2px);
  border-color: rgba(214,169,111,.48);
  color: var(--fc-gold-light);
  background: linear-gradient(135deg, rgba(214,169,111,.12), rgba(214,169,111,.035));
}

/* ── Górny pasek ───────────────────────────────────────────── */
.fc-top-bar {
  min-height: 64px;
  padding: 0 24px;
  background: rgba(10,13,16,.78);
  border-bottom-color: rgba(255,255,255,.07);
  backdrop-filter: blur(22px) saturate(140%);
  box-shadow: 0 10px 35px rgba(0,0,0,.16);
}

.fc-side-tabs {
  gap: 6px;
}

.fc-side-tab {
  margin: 8px 0;
  padding: 10px 14px;
  border-radius: 10px;
  border-bottom: none;
  font-weight: 650;
}

.fc-side-tab:hover {
  background: rgba(255,255,255,.045);
  border-bottom-color: transparent;
}

.fc-side-tab.active {
  color: var(--fc-gold-light);
  background: rgba(214,169,111,.10);
  border-bottom-color: transparent;
}

.fc-client-id {
  padding: 7px 10px;
  border-radius: 9px;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.06);
}

/* ── Główny konfigurator ──────────────────────────────────── */
.fc-configurator-layout {
  grid-template-columns: minmax(0, 1fr) 460px;
  background: transparent;
}

.fc-viz-panel {
  padding: 24px;
  background:
    radial-gradient(circle at 50% 30%, rgba(214,169,111,.055), transparent 45%),
    transparent;
}

.fc-viz-canvas-wrap {
  border-radius: 26px;
  border: 1px solid rgba(255,255,255,.09);
  background:
    radial-gradient(circle at 50% 20%, rgba(255,255,255,.035), transparent 50%),
    #10151a;
  box-shadow:
    0 30px 80px rgba(0,0,0,.34),
    inset 0 1px 0 rgba(255,255,255,.05);
}

.fc-viz-controls {
  top: 18px;
  right: 18px;
  gap: 7px;
}

.fc-viz-ctrl {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(13,17,21,.72);
  border-color: rgba(255,255,255,.10);
  backdrop-filter: blur(16px);
}

.fc-viz-ctrl:hover {
  transform: translateY(-2px);
  color: var(--fc-gold-light);
  border-color: rgba(214,169,111,.45);
}

.fc-viz-dimensions {
  padding: 14px 18px;
  border-radius: 15px;
  background: rgba(255,255,255,.025);
  border-color: rgba(255,255,255,.07);
}

/* ── Panel opcji ───────────────────────────────────────────── */
.fc-config-panel {
  background: rgba(16,21,26,.90);
  border-left-color: rgba(255,255,255,.07);
  backdrop-filter: blur(22px);
  box-shadow: -20px 0 60px rgba(0,0,0,.14);
}

.fc-config-steps {
  padding: 8px;
  gap: 5px;
  background: rgba(255,255,255,.025);
  border-bottom-color: rgba(255,255,255,.07);
  top: 64px;
}

.fc-cfg-step {
  flex: 1 0 auto;
  padding: 10px 9px;
  border-radius: 11px;
  border-bottom: none;
  font-weight: 650;
}

.fc-cfg-step:hover {
  background: rgba(255,255,255,.045);
}

.fc-cfg-step.active {
  color: var(--fc-gold-light);
  background: rgba(214,169,111,.10);
  border-bottom-color: transparent;
}

.fc-cfg-step-num {
  width: 21px;
  height: 21px;
  margin-right: 5px;
  border-radius: 8px;
  background: rgba(255,255,255,.09);
  color: var(--fc-text2);
}

.fc-cfg-step.active .fc-cfg-step-num {
  background: linear-gradient(135deg, #e5ba80, #a97642);
  color: #17120c;
}

.fc-cfg-panel[data-cfg-panel] {
  padding: 28px 24px;
}

.fc-cfg-panel h3 {
  font-size: 22px;
  letter-spacing: -.025em;
}

.fc-section-label {
  margin-top: 12px;
  color: #7f8993;
}

/* ── Modele ────────────────────────────────────────────────── */
.fc-model-grid {
  gap: 10px;
  max-height: 390px;
  padding: 2px 6px 4px 2px;
}

.fc-model-card {
  position: relative;
  min-height: 72px;
  padding: 11px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,.055), rgba(255,255,255,.02));
  border-color: rgba(255,255,255,.075);
  overflow: hidden;
}

.fc-model-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(#f0ca91, #a97642);
  opacity: 0;
  transition: var(--fc-trans);
}

.fc-model-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.15);
  box-shadow: 0 14px 30px rgba(0,0,0,.18);
}

.fc-model-card.selected {
  border-color: rgba(214,169,111,.48);
  background: linear-gradient(135deg, rgba(214,169,111,.13), rgba(214,169,111,.035));
  box-shadow: 0 14px 34px rgba(214,169,111,.09);
}

.fc-model-card.selected::before {
  opacity: 1;
}

.fc-model-thumb {
  width: 72px;
  height: 50px;
  border-radius: 11px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}

.fc-model-card:hover .fc-model-thumb {
  transform: scale(1.04);
}

.fc-model-info strong {
  font-size: 14px;
}

.fc-model-info span {
  margin-top: 2px;
  font-size: 11px;
}

.fc-model-check {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
}

.fc-model-card.selected .fc-model-check {
  color: #17120c;
  background: linear-gradient(135deg, #f0ca91, #bd874d);
}

/* ── Karty wyboru ──────────────────────────────────────────── */
.fc-choice-row {
  gap: 10px;
}

.fc-choice-card,
.fc-fill-card {
  position: relative;
  overflow: hidden;
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,255,255,.018));
  border-color: rgba(255,255,255,.075);
}

.fc-choice-card {
  padding: 16px 13px;
}

.fc-choice-card:hover,
.fc-choice-card.selected,
.fc-fill-card:hover,
.fc-fill-card.selected {
  transform: translateY(-3px);
  border-color: rgba(214,169,111,.48);
  background: linear-gradient(145deg, rgba(214,169,111,.13), rgba(214,169,111,.035));
  box-shadow: 0 15px 30px rgba(0,0,0,.16);
}

.fc-choice-card.selected::after,
.fc-fill-card.selected::after {
  content: "✓";
  position: absolute;
  top: 9px;
  right: 10px;
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #17120c;
  font-size: 11px;
  font-weight: 900;
  background: var(--fc-gold-light);
}

.fc-choice-thumb {
  height: 66px;
  border-radius: 11px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}

.fc-fill-card {
  padding: 20px 14px;
}

/* ── Wysokości ─────────────────────────────────────────────── */
.fc-height-options {
  gap: 9px;
}

.fc-height-opt {
  min-width: 76px;
  padding: 12px 14px;
  border-radius: 13px;
  background: rgba(255,255,255,.035);
  border-color: rgba(255,255,255,.08);
}

.fc-height-opt:hover,
.fc-height-opt.selected {
  transform: translateY(-2px);
  border-color: rgba(214,169,111,.48);
  color: var(--fc-gold-light);
  background: rgba(214,169,111,.10);
}

/* ── Kolory ───────────────────────────────────────────────── */
.fc-color-grid {
  gap: 12px;
}

.fc-color-swatch {
  width: 58px;
  gap: 6px;
}

.fc-color-swatch:hover {
  transform: translateY(-4px);
}

.fc-swatch-img {
  width: 58px;
  height: 46px;
  border-radius: 13px;
  border-color: rgba(255,255,255,.10);
  box-shadow: 0 8px 20px rgba(0,0,0,.18);
}

.fc-color-swatch.selected .fc-swatch-img {
  outline: 2px solid var(--fc-gold-light);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgba(214,169,111,.12), 0 12px 26px rgba(0,0,0,.22);
}

.fc-swatch-label {
  max-width: 60px;
  font-size: 9px;
}

.fc-color-swatch.selected .fc-swatch-label {
  color: var(--fc-gold-light);
  font-weight: 700;
}

/* ── Dolne akcje ───────────────────────────────────────────── */
.fc-cfg-actions {
  position: sticky;
  bottom: 0;
  margin: 18px -24px -28px;
  padding: 18px 24px;
  background: linear-gradient(to bottom, rgba(16,21,26,.72), rgba(16,21,26,.98) 35%);
  backdrop-filter: blur(18px);
  border-top: 1px solid rgba(255,255,255,.07);
}

/* ── Podsumowanie ──────────────────────────────────────────── */
.fc-summary-layout {
  grid-template-columns: minmax(0, 1fr) 460px;
}

.fc-summary-viz {
  padding: 32px;
  background:
    radial-gradient(circle at 50% 35%, rgba(214,169,111,.07), transparent 45%),
    transparent;
}

#fc-summary-canvas {
  border-radius: 26px;
  border-color: rgba(255,255,255,.09);
  box-shadow: var(--fc-shadow);
}

.fc-summary-details {
  padding: 34px 28px;
  background: rgba(16,21,26,.92);
  border-left-color: rgba(255,255,255,.07);
  backdrop-filter: blur(22px);
}

.fc-summary-header h2 {
  font-size: 28px;
  letter-spacing: -.035em;
}

.fc-client-badge {
  border-radius: 12px;
  background: rgba(255,255,255,.035);
  border-color: rgba(255,255,255,.08);
}

.fc-summary-row {
  padding: 13px 15px;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 13px;
  background: rgba(255,255,255,.025);
}

.fc-summary-row-val {
  color: var(--fc-text);
}

.fc-summary-price {
  position: relative;
  overflow: hidden;
  padding: 23px;
  border-radius: 21px;
  background:
    radial-gradient(circle at 100% 0%, rgba(214,169,111,.20), transparent 45%),
    linear-gradient(135deg, rgba(214,169,111,.14), rgba(214,169,111,.045));
  border-color: rgba(214,169,111,.28);
  box-shadow: 0 18px 40px rgba(0,0,0,.18);
}

.fc-summary-price strong {
  font-size: 34px;
  letter-spacing: -.04em;
  color: var(--fc-gold-light);
}

/* ── Toast ─────────────────────────────────────────────────── */
.fc-toast {
  right: 28px;
  bottom: 28px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(18,23,28,.88);
  border-color: rgba(255,255,255,.10);
  backdrop-filter: blur(20px);
  box-shadow: var(--fc-shadow);
}

/* ── Scrollbar ─────────────────────────────────────────────── */
.fc-config-panel::-webkit-scrollbar,
.fc-model-grid::-webkit-scrollbar {
  width: 7px;
}

.fc-config-panel::-webkit-scrollbar-thumb,
.fc-model-grid::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.13);
  border-radius: 999px;
}

.fc-config-panel::-webkit-scrollbar-thumb:hover,
.fc-model-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(214,169,111,.42);
}

/* ── Responsywność ─────────────────────────────────────────── */
@media (max-width: 1050px) {
  .fc-configurator-layout,
  .fc-summary-layout {
    grid-template-columns: minmax(0, 1fr) 400px;
  }
}

@media (max-width: 900px) {
  .fc-top-bar {
    min-height: 58px;
    padding: 0 14px;
  }

  .fc-configurator-layout,
  .fc-summary-layout {
    grid-template-columns: 1fr;
  }

  .fc-config-panel {
    border-left: none;
    border-top: 1px solid rgba(255,255,255,.07);
  }

  .fc-config-steps {
    top: 58px;
  }

  .fc-viz-panel {
    min-height: 55vh;
  }

  .fc-summary-details {
    border-left: none;
    border-top: 1px solid rgba(255,255,255,.07);
  }
}

@media (max-width: 600px) {
  .fc-root {
    font-size: 14px;
  }

  .fc-step-layout {
    padding: 28px 16px 54px;
  }

  .fc-step-header h2 {
    font-size: 34px;
  }

  .fc-step-header p {
    font-size: 14px;
  }

  .fc-sides-grid {
    gap: 9px;
  }

  .fc-side-btn {
    border-radius: 14px;
    font-size: 20px;
  }

  .fc-sides-sliders,
  .fc-map-area {
    padding: 17px;
    border-radius: 18px;
  }

  .fc-viz-panel {
    padding: 12px;
    min-height: 48vh;
  }

  .fc-viz-canvas-wrap {
    min-height: 390px;
    border-radius: 19px;
  }

  .fc-config-panel[data-cfg-panel] {
    padding: 22px 16px;
  }

  .fc-cfg-actions {
    margin: 18px -16px -22px;
    padding: 16px;
  }

  .fc-choice-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .fc-color-swatch,
  .fc-swatch-img {
    width: 50px;
  }

  .fc-swatch-img {
    height: 41px;
  }

  .fc-summary-details {
    padding: 26px 16px;
  }
}

/* Mniej ruchu dla użytkowników z ograniczeniem animacji */
@media (prefers-reduced-motion: reduce) {
  .fc-root *,
  .fc-root *::before,
  .fc-root *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
