/* =========================================================
   Gallery Dastaneh — Order wizard page
   ========================================================= */


/* ---------- Header (dark, matches the home page) ---------- */

/* ---------- Top band: title + stepper ---------- */
.order-hero { position: relative; overflow: hidden; color: var(--cream-hi); padding: 34px 0 30px;
    background: radial-gradient(120% 140% at 70% 0%, var(--espresso-3) 0%, var(--espresso-2) 45%, var(--espresso) 100%); }
.oh-glow { position: absolute; width: 700px; height: 700px; right: -160px; top: -380px; border-radius: 50%; background: radial-gradient(circle, rgba(216,185,138,.22), transparent 62%); pointer-events: none; }
.page-head { position: relative; }
.oh-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 800; color: var(--gold); margin-bottom: 8px; }
.oh-kicker::before { content: ''; width: 22px; height: 2px; border-radius: 2px; background: currentColor; }
.page-head h1 { font-size: clamp(24px, 3vw, 34px); font-weight: 900; margin: 0 0 8px; line-height: 1.4; }
.page-head h1 .accent { background: linear-gradient(100deg, var(--gold-hi), var(--gold) 45%, var(--gold-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.page-head p { color: rgba(251,246,234,.66); font-size: 14.5px; margin: 0; }

.stepper { list-style: none; margin: 26px 0 0; padding: 0 0 4px; display: flex; overflow-x: auto; scrollbar-width: none; }
.stepper::-webkit-scrollbar { display: none; }
.pstep { position: relative; flex: 1; min-width: 92px; text-align: center; }
.pstep::before { content: ''; position: absolute; top: 17px; left: 50%; right: -50%; height: 2px; background: rgba(216,185,138,.22); }
.pstep:first-child::before { display: none; }
.pstep.done::before, .pstep.active::before { background: linear-gradient(90deg, var(--gold-2), var(--gold-hi)); }
.pstep button { display: block; width: 100%; background: none; border: none; padding: 0; cursor: pointer; color: inherit; font-family: inherit; }
.pstep button:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 10px; }
.pnum { position: relative; z-index: 1; width: 36px; height: 36px; margin: 0 auto 8px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 800; color: rgba(251,246,234,.5); background: var(--espresso-2); border: 1.5px solid rgba(216,185,138,.28); transition: all .3s var(--ease); }
.plbl { display: block; font-size: 12px; font-weight: 700; color: rgba(251,246,234,.45); white-space: nowrap; }
.pstep.done .pnum { color: #2A1C10; background: linear-gradient(135deg, var(--gold-hi), var(--gold-2)); border-color: transparent; }
.pstep.done .plbl { color: rgba(251,246,234,.8); }
.pstep.done button:hover .pnum { transform: scale(1.1); box-shadow: 0 0 0 4px rgba(216,185,138,.2); }
.pstep.done button:hover .plbl { color: var(--gold-hi); }
.pstep.active .pnum { color: var(--gold-hi); border-color: var(--gold); box-shadow: 0 0 0 5px rgba(216,185,138,.16), 0 0 22px rgba(243,217,139,.35); }
.pstep.active .plbl { color: var(--gold-hi); }
/* a side's two sub-steps (background, texts/QR) as mini dots under its label */
.psub { display: flex; justify-content: center; gap: 4px; margin-top: 5px; }
.psub i { width: 14px; height: 4px; border-radius: 3px; background: rgba(216,185,138,.25); }
.psub i.d { background: var(--gold); }
.psub i.a { background: var(--gold-hi); box-shadow: 0 0 8px rgba(243,217,139,.6); }

/* ---------- Layout ---------- */
.wizard-wrap { display: flex; gap: 36px; align-items: flex-start; padding-top: 32px; padding-bottom: 80px; }
.wizard-main { flex: 1; min-width: 0; }

/* ---------- Preview card (dark, like the home hero) ---------- */
.wizard-preview { position: sticky; top: 94px; width: 350px; flex-shrink: 0; overflow: hidden; isolation: isolate; border-radius: 28px; padding: 20px; color: var(--cream-hi);
    background: radial-gradient(120% 100% at 50% 20%, var(--espresso-3), var(--espresso) 75%); box-shadow: 0 30px 70px -30px rgba(21,14,9,.7); }
.wp-glow { position: absolute; z-index: -1; width: 380px; height: 380px; left: 50%; top: 150px; transform: translate(-50%,-50%); border-radius: 50%;
    background: radial-gradient(circle, rgba(243,217,139,.24), rgba(216,185,138,.06) 50%, transparent 68%); pointer-events: none; }
.preview-title { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; font-weight: 800; color: var(--gold); margin-bottom: 8px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #7CD992; box-shadow: 0 0 0 0 rgba(124,217,146,.6); animation: livePulse 2s infinite; }
@keyframes livePulse { 70% { box-shadow: 0 0 0 8px rgba(124,217,146,0); } 100% { box-shadow: 0 0 0 0 rgba(124,217,146,0); } }
.preview-stage { position: relative; height: 330px; }
#previewCanvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; background: transparent; border-radius: 16px; }
#previewCanvas.dragging { cursor: grabbing; }
.view-tools { position: absolute; top: 4px; left: 0; display: flex; flex-direction: column; gap: 6px; }
.view-tools button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(216,185,138,.3); background: rgba(251,246,234,.07); color: var(--gold-hi); font-size: 17px; font-weight: 700; line-height: 1;
    cursor: pointer; display: flex; align-items: center; justify-content: center; font-family: inherit; backdrop-filter: blur(6px); transition: all .2s; }
.view-tools button:hover { background: var(--gold); color: #2A1C10; border-color: var(--gold); }
.preview-hint { text-align: center; font-size: 11px; color: rgba(251,246,234,.42); margin-top: 6px; }
.preview-flip { display: flex; justify-content: center; margin-top: 10px; }
.flip-btn { color: var(--cream-hi); border: 1.5px solid rgba(216,185,138,.45); background: rgba(255,255,255,.04); }
.flip-btn:hover { background: rgba(216,185,138,.16); border-color: var(--gold); transform: translateY(-1px); }
.preview-info { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(216,185,138,.16); font-size: 12.5px; }
.pi-row { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; color: rgba(251,246,234,.55); }
.pi-row b { color: var(--cream-hi); font-weight: 700; text-align: left; }
.pi-price { display: flex; justify-content: space-between; align-items: baseline; margin-top: 10px; padding: 12px 14px; border-radius: 14px; background: rgba(216,185,138,.1); border: 1px solid rgba(216,185,138,.22); }
.pi-price span { font-size: 12px; color: var(--gold); font-weight: 700; }
.pi-price b { font-size: 18px; font-weight: 900; color: var(--gold-hi); }
.pi-price small { font-size: 11px; font-weight: 600; color: rgba(251,246,234,.6); }

/* ---------- Panels ---------- */
.panel { background: #FFFCF6; border: 1px solid var(--line); border-radius: 28px; padding: 34px; margin-bottom: 20px; box-shadow: 0 20px 50px -30px rgba(46,32,21,.3); }
.step-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; color: var(--bronze); margin-bottom: 8px; }
.step-kicker::before { content: ''; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
.panel h2 { font-size: 22px; font-weight: 900; margin: 0 0 6px; }
.panel .sub { font-size: 13.5px; color: var(--ink-soft); margin: 0 0 24px; line-height: 1.9; }

/* ---------- Option cards ---------- */
.opt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.opt-card { position: relative; border: 2px solid var(--line); border-radius: 20px; padding: 24px 16px 20px; text-align: center; cursor: pointer; background: var(--bg-alt);
    transition: border-color .25s, transform .3s var(--ease), box-shadow .3s var(--ease), background .25s; }
.opt-card:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: 0 16px 34px -16px rgba(46,32,21,.3); }
.opt-card:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.opt-card.selected { border-color: var(--gold-2); background: #FFF8EA; box-shadow: 0 0 0 4px rgba(216,185,138,.25), 0 16px 34px -16px rgba(201,162,75,.45); }
.opt-card .ico { width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 22px; background: var(--card); display: flex; align-items: center; justify-content: center; color: var(--bronze-dark); transition: all .3s var(--ease); }
.opt-card.selected .ico { background: linear-gradient(135deg, var(--espresso-3), var(--espresso)); color: var(--gold-hi); }
.opt-card .t { font-weight: 900; font-size: 15.5px; margin-bottom: 4px; }
.opt-card .d { font-size: 12.5px; color: var(--muted); }
.price-tag { display: inline-block; margin-top: 4px; padding: 4px 12px; border-radius: 14px; background: #FFF3DC; color: var(--bronze-dark); font-weight: 800; font-size: 13px; }
.opt-card .check { position: absolute; z-index: 2; top: 12px; left: 12px; width: 26px; height: 26px; border-radius: 50%; color: #2A1C10; font-size: 13px; font-weight: 900;
    background: linear-gradient(135deg, var(--gold-hi), var(--gold-2)); display: flex; align-items: center; justify-content: center; transform: scale(0); transition: transform .3s var(--ease); box-shadow: 0 4px 10px rgba(201,162,75,.4); }
.opt-card.selected .check { transform: scale(1); }
.photo-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.opt-card.has-photo { padding: 0 0 20px; overflow: hidden; }
.opt-photo { aspect-ratio: 4 / 3; overflow: hidden; margin-bottom: 16px; }
.opt-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.opt-card.has-photo:hover .opt-photo img, .opt-card.has-photo.selected .opt-photo img { transform: scale(1.06); }

/* ---------- Side tabs & content types ---------- */
.side-tabs { display: flex; gap: 10px; margin-bottom: 22px; }
.side-tab { flex: 1; padding: 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--bg); text-align: center; cursor: pointer; font-weight: 700; font-size: 14px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.side-tab .mini-status { font-size: 11px; font-weight: 600; color: var(--muted); }
.side-tab.active { border-color: var(--bronze-dark); background: var(--card); }
.side-tab.filled .mini-status { color: var(--ok); }
.side-tab.filled .mini-status::before { content: '✓ '; }

.ctype-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-bottom: 22px; }
.ctype-card { border: 2px solid var(--line); border-radius: 14px; padding: 14px 10px; text-align: center; cursor: pointer; background: var(--bg); font-size: 12.5px; font-weight: 700; }
.ctype-card .ico { font-size: 22px; margin-bottom: 6px; }
.ctype-card.selected { border-color: var(--bronze); background: var(--card); color: var(--bronze-dark); }
.ctype-card.disabled { opacity: .4; cursor: not-allowed; }
.sub.warn { color: #A4492B; font-weight: 700; margin: 12px 0 0; }

/* ---------- Form fields ---------- */
.fill-area { border-top: 1px dashed var(--line); padding-top: 20px; margin-top: 6px; }
.field-label { font-size: 13px; font-weight: 700; margin-bottom: 8px; display: block; }
.text-input { width: 100%; padding: 12px 16px; border: 1.5px solid var(--line); border-radius: 12px; font-family: inherit; font-size: 14px; background: #fff; color: var(--ink); }
.text-input:focus { outline: none; border-color: var(--bronze); }

.dropzone { border: 2px dashed var(--line); border-radius: 16px; padding: 30px; text-align: center; cursor: pointer; background: var(--bg); }
.dropzone:hover { border-color: var(--bronze); }
.dropzone .ico { font-size: 30px; margin-bottom: 8px; }
.dropzone .t { font-weight: 700; font-size: 14px; margin-bottom: 4px; overflow-wrap: anywhere; }
.dropzone .d { font-size: 12px; color: var(--muted); }

/* ---------- Cropper ---------- */
.crop-wrap { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.crop-stage { position: relative; background: #000; border-radius: 10px; overflow: hidden; touch-action: none; cursor: grab; }
.crop-stage:active { cursor: grabbing; }
.crop-mask { position: absolute; inset: 0; pointer-events: none; box-shadow: 0 0 0 2000px rgba(20,14,8,.55); }
.crop-controls { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 14px; }
.zoom-row { display: flex; align-items: center; gap: 10px; }
.zoom-row input[type=range] { flex: 1; accent-color: var(--bronze); }

/* ---------- Designs (name / text artwork) ---------- */
.design-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; margin-bottom: 18px; }
.design-grid.shape-rect { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.design-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px; border: 2px solid var(--line); border-radius: 14px; background: var(--bg); cursor: pointer; font-family: inherit; color: var(--ink); }
.design-card:hover { border-color: var(--bronze); }
.design-card.selected { border-color: var(--bronze-dark); background: var(--card); }
.design-thumb { display: block; margin: 0 auto; background-size: cover; background-position: center; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.shape-rect .design-thumb { border-radius: 4px; }
.design-card .lbl { font-size: 12px; font-weight: 700; text-align: center; }
.design-card .cknote { position: absolute; top: 6px; left: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--bronze-dark); color: #fff; font-size: 11px; align-items: center; justify-content: center; display: none; }
.design-card.selected .cknote { display: flex; }

/* ---------- Composer (background + free text / QR layers) ---------- */
.seg { display: inline-flex; gap: 4px; padding: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.seg-btn { border: none; background: transparent; padding: 8px 14px; border-radius: 10px; font-family: inherit; font-weight: 700; font-size: 13px; color: var(--ink-soft); cursor: pointer; }
.seg-btn.on { background: linear-gradient(135deg, var(--espresso-3), var(--espresso)); color: var(--gold-hi); }
.mode-seg { margin-bottom: 18px; }
.composer { display: flex; flex-wrap: wrap; gap: 26px; align-items: flex-start; }
.cmp-stage-col { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 8px; position: sticky; top: 104px; max-width: 100%; }
.cmp-tools { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.cmp-sec h3 { font-size: 14px; font-weight: 800; margin: 0 0 10px; color: var(--bronze-dark); }
.te-stage { position: relative; overflow: hidden; background: #F4E6C8; box-shadow: 0 0 0 3px #CDD2D6, 0 6px 18px rgba(58,43,30,.15); }
.te-stage canvas { display: block; cursor: default; touch-action: none; outline: none; }
.te-stage canvas.dragging { cursor: grabbing; }
.te-hint { font-size: 11.5px; color: var(--muted); margin: 0; text-align: center; max-width: 320px; line-height: 1.8; }
.dropzone.sm { padding: 14px; }
.dropzone.sm .t { margin: 0 0 2px; }
.sec-note { margin: -4px 0 10px; }
.add-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.add-btn { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 10px; border: 1.5px dashed var(--bronze); border-radius: 14px; background: transparent; color: var(--bronze-dark); font-family: inherit; font-weight: 800; font-size: 13.5px; cursor: pointer; transition: background .2s; }
.add-btn:hover { background: var(--card); }
.add-btn .plus { width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, var(--gold-hi), var(--gold-2)); color: #2A1C10; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; line-height: 1; }
.add-btn:disabled { opacity: .45; cursor: not-allowed; }
.layer-list { display: flex; flex-direction: column; gap: 10px; }
.layers-empty { padding: 18px; text-align: center; font-size: 12.5px; color: var(--muted); line-height: 2; border: 1.5px dashed var(--line); border-radius: 14px; }

/* one card per layer; the open one shows its settings underneath */
.lc { border: 1.5px solid var(--line); border-radius: 16px; background: #fff; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.lc.open { border-color: var(--bronze); box-shadow: 0 6px 18px rgba(58,43,30,.10); }
.lc-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; user-select: none; }
.lc-head:hover { background: var(--bg); }
.lc-head:focus-visible { outline: 2px solid var(--bronze); outline-offset: -2px; }
.lc.open .lc-head { background: var(--card); }
.lc-badge { width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.lc-text .lc-badge { background: #F3E3C8; }
.lc-qr .lc-badge { background: #DDE6EE; color: #1F3F6E; font-size: 18px; }
.lc { min-width: 0; max-width: 100%; scroll-margin-top: 104px; }   /* keep the card title clear of the sticky header when scrolled to */
.lc-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.5; }
.lc-titles b { font-size: 13px; font-weight: 800; color: var(--ink); }
.lc-titles small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc.pending .lc-titles small { color: #A4492B; }
#sideBlocker { padding: 10px 14px; border-radius: 12px; background: #FBEAE3; border: 1px solid #E8B9A6; color: #8A3B1F; font-size: 13px; margin: 16px 0 0; }
#sideBlocker::before { content: '⚠️ '; }
.lc-actions { display: flex; gap: 4px; flex-shrink: 0; }
.lc-actions button { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink-soft); cursor: pointer; font-size: 10px; font-family: inherit; }
.lc-actions button:disabled { opacity: .3; cursor: default; }
.lc-actions button.del:hover { background: #A4492B; color: #fff; border-color: #A4492B; }
.lc-chev { width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-2px) rotate(45deg); margin: 0 4px; flex-shrink: 0; transition: transform .2s; }
.lc.open .lc-chev { transform: translateY(2px) rotate(-135deg); border-color: var(--bronze-dark); }
.lc-bw { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .32s ease; }
.lc.open .lc-bw { grid-template-rows: 1fr; }
.lc-body { overflow: hidden; min-height: 0; }
.lc-inner { padding: 4px 14px 14px; opacity: 0; transform: translateY(-6px); transition: opacity .25s ease, transform .3s ease; }
.lc.open .lc-inner { opacity: 1; transform: none; transition-delay: .06s; }
.lc.open .lc-head { transition: background .2s; }
.lc-alert { margin: 10px 12px 12px; padding: 9px 12px; border-radius: 10px; background: #FBEAE3; border: 1px solid #E8B9A6; color: #8A3B1F; font-size: 12px; font-weight: 700; line-height: 1.9; }
@media (prefers-reduced-motion: reduce) { .lc-bw, .lc-inner, .lc-chev { transition: none; } }
.lp-sec { padding: 12px 0; border-bottom: 1px dashed var(--line); display: flex; flex-direction: column; gap: 8px; }
.lp-sec:last-child { border-bottom: none; padding-bottom: 0; }
.lp-title { font-size: 12.5px; font-weight: 800; color: var(--bronze-dark); }
.lp-sec textarea { resize: vertical; line-height: 1.8; }
.lp-sec .btn-sm { align-self: flex-start; }
.lp-title .val, .field-label .val { font-weight: 600; color: var(--muted); font-size: 12px; margin-inline-start: 6px; }
.qr-warn { margin: 0; font-size: 12px; line-height: 1.9; }
.field-note { font-size: 11.5px; color: var(--muted); }
.font-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.font-chip { padding: 6px; height: 54px; border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font-size: 16px; cursor: pointer; line-height: 1.4; white-space: nowrap; overflow: hidden; }
.font-chip:hover { border-color: var(--bronze); }
.font-chip.selected { border-color: var(--bronze-dark); background: var(--card); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; padding: 0; position: relative; }
.swatch.selected { outline: 2px solid var(--bronze-dark); outline-offset: 2px; }
.swatch.custom { background: conic-gradient(#e53935,#fdd835,#43a047,#1e88e5,#8e24aa,#e53935); overflow: hidden; display: inline-block; }
.swatch.custom input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; padding: 0; }
.sum-block .row.detail { justify-content: flex-start; font-size: 12px; line-height: 1.9; padding-top: 0; }


/* ---------- Design steps: heading, add tiles, categories, presets ---------- */
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.guide-btn { flex-shrink: 0; display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 20px; border: 1.5px solid var(--gold); background: #FFF8EA;
    color: var(--bronze-dark); font-family: inherit; font-weight: 800; font-size: 12.5px; cursor: pointer; transition: all .25s; }
.guide-btn span { width: 20px; height: 20px; border-radius: 50%; background: linear-gradient(135deg, var(--gold-hi), var(--gold-2)); color: #2A1C10; display: inline-flex; align-items: center; justify-content: center; font-size: 9px; }
.guide-btn:hover { background: var(--card); transform: translateY(-1px); }
.add-tiles { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 22px; }
.add-tile { display: flex; align-items: center; gap: 12px; text-align: right; padding: 16px; border-radius: 20px; border: 2px dashed var(--gold); background: #FFF8EA;
    font-family: inherit; color: var(--ink); cursor: pointer; transition: transform .3s var(--ease), box-shadow .3s, border-color .3s, background .3s; }
.add-tile:hover { transform: translateY(-3px); border-style: solid; border-color: var(--gold-2); box-shadow: 0 14px 30px -14px rgba(201,162,75,.55); background: #FFF3DC; }
.add-tile:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.at-ico { width: 48px; height: 48px; flex-shrink: 0; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 22px; background: #F3E3C8; }
.at-ico.qr { background: #DDE6EE; color: #1F3F6E; font-size: 24px; }
.at-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.at-txt b { font-size: 15px; font-weight: 900; }
.at-txt small { font-size: 12px; color: var(--ink-soft); line-height: 1.7; }
.at-plus { width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700;
    color: #2A1C10; background: linear-gradient(135deg, var(--gold-hi), var(--gold-2)); box-shadow: 0 6px 14px rgba(201,162,75,.4); }
.layers-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 14px; font-weight: 900; margin: 0 0 10px; color: var(--ink); }
.layers-title .field-note { font-weight: 600; }
.bg-seg { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
.bg-seg .seg-btn { padding: 9px 6px; font-size: 12.5px; white-space: nowrap; }
/* while designing a side (desktop), the 3D card slims down to give the editor and tools more room */
@media (min-width: 961px) {
    body.designing .wizard-preview { width: 290px; padding: 16px; }
    body.designing .preview-stage { height: 280px; }
    body.designing .wizard-wrap { gap: 26px; }
}
.cat-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.cat-chip { padding: 7px 14px; border-radius: 18px; border: 1.5px solid var(--line); background: #fff; font-family: inherit; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); cursor: pointer; }
.cat-chip.on { background: linear-gradient(135deg, var(--espresso-3), var(--espresso)); color: var(--gold-hi); border-color: transparent; }
.part-bg .design-grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); max-height: 560px; overflow-y: auto; padding: 4px; }
.part-bg .design-card.selected { box-shadow: 0 0 0 4px rgba(216,185,138,.3); border-color: var(--gold-2); }
.swatches.big .swatch { width: 44px; height: 44px; }
.plate-note { padding: 18px; border-radius: 16px; background: #FFF8EA; border: 1px solid var(--line); font-size: 14px; line-height: 2; color: var(--ink-soft); }
.presets .preset-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.presets .preset-tabs::-webkit-scrollbar { display: none; }
.preset-tab { flex-shrink: 0; padding: 6px 12px; border-radius: 16px; border: 1px solid var(--line); background: #fff; font-family: inherit; font-size: 12px; font-weight: 700; color: var(--ink-soft); cursor: pointer; }
.preset-tab.on { background: var(--bronze); border-color: var(--bronze); color: #fff; }
.preset-list { display: flex; flex-wrap: wrap; gap: 8px; }
.preset { padding: 8px 13px; border-radius: 12px; border: 1.5px solid var(--gold); background: #FFF8EA; font-family: inherit; font-size: 13px; font-weight: 700; color: var(--bronze-dark); cursor: pointer; transition: all .2s; }
.preset:hover { background: var(--gold); color: #2A1C10; transform: translateY(-1px); }

/* ---------- Drag coach: animated hand over a layer until the first drag ---------- */
.drag-coach { position: absolute; z-index: 3; pointer-events: none; transform: translate(-50%, -20%); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.drag-coach[hidden] { display: none; }
.coach-hand { font-size: 30px; filter: drop-shadow(0 3px 6px rgba(0,0,0,.35)); animation: coachMove 2.2s ease-in-out infinite; }
.coach-txt { padding: 4px 10px; border-radius: 12px; background: rgba(21,14,9,.8); color: var(--gold-hi); font-size: 11.5px; font-weight: 800; white-space: nowrap; }
@keyframes coachMove { 0% { transform: translate(0,6px) scale(1); } 20% { transform: translate(0,6px) scale(.88); } 55% { transform: translate(-26px,-10px) scale(.88); } 75% { transform: translate(-26px,-10px) scale(1); } 100% { transform: translate(0,6px) scale(1); } }

/* ---------- Intro walkthrough ---------- */
.intro-modal { position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(12,8,5,.78); backdrop-filter: blur(8px); opacity: 0; transition: opacity .3s; }
.intro-modal.open { opacity: 1; }
.intro-card { position: relative; width: min(620px, 100%); max-height: 100%; overflow-y: auto; padding: 28px 28px 24px; border-radius: 30px; color: var(--cream-hi); text-align: center;
    background: radial-gradient(120% 100% at 50% 0%, var(--espresso-3), var(--espresso) 70%); border: 1px solid rgba(216,185,138,.3); box-shadow: 0 40px 90px rgba(0,0,0,.6);
    transform: translateY(14px) scale(.97); transition: transform .4s var(--ease); }
.intro-modal.open .intro-card { transform: none; }
.intro-x { position: absolute; top: 16px; left: 16px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(216,185,138,.35); background: rgba(255,255,255,.05); color: var(--cream-hi); cursor: pointer; font-size: 15px; }
.intro-kicker { font-size: 12.5px; font-weight: 800; color: var(--gold); margin-bottom: 4px; }
.intro-card h3 { font-size: 20px; font-weight: 900; margin: 0 0 18px; }
.demo { position: relative; display: flex; align-items: center; justify-content: center; gap: 28px; padding: 20px; border-radius: 22px; background: rgba(251,246,234,.05); border: 1px solid rgba(216,185,138,.15); overflow: hidden; }
.demo-stage { perspective: 800px; }
.demo-face { position: relative; width: 210px; height: 210px; border-radius: 50%; overflow: hidden; transform-style: preserve-3d;
    box-shadow: 0 0 0 9px #D5D9DD, 0 0 0 11px #9DA3A9, 0 20px 40px rgba(0,0,0,.5); transition: transform 1.6s cubic-bezier(.5,0,.3,1); }
.demo-face.flip { transform: rotateY(360deg); }
.df-bg { position: absolute; inset: 0; background: #F4E6C8; background-size: cover; background-position: center; transition: background .5s; }
.df-text { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); padding: 2px 10px; font-family: Gulzar, Vazirmatn; font-size: 44px; color: #1F3F6E; line-height: 1.6; opacity: 0; transition: opacity .3s; white-space: nowrap; }
.df-text.show { opacity: 1; }
.df-text.sel { outline: 2px dashed rgba(122,74,35,.9); outline-offset: 2px; }
.df-qr { position: absolute; left: 50%; top: 68%; width: 58px !important; height: 58px !important; transform: translate(-50%,-50%) scale(.3); opacity: 0; border-radius: 6px; transition: transform .45s var(--ease), opacity .3s; }
.df-qr.show { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.demo-tools { display: flex; flex-direction: column; align-items: stretch; gap: 8px; min-width: 190px; text-align: right; }
.dt-label { font-size: 12px; font-weight: 800; color: var(--gold); margin-top: 4px; }
.dt-thumbs { display: flex; gap: 8px; }
.dt-thumb { width: 50px; height: 50px; border-radius: 50%; background-size: cover; background-position: center; border: 2px solid rgba(216,185,138,.3); transition: transform .2s, border-color .2s; }
.dt-add { padding: 10px 12px; border-radius: 14px; border: 1.5px dashed var(--gold); background: rgba(216,185,138,.08); color: var(--cream-hi); font-family: inherit; font-weight: 800; font-size: 13px; text-align: right; transition: transform .2s, background .2s; }
.dt-thumb.hit, .dt-add.hit { transform: scale(.92); border-color: var(--gold-hi); background-color: rgba(216,185,138,.25); }
.demo-cursor { position: absolute; top: 0; left: 0; z-index: 5; transition-property: transform; transition-timing-function: cubic-bezier(.45,0,.2,1); filter: drop-shadow(0 3px 5px rgba(0,0,0,.5)); }
.demo-cursor.press { transform-origin: 4px 2px; }
.demo-cursor.press path { fill: var(--gold-hi); }
.demo-cap { min-height: 50px; margin: 16px auto 8px; max-width: 460px; font-size: 15px; font-weight: 800; line-height: 1.8; color: var(--cream-hi); }
.demo-dots { display: flex; justify-content: center; gap: 6px; margin-bottom: 18px; }
.demo-dots span { width: 7px; height: 7px; border-radius: 4px; background: rgba(216,185,138,.3); transition: width .3s, background .3s; }
.demo-dots span.on { width: 22px; background: var(--gold-hi); }
.intro-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.intro-replay { color: var(--cream-hi); border-color: rgba(216,185,138,.5); }
.intro-replay:hover { background: rgba(216,185,138,.15); }

/* ---------- Mobile: while designing, the layout editor leads and stays pinned ---------- */
@media (max-width: 960px) {
    body.designing .wizard-preview { display: none; }
    body.designing .wizard-wrap { padding-top: 18px; }
    /* keep only the stepper in the top band while designing */
    body.designing .order-hero { padding: 14px 0 12px; }
    body.designing .oh-kicker, body.designing .page-head h1, body.designing .page-head p { display: none; }
    body.designing .stepper { margin-top: 0; }
    .composer { gap: 18px; }
    .cmp-stage-col { position: sticky; top: 74px; z-index: 6; width: 100%; padding: 10px 0 12px; background: #FFFCF6;
        border-bottom: 1px solid var(--line); box-shadow: 0 12px 16px -14px rgba(46,32,21,.35); }
    .te-hint { font-size: 11px; line-height: 1.6; }
    .te-hint .l2 { display: none; }
    body.designing .mini-preview { width: 104px; height: 104px; }
    body.designing .mini-preview.big { width: 220px; height: 220px; }
    /* anything scrolled into view lands below the pinned editor and above the floating 3D box */
    .cmp-tools button, .cmp-tools input, .cmp-tools textarea, .cmp-tools select, .cmp-tools .lc, #sideBlocker, .nav-row { scroll-margin-top: calc(84px + var(--editor-h, 0px)); scroll-margin-bottom: 160px; }
    .panel-head { flex-direction: column; }
    .demo { flex-direction: column; gap: 18px; }
    .demo-face { width: 170px; height: 170px; }
    .demo-tools { min-width: 0; width: 100%; }
    .dt-thumbs { justify-content: flex-start; }
}

/* ---------- Mobile floating mini preview ---------- */
.mini-preview { position: fixed; left: 14px; bottom: 14px; width: 132px; height: 132px; z-index: 40; border-radius: 22px; overflow: hidden;
    background: radial-gradient(circle at 50% 40%, var(--espresso-3), var(--espresso)); border: 1px solid rgba(216,185,138,.35);
    box-shadow: 0 10px 28px rgba(46,32,21,.28); display: none; }
.mini-preview.show { display: block; }
.mini-preview #previewCanvas { border-radius: 0; background: none; }
.mini-expand { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; border: none; background: rgba(216,185,138,.9); color: #2A1C10; font-size: 15px; cursor: pointer; display: flex; align-items: center; justify-content: center; }

/* ---------- License plate ---------- */
.plate-widget { display: flex; align-items: center; gap: 0; background: #fff; border: 3px solid var(--dark); border-radius: 8px; overflow: hidden; width: fit-content; max-width: 100%; }
.plate-widget input, .plate-widget select { border: none; text-align: center; font-weight: 800; font-size: 17px; font-family: inherit; background: transparent; color: var(--dark); padding: 10px 4px; }
.plate-widget input:focus, .plate-widget select:focus { outline: none; background: var(--card); }
.plate-widget .p2 { width: 44px; }
.plate-widget .p3 { width: 56px; }
.plate-widget .pletter { width: 52px; }
.plate-widget .pir { background: #1f4fa3; color: #fff; font-size: 10px; font-weight: 700; padding: 6px 5px; display: flex; flex-direction: column; align-items: center; line-height: 1.3; }
.plate-widget .pregion { width: 40px; border-right: 2px solid var(--dark); }
.plate-widget span.sep { color: var(--muted); padding: 0 2px; }

.mini-preview-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px; border-radius: 12px; background: var(--bg); }
.mini-preview-row img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.mini-preview-row .txt { font-size: 12.5px; color: var(--ink-soft); flex: 1; }
.mini-preview-row img { object-fit: contain; background: #fff; }

.nav-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; }
.nav-row .btn { padding: 14px 30px; }

/* ---------- Review & checkout ---------- */
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sum-block { background: var(--bg-alt); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; }
.sum-block h4 { margin: 0 0 8px; font-size: 13px; color: var(--bronze-dark); font-weight: 800; }
.sum-block .row { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; color: var(--ink-soft); }
.sum-block .row b { color: var(--ink); font-weight: 700; }
.price-box { margin-top: 20px; background: radial-gradient(120% 140% at 80% 0%, var(--espresso-3), var(--espresso) 70%); color: #F5EDDF; border-radius: 20px; padding: 24px 26px; border: 1px solid rgba(216,185,138,.25); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.price-box .lbl { font-size: 13px; color: #D8B98A; }
.price-box .amt { font-size: 28px; font-weight: 900; background: linear-gradient(100deg, var(--gold-hi), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }

.success-box { text-align: center; padding: 50px 20px; }
.success-box .ico { width: 88px; height: 88px; border-radius: 50%; background: linear-gradient(135deg, var(--gold-hi), var(--gold-2)); color: #2A1C10; box-shadow: 0 0 0 10px rgba(216,185,138,.18), 0 16px 34px rgba(201,162,75,.4); display: flex; align-items: center; justify-content: center; font-size: 40px; margin: 0 auto 20px; }
.success-box h2 { font-size: 22px; margin: 0 0 10px; }
.success-box p { color: var(--ink-soft); font-size: 14px; max-width: 420px; margin: 0 auto 24px; }

/* ---------- Restored-draft toast ---------- */
.draft-toast { position: fixed; z-index: 120; top: 86px; left: 50%; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
    width: max-content; max-width: calc(100% - 24px); padding: 10px 10px 10px 16px; border-radius: 18px; font-size: 13.5px; font-weight: 600;
    color: var(--cream-hi); background: linear-gradient(135deg, var(--espresso-3), var(--espresso)); border: 1px solid rgba(216,185,138,.35);
    box-shadow: 0 16px 40px -12px rgba(21,14,9,.6); opacity: 0; transform: translate(-50%, -12px); transition: opacity .3s, transform .3s; }
.draft-toast.show { opacity: 1; transform: translate(-50%, 0); }
.draft-toast button { font: inherit; font-size: 12.5px; font-weight: 800; padding: 7px 12px; border-radius: 12px; border: 0; cursor: pointer;
    color: var(--espresso); background: linear-gradient(135deg, var(--gold-hi), var(--gold)); }
.draft-toast .dt-x { padding: 4px 9px; color: var(--gold); background: transparent; font-size: 16px; }

/* ---------- Checkout: sign-in, submitting overlay, done ---------- */
.checkout-login { max-width: 420px; margin: 8px auto 0; padding: 26px 24px; border-radius: 22px; background: var(--bg); border: 1px solid var(--line); }
.field-label small { font-weight: 500; color: var(--muted); }
.ltr-input { direction: ltr; text-align: right; }
.co-error { margin-top: 16px; padding: 12px 16px; border-radius: 12px; font-size: 13.5px; font-weight: 600; line-height: 1.8; color: #8E2B21; background: #FBE9E4; border: 1px solid #F0C5BB; }
.done-acts { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.submit-ov { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; background: rgba(21,14,9,.62); backdrop-filter: blur(6px); animation: soIn .25s ease; }
@keyframes soIn { from { opacity: 0; } }
.so-card { width: min(340px, 100%); padding: 30px 26px 24px; border-radius: 26px; text-align: center; background: var(--bg-alt); box-shadow: 0 30px 70px rgba(0,0,0,.4); }
.so-ring { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; border: 5px solid var(--card); border-top-color: var(--bronze); animation: soSpin .9s linear infinite; }
@keyframes soSpin { to { transform: rotate(360deg); } }
.so-card b { display: block; font-size: 16px; font-weight: 800; }
.so-bar { height: 8px; margin: 16px 0 10px; border-radius: 6px; overflow: hidden; background: var(--card); }
.so-bar i { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, var(--gold), var(--bronze)); transition: width .3s; }
.so-card small { font-size: 12px; color: var(--muted); }

/* ---------- Responsive ---------- */
/* mobile: floating pill pointing down to the step under the 3D card */
.step-cue { display: none; }
@media (max-width: 960px) {
    .step-cue { position: fixed; z-index: 60; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 12px;
        padding: 10px 12px 10px 22px; border: 1px solid rgba(216,185,138,.45); border-radius: 999px; font: inherit; text-align: right; cursor: pointer; color: var(--cream-hi);
        background: linear-gradient(135deg, var(--espresso-3), var(--espresso)); box-shadow: 0 14px 34px -10px rgba(21,14,9,.75), 0 0 0 4px rgba(216,185,138,.12);
        opacity: 0; visibility: hidden; transform: translate(-50%, 16px); transition: opacity .3s, transform .3s, visibility 0s .3s; }
    .step-cue.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity .3s, transform .3s; }
    #wizardMain .panel { scroll-margin-top: 88px; }
    .step-cue .sc-txt { display: flex; flex-direction: column; line-height: 1.45; white-space: nowrap; }
    .step-cue small { font-size: 11px; color: var(--gold); }
    .step-cue b { font-size: 14px; font-weight: 800; }
    .step-cue .sc-arrow { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; font-weight: 800;
        color: var(--espresso); background: linear-gradient(135deg, var(--gold-hi), var(--gold)); animation: cueBob 1.4s ease-in-out infinite; }
}
@keyframes cueBob { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(3px); } }
@media (prefers-reduced-motion: reduce) { .step-cue .sc-arrow { animation: none; } }

@media (max-width: 960px) {
    .wizard-wrap { flex-direction: column; align-items: stretch; }
    .wizard-main { width: 100%; }   /* never size to content (a long file name used to widen the page) */
    .wizard-preview { width: 100%; position: static; order: -1; padding: 14px 14px 16px; }
    .preview-info, .preview-hint { display: none; }
    .preview-flip { margin-top: 4px; }
    .preview-stage { height: 280px; }
    .wp-glow { top: 140px; }
    .order-hero { padding: 24px 0 22px; }
    .stepper { margin-top: 20px; }
    .pstep { min-width: 78px; }
    .wizard-wrap { padding-bottom: 170px; }   /* room to scroll the nav row clear of the mini preview */
}

@media (max-width: 960px) {
}

@media (max-width: 640px) {
    .panel { padding: 22px 18px; }
    .summary-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .panel { border-radius: 22px; }
    .nav-row .btn { padding: 13px 22px; }
}

/* checkout: shipping and payment choices, totals */
.co-h { font-size: 15px; font-weight: 900; margin: 26px 0 10px; }
.co-opts { display: flex; flex-direction: column; gap: 10px; }
.co-opt { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; border: 1.5px solid var(--line, #E9DCC3); background: #fff; cursor: pointer; transition: border-color .2s, box-shadow .2s, background .2s; }
.co-opt:hover { border-color: #D8B98A; }
.co-opt input { position: absolute; opacity: 0; pointer-events: none; }
.co-opt::before { content: ''; flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #CDB894; background: #fff; box-shadow: inset 0 0 0 4px #fff; transition: background .2s, border-color .2s; }
.co-opt:has(input:checked) { border-color: var(--gold, #C9A24B); background: #FFFBF3; box-shadow: 0 6px 18px rgba(201,162,75,.16); }
.co-opt:has(input:checked)::before { border-color: var(--gold, #C9A24B); background: var(--gold, #C9A24B); }
.co-opt:has(input:focus-visible) { outline: 2px solid var(--gold, #C9A24B); outline-offset: 2px; }
.co-ic { font-size: 22px; }
.co-o { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.co-o b { font-size: 14.5px; }
.co-o small { font-size: 12.5px; color: var(--ink-soft, #6B5844); line-height: 1.8; }
.co-o .co-free { color: #2F6B3A; font-weight: 700; }
.co-p { font-weight: 900; font-size: 14.5px; white-space: nowrap; }
.co-p small { font-weight: 600; font-size: 11.5px; color: var(--ink-soft, #6B5844); }
.co-p em { font-style: normal; color: #2F6B3A; }
.co-sum { margin-top: 24px; padding: 20px 22px; border-radius: 20px; color: #F5EDDF; background: radial-gradient(120% 140% at 80% 0%, var(--espresso-3), var(--espresso) 70%); border: 1px solid rgba(216,185,138,.25); }
.co-sum .r { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 14px; color: #E6D6BC; }
.co-sum .r b { color: #F5EDDF; font-weight: 800; white-space: nowrap; }
.co-sum .tot { margin-top: 6px; padding-top: 12px; border-top: 1px dashed rgba(216,185,138,.35); align-items: center; }
.co-sum .tot span { color: #D8B98A; font-weight: 700; }
.co-sum .tot b { font-size: 24px; font-weight: 900; background: linear-gradient(100deg, var(--gold-hi), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.co-sum .tot b small { font-size: 13px; }
.co-sum .note { display: block; margin-top: 8px; font-size: 12.5px; color: #CDB894; line-height: 1.9; }
.co-disc { margin-top: 22px; }
.cd-row { display: flex; gap: 8px; }
.cd-row .text-input { flex: 1; min-width: 0; text-transform: uppercase; }
.cd-row .btn { flex: none; }
.cd-msg { margin-top: 8px; font-size: 13px; font-weight: 700; }
.cd-msg.ok { color: #2F6B3A; }
.cd-msg.err { color: #B4483A; }
.co-sum .r.disc b { color: #9FE0A8; }
