/* --- Minimal reset --- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue",
    Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color: #0f172a;
  background: #f8fafc;
}
img { max-width: 100%; display: block; }
a { color: #3b82f6; text-decoration: none; }

/* --- Layout shell --- */
.wrap {
  max-width: 1700px;
  margin: 24px auto 80px;
  padding: 0 24px;
}

/* Global progress bar below site header, full width */
.progress-shell {
  width: 100%;
  padding: 12px 24px 0;
  margin-bottom: 50px;
  box-sizing: border-box;
}
.progress {
  height: 6px;
  background: #e0ecff;
  border-radius: 999px;
  overflow: hidden;
}
.progress > i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #3b82f6, #1d4ed8);
  transition: width 0.25s ease;
}

/* Main step layout */
.step-shell {
  max-width: 1700px;
  margin: 24px auto 80px;
  padding: 0 24px;
}
.step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 4px;
  position: relative;
}
.step-header h2 {
  margin: 0;
  text-align: center;
  font-size: 2.3rem;
  font-weight: 600;
  line-height: 1.2;
  padding-bottom: 10px;
}
.step-header-center {
  flex: 1 1 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.step-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.step-title-icon-mobile {
  display: none;
}
.step-title-ai-icon {
  width: 52px;
  height: 52px;
}
.step-title-ai-float {
  animation: title-float 3s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
  filter: drop-shadow(0 0 4px rgba(59, 130, 246, 0.5));
}
.step-title-ai-icon .st0 {
  fill: #3b82f6;
}
@keyframes title-float {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  50% {
    transform: translateY(-1.5px) scale(1.01);
    opacity: 0.98;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}
.step {
  padding: 4px 0 18px;
}
.step .subtitle {
  margin: 0.25rem auto 1.75rem;
  color: #475569;
  text-align: center;
  max-width: 960px;
}

/* Prerequisite selections summary under the title */
.prereq-list {
  margin: 0 auto 1rem;
  color: #64748b;
  text-align: center;
  font-size: 0.9rem;
}
.prereq-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid #22c55e;
  background: #ecfdf5;
  color: #16a34a;
  font-size: 0.7rem;
  margin-right: 4px;
}
.prereq-text {
  margin-right: 4px;
}
.prereq-sep {
  margin-right: 4px;
}

/* Extra vertical space between title/subtitle and content */
.step .options,
.step .fields,
.step .dyn-list {
  margin-top: 12px;
}

/* Step transition: subtle slide from right to left on change */
.step-animate-forward {
  animation: step-slide-in 260ms ease-out;
}
@keyframes step-slide-in {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Options grid */
.options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}
.opt {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.04s;
  flex: 0 1 520px;
  width: 100%;
  max-width: 520px;
}
.opt:hover {
  border-color: #cbd5e1;
  box-shadow: 0 3px 12px rgba(2, 6, 23, 0.06);
}
.opt:active { transform: translateY(1px); }
.opt.is-selected {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
  background: #eff6ff;
}
.opt-checkbox {
  margin-right: 12px;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  accent-color: #3b82f6;
}
.opt-radio {
  margin-right: 12px;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  accent-color: #3b82f6;
}

/* Single-choice hover: stronger lift and tint (non-primary buttons) */
.options-single .opt:not(.style-btn-primary):hover {
  border-color: #3b82f6;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
  transform: translateY(-2px);
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 40%, #eff6ff 100%);
}
/* Text-only single-choice options (non-primary): extra emphasis on hover */
.options-single .opt.no-thumb:not(.style-btn-primary):hover {
  border-color: #3b82f6;
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.32);
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 35%, #e0ecff 100%);
}
/* Multi-choice hover: softer blue tint to invite click */
.options-multi .opt:hover {
  border-color: #bfdbfe;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.16);
  transform: translateY(-1px);
  background: linear-gradient(135deg, #f1f5ff 0%, #ffffff 45%, #e5f0ff 100%);
}
.options-multi .opt.is-selected {
  border-width: 2px;
  animation: multi-selected-pulse 1.4s ease-in-out infinite;
}
@keyframes multi-selected-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 3px rgba(37, 99, 235, 0.22),
      0 0 0 0 rgba(59, 130, 246, 0.0);
  }
  50% {
    box-shadow:
      0 0 0 3px rgba(37, 99, 235, 0.30),
      0 0 0 6px rgba(59, 130, 246, 0.18);
  }
}

