/* DJML Labs — Apple-style configurator: sticky stage left, scrolling options right. */
.ap-page { padding-top: 104px; padding-bottom: 140px; }
.ap-head { margin-bottom: 28px; }
.ap-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-top: 14px; }
.ap-head h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.04; letter-spacing: -0.02em; margin-top: 6px; }
.ap-head .cfg-steps { margin-top: 0; }

.ap-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr); gap: 56px; align-items: start; }

/* ── Stage ── */
.ap-stage-col { position: sticky; top: 92px; height: calc(100vh - 92px - 96px); min-height: 420px; }
.ap-stage { position: relative; height: 100%; margin: 0; border-radius: 28px; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, var(--panel-b), transparent 70%), var(--bg2);
  border: 1px solid var(--stroke); display: flex; flex-direction: column; transition: filter .5s ease; }
.ap-stage-glow { position: absolute; inset: -30% -10% auto; height: 70%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(0,212,255,0.16), transparent), radial-gradient(closest-side at 70% 60%, rgba(184,72,255,0.14), transparent);
  transition: opacity .6s ease; }
.ap-stage.is-off .ap-stage-glow { opacity: .25; }
.ap-stage.is-off .ap-layer.is-active img { filter: saturate(.35) brightness(.8); }
.ap-stage-frame { position: relative; flex: 1; margin: 48px 40px 0; cursor: zoom-in; outline: none; }
.ap-stage-frame:focus-visible { outline: 2px solid var(--c1); outline-offset: 6px; border-radius: 16px; }
.ap-layer { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transform: scale(.965) translateY(14px);
  transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .9s cubic-bezier(.22,1,.36,1); pointer-events: none; }
.ap-layer.is-active { opacity: 1; transform: none; pointer-events: auto; }
.ap-layer img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 16px;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.65), 0 0 0 1px var(--stroke); transition: filter .5s ease; }
.ap-layer-review { cursor: default; }
.ap-mosaic { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; width: 100%; max-width: 560px; }
.ap-tile { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 18px; background: var(--panel-b);
  border: 1px solid var(--stroke-b); animation: apPop .5s cubic-bezier(.22,1,.36,1) both; }
.ap-tile span { font-size: 26px; }
.ap-tile b { font-size: 13px; line-height: 1.3; }
@keyframes apPop { from { opacity: 0; transform: scale(.9); } }

.ap-stage-cap { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 20px 12px; text-align: center; }
.ap-stage-cap b { font-family: 'Sora', sans-serif; font-size: 20px; letter-spacing: -0.01em; }
.ap-stage-tag { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px;
  color: var(--text3); border: 1px solid var(--stroke-b); transition: all .3s; }
.ap-stage-tag.is-on { color: var(--cfg-ok); border-color: rgba(46,230,166,0.35); background: var(--cfg-ok-soft); }
.ap-stage-dots { display: flex; justify-content: center; gap: 8px; padding: 6px 0 22px; }
.ap-stage-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--stroke-b); transition: all .35s; }
.ap-stage-dots i.is-sel { background: var(--text3); }
.ap-stage-dots i.is-active { width: 22px; border-radius: 4px; background: var(--grad); }

/* ── Options column ── */
.ap-options { display: flex; flex-direction: column; }
.ap-opt { padding: 44px 0; border-top: 1px solid var(--stroke); opacity: .45; transition: opacity .5s ease; }
.ap-opt:first-child { border-top: 0; padding-top: 8px; }
.ap-opt.is-current { opacity: 1; }
.ap-opt-label { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text3); margin-bottom: 10px; }
.ap-ico { font-size: 16px; }
.ap-opt h2 { font-size: clamp(22px, 2.2vw, 28px); line-height: 1.2; letter-spacing: -0.015em; margin-bottom: 22px; font-weight: 700; }
.ap-dim { color: var(--text2); font-weight: 600; }
.ap-addons-head { display: flex; justify-content: space-between; align-items: center; padding-top: 40px; border-top: 1px solid var(--stroke); }
.ap-addons-head .ap-opt-label { margin: 0; }
.ap-addons-head + div > .ap-opt:first-child { border-top: 0; padding-top: 18px; }

.ap-choices { display: flex; flex-direction: column; gap: 12px; }
.ap-choice { position: relative; display: flex; justify-content: space-between; gap: 16px; align-items: flex-start;
  padding: 20px 22px; border-radius: 16px; border: 1px solid var(--stroke-b); background: transparent; cursor: pointer;
  transition: border-color .25s, box-shadow .25s, background .25s; }
.ap-choice:hover { border-color: var(--text3); }
.ap-choice.is-on { border-color: var(--c1); box-shadow: 0 0 0 1px var(--c1); background: var(--cfg-on); }
.ap-choice:focus-within { outline: 2px solid var(--c1); outline-offset: 3px; }
.ap-choice.is-locked { cursor: default; }
.ap-choice-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ap-choice-main b { font-size: 16px; }
.ap-choice-main small { color: var(--text2); font-size: 13px; }
.ap-choice-main code { font-size: 11px; color: var(--text3); }
.ap-choice-price { text-align: right; white-space: nowrap; display: flex; flex-direction: column; gap: 2px; }
.ap-choice-price strong { font-family: 'Sora', sans-serif; font-size: 15px; font-variant-numeric: tabular-nums; }
.ap-choice-price small { font-size: 11px; color: var(--cfg-ok); text-transform: uppercase; letter-spacing: .06em; }
.ap-list { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.ap-list li { position: relative; padding-left: 22px; color: var(--text2); font-size: 14px; }
.ap-list li::before { content: "✓"; position: absolute; left: 0; color: var(--cfg-ok); font-weight: 700; }
.ap-next { margin-top: 18px; background: none; border: 0; color: var(--c1); font: inherit; font-size: 15px; cursor: pointer; padding: 0; }
.ap-next:hover { text-decoration: underline; }

.ap-review { display: flex; flex-direction: column; gap: 18px; }
.ap-review h2 { margin-bottom: 0; }
.ap-review-total { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 0; border-top: 1px solid var(--stroke); border-bottom: 1px solid var(--stroke); }
.ap-review-total span { color: var(--text2); font-size: 14px; }
.ap-review-total strong { font-family: 'Sora', sans-serif; font-size: 28px; font-variant-numeric: tabular-nums; }

/* ── Bottom bar ── */
.ap-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 100; background: var(--nav-bg-s);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-top: 1px solid var(--stroke-b); }
.ap-bar-in { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.ap-bar-sum strong { display: block; font-family: 'Sora', sans-serif; font-size: 22px; font-variant-numeric: tabular-nums; }
.ap-bar-sum small { color: var(--text2); font-size: 12px; }

@media (max-width: 960px) {
  .ap-layout { grid-template-columns: 1fr; gap: 0; }
  .ap-stage-col { top: 64px; height: 42vh; min-height: 260px; z-index: 5; margin: 0 -4px; }
  .ap-stage { border-radius: 22px; }
  .ap-stage-frame { margin: 22px 22px 0; }
  .ap-stage-cap { padding: 10px 14px 4px; }
  .ap-stage-cap b { font-size: 16px; }
  .ap-stage-dots { padding-bottom: 12px; }
  .ap-mosaic { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .ap-tile { padding: 10px; gap: 4px; }
  .ap-tile b { font-size: 11px; }
  .ap-opt { padding: 32px 0; }
  .ap-options { padding-top: 12px; }
}
@media (max-width: 600px) { .cfg-row { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .ap-layer, .ap-opt, .ap-tile, .ap-stage-dots i { transition: none; animation: none; } }
