.builder-wrap {
  padding: 60px 24px 88px;
  background:
    radial-gradient(circle at 82% 8%, rgba(0,167,149,.10), transparent 25%),
    var(--cream);
}

.builder-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  column-gap: 28px;
  row-gap: 0;
  align-items: start;
}

.builder-head {
  grid-column: 1 / -1;
}

.builder-title {
  margin-bottom: 22px;
  font-family: 'Instrument Serif', serif;
  font-size: clamp(34px, 4vw, 50px);
  font-weight: 400;
  color: var(--navy);
}

.builder-title em { color: var(--teal); font-weight: 400; }

.builder-intro {
  max-width: 650px;
  margin: -10px 0 28px;
  color: #66665f;
  font-size: 16px;
  line-height: 1.65;
}

.service-banner {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 26px;
  margin-bottom: 22px;
  padding: 14px 20px;
  border: 1px solid rgba(0,167,149,.28);
  border-left: 4px solid var(--teal);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(0,167,149,.12), rgba(0,167,149,.04));
}

.design-banner {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 18px;
  padding: 12px 18px;
  border: 1px solid rgba(10,35,66,.16);
  border-radius: 16px;
  background: rgba(10,35,66,.05);
  font-size: 13px;
  color: var(--navy);
}
.design-banner[hidden] { display: none; }
.design-banner-label {
  flex: 0 0 auto;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--navy);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
#design-banner-text { font-weight: 600; }
.design-banner-photo {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(10,35,66,.16);
}
.design-banner-photo[hidden] { display: none; }
.design-banner-photo-note {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 400;
  color: var(--gray, #5a5a53);
}
.design-banner-photo-note[hidden] { display: none; }

.service-banner-lead {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.service-banner-badge {
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--teal);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.service-banner-title {
  color: var(--navy);
  font-family: 'Instrument Serif', serif;
  font-size: 23px;
  font-weight: 400;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.service-banner-text {
  flex: 1 1 320px;
  min-width: 0;
  color: #47514c;
  font-size: 13.5px;
  line-height: 1.5;
}

.product-picker {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 560px;
}

.product-option {
  display: grid;
  grid-template-columns: 132px 1fr;
  overflow: hidden;
  border: 1px solid #e7e5df;
  border-radius: 20px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 8px 28px rgba(10,35,66,.05);
}

.product-option[hidden] { display: none; }

.product-image {
  height: 100%;
  min-height: 210px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #f4fbf9, #fbfaf6);
}

.product-add-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  max-width: 560px;
}

.product-add-row[hidden] { display: none; }

.product-add-chip {
  border: 1px dashed #c6c6be;
  border-radius: 100px;
  padding: 11px 20px;
  background: transparent;
  color: var(--navy);
  font: 700 13px 'Outfit', sans-serif;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}

.product-add-chip::before { content: '+ '; color: var(--teal); font-weight: 800; }
.product-add-chip:hover { border-color: var(--teal); background: rgba(0,167,149,.08); }
.product-add-chip[hidden] { display: none; }

.product-image img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 12px rgba(10,35,66,.10));
}

.product-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px;
}

.product-kicker {
  margin-bottom: 7px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.product-body h2 {
  color: var(--navy);
  font-family: 'Instrument Serif', serif;
  font-size: 29px;
  font-weight: 400;
  line-height: 1;
}

.product-note {
  min-height: 42px;
  margin: 10px 0 18px;
  color: #74746d;
  font-size: 13px;
  line-height: 1.45;
}

.picker-field { margin-top: 12px; }
.picker-field:first-of-type { margin-top: 0; }
.picker-field:last-of-type { margin-bottom: 16px; }

.picker-field label {
  display: block;
  margin-bottom: 7px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
}

.picker-field select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d9d9d3;
  border-radius: 11px;
  padding: 0 36px 0 12px;
  background: #fff;
  color: var(--navy);
  font: 600 14px 'Outfit', sans-serif;
}