/* Multi-choice layout: checkbox pinned left; image + text centered as a block */
.options-multi .opt {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 14px 12px 40px; /* tighter left/right padding, room for checkbox */
  flex: 0 1 360px;
  max-width: 360px;
}
.options-multi .opt .thumb {
  width: 190px;
  height: 190px;
}
.options-multi .opt .meta {
  align-items: center;
  text-align: center;
  max-width: 190px;
}
.options-multi .opt .opt-checkbox {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  margin-right: 0;
}

.opt .thumb {
  width: 150px;
  height: 150px;
  border-radius: 12px;
  flex: 0 0 auto;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.opt .thumb.thumb-svg {
  width: auto;
  height: auto;
  padding: 4px;
  background: transparent;
  align-self: center;
}
.opt .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.opt .thumb svg { width: 32px; height: 32px; }
.opt .meta {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  text-align: left;
}
.opt.no-thumb {
  justify-content: flex-start;
}
.opt.no-thumb .meta {
  align-items: flex-start;
  text-align: left;
}

/* Button-style option presets (button.primary / button.secondary / etc.) */
.opt.style-btn-primary {
  border-radius: 999px;
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.25);
  flex: 0 0 auto;
  width: auto;
  max-width: 100%;
  padding: 1.1rem 2.8rem;
  align-items: center;
}
.opt.style-btn-primary .meta .title {
  font-weight: 700;
  font-size: 1.5rem;
}
.opt.style-btn-primary .meta .subtitle {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.05rem;
}
.opt.style-btn-primary:hover {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.32);
}

.opt.style-btn-secondary {
  border-radius: 999px;
  background: #fff;
  color: #1d4ed8;
  border-color: #bfdbfe;
  box-shadow: none;
  flex: 0 0 auto;
  width: auto;
  max-width: 100%;
  padding: 0.7rem 1.8rem;
  align-items: center;
}
.opt.style-btn-secondary .meta .title {
  font-size: 1rem;
}
.opt.style-btn-secondary .meta .subtitle {
  font-size: 0.75rem;
}
.opt.style-btn-secondary:hover {
  background: #eff6ff;
  border-color: #3b82f6;
  box-shadow: 0 8px 22px rgba(148, 163, 184, 0.3);
}

