:root {
  --primary: #2563eb;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
}

* { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  padding: 20px;
  display: flex;
  justify-content: center;
}

/* Klasy pomocnicze do kontroli widoczności */
.is-hidden {
  display: none !important;
}

.is-visible-flex {
  display: flex !important;
}

.is-visible-block {
  display: block !important;
}

.is-visible-inline-block {
  display: inline-block !important;
}

.wizard-container {
  max-width: 900px;
  width: 100%;
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
  padding: 30px;
  display: flex;
  flex-direction: column;
  min-height: 600px;
  position: relative;
  overflow: hidden;
}

/* Nagłówek i opis konfiguratora */
.wizard-header {
  text-align: center;
  margin-bottom: 42px;
}

.wizard-title {
  font-size: 1.8rem;
  margin-bottom: 10px;
  color: #333333;
}

.wizard-description {
  font-size: 1rem;
  color: #666666;
  line-height: 1.5;
  margin: 0;
}

/* Ekran Startowy (Krok 0) */
.step-content-start {
  padding: 10px 0;
  text-align: center;
}

.start-banner-wrapper {
  width: 100%;
  margin-bottom: 20px;
}

.start-banner-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  object-fit: cover;
}

/* Pasek postępu */
.progress-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
  position: relative;
}

.progress-bar::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border);
  z-index: 1;
}

.step-indicator {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  z-index: 2;
  transition: all 0.3s;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
  color: #64748b;
}

.step-indicator:not(.disabled):hover {
  border-color: var(--primary);
  transform: scale(1.08);
}

.step-indicator.active {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.step-indicator.completed {
  border-color: var(--primary);
  background: #dbeafe;
  color: var(--primary);
}

.step-indicator.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #94a3b8;
  pointer-events: auto;
}

.step-title { 
  font-size: 22px; 
  margin-bottom: 8px; 
}

.step-subtitle { 
  color: #64748b; 
  font-size: 14px; 
  margin-bottom: 25px; 
}

.sub-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  margin: 20px 0 10px 0;
  padding-bottom: 5px;
  border-bottom: 2px solid var(--border);
}

/* Grid i Karty Wyboru */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.card {
  border: 2px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
  display: flex;
  flex-direction: column;
  position: relative;
}

.card:hover {
  border-color: #93c5fd;
  transform: translateY(-3px);
  z-index: 10;
}

.card.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  background: #f1f5f9;
  border-radius: 10px 10px 0 0;
  transition: transform 0.25s ease, object-fit 0.25s ease, box-shadow 0.25s ease;
}

.card:hover img {
  transform: none;
  object-fit: cover;
}

.card-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
  background: white;
  border-radius: 0 0 10px 10px;
  z-index: 5;
}

.card-title { 
  font-weight: 600; 
  font-size: 14px; 
  margin-bottom: 6px; 
}

.card-price { 
  font-size: 15px; 
  font-weight: bold; 
  color: var(--primary); 
}

.no-light-msg {
  text-align: center;
  padding: 30px;
  background: #f1f5f9;
  border-radius: 12px;
  color: #475569;
  font-size: 15px;
}

/* Ostrzeżenie o braku oświetlenia */
#no-light-warning {
  display: none;
  background-color: #f8d7da;
  color: #842029;
  border: 1px solid #f5c2c7;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.95rem;
  line-height: 1.4;
}

/* Podsumowanie i Formularz w Kroku 5 */
.summary-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 25px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}

.summary-item:last-child { 
  border-bottom: none; 
}

.total-price {
  font-size: 22px;
  font-weight: bold;
  color: var(--primary);
  text-align: right;
  margin-top: 15px;
}

form {
	margin-top: 20px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}

.form-group input[type="file"] {
  font-size: 14px;
}

.form-hint {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
}

/* Stopka i Przyciski Nawigacji */
.footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.current-total { 
  font-size: 18px; 
  font-weight: 600; 
  margin-left: auto;
  margin-right: 12px;
}