.add-button {
  width: 100%;
  min-height: 45px;
  margin-top: auto;
  border: 0;
  border-radius: 100px;
  background: var(--navy);
  color: #fff;
  font: 700 14px 'Outfit', sans-serif;
  cursor: pointer;
  transition: transform .2s, background .2s;
}

.add-button:hover { background: var(--teal); transform: translateY(-1px); }
.add-button:focus-visible, .picker-field select:focus-visible, .checkout-button:focus-visible, .remove-line:focus-visible {
  outline: 3px solid rgba(0,167,149,.25);
  outline-offset: 2px;
}

.cart-card {
  border-radius: 22px;
  padding: 24px;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 20px 50px rgba(10,35,66,.18);
}

.cart-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding-bottom: 17px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.cart-top h2 { font-family: 'Instrument Serif', serif; font-size: 30px; font-weight: 400; }
.cart-count { color: var(--teal-bright); font-size: 12px; font-weight: 700; }

.cart-empty {
  padding: 30px 4px;
  color: rgba(255,255,255,.58);
  font-size: 14px;
  line-height: 1.55;
}

.cart-lines { list-style: none; }

.cart-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 14px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,.11);
}

.line-name { font-size: 14px; font-weight: 700; }
.line-detail { color: rgba(255,255,255,.55); font-size: 12px; }
.line-price { grid-row: 1 / span 2; grid-column: 2; font-size: 15px; font-weight: 700; }
.remove-line { justify-self: start; border: 0; padding: 4px 0 0; background: none; color: var(--teal-bright); font: 600 11px 'Outfit', sans-serif; cursor: pointer; }

.promo { margin-top: 16px; }
.promo-entry { display: flex; gap: 8px; }
.promo-entry input {
  flex: 1 1 auto; min-width: 0; min-height: 42px;
  border: 1px solid rgba(255,255,255,.22); border-radius: 10px;
  padding: 0 12px; background: rgba(255,255,255,.06); color: #fff;
  font: 600 13px 'Outfit', sans-serif; letter-spacing: .04em; text-transform: uppercase;
}
.promo-entry input::placeholder { color: rgba(255,255,255,.4); letter-spacing: 0; text-transform: none; font-weight: 500; }
.promo-entry input:disabled { opacity: .8; }
.promo-entry input:focus-visible { outline: 3px solid rgba(0,167,149,.35); outline-offset: 1px; border-color: var(--teal-bright); }
.promo-entry button {
  flex: 0 0 auto; min-height: 42px; padding: 0 16px;
  border: 0; border-radius: 10px; background: rgba(255,255,255,.14); color: #fff;
  font: 700 12px 'Outfit', sans-serif; cursor: pointer; transition: background .2s;
}
.promo-entry button:hover { background: rgba(255,255,255,.24); }
.promo-entry.is-applied button { background: rgba(255,255,255,.10); color: var(--teal-bright); }
.promo-msg { margin-top: 8px; font-size: 11.5px; line-height: 1.4; }
.promo-msg.ok { color: var(--teal-bright); }
.promo-msg.err { color: #ff9a8f; }

.cart-total {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 21px 0 8px;
}

.cart-total span { color: rgba(255,255,255,.65); font-size: 12px; }
.cart-total strong { font-family: 'Instrument Serif', serif; font-size: 36px; font-weight: 400; }

.estimate-note { color: rgba(255,255,255,.46); font-size: 11px; line-height: 1.45; }

.pay-note {
  margin-top: 12px;
  color: rgba(255,255,255,.62);
  font-size: 11.5px;
  line-height: 1.5;
}

.checkout-button {
  width: 100%;
  min-height: 49px;
  margin-top: 18px;
  border: 0;
  border-radius: 100px;
  background: var(--teal);
  color: var(--navy);
  font: 800 14px 'Outfit', sans-serif;
  cursor: pointer;
}

.checkout-button:disabled { opacity: .38; cursor: not-allowed; }

/* ---- Checkout drawer ---- */
.checkout-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 35, 66, .45);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}