/* Pill-style buttons: center text block horizontally & vertically */
.opt.style-btn-primary .meta,
.opt.style-btn-secondary .meta,
.opt.style-btn-ghost .meta,
.opt.style-btn-aux .meta {
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* Hero layout for single-choice cards with image (typically two options) */
.options-single-hero {
  justify-content: center;
}
.options-single-hero .opt {
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 420px;
  position: relative;
}
.options-single-hero .opt-radio {
  order: 2;
  margin: 10px 0 4px;
}
.options-single-hero .opt .thumb {
  order: 1;
}
.options-single-hero .opt .meta {
  order: 3;
}
.options-single-hero .opt .thumb {
  width: 220px;
  height: 220px;
  margin-bottom: 6px;
}
.options-single-hero .opt .meta {
  align-items: center;
  text-align: center;
}
.options-single-hero .opt .meta .title {
  font-size: 1.4rem;
}
.opt .meta .title {
  font-weight: 800;
  font-size: 1.25rem;
  margin: 0 0 2px;
}
.opt .meta .subtitle {
  color: #64748b;
  font-size: 0.9rem;
  margin: 0;
}

/* Fast quantity layout: text + input act as separate stacked sections */
.opt.with-input {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 16px;
  row-gap: 6px;
  align-items: flex-start;
  flex: 0 0 auto;
  max-width: 100%;
  width: auto;
}
.opt.with-input .thumb {
  grid-row: 1 / span 2;
  grid-column: 1;
}
.opt.with-input .meta {
  grid-row: 1;
  grid-column: 2;
  align-items: flex-start;
  text-align: left;
}
.fast-item-input-wrap {
  grid-row: 2;
  grid-column: 2;
  justify-self: flex-start;
}

/* Fast quantity dynamic labels: item (muted label above, question below) */
.fast-item-label-wrap {
  align-self: flex-start;
  margin-top: 0;
  margin-bottom: 4px;
}
.fast-item-question-wrap {
  align-self: flex-start;
}
.fast-item-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: #6b7280;
}
.fast-item-question {
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.4;
  text-align: left;
  align-self: flex-start;
}
.opt .input-wrap {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.opt.with-input .fast-item-input-wrap {
  margin-left: 0;
}
.opt .input-wrap input[type=number] {
  width: 120px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  font-weight: 700;
}
.opt .input-wrap .unit {
  color: #64748b;
  font-weight: 600;
}

/* Fast quantity input controls: bigger field + custom +/- buttons */
.fast-item-input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.fast-item-input-wrap input[type="number"] {
  width: 90px;
  padding: 10px 8px;
  border-radius: 10px;
  border: 1px solid #3b82f6;
  font-size: 1rem;
}
.fast-item-input-wrap .unit {
  font-size: 0.9rem;
  color: #6b7280;
}
.qty-btn {
  min-width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid #3b82f6;
  background: #fff;
  color: #3b82f6;
  font-weight: 700;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease, color 0.15s ease, transform 0.06s ease, box-shadow 0.15s ease;
}
.qty-btn:hover {
  background: #3b82f6;
  color: #fff;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}
.qty-btn:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Hide native number spinners for custom +/- controls */
.fast-item-input-wrap input[type="number"]::-webkit-inner-spin-button,
.fast-item-input-wrap input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.fast-item-input-wrap input[type="number"] {
  -moz-appearance: textfield;
}

/* List style */
.list .opt,
.opt.list {
  gap: 10px;
  padding: 10px 12px;
}
.list .thumb,
.opt.list .thumb {
  display: none;
}

/* List + no-thumb: simple full-width rows (use same width as base .opt) */
.list .opt.no-thumb,
.opt.list.no-thumb {
  flex: 0 1 520px;
  max-width: 520px;
  padding: 12px 12px;
}

/* Dimenzije objekta step: drawing with overlaid inputs */
.dims-step {
  position: relative;
  max-width: 820px;
  margin: 0 auto 0;
}
.dims-step .dims-svg {
  width: 100%;
}
.dims-step .dims-svg svg {
  display: block;
  width: 100%;
  height: auto;
}
.dims-step .fields {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.dims-step .field {
  pointer-events: auto;
}
.dims-step .field label {
  background: #f8fafc;
  padding: 2px 6px;
  border-radius: 999px;
  display: inline-block;
}

/* Smaller overlaid fields for dimensions step */
.dims-fields-small .field-number-wrap input[type=number] {
  width: 65px;
  padding: 4px 8px;
  font-size: 0.85rem;
}
.dims-fields-small .field-qty-btn {
  min-width: 28px;
  height: 28px;
  font-size: 0.85rem;
}
.dims-step .dims-svg svg path {
  fill: #b8b8b8;
}

/* Dyn quantity */
.dyn-list { display: grid; gap: 12px; }
.dyn-item {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px dashed #e2e8f0;
  border-radius: 12px;
  background: #fff;
}
.dyn-item .name { font-weight: 700; }
.dyn-item input[type=number] {
  width: 110px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  font-weight: 700;
}
.dyn-item .unit {
  color: #64748b;
  font-weight: 600;
  margin-left: 4px;
}

/* Inputs */
.fields {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-weight: 700;
  font-size: 0.95rem;
}
.field input[type=text],
.field input[type=email],
.field input[type=tel],
.field input[type=number],
.field textarea {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 1rem;
  width: 100%;
  font-weight: 500;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.field input[type=file] {
  font-size: 0.95rem;
  border: none;
  padding: 0;
}
.field textarea {
  min-height: 120px;
  resize: vertical;
}

/* Long text fields: more prominent card-like area */
.field.field-long-text textarea {
  min-height: 180px;
  border-radius: 14px;
  border-width: 2px;
  padding: 14px 16px;
  line-height: 1.6;
}

/* Center skip button ("Preskoči") under steps */
.btn-skip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 16px auto 0;
}

/* Number-only fields: center label and control within the column */
.field.field-number {
  align-items: center;
  text-align: center;
}
.field.field-number label {
  align-self: center;
}

/* Floating labels for text-like fields */
.field-floating {
  position: relative;
  padding-top: 10px;
}
.field-floating label {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  transform-origin: left center;
  font-size: 0.95rem;
  color: #94a3b8;
  pointer-events: none;
  background-color: #f8fafc;
  padding: 0 4px;
  z-index: 1;
  transition: transform 0.16s ease, top 0.16s ease, font-size 0.16s ease, color 0.16s ease, background-color 0.16s ease;
}
.field-floating input[type=text],
.field-floating input[type=email],
.field-floating input[type=tel],
.field-floating textarea {
  padding-top: 18px;
}
.field-floating.field-focused label,
.field-floating.field-has-value label {
  top: 6px;
  transform: translateY(0);
  font-size: 0.78rem;
  color: #3b82f6;
  background-color: #eff6ff;
}

/* Hide placeholders (floating labels replace them visually) */
.field input::placeholder,
.field textarea::placeholder {
  color: transparent;
}

/* Single-file upload card */
.fields.fields-single-file {
  grid-template-columns: 1fr;
}
.field.field-file-card {
  align-items: stretch;
}
.field.field-file-card label {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 8px;
}
.upload-card {
  border-radius: 16px;
  border: 1px dashed #bfdbfe;
  background: #f9fafb;
  padding: 18px 16px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease, transform 0.06s ease;
}
.upload-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}
.upload-card-icon-svg {
  width: 24px;
  height: 24px;
  fill: #3b82f6;
}
.upload-card-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: #0f172a;
}
.upload-card-desc {
  font-size: 0.9rem;
  color: #64748b;
}
.upload-card-desc strong {
  font-weight: 700;
  color: #1d4ed8;
}
.upload-card-files {
  font-size: 0.85rem;
  color: #0f172a;
  margin-top: 4px;
}
.upload-card--hover {
  border-style: dashed;
  border-width: 2px;
  border-color: #3b82f6;
  background: #eff6ff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18);
  transform: translateY(-1px);
}
.field-file-card .upload-card-input {
  display: none;
}

/* Also trigger hover visuals on pointer hover, not just drag */
.upload-card:hover {
  border-style: dashed;
  border-width: 2px;
  border-color: #3b82f6;
  background: #eff6ff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18);
  transform: translateY(-1px);
}

/* Number-only input fields in steps: inline +/- controls */
.field-number-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 4px auto 0;
}
.field-number-wrap input[type=number] {
  width: 130px;
  padding: 12px 10px;
  border-radius: 10px;
  border: 1px solid #3b82f6;
  font-size: 1.05rem;
  font-weight: 500;
}
.field-number-wrap .field-qty-btn {
  min-width: 38px;
  height: 38px;
}
/* Hide native spinners for these number fields */
.field-number-wrap input[type=number]::-webkit-inner-spin-button,
.field-number-wrap input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.field-number-wrap input[type=number] {
  -moz-appearance: textfield;
}

