/* NBNE A-frame designer — styles. Page-level vars (--accent etc.) come from a-frames/index.html. */
.design-section { padding: 3.5rem 1.5rem; background: #f8fafc; border-top: 1px solid #e5e7eb; }
.design-inner { max-width: 1160px; margin: 0 auto; }
.design-inner > h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 0.5rem; letter-spacing: -0.02em; text-align: center; }
.design-inner > .lede { color: var(--muted); max-width: 720px; margin: 0 auto 1.75rem; text-align: center; }
.afd-return { display: none; max-width: 760px; margin: 0 auto 1.5rem; padding: 1rem 1.25rem; border-radius: 10px; font-size: 0.95rem; line-height: 1.5; }
.afd-return.success { display: block; background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.afd-return.cancelled { display: block; background: #fef9c3; color: #854d0e; border: 1px solid #fde047; }

#afDesigner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 1.75rem; align-items: start; }
.afd-preview-col { position: sticky; top: 1rem; }
.afd-face-tabs { display: flex; gap: 0.4rem; align-items: center; min-height: 2rem; margin-bottom: 0.6rem; flex-wrap: wrap; }
.afd-face-tab { border: 1px solid #d1d5db; background: #fff; border-radius: 999px; padding: 0.35rem 0.9rem; font: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.afd-face-tab.is-on { background: var(--dark); color: #fff; border-color: var(--dark); }
.afd-face-note { font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.afd-link { border: none; background: none; color: var(--accent); font: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer; text-decoration: underline; margin-left: auto; }
.afd-preview { background: #e5e7eb; border-radius: 14px; padding: 1.1rem; box-shadow: inset 0 1px 6px rgba(0,0,0,0.08); display: flex; justify-content: center; }
.afd-preview svg { display: block; width: 100%; height: auto; max-height: 68vh; border-radius: 6px; box-shadow: 0 14px 34px rgba(0,0,0,0.22); background: #fff; }
.afd-preview.port svg { max-width: 420px; }
.afd-preview svg.afd-chrome { background: transparent; box-shadow: none; border-radius: 0; filter: drop-shadow(0 14px 22px rgba(0,0,0,0.28)); }
.afd-preview.swinger svg.afd-chrome { max-width: 380px; }
.afd-preview-cap { font-size: 0.75rem; color: var(--muted); margin: 0.6rem 0.2rem 0; line-height: 1.45; }
.afd-pricebox { margin-top: 1rem; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 1rem 1.1rem; }
.afd-price-line { display: flex; justify-content: space-between; font-size: 0.92rem; padding: 0.25rem 0; }
.afd-price-line.muted { color: var(--muted); font-size: 0.85rem; }
.afd-price-line.total { border-top: 1px solid #e5e7eb; margin-top: 0.35rem; padding-top: 0.6rem; font-weight: 800; font-size: 1.1rem; }
.afd-price-note { font-size: 0.78rem; color: var(--muted); margin-top: 0.5rem; line-height: 1.45; }

.afd-controls { display: flex; flex-direction: column; gap: 1rem; }
.afd-step { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 1.1rem 1.2rem 1.2rem; }
.afd-step h3 { font-size: 1rem; margin: 0 0 0.85rem; display: flex; align-items: center; gap: 0.6rem; letter-spacing: -0.01em; }
.afd-step-n { display: inline-flex; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--accent); color: #fff; font-size: 0.8rem; font-weight: 800; align-items: center; justify-content: center; flex: none; }
.afd-label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.75rem; }
.afd-label input[type="text"], .afd-label input[type="email"], .afd-label input[type="tel"], .afd-label textarea, .afd-label select, .afd-select {
  font-family: inherit; font-size: 1rem; font-weight: 400; padding: 0.65rem 0.8rem; border: 1px solid #d1d5db; border-radius: 6px; background: #fff; width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
@media (min-width: 768px) { .afd-label input, .afd-label textarea, .afd-label select, .afd-select { font-size: 0.93rem; } }
.afd-label input:focus, .afd-label textarea:focus, .afd-label select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }
.afd-label textarea { resize: vertical; }
.afd-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.75rem; }
.afd-muted { font-size: 0.8rem; color: var(--muted); margin: 0.25rem 0 0; line-height: 1.5; }
.afd-muted.small { font-size: 0.75rem; }

.afd-boards { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.afd-board { display: flex; gap: 0.7rem; text-align: left; border: 2px solid #e5e7eb; border-radius: 10px; background: #fff; padding: 0.7rem; cursor: pointer; font: inherit; color: inherit; position: relative; transition: border-color 0.15s; }
.afd-board:hover { border-color: #9ca3af; }
.afd-board.is-on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }
.afd-board-shape { flex: none; width: 2.4rem; background: linear-gradient(160deg, #1f2937, #4b5563); border-radius: 3px; align-self: flex-start; }
.afd-board-shape.land { width: 3.6rem; }
.afd-board-body { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.afd-board-body strong { font-size: 0.9rem; }
.afd-board-desc { font-size: 0.74rem; color: var(--muted); line-height: 1.4; }
.afd-board-price { font-weight: 800; font-size: 0.95rem; margin-top: 0.15rem; }
.afd-board-price small { font-weight: 500; color: var(--muted); font-size: 0.72rem; }
.afd-tag { position: absolute; top: -0.55rem; right: 0.6rem; background: var(--accent); color: #fff; font-style: normal; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; padding: 0.15rem 0.5rem; border-radius: 999px; }

.afd-boards.compact { grid-template-columns: repeat(2, 1fr); gap: 0.45rem; }
.afd-boards.compact .afd-board { padding: 0.5rem 0.6rem; gap: 0.55rem; align-items: center; }
.afd-boards.compact .afd-board-shape { width: 2.2rem; max-height: 2.6rem; }
.afd-boards.compact .afd-board-shape.land { width: 3rem; }
.afd-boards.compact .afd-board-body strong { font-size: 0.84rem; }
.afd-boards.compact .afd-board-price { font-size: 0.88rem; margin-top: 0; }
.afd-board-shape.panel { background: linear-gradient(160deg, #f8fafc, #cbd5e1); border: 1px solid #94a3b8; }
.afd-board.is-custom .afd-board-shape { background: repeating-linear-gradient(45deg, #e5e7eb 0 4px, #f8fafc 4px 8px); border: 1px dashed #64748b; }
.afd-custom-size { margin-top: 0.8rem; padding: 0.8rem 0.9rem; background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 10px; }
.afd-size-row { display: flex; gap: 0.6rem; align-items: flex-end; flex-wrap: wrap; }
.afd-size-row .afd-label { margin-bottom: 0; flex: 1 1 110px; }
.afd-size-row .afd-label input { width: 100%; }
.afd-x { font-size: 1.2rem; color: var(--muted); padding-bottom: 0.55rem; }
.afd-size-row .afd-btn-sm { margin-bottom: 0.25rem; }
.afd-extras { display: flex; flex-direction: column; gap: 0.5rem; }
.afd-extra { display: flex; gap: 0.65rem; align-items: flex-start; padding: 0.6rem 0.7rem; border: 1px solid #e5e7eb; border-radius: 8px; cursor: pointer; }
.afd-extra input { margin-top: 0.25rem; }
.afd-extra-body { display: flex; flex-direction: column; gap: 0.1rem; font-size: 0.8rem; color: var(--muted); line-height: 1.4; }
.afd-extra-body strong { font-size: 0.88rem; color: var(--dark); }
.afd-extra-body em { font-style: normal; font-weight: 700; color: var(--dark); font-size: 0.8rem; }
.afd-preview.panel svg.afd-chrome { filter: drop-shadow(0 10px 18px rgba(0,0,0,0.25)); }
.afd-preview.panel.land svg.afd-chrome { max-width: 100%; }
.afd-check { display: flex; gap: 0.5rem; align-items: flex-start; font-size: 0.85rem; font-weight: 500; margin-bottom: 0.8rem; cursor: pointer; line-height: 1.4; }
.afd-check input { margin-top: 0.2rem; }
.afd-templates { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
.afd-tpl { display: flex; flex-direction: column; gap: 0.25rem; text-align: left; border: 2px solid #e5e7eb; border-radius: 10px; background: #fff; padding: 0.6rem; cursor: pointer; font: inherit; color: inherit; transition: border-color 0.15s; }
.afd-tpl:hover { border-color: #9ca3af; }
.afd-tpl.is-on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }
.afd-tpl strong { font-size: 0.85rem; }
.afd-tpl > span { font-size: 0.72rem; color: var(--muted); line-height: 1.4; }
.afd-tpl-thumb { background: #e5e7eb; border-radius: 6px; padding: 0.4rem; display: flex; justify-content: center; margin-bottom: 0.2rem; }
.afd-tpl-thumb svg { width: auto; height: 110px; max-width: 100%; display: block; border-radius: 2px; box-shadow: 0 3px 8px rgba(0,0,0,0.18); }

.afd-img-row { display: flex; gap: 0.8rem; align-items: flex-start; padding: 0.6rem 0; border-top: 1px solid #f1f5f9; }
.afd-img-row:first-child { border-top: none; padding-top: 0; }
.afd-img-thumb { flex: none; width: 64px; height: 64px; border-radius: 8px; background: #f1f5f9 center/cover no-repeat; border: 1px solid #e5e7eb; }
.afd-img-body { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; font-size: 0.85rem; }
.afd-img-status { font-size: 0.78rem; color: var(--muted); line-height: 1.45; }
.afd-img-status .good { color: #166534; }
.afd-img-status .warn { color: #854d0e; }
.afd-img-status .bad { color: #991b1b; }
.afd-img-actions { display: flex; gap: 0.4rem; }
.afd-btn-sm { border: 1px solid var(--accent); background: var(--accent); color: #fff; border-radius: 6px; padding: 0.4rem 0.8rem; font: inherit; font-size: 0.8rem; font-weight: 700; cursor: pointer; }
.afd-btn-sm.ghost { background: #fff; color: var(--dark); border-color: #d1d5db; }

.afd-schemes { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.afd-scheme { display: flex; align-items: center; gap: 0.15rem; border: 2px solid #e5e7eb; border-radius: 8px; padding: 0.35rem 0.5rem; background: #fff; cursor: pointer; font: inherit; }
.afd-scheme.is-on { border-color: var(--accent); }
.afd-sw { width: 0.95rem; height: 0.95rem; border-radius: 3px; border: 1px solid rgba(0,0,0,0.12); }
.afd-scheme-name { font-size: 0.72rem; font-weight: 600; margin-left: 0.3rem; }
.afd-custom-colours { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 0.6rem; }
.afd-custom-colours label { display: flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; font-weight: 600; cursor: pointer; }
.afd-custom-colours input[type="color"] { width: 2rem; height: 1.6rem; border: 1px solid #d1d5db; border-radius: 4px; padding: 0; background: none; cursor: pointer; }

.afd-ship { display: flex; flex-direction: column; gap: 0.35rem; }
.afd-radio { display: flex; gap: 0.5rem; align-items: center; font-weight: 500; font-size: 0.88rem; cursor: pointer; }
.afd-status { display: none; padding: 0.75rem 1rem; border-radius: 6px; font-size: 0.88rem; margin-bottom: 0.8rem; }
.afd-status.error { display: block; background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.afd-status.success { display: block; background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.afd-submit { width: 100%; padding: 0.95rem; background: #16a34a; color: #fff; border: none; border-radius: 8px; font: inherit; font-size: 1rem; font-weight: 800; cursor: pointer; transition: background 0.2s; margin-top: 0.25rem; }
.afd-submit:hover { background: #15803d; }
.afd-submit:disabled { opacity: 0.6; cursor: wait; }

@media (max-width: 900px) {
  #afDesigner { grid-template-columns: 1fr; }
  .afd-preview-col { position: static; }
  .afd-preview svg { max-height: 52vh; }
  .afd-boards, .afd-templates { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .design-section { padding: 2.5rem 1rem; }
  .afd-boards, .afd-two { grid-template-columns: 1fr; }
  .afd-templates { grid-template-columns: 1fr 1fr; }
  .afd-tpl-thumb svg { height: 84px; }
}
