/* ------------------------------
   Base & Layout
------------------------------ */
* {
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  background: #f6f7fb;
  color: #111;
}

.container {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 20px;
}

h1 {
  font-weight: 700;
  font-size: 28px;
  margin-bottom: 16px;
}

.card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  padding: 20px;
}

/* ------------------------------
   Typography & Helpers
------------------------------ */
.step-title {
  font-size: 20px;
  margin: 0 0 12px;
}

.center {
  text-align: center;
}

small.muted {
  color: #6b7280;
}

.footer-note {
  margin-top: 16px;
}

.help {
  font-size: 12px;
  color: #6b7280;
  margin-top: 10px;
}

.error {
  color: #b91c1c;
  margin-top: 10px;
}

.success {
  color: #065f46;
  margin-top: 8px;
}

/* ------------------------------
   Buttons & Inputs
------------------------------ */
button {
  appearance: none;
  border: none;
  border-radius: 12px;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
}

button.primary {
  background: #111;
  color: #fff;
}

button.secondary {
  background: #e5e7eb;
}

.input {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
}

/* ------------------------------
   Tables
------------------------------ */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.table th,
.table td {
  border-bottom: 1px solid #eee;
  padding: 8px 12px;
  text-align: left;
  white-space: nowrap;
}

.table th {
  background: #f4f4f4;
  position: sticky;
  top: 0;
  z-index: 2;
}

/* ------------------------------
   Badges
------------------------------ */
.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e5e7eb;
  font-size: 12px;
}

/* ------------------------------
   Grids & Options
------------------------------ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  background: #fafafa;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.option:hover {
  transform: scale(1.05);
  border-color: #9ca3af;
}

.option.selected {
  border-color: #111;
  background: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

/* Option Images */
.option img {
  width: 100%;
  height: 225px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 8px;
  background: #e5e7eb;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s;
}

.option div {
  padding: 0.6rem;
  font-weight: 500;
}

.option:hover img {
  transform: scale(1.03);
}

/* ------------------------------
   Swatches
------------------------------ */
.swatch {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid #ccc;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
  transition: all 0.25s ease;
}

.option:hover .swatch,
.option:active .swatch {
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.4), 0 0 8px currentColor;
  transform: scale(1.1);
}

.option.selected .swatch {
  box-shadow: 0 0 10px rgba(0, 128, 255, 0.6);
  border-color: #007bff;
  transform: scale(1.15);
}

/* RAL Swatch Animation */
@keyframes rainbowShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.swatch[data-ral="true"] {
  background-image: linear-gradient(90deg, red, orange, yellow, green, blue, indigo, violet);
  background-size: 400% 400%;
  animation: rainbowShift 6s linear infinite;
}

/* ------------------------------
   Categories
------------------------------ */
.categories {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  grid-auto-rows: 1fr;
  margin: 16px;
}

.category {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 6px;
}

.category img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(70%);
  opacity: 0.85; /* reduced default opacity */
  transition: opacity 0.3s ease, transform 0.4s ease, filter 0.3s ease;
}

/* Smooth hover effect */
.category:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.category:hover img {
  filter: brightness(90%);
  transform: scale(1.05);
}

/* Overlay styling */
.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(transparent 60%, rgba(0, 0, 0, 0.6));
  color: #fff;
  padding: 20px 20px 60px 20px;
  text-align: center;
  transition: background 0.3s ease;
}

.category:hover .overlay {
  background: linear-gradient(transparent 50%, rgba(0, 0, 0, 0.8));
}

/* Title and description */
.overlay h2 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.overlay p {
  margin-top: 0.4rem;
  font-size: 1rem;
  opacity: 0.5;
}


.category * {
  pointer-events: none;
}

.category .overlay {
  opacity: 0.85;
  transition: opacity 0.3s ease, background 0.3s ease;
}

.category:hover .overlay {
  opacity: 1;
  background: linear-gradient(transparent 50%, rgba(0, 0, 0, 0.8));
}


/* ------------------------------
   Responsive Design
------------------------------ */
@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
}

@media (max-width: 600px) {
  .grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .option img,
  .swatch {
    width: 80%;
    height: auto;
  }

  .step-title {
    font-size: 20px;
    text-align: center;
  }

  .container {
    padding: 0 10px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 22px;
  }
  .card {
    padding: 16px;
  }
}

.split-container {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
}


.wrapper.split {
  display: flex;
  flex-direction: row;
  min-height: 500px;
}

.form-image {
  flex: 1;
  background-size: cover;
  background-position: center;
  height: 690px;
}

.form-content {
  flex: 1;
  padding: 40px;
  background-size: contain;        /* show the full door image */
  background-repeat: no-repeat;    /* prevent tiling */
  background-position: center;     /* center it nicely */
  background-color: #f6f7fb;       /* optional neutral background */
}


/* --- Progress Bar --- */
.progress-bar {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 1.5rem;
}

.progress-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ccc;
  transition: background 0.3s, transform 0.3s;
}

.progress-dot.active {
  background: #0078d7; /* main accent colour */
  transform: scale(1.2);
}

/* --- Step transition animation --- */
.form-content {
  opacity: 0;
  transform: translateX(30px);
  animation: fadeSlideIn 0.5s ease forwards;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.fade-out {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.summary-box {
  background: #fff;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  text-align: left;
  max-width: 500px;
  margin: 0 auto 2rem;
}

.summary-box h2 {
  text-align: center;
  margin-top: 0;
  margin-bottom: 1rem;
}

.summary-box .price {
  font-size: 1.2rem;
  color: #0078d7;
  margin-top: 1rem;
}

.summary-box .note {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #555;
  font-style: italic;
}

.previous-quotes {
  margin-top: 2rem;
  text-align: left;
}

.previous-quotes h3 {
  margin-bottom: 0.5rem;
}

.prev-item {
  font-size: 0.9rem;
  color: #444;
  margin-bottom: 0.3rem;
}

.progress-wrapper {
  text-align: center;
  margin-bottom: 1rem;
}

.progress-label {
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: #444;
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

/* Dimension form styling (matches entrance doors) */
#window-size-form {
  display: flex;
  flex-direction: column;
  gap: 20px; /* vertical spacing between fields */
  max-width: 400px;
}

#window-size-form label {
  font-weight: 600;
  margin-bottom: 5px;
  display: block;
}

#window-size-form input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 16px;
  box-sizing: border-box;
}

#window-size-form .btn-primary,
#window-size-form .btn-secondary {
  width: auto;
  min-width: 120px;
}

#window-size-form div[style*="margin-top:20px"] {
  display: flex;
  gap: 10px;
  align-items: center;
}