/* Make file upload inputs look like primary buttons */
.field input[type=file]::file-selector-button,
.field input[type=file]::-webkit-file-upload-button {
  border: 1px solid #3b82f6;
  background: #3b82f6;
  color: #fff;
  border-radius: 999px;
  padding: 0.6rem 1.4rem;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  margin-right: 10px;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.06s ease;
}
.field input[type=file]::file-selector-button:hover,
.field input[type=file]::-webkit-file-upload-button:hover {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.28);
  transform: translateY(-1px);
}
.field input[type=file]::file-selector-button:active,
.field input[type=file]::-webkit-file-upload-button:active {
  transform: translateY(0);
  box-shadow: none;
}
.field input[type=text],
.field input[type=email],
.field input[type=tel],
.field input[type=number] {
  height: 48px;
}
.field input[type=text]:focus,
.field input[type=email]:focus,
.field input[type=tel]:focus,
.field input[type=number]:focus,
.field textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
  outline: none;
  background-color: #eff6ff;
}

.phone-field {
  display: flex;
  align-items: stretch;
  position: relative;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
}
.phone-country-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: none;
  border-right: 1px solid #cbd5e1;
  background: #f3f4f6;
  cursor: pointer;
  font-size: 0.95rem;
  gap: 6px;
}
.phone-country-flag {
  font-size: 1.1rem;
}
.phone-country-code {
  font-weight: 600;
  color: #111827;
}
.phone-input {
  border: none;
  flex: 1 1 auto;
  padding: 10px 12px;
  font-size: 1rem;
  font-weight: 500;
}
.phone-input:focus {
  outline: none;
}
.phone-country-menu {
  position: absolute;
  z-index: 20;
  margin-top: 4px;
  padding: 8px;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
  max-height: 260px;
  overflow-y: auto;
  min-width: 220px;
}
.phone-country-search {
  width: 100%;
  padding: 6px 8px;
  margin-bottom: 6px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  font-size: 0.9rem;
}
.phone-country-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.phone-country-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 4px;
  cursor: pointer;
  font-size: 0.9rem;
}
.phone-country-item:hover {
  background: #eff6ff;
}
.phone-country-name {
  margin: 0 6px;
  flex: 1 1 auto;
}
.radio-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  color: #0f172a;
  transition:
    border-color 0.16s ease,
    background-color 0.16s ease,
    box-shadow 0.16s ease,
    color 0.16s ease,
    transform 0.06s ease;
}
.chip:hover {
  border-color: #3b82f6;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 40%, #e0ecff 100%);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.18);
  transform: translateY(-1px);
}
.chip.is-selected {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  border-color: #1d4ed8;
  color: #fff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.cant-find { margin-top: 10px; }
.error {
  color: #ef4444;
  font-weight: 700;
  margin-top: 6px;
  text-align: center;
}

/* Buttons (global for form UI) */
.btn {
  appearance: none;
  border: 1px solid #3b82f6;
  background: #3b82f6;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-label {
  display: inline-block;
}
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-icon-svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.btn:not(.secondary):not(.ghost):hover {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.32);
  transform: translateY(-1px);
}
.btn.secondary {
  background: #fff;
  color: #3b82f6;
}
.btn.ghost {
  background: transparent;
  border-color: #cbd5e1;
  color: #0f172a;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-invisible {
  visibility: hidden;
  pointer-events: none;
}

