:root {
  --l3d-ink: #102f2a;
  --l3d-green: #17483f;
  --l3d-green-2: #2d6258;
  --l3d-gold: #e8b84f;
  --l3d-mist: #edf3f0;
  --l3d-line: #d3dfda;
  --l3d-white: #fff;
}

.l3d-intro {
  background: linear-gradient(110deg, #f5f8f6 0%, #e8f0ec 100%);
  border-bottom: 1px solid var(--l3d-line);
  padding: 34px 0 32px;
}

.l3d-intro__inner {
  align-items: flex-end;
  display: flex;
  gap: 28px;
  justify-content: space-between;
}

.l3d-intro .eyebrow,
.l3d-options .eyebrow {
  color: #b77a08;
  font-size: 11px;
  letter-spacing: .16em;
  margin: 0 0 9px;
}

.l3d-intro h1 {
  color: var(--l3d-ink);
  font-size: clamp(30px, 3.3vw, 52px);
  line-height: 1.02;
  margin: 0;
  max-width: 800px;
}

.l3d-intro p:not(.eyebrow) {
  color: #51645f;
  font-size: 16px;
  margin: 14px 0 0;
  max-width: 720px;
}

.l3d-intro__tag {
  background: rgba(255,255,255,.76);
  border: 1px solid #cbd9d4;
  border-radius: 999px;
  color: #36544e;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  padding: 9px 14px;
  text-transform: uppercase;
}

.l3d-shell {
  background: #eef3f1;
  padding: 32px 0 64px;
}

.l3d-layout {
  align-items: start;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1.65fr) minmax(340px, .78fr);
}

.l3d-model,
.l3d-options {
  background: var(--l3d-white);
  border: 1px solid var(--l3d-line);
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(24,63,54,.08);
  overflow: hidden;
}

.l3d-model__toolbar,
.l3d-options__heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: 76px;
  padding: 14px 18px;
}

.l3d-model__toolbar strong,
.l3d-model__toolbar span {
  display: block;
}

.l3d-model__toolbar strong {
  color: var(--l3d-ink);
  font-size: 16px;
}

.l3d-model__toolbar span {
  color: #6d7d78;
  font-size: 12px;
  margin-top: 3px;
}

.l3d-model__actions {
  display: flex;
  gap: 7px;
}

.l3d-model__actions button,
.l3d-motion__states button,
.l3d-segmented button {
  background: #f6f8f7;
  border: 1px solid #cbd9d4;
  border-radius: 999px;
  color: #264941;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 8px 12px;
}

.l3d-model__actions button:hover,
.l3d-model__actions button[aria-pressed="true"],
.l3d-motion__states button.is-active,
.l3d-segmented button.is-active {
  background: var(--l3d-green);
  border-color: var(--l3d-green);
  color: white;
}

.l3d-stage {
  background: #dfe9e5;
  height: 560px;
  overflow: hidden;
  position: relative;
}

#retractable-louvre-model-fallback { display: none; }

#retractable-louvred-pergola-model-integrated {
  cursor: grab;
  display: block;
  height: 100%;
  inset: 0;
  position: absolute;
  touch-action: none;
  width: 100%;
}

#retractable-louvred-pergola-model-integrated:active { cursor: grabbing; }

.l3d-stage__loading {
  align-items: center;
  background: rgba(239,245,242,.92);
  color: #36534c;
  display: flex;
  font-size: 12px;
  inset: 0;
  justify-content: center;
  letter-spacing: .04em;
  position: absolute;
  transition: opacity .24s ease, visibility .24s ease;
  z-index: 3;
}

.l3d-stage__loading::before {
  animation: l3d-model-spin 1s linear infinite;
  border: 2px solid rgba(33,71,63,.17);
  border-radius: 50%;
  border-top-color: #2d6258;
  content: "";
  height: 20px;
  margin-right: 10px;
  width: 20px;
}

