/* The website builder: steps on the left, a live preview on the right. Uses the landing page's colours and buttons. */
body.builder { background: var(--page); min-height: 100vh; }
.btn.light { color: var(--brown); background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.light:hover { box-shadow: inset 0 0 0 1.5px var(--gold); }

/* top bar */
.bar { position: sticky; top: 0; z-index: 30; background: linear-gradient(180deg, var(--deep), #4a2a18); color: #fff; box-shadow: 0 8px 24px -14px rgba(0, 0, 0, .6); }
.bar-in { display: flex; align-items: center; gap: 24px; width: min(1480px, 100% - 40px); margin-inline: auto; height: 64px; }
.bar .brand img { width: 36px; } .bar .brand b { font-size: 23px; }
.bar-link { margin-left: auto; color: #e8d6c6; text-decoration: none; font-weight: 700; font-size: 14.5px; padding: 8px 14px; border-radius: 10px; }
.bar-link:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.steps-nav { display: flex; gap: 6px; list-style: none; margin: 0 auto; padding: 0; }
.steps-nav button { display: flex; align-items: center; gap: 9px; padding: 7px 14px 7px 8px; border: 0; border-radius: 99px; background: transparent; color: #cdb8a6; font: 800 14px var(--sans); cursor: pointer; transition: all .2s; }
.steps-nav i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(255, 255, 255, .12); font-style: normal; font-size: 13px; transition: all .2s; }
.steps-nav li.on button { background: rgba(243, 194, 126, .18); color: #fff; }
.steps-nav li.on i { background: var(--gold-lt); color: var(--deep); }
.steps-nav li.done i { background: var(--wa); color: #fff; font-size: 0; }
.steps-nav li.done i::after { content: "✓"; font-size: 14px; }
.steps-nav li.done button { color: #fff; }
.bar-prog { height: 3px; background: rgba(255, 255, 255, .12); }
.bar-prog span { display: block; height: 100%; width: 25%; background: linear-gradient(90deg, var(--gold-lt), var(--gold-dk)); transition: width .4s cubic-bezier(.22, 1, .36, 1); }

/* layout */
.build { display: grid; grid-template-columns: minmax(380px, 560px) minmax(0, 1fr); gap: 0; width: min(1480px, 100%); margin-inline: auto; min-height: calc(100vh - 67px); }
.panel { padding: 40px clamp(20px, 3vw, 44px) 120px; background: #fff; border-right: 1px solid var(--line); position: relative; }
.panel h1 { font-size: clamp(28px, 3vw, 38px); color: var(--brown-dk); text-wrap: balance; }
.sub { margin: 10px 0 26px; color: var(--ink-soft); font-size: 17px; }
.step { animation: stepin .4s cubic-bezier(.22, 1, .36, 1); }
.step[hidden] { display: none; }
@keyframes stepin { from { opacity: 0; transform: translateX(18px); } }
.fine-note { margin-top: 18px; font-size: 14px; color: var(--ink-soft); }

/* step 1: template cards */
.tpl-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.tcard { position: relative; text-align: left; padding: 0; border: 2px solid var(--line); border-radius: 16px; background: #fff; overflow: hidden; cursor: pointer; font: inherit; color: var(--ink); transition: transform .2s, border-color .2s, box-shadow .2s; }
.tcard:hover { transform: translateY(-3px); border-color: var(--gold); }
.tcard img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; background: var(--sand); }
.tcard span { display: block; padding: 10px 14px 12px; }
.tcard b { display: block; font-size: 16px; color: var(--brown-dk); } .tcard small { color: var(--ink-soft); font-size: 13px; }
.tcard.on { border-color: var(--brown); box-shadow: 0 0 0 4px rgba(125, 78, 51, .18), 0 18px 30px -18px rgba(var(--shade), .7); }
.tcard.on::after { content: "✓"; position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--brown); color: #fff; font-weight: 800; }

/* fields (label on the border line, like the app) */
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 14px; }
.fields label { position: relative; display: block; }
.fields label.wide { grid-column: 1 / -1; }
.fields label > span { position: absolute; left: 12px; top: -9px; z-index: 1; padding: 0 6px; background: #fff; font-size: 12.5px; font-weight: 800; color: var(--ink-soft); }
.fields input, .fields textarea { width: 100%; padding: 0 14px; height: 48px; border: 1.5px solid #d7bcac; border-radius: 12px; background: #fff; font: 600 16px var(--sans); color: var(--ink); }
.fields textarea { height: auto; padding: 12px 14px; resize: vertical; line-height: 1.45; }
.fields input:focus, .fields textarea:focus, .addr-box:focus-within { outline: 0; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(193, 136, 103, .25); }
.fields label:focus-within > span { color: var(--brown); }
.fields label.bad input, .fields label.bad .addr-box { border-color: #b3261e; }
.fields .count { position: absolute; right: 6px; bottom: -20px; font-size: 12px; color: var(--ink-soft); font-style: normal; }
.addr-box { display: flex; align-items: center; border: 1.5px solid #d7bcac; border-radius: 12px; background: #fff; overflow: hidden; }
.addr-box input { border: 0; box-shadow: none !important; height: 46px; flex: 1; min-width: 0; text-align: right; padding-right: 2px; }
.addr-box i { padding: 0 14px 0 2px; font: 800 16px var(--sans); color: var(--brown); font-style: normal; }
.slug-msg { display: block; margin-top: 6px; font-size: 13px; color: var(--ink-soft); font-style: normal; }
.slug-msg.ok { color: #1d6b3a; font-weight: 700; } .slug-msg.no { color: #b3261e; font-weight: 700; }

/* brand row */
.brandrow { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 28px; }
.brandrow > div > b { display: block; margin-bottom: 10px; color: var(--brown-dk); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.sw-b { width: 38px; height: 38px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1.5px var(--line); cursor: pointer; padding: 0; transition: transform .15s, box-shadow .15s; }
.sw-b:hover { transform: scale(1.12); }
.sw-b.on { box-shadow: 0 0 0 3px var(--brown); transform: scale(1.08); }
.sw-b.auto { background: conic-gradient(#e8506b, #e8812b, #e9bf6a, #2f8f6b, #3b6fb6, #7b5ea7, #e8506b); }
.logo-pick { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.logo-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.logo-box { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 16px; border: 2px dashed #d7bcac; background: var(--cream) center / cover; color: var(--brown); font-size: 28px; flex: none; transition: border-color .2s; }
.logo-pick:hover .logo-box, .logo-pick input:focus-visible + .logo-box { border-color: var(--gold); }
.logo-hint { font-size: 13.5px; color: var(--ink-soft); }

/* step 3: cakes */
.cakes { display: grid; gap: 12px; }
.cake { display: grid; grid-template-columns: 58px minmax(0, 1fr) 96px 84px 40px; gap: 10px; align-items: center; padding: 12px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--cream); animation: stepin .3s; }
.cake .ph { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 12px; border: 2px dashed #d7bcac; background: #fff center / cover; color: var(--brown); font-size: 22px; cursor: pointer; transition: border-color .2s; position: relative; }
.cake .ph:hover { border-color: var(--gold); } .cake .ph input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cake .ph.has { border-style: solid; font-size: 0; }
.cake .sk { position: relative; } .cake .sk::after { content: "in stock"; position: absolute; right: 8px; top: -8px; padding: 0 5px; background: var(--cream); font-size: 11px; font-weight: 800; color: var(--ink-soft); }
.cake-head { display: grid; grid-template-columns: 58px minmax(0, 1fr) 96px 84px 40px; gap: 10px; padding: 0 12px 6px; font-size: 12.5px; font-weight: 800; color: var(--ink-soft); }
.next-steps { text-align: left; margin: 0 0 22px; padding-left: 22px; display: grid; gap: 8px; color: var(--ink); font-size: 15px; }
.cake input, .cake select { height: 44px; padding: 0 12px; border: 1.5px solid #d7bcac; border-radius: 10px; background: #fff; font: 600 15.5px var(--sans); color: var(--ink); min-width: 0; width: 100%; }
.cake input:focus { outline: 0; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(193, 136, 103, .25); }
.cake .rm { width: 40px; height: 40px; border: 0; border-radius: 10px; background: #fff; color: #b3261e; font-size: 20px; cursor: pointer; box-shadow: inset 0 0 0 1.5px var(--line); }
.cake .rm:hover { background: #fbe3e1; }
.cake .pr { position: relative; } .cake .pr input { padding-left: 26px; } .cake .pr::before { content: "₹"; position: absolute; left: 11px; top: 50%; transform: translateY(-50%); font-weight: 800; color: var(--brown); }
.cake-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

/* step 4 */
.summary { margin-top: 24px; padding: 18px 20px; border-radius: 16px; background: var(--cream); border: 1px solid var(--line); font-size: 15px; display: grid; gap: 6px; }
.summary b { color: var(--brown-dk); }
.form-err { margin-top: 14px; padding: 11px 14px; border-radius: 10px; background: #fbe3e1; color: #b3261e; font-weight: 700; font-size: 14.5px; }

/* buttons row */
.nav-btns { position: sticky; bottom: 0; display: flex; align-items: center; gap: 12px; margin: 34px -44px -120px; padding: 18px 44px; background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 28%); }
.spacer { flex: 1; }

/* preview */
.preview { position: sticky; top: 67px; align-self: start; height: calc(100vh - 67px); padding: 24px clamp(16px, 2.4vw, 40px) 18px; display: flex; flex-direction: column; background: radial-gradient(900px 500px at 70% 0%, #f4e4d8, transparent 70%), var(--sand); }
.pv-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.pv-title { font: 800 22px var(--serif); color: var(--brown-dk); }
.tpl-toggle.small { background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); }
.tpl-toggle.small button { color: var(--brown); padding: 8px 16px; }
.tpl-toggle.small button.on { background: var(--brown); color: #fff; }
.pv-stage { flex: 1; min-height: 0; position: relative; display: grid; place-items: start center; }
.pv-desk { width: 100%; height: 100%; display: flex; flex-direction: column; transition: opacity .35s, transform .4s; }
.pv-box { flex: 1; min-height: 0; position: relative; background: #fff; overflow: hidden; }
.pv-box iframe { position: absolute; top: 0; left: 0; width: 1440px; height: 900px; border: 0; transform-origin: 0 0; background: #fff; }
.pv-phone { position: absolute; top: 0; height: 100%; max-height: 780px; width: auto; aspect-ratio: 390 / 844; max-width: 100%; opacity: 0; transform: scale(.93); pointer-events: none; transition: opacity .35s, transform .4s; }
.pv-phone iframe { width: 100%; height: 100%; border: 0; border-radius: 24px; background: #fff; }
.pv-stage[data-view='phone'] .pv-desk { opacity: 0; transform: scale(.96); pointer-events: none; }
.pv-stage[data-view='phone'] .pv-phone { opacity: 1; transform: none; pointer-events: auto; position: relative; }
.pv-note { margin-top: 12px; font-size: 13.5px; color: var(--ink-soft); text-align: center; }
.pv-note a { color: var(--brown); font-weight: 800; }
.frame { box-shadow: 0 30px 70px -28px rgba(var(--shade), .65), 0 0 0 1px rgba(0, 0, 0, .08); }

/* a cover while the preview loads (the 3D templates take a few seconds) */
.pv-load { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 14px; background: linear-gradient(160deg, #f8f1ed, #ecd9cc); color: var(--brown); font-weight: 800; font-size: 15px; opacity: 0; pointer-events: none; transition: opacity .3s; border-radius: inherit; }
.pv-load span { width: 38px; height: 38px; border-radius: 50%; border: 4px solid rgba(125, 78, 51, .2); border-top-color: var(--brown); animation: spin .9s linear infinite; }
.pv-stage.loading .pv-load { opacity: 1; }
.pv-phone { overflow: hidden; }
.pv-phone .pv-load { border-radius: 24px; inset: 7px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* responsive */
@media (max-width: 1000px) {
  .build { grid-template-columns: 1fr; }
  .preview { position: relative; top: 0; height: 640px; order: -1; padding: 16px; }
  .panel { border-right: 0; border-top: 1px solid var(--line); padding-top: 28px; }
  .steps-nav span { display: none; } .steps-nav button { padding: 6px; } .steps-nav { margin-inline: auto; }
  .nav-btns { margin-inline: -20px; padding-inline: 20px; }
}
@media (max-width: 620px) {
  .bar-in { gap: 10px; } .bar .brand b { display: none; }
  .tpl-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .fields { grid-template-columns: 1fr; }
  .brandrow { grid-template-columns: 1fr; }
  .cake { grid-template-columns: 58px minmax(0, 1fr) minmax(0, 1fr) 36px; grid-template-areas: 'ph nm nm rm' 'ph pr sk sk'; padding: 10px; row-gap: 8px; }
  .cake .ph { grid-area: ph; align-self: start; } .cake .cn { grid-area: nm; } .cake .pr { grid-area: pr; } .cake .sk { grid-area: sk; } .cake .rm { grid-area: rm; }
  .cake-head { display: none; }
  .preview { height: 520px; }
  .btn.lg { width: auto; flex: 1; }
}

/* the preview as pictures, when there is no live preview (the real site) */
.pv-box > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.pv-phone > img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 24px; }
.pv-box > img[hidden], .pv-phone > img[hidden] { display: none; }
.hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
/* prices in the builder */
.price-banner { margin: -6px 0 22px; padding: 12px 16px; border-radius: 14px; background: linear-gradient(135deg, #fff4df, #fbe8c8); border: 1px solid #f0d9a8; font-size: 15px; color: #5b3d06; }
.price-banner b { color: var(--brown-dk); } .price-banner i { font-style: normal; font-weight: 800; }
.prem { position: absolute; top: 10px; left: 10px; z-index: 2; padding: 3px 10px; border-radius: 99px; background: linear-gradient(180deg, #ffd9a0, var(--gold-dk)); color: var(--deep); font: 800 11.5px var(--sans); letter-spacing: .04em; text-transform: uppercase; font-style: normal; box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .5); }