/* Nav back button: text + arrow only (no pill) */
.step-header #btnPrev {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
  color: #3b82f6;
}
.step-header #btnPrev .btn-icon-svg {
  width: 18px;
  height: 18px;
}

/* Utility */
.muted { color: #64748b; }
.hide { display: none !important; }

/* Style families mapping (simplified) */
.style-button {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.style-button .opt { justify-content: center; }
.style-tile-left .opt { }
.style-tile-top .opt {
  flex-direction: column;
  align-items: flex-start;
}

/* Loader overlay */
.loader {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.9);
  color: #e2e8f0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 50;
}
.loader .panel {
  width: 100%;
  max-width: 980px;
  background: #0b1324;
  border: 1px solid #1f2a44;
  border-radius: 16px;
  padding: 16px;
}
.loader h3 {
  margin: 0 0 6px;
  font-size: 1.2rem;
  font-weight: 800;
}
.loader p {
  margin: 0 0 12px;
  color: #94a3b8;
}
.loader textarea {
  width: 100%;
  min-height: 240px;
  background: #0a1020;
  color: #e2e8f0;
  border: 1px solid #1f2a44;
  border-radius: 12px;
  padding: 12px;
  font-family: 'SFMono-Regular', ui-monospace, Menlo, monospace;
  font-size: 0.9rem;
}
.loader .row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* Embed mode: larger fields and tighter layout when inside an iframe */
body.embed .wrap {
  max-width: 100%;
  margin: 0 auto 64px;
  padding: 12px 12px 56px;
}
body.embed .step {
  padding: 18px;
}
body.embed .fields { gap: 14px; }
body.embed .field label { font-size: 1.05rem; }
body.embed .field input[type=text],
body.embed .field input[type=email],
body.embed .field input[type=tel],
body.embed .field input[type=number],
body.embed .field textarea {
  padding: 14px 16px;
  font-size: 1.05rem;
  min-height: 54px;
  border-radius: 12px;
  border-width: 2px;
}
body.embed .field textarea { min-height: 160px; }
body.embed #defLoader { display: none !important; }

/* Phone layout: shrink overall scale for small screens */
@media (max-width: 640px) {
  .wrap {
    margin: 16px auto 48px;
    padding: 0 12px;
  }
  .progress-shell {
    margin-bottom: 20px;
  }
  .step-shell {
    margin: 16px auto 48px;
    padding: 0 12px;
  }
  .step-header {
    margin: 12px 0 10px;
    flex-wrap: wrap;
    justify-content: space-between;
  }
  .step-header h2 {
    font-size: 1.4rem;
  }
  .step-header #btnPrev,
  .step-header #btnNext {
    order: 1;
    flex: 0 0 auto;
    justify-content: center;
  }
  .step-header .step-header-center {
    order: 2;
    flex: 0 0 100%;
    margin-top: 32px;
  }
  .step-title-icon {
    display: none;
  }
  .step-title-icon-mobile {
    display: flex;
    order: 1;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 50%;
    top: 12px;
    transform: translateX(-50%);
    pointer-events: none;
  }
  .options {
    gap: 14px;
  }
  .opt {
    padding: 14px 16px;
    gap: 12px;
    flex: 0 1 100%;
    max-width: 100%;
  }
  .opt.with-input {
    flex: 0 0 auto;
    max-width: 100%;
    width: auto;
  }
  .options-multi.options-two-col .opt:not(.with-input) {
    flex: 0 1 calc(50% - 10px);
    max-width: calc(50% - 10px);
  }
  .opt .thumb {
    width: 120px;
    height: 120px;
  }
  .opt .meta .title {
    font-size: 1rem;
  }
  .opt .meta .subtitle {
    font-size: 0.85rem;
  }
  .dims-step {
    max-width: 100%;
  }
  .dims-fields-small .field-number-wrap input[type=number] {
    width: 50px;
    padding: 3px 6px;
    font-size: 0.8rem;
  }
  .dims-fields-small .field-qty-btn {
    min-width: 24px;
    height: 24px;
    font-size: 0.8rem;
  }
  /* Single-choice hero cards with big images: shrink and limit width on phones */
  .options-single-hero .opt {
    max-width: 360px;
  }
  .options-single-hero .opt .thumb {
    width: 160px;
    height: 160px;
  }
  .field input[type=text],
  .field input[type=email],
  .field input[type=tel],
  .field input[type=number] {
    height: 52px;
    font-size: 1.05rem;
  }
  .field textarea {
    min-height: 140px;
  }
  .btn {
    font-size: 0.85rem;
    padding: 0.6rem 1rem;
  }
  /* Multi-choice cards on phone: make them smaller so checkbox doesn't overlap image */
  .options-multi .opt {
    padding-left: 32px;
  }
  .options-multi .opt .thumb {
    width: 120px;
    height: 120px;
  }
  .options-multi .opt .meta {
    max-width: 100%;
  }
  .options-multi .opt .opt-checkbox {
    left: 10px;
  }
}