.btn {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-center {
  margin: 0 auto;
}

.btn-secondary { background: #e2e8f0; color: #475569; }
.btn-primary { background: var(--primary); color: white; }
.btn-danger { background: #fee2e2; color: #dc2626; }
.btn-danger:hover { background: #fca5a5; }

.btn:disabled { 
  opacity: 0.55; 
  cursor: not-allowed; 
  background: #cbd5e1 !important;
  color: #64748b !important;
}

.step-content { display: none; }
.step-content.active { display: block; }

/* Customowy Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.6);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(3px);
}

.modal-box {
  background: #ffffff;
  padding: 24px;
  border-radius: 12px;
  max-width: 460px;
  width: 90%;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  text-align: left;
}

.modal-box h3 {
  margin-top: 0;
  color: var(--text);
  font-size: 18px;
  text-align: center;
}

#modal-message {
  color: #475569;
  margin: 15px 0 20px;
  font-size: 14px;
  line-height: 1.6;
}

#modal-message p {
  margin-bottom: 10px;
}

#modal-message ul {
  padding-left: 20px;
  margin-bottom: 10px;
}

.modal-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

/* Ikona lupy i informacji na kartach */
.card-img-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 10px 10px 0 0;
  background: #f1f5f9;
}

.card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.zoom-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
  color: var(--text);
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.zoom-btn:hover {
  background: #ffffff;
  transform: scale(1.1);
  color: var(--primary);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.zoom-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.info-btn {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
  color: var(--text);
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.info-btn:hover {
  background: #ffffff;
  transform: scale(1.1);
  color: var(--primary);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.info-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Lightbox (Modal powiększenia) */
.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(5px);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: -15px;
  right: -15px;
  width: 36px;
  height: 36px;
  background: white;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  font-weight: bold;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: transform 0.2s;
}

.lightbox-close:hover {
  transform: scale(1.1);
  background: #fee2e2;
  color: #dc2626;
}

/* Sekcja wyboru materiału */
#material-selection-container {
  margin-bottom: 25px;
}

.material-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}

.material-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 15px;
}

.material-card {
  position: relative;
  cursor: pointer;
  display: block;
}

.material-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.material-card-content {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  transition: all 0.2s ease;
}

.material-card:hover .material-card-content {
  border-color: #93c5fd;
  transform: translateY(-2px);
}

.material-card input[type="radio"]:checked + .material-card-content {
  border-color: var(--primary);
  background-color: #f0f6ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.material-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.2s ease, color 0.2s ease;
  color: #475569;
}

.material-card input[type="radio"]:checked + .material-card-content .material-icon-circle {
  background: var(--primary);
  color: #ffffff;
}

.material-icon {
  width: 22px;
  height: 22px;
}

.material-info {
  display: flex;
  flex-direction: column;
}

.material-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}

.material-desc {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

/* --- Style dla slidera w Kroku 0 --- */
.wizard-slider-container {
  position: relative;
  width: 100%;
  margin-bottom: 70px; /* Zwiększona przestrzeń pod sliderem na kropki i podpis */
}

.step-content-start .section-title {
  text-align: center;
  margin-top: 0;
  margin-bottom: 25px;
  color: #333;
  font-size: 1.8rem;
}

.swiper {
  width: 100%;
  padding: 10px 0;
  overflow: hidden; 
}

.swiper-slide {
  width: calc((100% - 40px) / 3) !important; 
  display: flex;
  flex-direction: column; /* Układ pionowy: zdjęcie na górze, opis pod spodem */
  align-items: center;
  justify-content: flex-start;
}

.swiper-slide img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  display: block;
}

.swiper-slide img:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* Styl opisu umieszczonego bezpośrednio pod zdjęciem w sliderze */
.slide-caption {
  font-size: 13px;
  color: #64748b;
  text-align: center;
  margin-top: 8px;
  line-height: 1.4;
  width: 100%;
}

/* Kropki paginacji osadzone niżej, z dala od zdjęć i podpisów */
.wizard-slider-container .swiper-pagination {
  position: absolute !important;
  bottom: -45px !important; 
  left: 0;
  width: 100%;
}
  
.swiper-pagination-bullet-active {
  background-color: var(--primary);
}

@media (max-width: 640px) {
  .swiper-slide {
    width: 100% !important;
  }
}

#discount-code {
	margin-bottom: 25px;
}