.checkout-backdrop.open { opacity: 1; visibility: visible; }

.checkout-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 201;
  width: min(560px, 94vw);
  display: flex;
  flex-direction: column;
  background: var(--cream);
  box-shadow: -24px 0 60px rgba(10, 35, 66, .22);
  transform: translateX(100%);
  visibility: hidden;
  overflow: hidden;
  transition: transform .3s cubic-bezier(.4, 0, .2, 1), visibility .3s;
}

.checkout-panel.open { transform: translateX(0); visibility: visible; }

.checkout-panel-head {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 14px;
  background: var(--cream);
  border-bottom: 1px solid #e7e5df;
}

.checkout-panel-head h2 {
  color: var(--navy);
  font-family: 'Instrument Serif', serif;
  font-size: 27px;
  font-weight: 400;
}

.checkout-panel-head p {
  margin-top: 5px;
  max-width: 40ch;
  color: #696961;
  font-size: 13px;
  line-height: 1.5;
}

.checkout-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(10, 35, 66, .07);
  color: var(--navy);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background .2s;
}

.checkout-close:hover { background: rgba(10, 35, 66, .14); }

.checkout-steps {
  flex: 0 0 auto;
  display: flex;
  gap: 6px;
  margin: 14px 24px 0;
  padding: 0;
  list-style: none;
  counter-reset: cstep;
}

.checkout-steps li {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #a2a29a;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.checkout-steps li::before {
  counter-increment: cstep;
  content: counter(cstep);
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #e7e5df;
  color: #8a8a82;
  font-size: 10px;
}

#checkout-wrap[data-stage="details"] .step-order::before,
#checkout-wrap[data-stage="details"] .step-details::before,
#checkout-wrap[data-stage="done"] .checkout-steps li::before {
  background: var(--teal);
  color: #fff;
}

#checkout-wrap[data-stage="details"] .step-order,
#checkout-wrap[data-stage="details"] .step-details,
#checkout-wrap[data-stage="done"] .checkout-steps li {
  color: var(--navy);
}

/* Author rules below set display, which would otherwise beat [hidden]. */
.checkout-frame[hidden],
.checkout-summary[hidden],
.checkout-summary-tab[hidden],
.checkout-done[hidden] { display: none !important; }

.checkout-done {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 32px 30px;
  text-align: center;
}

.checkout-done-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 26px;
  font-weight: 700;
}

.checkout-done h3 {
  margin: 6px 0 0;
  color: var(--navy);
  font-family: 'Instrument Serif', serif;
  font-size: 27px;
  font-weight: 400;
}

.checkout-done p {
  max-width: 40ch;
  margin: 0;
  color: #5f5f57;
  font-size: 13.5px;
  line-height: 1.6;
}

.checkout-done-close {
  margin-top: 12px;
  min-height: 46px;
  padding: 0 34px;
  border: 0;
  border-radius: 100px;
  background: var(--navy);
  color: #fff;
  font: 800 14px 'Outfit', sans-serif;
  cursor: pointer;
}

.checkout-done-close:hover { background: var(--teal); color: var(--navy); }

/* Compact always-visible toggle — replaces a permanent inline order box so the
   form gets the vertical space by default; tapping it slides the itemized
   order out from the side as a small flyout (below). */