/* Desktop layout for input steps: two fields per row where possible */
@media (min-width: 900px) {
  .fields {
    grid-template-columns: repeat(2, minmax(0, 420px));
    column-gap: 24px;
    row-gap: 16px;
    justify-content: center;
  }
  .fields .field {
    max-width: 100%;
  }
  .fields.fields-single-number {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .fields.fields-single-number .field.field-number {
    max-width: 420px;
  }
  .fields.fields-single-file {
    justify-items: center;
  }
  .fields.fields-single-file .field.field-file-card {
    max-width: 460px;
    width: 100%;
  }
  /* Slightly bigger inputs on desktop */
  .field input[type=text],
  .field input[type=email],
  .field input[type=tel],
  .field input[type=number] {
    height: 52px;
    font-size: 1.05rem;
  }
  .field textarea {
    min-height: 140px;
  }

  /* Single-field steps: center and slightly widen the field */
  .fields > .field:only-child {
    grid-column: 1 / -1;
    max-width: 540px;
    width: 100%;
    justify-self: center;
  }

  /* Single long-text field: wider content area */
  .fields.fields-single-long {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .fields.fields-single-long .field {
    max-width: 640px;
    width: 100%;
  }
}


/* AI Limar recommendations layout */
.ai-results {
  margin-top: 8px;
}
.ai-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0,1fr));
}
@media (min-width: 1024px) {
  .ai-grid {
    grid-template-columns: repeat(6, minmax(0,220px));
    justify-content: center;
  }
}
.ai-card {
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
.ai-card-thumb {
  width: 100%;
  max-width: 140px;
  margin-bottom: 6px;
}
.ai-card-thumb img {
  border-radius: 10px;
}
.ai-card-warning {
  color: #dc2626;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 4px;
}
.ai-card-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 4px;
}
.ai-card-main {
  font-size: 0.95rem;
  margin-bottom: 4px;
}
.ai-card-config {
  font-size: 0.82rem;
  color: #475569;
  margin-bottom: 4px;
}
.ai-card-line {
  line-height: 1.3;
}
.ai-card-total {
  margin-top: 2px;
}
.ai-card-color {
  font-size: 0.8rem;
  color: #64748b;
}
.ai-card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.ai-actions {
  justify-content: center;
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 18px 0 18px;
}
.ai-limar-card {
  padding: 12px;
}



/* Required field error state */
.field.field-error label {
  color: #b91c1c;
}
.field.field-error input[type=text],
.field.field-error input[type=email],
.field.field-error input[type=tel],
.field.field-error input[type=number],
.field.field-error textarea,
.field.field-error .upload-card,
.field.field-error .field-number-wrap input[type=number] {
  border-color: #ef4444 !important; box-shadow: 0 0 0 1px rgba(248,113,113,0.35);
}

.field-error-inline {
  font-size: 0.82rem;
  color: #b91c1c;
}

@media (min-width: 1024px) {
  .dims-step {
    margin-top: -32px;
  }
}

.submit-confirm {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #166534;
  border-radius: 12px;
  font-weight: 600;
}