.l3d-stage__loading.is-hidden { opacity: 0; pointer-events: none; visibility: hidden; }
.l3d-stage__loading.is-error { color: #8b2d27; }
@keyframes l3d-model-spin { to { transform: rotate(360deg); } }

.l3d-stage__badge,
.l3d-stage__hint,
.l3d-stage__status {
  backdrop-filter: blur(8px);
  background: rgba(250,252,251,.84);
  border: 1px solid rgba(255,255,255,.72);
  color: #36534c;
  position: absolute;
}

.l3d-stage__badge,
.l3d-stage__hint {
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  padding: 7px 10px;
  top: 14px;
  text-transform: uppercase;
}

.l3d-stage__badge { right: 14px; }
.l3d-stage__hint { left: 14px; }

.l3d-stage__status {
  border-radius: 13px;
  bottom: 15px;
  left: 15px;
  min-width: 126px;
  padding: 9px 12px;
}

.l3d-stage__status small,
.l3d-stage__status strong { display: block; }
.l3d-stage__status small { font-size: 9px; text-transform: uppercase; }
.l3d-stage__status strong { color: var(--l3d-ink); font-size: 15px; margin-top: 2px; }

.l3d-motion {
  border-top: 1px solid var(--l3d-line);
  padding: 15px 18px 17px;
}

.l3d-motion__states {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 14px;
}

.l3d-motion__states button {
  border-radius: 10px;
  padding: 9px 6px;
}

.l3d-motion label,
.l3d-range {
  color: #456159;
  display: flex;
  font-size: 11px;
  font-weight: 700;
  justify-content: space-between;
  margin-bottom: 7px;
}

.l3d-motion output,
.l3d-range output { color: var(--l3d-ink); }

.l3d-motion input,
.l3d-option-group > input[type="range"] {
  accent-color: var(--l3d-green-2);
  cursor: pointer;
  width: 100%;
}

.l3d-live {
  border-top: 1px solid var(--l3d-line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.l3d-live span {
  min-width: 0;
  padding: 13px 14px;
}

.l3d-live span + span { border-left: 1px solid var(--l3d-line); }
.l3d-live small,
.l3d-live strong { display: block; }
.l3d-live small { color: #7c8c87; font-size: 8px; letter-spacing: .1em; text-transform: uppercase; }
.l3d-live strong { color: var(--l3d-ink); font-size: 11px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.l3d-options {
  position: sticky;
  top: 82px;
}

.l3d-options__heading {
  background: #f8faf9;
  border-bottom: 1px solid var(--l3d-line);
}

.l3d-options__heading h2 {
  color: var(--l3d-ink);
  font-size: 22px;
  line-height: 1.05;
  margin: 0;
}

.l3d-options__heading > span {
  color: #8a6a24;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.l3d-option-group {
  border-bottom: 1px solid var(--l3d-line);
  padding: 18px;
}

.l3d-option-title {
  align-items: baseline;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.l3d-option-title h3 {
  color: var(--l3d-ink);
  font-size: 15px;
  margin: 0;
}

.l3d-option-title p {
  color: #7b8985;
  font-size: 9px;
  margin: 0;
  text-align: right;
}

.l3d-option-group > input[type="range"] { margin-bottom: 12px; }
.l3d-option-group > input[type="range"]:last-child { margin-bottom: 0; }

.l3d-swatches {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(2, 1fr);
}

.l3d-swatches button {
  align-items: center;
  background: white;
  border: 1px solid #d4dfdb;
  border-radius: 12px;
  color: #536762;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  font: inherit;
  font-size: 9px;
  gap: 6px;
  padding: 8px 4px;
}

.l3d-swatches button.is-active {
  border-color: var(--l3d-green-2);
  box-shadow: 0 0 0 2px rgba(45,98,88,.12);
  color: var(--l3d-ink);
  font-weight: 700;
}

.l3d-swatches i {
  background: var(--swatch);
  border: 1px solid rgba(19,45,39,.18);
  border-radius: 50%;
  height: 25px;
  width: 25px;
}

.l3d-secondary-title {
  border-top: 1px solid #d8e2de;
  margin-top: 18px;
  padding-top: 17px;
}

.l3d-whole-colour { grid-template-columns: minmax(0, 1fr); }

.l3d-custom-colour {
  background: #f6f9f7;
  border: 1px solid #d4dfdb;
  border-radius: 12px;
  color: #536762;
  display: block;
  font-size: 11px;
  font-weight: 700;
  margin-top: 10px;
  padding: 10px;
}

.l3d-custom-colour[hidden] { display: none; }
.l3d-custom-colour > span,
.l3d-custom-colour small { display: block; }

.l3d-custom-colour input {
  background: #fff;
  border: 1px solid #c9d7d2;
  border-radius: 8px;
  color: #183d35;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  margin: 7px 0;
  padding: 8px 9px;
  text-transform: uppercase;
  width: 100%;
}

.l3d-custom-colour small {
  color: #71817c;
  font-weight: 400;
  line-height: 1.45;
}

.l3d-segmented {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.l3d-rgb-options button { align-items: center; display: flex; gap: 7px; justify-content: center; }
.l3d-rgb-options button i { background: var(--rgb); border: 1px solid rgba(16,47,42,.18); border-radius: 50%; box-shadow: 0 0 0 2px rgba(255,255,255,.7); height: 13px; width: 13px; }

.l3d-option-group--last { border-bottom: 0; }

.l3d-note {
  background: #173f37;
  color: white;
  margin: 0;
  padding: 16px 18px 18px;
}

.l3d-note strong { color: var(--l3d-gold); font-size: 11px; text-transform: uppercase; }
.l3d-note p { color: #d9e5e1; font-size: 10px; line-height: 1.55; margin: 6px 0 0; }

.l3d-model__toolbar {
  gap: 14px;
}

.l3d-model__price {
  margin-left: auto;
  text-align: right;
}

.l3d-model__price small,
.l3d-model__price strong,
.l3d-model__price span {
  display: block;
}

.l3d-model__price small {
  color: #768681;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.l3d-model__price strong {
  color: var(--l3d-green);
  font-size: 22px;
  line-height: 1;
  margin-top: 3px;
}

.l3d-model__price span {
  color: #7a8985;
  font-size: 8px;
  margin-top: 3px;
}

.l3d-input-grid {
  display: grid;
  gap: 9px;
  grid-template-columns: 1fr 1fr;
}

.l3d-input-grid label {
  background: #f6f9f7;
  border: 1px solid #d4dfdb;
  border-radius: 12px;
  padding: 9px 10px;
}

.l3d-input-grid label > span,
.l3d-input-grid output {
  color: #536762;
  display: block;
  font-size: 9px;
  font-weight: 700;
}

.l3d-input-grid input {
  background: white;
  border: 1px solid #c9d7d2;
  border-radius: 8px;
  color: var(--l3d-ink);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  margin: 7px 0 5px;
  padding: 8px 9px;
  width: 100%;
}

.l3d-input-grid output {
  color: #7b8985;
}

.l3d-charge-band {
  align-items: center;
  background: var(--l3d-green);
  border-radius: 11px;
  color: white;
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  padding: 10px 12px;
}

.l3d-charge-band span {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.l3d-charge-band strong {
  color: var(--l3d-gold);
  font-size: 13px;
}

.l3d-help,
.l3d-price-note,
.l3d-save-status {
  color: #71817c;
  font-size: 9px;
  line-height: 1.45;
  margin: 9px 0 0;
}

.l3d-subtitle {
  color: var(--l3d-ink);
  font-size: 10px;
  font-weight: 700;
  margin: 14px 0 8px;
}

.l3d-wall-grid {
  display: grid;
  gap: 7px;
  grid-template-columns: 1fr 1fr;
}

.l3d-wall-grid label {
  align-items: center;
  background: #f6f9f7;
  border: 1px solid #d4dfdb;
  border-radius: 10px;
  color: #466159;
  cursor: pointer;
  display: flex;
  font-size: 9px;
  font-weight: 700;
  gap: 7px;
  padding: 9px;
}

.l3d-wall-grid input {
  accent-color: var(--l3d-green);
  margin: 0;
}

.l3d-choice-list {
  display: grid;
  gap: 8px;
}

.l3d-choice-list button {
  align-items: center;
  background: white;
  border: 1px solid #d4dfdb;
  border-radius: 12px;
  color: #52655f;
  cursor: pointer;
  display: flex;
  font: inherit;
  justify-content: space-between;
  padding: 10px 11px;
  text-align: left;
}

.l3d-choice-list button.is-active {
  border-color: var(--l3d-green-2);
  box-shadow: 0 0 0 2px rgba(45,98,88,.12);
}

.l3d-choice-list span,
.l3d-choice-list strong,
.l3d-choice-list small {
  display: block;
}

.l3d-choice-list strong {
  color: var(--l3d-ink);
  font-size: 10px;
}

.l3d-choice-list small {
  color: #7a8985;
  font-size: 8px;
  margin-top: 3px;
}

.l3d-choice-list b {
  color: #a96f06;
  font-size: 9px;
  margin-left: 12px;
  white-space: nowrap;
}

.l3d-price-panel {
  background: #f8faf9;
  border-top: 1px solid var(--l3d-line);
  padding: 18px;
}

.l3d-price-panel .eyebrow {
  margin-bottom: 7px;
}

.l3d-price-total {
  align-items: flex-end;
  background: var(--l3d-green);
  border-radius: 13px;
  color: white;
  display: flex;
  justify-content: space-between;
  padding: 13px;
}

.l3d-price-total span {
  font-size: 9px;
  font-weight: 700;
}

.l3d-price-total strong {
  color: var(--l3d-gold);
  font-size: 24px;
  line-height: 1;
}

.l3d-price-panel ul {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.l3d-price-panel li {
  border-bottom: 1px solid #dde6e2;
  display: flex;
  font-size: 9px;
  gap: 12px;
  justify-content: space-between;
  padding: 7px 0;
}

.l3d-price-panel li span {
  color: #71817c;
}

.l3d-price-panel li strong {
  color: var(--l3d-ink);
  text-align: right;
}

.l3d-config-actions {
  display: grid;
  gap: 7px;
  margin-top: 13px;
}

.l3d-config-actions .btn {
  font-size: 10px;
  justify-content: center;
  min-height: 38px;
  width: 100%;
}

.l3d-save-status {
  color: var(--l3d-green-2);
  font-weight: 700;
}
.l3d-progress {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 0 0 18px;
}

.l3d-progress button {
  align-items: center;
  background: #fff;
  border: 1px solid #cbd9d4;
  border-radius: 13px;
  color: #58706a;
  cursor: pointer;
  display: flex;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  gap: 8px;
  justify-content: center;
  min-height: 48px;
  padding: 8px 9px;
}

.l3d-progress button span {
  align-items: center;
  background: #eaf1ee;
  border-radius: 50%;
  color: #55706a;
  display: inline-flex;
  flex: 0 0 24px;
  height: 24px;
  justify-content: center;
}

.l3d-progress button.is-active {
  background: var(--l3d-green);
  border-color: var(--l3d-green);
  color: #fff;
}

.l3d-progress button.is-active span {
  background: var(--l3d-gold);
  color: var(--l3d-ink);
}

.l3d-progress button.is-complete:not(.is-active) {
  border-color: #8eaaa2;
  color: var(--l3d-green);
}

.l3d-progress button.is-complete:not(.is-active) span {
  background: #dce9e4;
  color: var(--l3d-green);
}

.l3d-options__heading [data-step-price] {
  color: var(--l3d-green);
  font-size: 16px;
  letter-spacing: 0;
  text-transform: none;
}

[data-step-panel][hidden],
.l3d-step-nav [hidden] {
  display: none !important;
}

.l3d-step-nav {
  align-items: center;
  border-top: 1px solid var(--l3d-line);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 15px 18px;
}

.l3d-step-nav .btn {
  font-size: 10px;
  justify-content: center;
  min-height: 40px;
  min-width: 104px;
}

.l3d-step-nav button:disabled {
  cursor: not-allowed;
  opacity: .4;
}
@media (max-width: 1050px) {
  .l3d-layout { grid-template-columns: 1fr; }
  .l3d-options { position: static; }
  .l3d-stage { height: 540px; }
}

@media (max-width: 700px) {
  .l3d-intro { padding: 24px 0 22px; }
  .l3d-intro__inner { align-items: flex-start; flex-direction: column; gap: 14px; }
  .l3d-intro h1 { font-size: 33px; }
  .l3d-intro p:not(.eyebrow) { font-size: 14px; }
  .l3d-shell { padding: 14px 0 40px; }
  .l3d-layout { gap: 14px; }
  .l3d-progress {
    gap: 6px;
    grid-template-columns: repeat(6, minmax(112px, 1fr));
    margin-bottom: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }
  .l3d-progress button { font-size: 9px; justify-content: flex-start; min-height: 44px; }
  .l3d-progress button span { flex-basis: 22px; height: 22px; }
  .l3d-model,
  .l3d-options { border-radius: 15px; }
  .l3d-model__toolbar { align-items: flex-start; flex-wrap: wrap; min-height: 86px; }
  .l3d-model__price { order: 3; text-align: left; width: 100%; }
  .l3d-input-grid, .l3d-wall-grid { grid-template-columns: 1fr; }
  .l3d-model__toolbar strong { font-size: 13px; max-width: 190px; }
  .l3d-model__actions { flex-direction: column; }
  .l3d-model__actions button { font-size: 9px; padding: 6px 9px; }
  .l3d-stage { height: 420px; }
  .l3d-stage__badge,
  .l3d-stage__hint { display: none; }
  .l3d-motion { padding: 12px; }
  .l3d-motion__states { gap: 4px; }
  .l3d-motion__states button { font-size: 8px; padding: 8px 3px; }
  .l3d-live { grid-template-columns: 1fr 1fr; }
  .l3d-live span:nth-child(3) { border-left: 0; border-top: 1px solid var(--l3d-line); }
  .l3d-live span:nth-child(4) { border-top: 1px solid var(--l3d-line); }
  .l3d-options__heading { min-height: 72px; }
  .l3d-options__heading h2 { font-size: 20px; }
  .l3d-options__heading [data-step-price] { font-size: 14px; }
  .l3d-step-nav { position: sticky; bottom: 0; background: rgba(255,255,255,.96); z-index: 4; }
}

@media (prefers-reduced-motion: reduce) {
  #retractable-louvre-model-fallback { scroll-behavior: auto; }
}