.checkout-summary-tab {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 8px;
  margin: 8px 20px 14px;
  padding: 10px 14px;
  border: 1px solid rgba(0, 167, 149, .28);
  border-radius: 100px;
  background: rgba(0, 167, 149, .08);
  color: var(--navy);
  font: 700 12.5px 'Outfit', sans-serif;
  text-align: left;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.checkout-summary-tab:hover { background: rgba(0, 167, 149, .14); border-color: rgba(0, 167, 149, .45); }
.checkout-summary-tab .cst-icon { font-size: 14px; line-height: 1; }
.checkout-summary-tab .cst-label { flex: 1 1 auto; }
.checkout-summary-tab .cst-chev {
  color: var(--teal); font-size: 17px; font-weight: 800; line-height: 1;
  transition: transform .25s ease;
}
.checkout-summary-tab[aria-expanded="true"] .cst-chev { transform: rotate(90deg); }

.checkout-summary-backdrop {
  position: absolute; inset: 0;
  background: rgba(10, 35, 66, .18);
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease, visibility .25s;
  z-index: 5;
}
.checkout-summary-backdrop.open { opacity: 1; visibility: visible; }

.checkout-summary {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  z-index: 6;
  width: min(320px, 86%);
  overflow-y: auto;
  padding: 20px 18px;
  border: 0;
  border-radius: 0 18px 18px 0;
  background: var(--cream);
  color: var(--navy);
  box-shadow: 14px 0 40px rgba(10, 35, 66, .25);
  transform: translateX(-100%);
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
}
.checkout-summary.open { transform: translateX(0); }

.cs-panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 14px;
}
.cs-panel-head span {
  font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; font-size: 21px; color: var(--navy);
}
.cs-panel-close {
  flex: 0 0 auto; width: 30px; height: 30px; border: 0; border-radius: 50%;
  background: rgba(10, 35, 66, .07); color: var(--navy); font-size: 18px; line-height: 1;
  cursor: pointer; transition: background .2s;
}
.cs-panel-close:hover { background: rgba(10, 35, 66, .14); }

.checkout-summary-lines { list-style: none; margin: 0; padding: 0; }

.cs-line {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(10, 35, 66, .08);
}
.cs-line:last-child { border-bottom: 0; }

.cs-name { grid-column: 1; font-size: 13px; font-weight: 700; line-height: 1.35; }
.cs-detail { grid-column: 1; margin-top: 1px; color: #6b6b62; font-size: 11.5px; line-height: 1.3; }
.cs-price { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-size: 13px; font-weight: 700; white-space: nowrap; }

.cs-line.cs-discount .cs-name, .cs-line.cs-discount .cs-price { color: var(--teal); }

.checkout-summary-total {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-top: 4px; padding: 9px 0; border-top: 1px solid rgba(0, 167, 149, .28);
}
.checkout-summary-total span {
  font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: #55554d;
}
.checkout-summary-total strong {
  font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; font-size: 19px; color: var(--navy);
}

@media (max-width: 480px) {
  .cs-name, .cs-price { font-size: 12.5px; }
}

/* ---- Embedded checkout form (restyled JotForm) ---- */
.checkout-frame {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  border: 0;
  display: block;
  background: var(--cream);
}

.checkout-panel .trust-row {
  flex: 0 0 auto;
  margin: 0;
  padding: 12px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  background: var(--cream);
  border-top: 1px solid #e7e5df;
  color: #56564f;
  font-size: 11.5px;
}

.checkout-panel .trust-row span { display: inline-flex; align-items: center; gap: 8px; }

.checkout-panel .trust-row svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  stroke: var(--teal);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.checkout-open { overflow: hidden; }

@media (max-width: 700px) {
  .checkout-panel { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .checkout-panel, .checkout-backdrop { transition: none; }
}

@media (max-width: 980px) {
  .builder-shell { grid-template-columns: 1fr; }
  .cart-card { position: static; }
}

@media (max-width: 760px) {
  .builder-wrap { padding: 38px 18px 64px; }
  .product-picker, .product-add-row { max-width: none; }
  .service-banner { padding: 14px 18px; gap: 8px 18px; }
  .service-banner-title { font-size: 21px; white-space: normal; }
  .product-option { grid-template-columns: 120px 1fr; }
  .product-image { min-height: 200px; padding: 10px; }
  .product-body { padding: 18px; }
}

@media (max-width: 480px) {
  .product-option { grid-template-columns: 1fr; }
  .product-image { height: 140px; min-height: 0; }
}
