/* ---------- 3D customiser ---------- */
body[data-page="designer"] { background: var(--chalk); color: var(--ink-text); }
body[data-page="designer"] .wa-fab { display: none; }   /* the designer has its own WhatsApp button, and the bubble covers the colour list */
.cz { padding: calc(var(--head-h) + 22px) 0 72px; }
.cz__crumbs { margin-bottom: 18px; }
.cz__crumbs a { color: var(--muted-light); }
.cz__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr); gap: clamp(20px, 3vw, 48px); align-items: start; }

.cz__stage {
  position: sticky; top: calc(var(--head-h) + 16px); height: min(78vh, 760px); min-height: 460px;
  background: radial-gradient(70% 60% at 50% 38%, #ffffff 0%, #ecebe7 62%, #dfded9 100%);
  border: 1px solid var(--chalk-line); overflow: hidden;
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
}
.cz__canvas { position: absolute; inset: 0; }
.cz__canvas canvas { display: block; width: 100% !important; height: 100% !important; touch-action: none; cursor: grab; }
.cz__canvas canvas:active { cursor: grabbing; }
.cz__stage.is-moving .cz__canvas canvas { cursor: crosshair; }
.cz__loading { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; font: 500 .74rem/1.4 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted-light); transition: opacity .4s; }
.cz__loading.is-done { opacity: 0; pointer-events: none; }
.cz__spin { width: 34px; height: 34px; border: 3px solid var(--chalk-line); border-top-color: var(--flame-600); border-radius: 50%; animation: czspin .8s linear infinite; }
@keyframes czspin { to { transform: rotate(360deg); } }
.cz__hint { position: absolute; left: 50%; top: 18px; translate: -50% 0; padding: 7px 12px; background: rgba(20, 20, 22, .78); color: #fff; font: 500 .66rem/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; border-radius: 99px; white-space: nowrap; transition: opacity .5s; pointer-events: none; }
.cz__hint.is-gone { opacity: 0; }
.cz__views { position: absolute; left: 16px; bottom: 16px; display: flex; gap: 4px; padding: 4px; background: rgba(255, 255, 255, .86); backdrop-filter: blur(8px); border-radius: 99px; box-shadow: 0 6px 20px rgba(0, 0, 0, .08); }
.cz__view { padding: 9px 13px; border-radius: 99px; font: 600 .76rem/1 var(--f-body); color: var(--ink-text); }
.cz__view.is-on, .cz__view[aria-pressed="true"] { background: var(--ink-900); color: #fff; }
.cz__tools { position: absolute; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; }
.cz__tools .icon-btn { background: rgba(255, 255, 255, .9); color: var(--ink-text); box-shadow: 0 6px 20px rgba(0, 0, 0, .08); }
.cz__tools .icon-btn:hover { background: #fff; color: var(--flame-700); }
.cz__movebar { position: absolute; left: 50%; top: 16px; translate: -50% 0; margin: 0; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; background: var(--ink-900); color: #fff; font-size: .86rem; border-radius: 99px; white-space: nowrap; }
.cz__movebar button { padding: 7px 12px; background: var(--flame-600); color: #fff; border-radius: 99px; font: 700 .72rem/1 var(--f-display); letter-spacing: .06em; text-transform: uppercase; }

.cz__panel { min-width: 0; }
.cz__panel .eyebrow { color: var(--flame-700); }
.cz__title { margin: 10px 0 0; font: 900 clamp(2rem, 3.6vw, 3.1rem)/.92 var(--f-display); font-stretch: 78%; text-transform: uppercase; letter-spacing: -.01em; }
.cz__title em { font-style: normal; color: var(--flame-600); }
.cz__lede { margin: 14px 0 22px; color: var(--muted-light); max-width: 46ch; }
.cz__reset { padding: 8px 0; margin-top: 4px; font: 600 .84rem/1.2 var(--f-body); color: var(--flame-700); text-decoration: underline; text-underline-offset: 3px; }
#czCrumbCat[hidden] { display: none; }
.cz__lede a { color: var(--flame-700); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }

.cz__tabs { display: flex; gap: 4px; padding: 4px; background: #e4e3df; border-radius: 12px; margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.cz__tab { flex: 1 0 auto; padding: 11px 12px; border-radius: 9px; font: 600 .82rem/1 var(--f-body); color: var(--muted-light); white-space: nowrap; }
.cz__tab[aria-selected="true"] { background: #fff; color: var(--ink-text); box-shadow: 0 2px 8px rgba(0, 0, 0, .06); }
.cz__pane { min-height: 248px; }
.cz__ph { margin: 18px 0 10px; font: 500 .7rem/1.3 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted-light); }
.cz__ph:first-child { margin-top: 0; }
.cz__fine { margin: 14px 0 0; font-size: .82rem; color: var(--muted-light); }

.cz__designs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.cz__design { display: grid; gap: 8px; padding: 8px 8px 10px; background: #fff; border: 1.5px solid transparent; text-align: left; font: 600 .8rem/1.2 var(--f-body); transition: border-color .2s; }
.cz__design canvas { width: 100%; height: auto; display: block; background: #f3f2ef; }
.cz__design:hover { border-color: var(--chalk-line); }
.cz__design.is-on { border-color: var(--flame-600); }

.cz__field { display: grid; gap: 6px; margin-top: 16px; font-size: .84rem; font-weight: 600; }
.cz__field input, .cz__field select, .cz__custom input[type="text"] { width: 100%; padding: 11px 12px; border: 1.5px solid var(--chalk-line); background: #fff; font: 500 .95rem/1.2 var(--f-body); color: var(--ink-text); border-radius: 8px; }
.cz__field input:focus, .cz__field select:focus, .cz__custom input:focus { outline: 2px solid var(--flame-600); outline-offset: 1px; }
.cz__two { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 0 12px; }
.cz__two .cz__field:nth-child(-n+2) { margin-top: 0; }
.cz__two--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.cz__ph--gap { margin-top: 18px; }
.cz__spots small { color: var(--muted-light); font-weight: 500; }
.cz__flatimg canvas + .cz__ph { margin-top: 18px; }

.cz__zones { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cz__zone { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: #fff; border: 1.5px solid transparent; text-align: left; border-radius: 10px; }
.cz__zone.is-on { border-color: var(--flame-600); }
.cz__zone i { flex: none; width: 30px; height: 30px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); }
.cz__zone b { font: 600 .9rem/1.2 var(--f-body); }
.cz__zone span { margin-left: auto; font: 500 .72rem/1.2 var(--f-mono); color: var(--muted-light); text-align: right; }
.cz__palette { margin-top: 14px; padding: 14px; background: #fff; border-radius: 12px; }
.cz__swatches { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.cz__sw { aspect-ratio: 1; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); position: relative; }
.cz__sw:hover { transform: scale(1.08); }
.cz__sw[aria-selected="true"]::after { content: ""; position: absolute; inset: -4px; border: 2px solid var(--ink-900); border-radius: 11px; }
.cz__custom { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: end; margin-top: 14px; }
.cz__custom label { display: grid; gap: 5px; font-size: .78rem; font-weight: 600; }
.cz__custom input[type="color"] { width: 46px; height: 42px; padding: 0; border: 0; background: none; cursor: pointer; }

.cz__drop { display: grid; gap: 6px; padding: 20px; border: 2px dashed #c9c8c3; background: #fff; text-align: center; cursor: pointer; border-radius: 12px; transition: border-color .2s, background .2s; }
.cz__drop:hover, .cz__drop.is-over { border-color: var(--flame-600); background: #fff7f4; }
.cz__drop b { font: 800 1rem/1.2 var(--f-display); font-stretch: 100%; }
.cz__drop span { font-size: .82rem; color: var(--muted-light); }
.cz__spots, .cz__fonts { display: flex; flex-wrap: wrap; gap: 6px; }
.cz__spots button, .cz__fonts button { padding: 9px 12px; background: #fff; border: 1.5px solid var(--chalk-line); border-radius: 99px; font: 600 .8rem/1 var(--f-body); }
.cz__spots button:hover, .cz__fonts button:hover { border-color: var(--ink-900); }
.cz__fonts button { font-size: 1rem; border-radius: 8px; padding: 10px 14px; }
.cz__fonts button.is-on { border-color: var(--flame-600); box-shadow: inset 0 0 0 1px var(--flame-600); }
.cz__logos { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.cz__logo { width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px 10px; background: #fff; border: 1.5px solid transparent; border-radius: 10px; text-align: left; }
.cz__logo.is-on { border-color: var(--flame-600); }
.cz__logo img, .cz__logo .ph { width: 40px; height: 40px; object-fit: contain; background: #f3f2ef; border-radius: 6px; flex: none; }
.cz__logo .ph { display: grid; place-items: center; font: 600 .68rem/1 var(--f-mono); }
.cz__logo b { font: 600 .86rem/1.2 var(--f-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cz__logo span { display: block; font-size: .76rem; color: var(--muted-light); }
.cz__adjust { margin-top: 12px; padding: 14px; background: #fff; border-radius: 12px; display: grid; gap: 12px; }
.cz__adjust label { display: grid; gap: 6px; font-size: .82rem; font-weight: 600; }
.cz__adjust label span { display: flex; justify-content: space-between; }
.cz__adjust output { font: 500 .78rem/1.2 var(--f-mono); color: var(--muted-light); }
.cz__adjust input[type="range"] { width: 100%; accent-color: var(--flame-600); }
.cz__adjrow { display: flex; gap: 8px; flex-wrap: wrap; }

.btn--line { background: transparent; color: var(--ink-text); box-shadow: inset 0 0 0 1.5px var(--ink-text); }
.btn--line::before { background: var(--ink-900); }
.btn--line:hover { color: #fff; }

.cz__sum { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--chalk-line); }
.cz__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.cz__chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px 6px 7px; background: #fff; border-radius: 99px; font-size: .78rem; }
.cz__chip i { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.cz__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cz__actions .btn--flame { flex: 1 1 100%; justify-content: center; }
.cz__actions .btn--line { flex: 1 1 0; justify-content: center; }
.cz__actions .btn { white-space: normal; line-height: 1.15; text-align: center; }
@media (max-width: 520px) { .cz__actions .btn--line { flex: 1 1 100%; } }

.cz__flatwrap { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgba(12, 12, 14, .72); backdrop-filter: blur(6px); }
.cz__flatwrap[hidden] { display: none; }
.cz__flatbox { width: min(1100px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: #fff; padding: 16px; border-radius: 14px; }
.cz__flathead { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; margin-bottom: 12px; }
.cz__flathead span { grid-column: 1; font-size: .84rem; color: var(--muted-light); }
.cz__flathead .icon-btn { grid-row: 1 / span 2; grid-column: 2; background: #f0efec; color: var(--ink-text); }
.cz__flatimg canvas, .cz__flatimg img { width: 100%; height: auto; display: block; background: repeating-conic-gradient(#eee 0 25%, #fafafa 0 50%) 0 0 / 20px 20px; }

@media (max-width: 960px) {
  .cz__grid { grid-template-columns: minmax(0, 1fr); }
  .cz__stage { position: relative; top: 0; height: 62vh; min-height: 380px; }
}
@media (max-width: 520px) {
  .cz { padding-top: calc(var(--head-h) + 10px); }
  .cz__designs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cz__swatches { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .cz__views { left: 10px; bottom: 10px; }
  .cz__view { padding: 8px 10px; }
  .cz__tools { right: 10px; bottom: 10px; }
  .cz__movebar { white-space: normal; width: calc(100% - 24px); font-size: .8rem; }
  .cz__custom { grid-template-columns: auto minmax(0, 1fr); }
  .cz__custom .btn { grid-column: 1 / -1; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .cz__spin { animation-duration: 2s; } }
