/* =========================================================
   Order configuration page
   ========================================================= */
.cfg-page { padding: 28px 0 80px; background: linear-gradient(180deg, var(--bg-2), var(--bg) 420px); }
.cfg-page .crumbs { display: flex; gap: 8px; align-items: center; font-size: .82rem; color: var(--mute); margin-bottom: 10px; flex-wrap: wrap; }
.cfg-page .crumbs a:hover { color: var(--brand); }
.cfg-page .crumbs b { color: var(--ink-2); font-weight: 600; }
.cfg-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.cfg-head h1 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -.025em; }
.cfg-head p { margin: 6px 0 0; color: var(--mute); }
.cfg-head p b { color: var(--ink); }
.cfg-page .costeps { margin-bottom: 22px; }

.cfg { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.cfg__main { display: grid; gap: 18px; min-width: 0; }
.cfg__side { position: sticky; top: 96px; display: grid; gap: 14px; }

.cfg-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 1px 2px rgba(10,19,36,.04); min-width: 0; }
.cfg-card[hidden] { display: none; }
.cfg-card__h { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cfg-card__h h3 { margin: 0; font-size: 1.08rem; letter-spacing: -.01em; }
.cfg-card__h p { margin: 2px 0 0; font-size: .84rem; color: var(--mute); }
.cfg-card__ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--brand-soft); color: var(--brand); flex: none; }
.cfg-card__ic .ico { width: 19px; height: 19px; }
.cfg-card__b { padding: 20px 22px; }
.cfg-card.has-err { border-color: var(--bad); }

/* Product */
.cfg-prod__top { display: flex; align-items: center; gap: 16px; padding: 20px 22px; }
.cfg-prod__ic { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 16px; background: var(--brand-soft); color: var(--brand); flex: none; }
.cfg-prod__ic .ico { width: 28px; height: 28px; }
.cfg-prod h2 { margin: 0; font-size: 1.3rem; letter-spacing: -.02em; }
.cfg-prod__top p { margin: 4px 0 0; color: var(--mute); font-size: .9rem; }
.cfg-prod__cat { margin-left: auto; align-self: flex-start; padding: 4px 10px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); font-size: .74rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.cfg-prod__feat { list-style: none; margin: 0; padding: 16px 22px 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 17px 17px; }
.cfg-prod__feat li { display: flex; align-items: center; gap: 10px; font-size: .92rem; font-weight: 500; }
.cfg-prod__feat .ico { width: 17px; height: 17px; color: var(--ok); flex: none; }

/* Radio / checkbox visuals */
.radio, .chk { position: relative; display: block; width: 20px; height: 20px; flex: none; border: 2px solid var(--line-2); background: var(--surface); transition: border-color .15s, background .15s, box-shadow .15s; }
.radio { border-radius: 50%; }
.chk { border-radius: 6px; }
.radio::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--brand); transform: scale(0); transition: transform .2s cubic-bezier(.2,.8,.2,1.4); }
.chk::after { content: ""; position: absolute; left: 5px; top: 1px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) scale(0); transition: transform .2s; }
input:checked + * .radio, input:checked + .cyc__box .radio { border-color: var(--brand); }
input:checked + * .radio::after { transform: scale(1); }
input:checked + * .chk { background: var(--brand); border-color: var(--brand); }
input:checked + * .chk::after { transform: rotate(45deg) scale(1); }
input:focus-visible + * { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Billing cycle */
.cyc { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 12px; }
.cyc__o { position: relative; cursor: pointer; }
.cyc__o input { position: absolute; opacity: 0; pointer-events: none; }
.cyc__box { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 16px 18px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); transition: border-color .15s, background .15s, box-shadow .15s, transform .15s; }
.cyc__o:hover .cyc__box { border-color: var(--line-2); transform: translateY(-2px); }
.cyc__o input:checked + .cyc__box { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 10px 30px -18px rgba(26,92,240,.6); }
.cyc__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; min-height: 26px; }
.cyc__gift, .cyc__disc { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 8px; font-style: normal; font-size: .74rem; font-weight: 700; color: #fff; background: #16a34a; white-space: nowrap; }
.cyc__disc { background: var(--brand); }
.cyc__gift .ico { width: 13px; height: 13px; }
.cyc__box small { font-size: .86rem; color: var(--mute); font-weight: 600; }
.cyc__box b { font: 800 1.35rem/1.15 var(--f-display); letter-spacing: -.02em; }
.cyc__per { font-size: .8rem; color: var(--mute); }
.cyc__note { font-size: .8rem; font-weight: 700; color: #16a34a; margin-top: 4px; }

/* Domain */
.dmode { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin-bottom: 14px; border-radius: 13px; background: var(--bg-2); border: 1px solid var(--line); }
.dmode label { cursor: pointer; }
.dmode input { position: absolute; opacity: 0; pointer-events: none; }
.dmode span { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 10px; font-size: .88rem; font-weight: 600; color: var(--mute); transition: background .15s, color .15s; }
.dmode span .ico { width: 16px; height: 16px; }
.dmode input:checked + span { background: var(--surface); color: var(--brand); box-shadow: 0 1px 4px rgba(10,19,36,.12); }
.dfield { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 16px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.dfield:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.has-err .dfield { border-color: var(--bad); }
.dfield__www { font-family: var(--f-mono); color: var(--mute); font-size: .95rem; }
.dfield input { flex: 1; min-width: 0; border: 0 !important; box-shadow: none !important; background: none !important; padding: 0 !important; height: 44px; font: 600 1.05rem var(--f-mono); outline: 0; }
.dfield .btn { height: 44px; }
.dstat { min-height: 22px; margin-top: 10px; font-size: .88rem; font-weight: 600; }
.dstat .ok { color: var(--ok); }
.dstat .bad { color: var(--bad); }
.dstat .wait { color: var(--mute); display: inline-flex; align-items: center; gap: 8px; }
.dstat .spin { width: 14px; height: 14px; }
.dfield-epp { margin-top: 12px; }
.cfg-hint { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; font-size: .82rem; color: var(--mute); }
.cfg-hint .ico { width: 16px; height: 16px; flex: none; color: var(--brand); }

/* Fields */
.cfg-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.cfg-f { min-width: 0; }
.cfg-f[hidden] { display: none; }
.cfg-f--choice, .cfg-f--multi, .cfg-f--qty, .cfg-f--textarea { grid-column: 1 / -1; }
.cfg-f .field { margin: 0; }
.cfg-f__l { display: block; font-size: .84rem; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; }
.cfg-f.has-err input, .cfg-f.has-err textarea, .cfg-f.has-err select { border-color: var(--bad); }
.cfg-err { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; font-size: .82rem; font-weight: 600; color: var(--bad); }
.cfg-err .ico { width: 15px; height: 15px; }
.cfg-gen { display: inline-flex; align-items: center; gap: 7px; margin-top: 8px; padding: 0; border: 0; background: none; font: 600 .86rem var(--f-body); color: var(--brand); cursor: pointer; }
.cfg-gen:hover { text-decoration: underline; }
.cfg-gen .ico { width: 16px; height: 16px; }

/* Option cards */
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(max(180px, calc((100% - (var(--c, 3) - 1) * 10px) / var(--c, 3))), 1fr)); gap: 10px; }
.opt { position: relative; cursor: pointer; min-width: 0; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt__box { display: flex; align-items: center; gap: 12px; height: 100%; min-height: 64px; padding: 12px 14px; border-radius: 13px; border: 1.5px solid var(--line); background: var(--surface); transition: border-color .15s, background .15s, box-shadow .15s, transform .15s; }
.opt:hover .opt__box { border-color: var(--line-2); transform: translateY(-1px); }
.opt input:checked + .opt__box { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 8px 24px -18px rgba(26,92,240,.7); }
.opt__badge { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; flex: none; font: 800 .7rem/1 var(--f-display); letter-spacing: -.02em; box-shadow: inset 0 0 0 2px rgba(255,255,255,.18); }
.opt__t { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.opt__t b { font-size: .94rem; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.opt__t small { font-size: .76rem; color: var(--mute); margin-top: 2px; }
.opt__p { align-self: flex-start; margin-top: 6px; padding: 2px 8px; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--line); font-style: normal; font-size: .72rem; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.opt input:checked + .opt__box .opt__p { background: var(--surface); color: var(--brand); border-color: var(--brand); border-color: color-mix(in srgb, var(--brand) 30%, transparent); }

/* Quantity */
.qty { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line); transition: border-color .15s, background .15s; }
.qty.is-on { border-color: var(--brand); background: var(--brand-soft); }
.qty__ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--bg-2); color: var(--brand); flex: none; }
.qty__ic .ico { width: 20px; height: 20px; }
.qty__t { min-width: 0; }
.qty__t b { display: block; font-size: .96rem; }
.qty__t small { font-size: .8rem; color: var(--mute); }
.qty__c { margin-left: auto; display: flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: 11px; overflow: hidden; background: var(--surface); flex: none; }
.qty__c button { display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: none; color: var(--ink-2); cursor: pointer; transition: background .15s, color .15s; }
.qty__c button:hover { background: var(--bg-2); color: var(--brand); }
.qty__c .ico { width: 17px; height: 17px; }
.qty__c input { width: 52px; height: 44px; border: 0 !important; border-left: 1px solid var(--line) !important; border-right: 1px solid var(--line) !important; border-radius: 0 !important; text-align: center; font: 700 1rem var(--f-mono); padding: 0 !important; -moz-appearance: textfield; box-shadow: none !important; }
.qty__c input::-webkit-outer-spin-button, .qty__c input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Password */
.pw { position: relative; display: block; }
.pw input { padding-right: 48px !important; font-family: var(--f-mono); letter-spacing: .02em; }
.pw__eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 9px; background: none; color: var(--mute); cursor: pointer; }
.pw__eye:hover, .pw__eye.is-on { color: var(--brand); background: var(--brand-soft); }
.pw__eye .ico { width: 18px; height: 18px; }
.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 8px; }
.pw-meter i { height: 4px; border-radius: 3px; background: var(--line); transition: background .25s; }
.pw-meter[data-s="1"] i:nth-child(-n+1) { background: var(--bad); }
.pw-meter[data-s="2"] i:nth-child(-n+2) { background: var(--warn); }
.pw-meter[data-s="3"] i:nth-child(-n+3) { background: #22c55e; }
.pw-meter[data-s="4"] i { background: var(--ok); }

/* Summary */
.cfg-sum { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 20px 50px -34px rgba(10,19,36,.35); overflow: hidden; }
.cfg-sum h3 { margin: 0; padding: 18px 22px; font-size: 1.1rem; border-bottom: 1px solid var(--line); }
.cfg-sum__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 22px; border-bottom: 1px solid var(--line); font-size: .88rem; color: var(--ink-2); }
.cfg-sum__row[hidden] { display: none; }
.cfg-sum__row > span { min-width: 0; }
.cfg-sum__row b { font-family: var(--f-mono); font-size: .88rem; color: var(--ink); white-space: nowrap; }
.cfg-sum__row small { display: block; font-size: .76rem; color: var(--mute); margin-top: 2px; }
.cfg-sum__row em { font-style: normal; font-size: .68rem; font-weight: 700; padding: 1px 6px; border-radius: 5px; background: var(--bg-2); color: var(--mute); margin-left: 4px; }
.cfg-sum__row--main span b { font-family: var(--f-body); font-size: .96rem; }
.cfg-sum__row--muted { color: var(--mute); }
.cfg-sum__total { padding: 18px 22px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.cfg-sum__total small { display: block; font-size: .86rem; color: var(--mute); font-weight: 600; }
.cfg-sum__total b { display: block; font: 800 2rem/1.15 var(--f-display); letter-spacing: -.03em; margin: 4px 0; }
.cfg-sum__total span { font-size: .78rem; color: var(--mute); }
.cfg-sum__cta { padding: 18px 22px; }
.cfg-sum__cta .btn { height: 52px; font-size: 1rem; }
.cfg-sum__cta p { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 12px 0 0; font-size: .76rem; color: var(--mute); text-align: center; }
.cfg-sum__cta p .ico { width: 14px; height: 14px; flex: none; }
.cfg-help { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.cfg-help__ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); flex: none; }
.cfg-help__ic .ico { width: 21px; height: 21px; }
.cfg-help b { display: block; font-size: .92rem; }
.cfg-help a { display: block; color: var(--brand); font-weight: 600; font-size: .88rem; margin-top: 2px; }
.cfg-help small { display: block; color: var(--mute); font-size: .78rem; margin-top: 2px; }
.cfg-mbar { display: none; }

/* Cart line config */
.cline__cfg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cline__cfg span { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 7px; background: var(--bg-2); border: 1px solid var(--line); font-size: .74rem; color: var(--ink-2); }
.cline__cfg span b { font-weight: 600; color: var(--mute); }
.cline__edit { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; font-size: .8rem; font-weight: 600; color: var(--brand); }
.cline__edit .ico { width: 14px; height: 14px; }

@media (max-width: 1100px) {
  .cfg { grid-template-columns: 1fr; }
  .cfg__side { position: static; }
  .cyc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .cfg-page { padding-bottom: 110px; }
  .cfg-card__h, .cfg-card__b, .cfg-prod__top { padding-left: 16px; padding-right: 16px; }
  .cfg-prod__feat { grid-template-columns: 1fr; padding: 14px 16px; }
  .cfg-prod__cat { display: none; }
  .cfg-fields { grid-template-columns: 1fr; }
  .opts { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
  .cyc__box { padding: 14px; }
  .cyc__box b { font-size: 1.15rem; }
  .cfg-head .btn { width: 100%; }
  .qty { flex-wrap: wrap; }
  .qty__c { margin-left: 0; width: 100%; justify-content: space-between; }
  .qty__c input { flex: 1; }
  .cfg-mbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -10px 30px -18px rgba(10,19,36,.4); }
  .cfg-mbar small { display: block; font-size: .74rem; color: var(--mute); }
  .cfg-mbar b { font: 800 1.2rem var(--f-display); }
  .cfg-mbar .btn { height: 46px; }
  .dfield .btn span { display: none; }
}
@media (max-width: 460px) { .opts { grid-template-columns: 1fr; } .cyc { gap: 8px; } }
@media (max-width: 760px) { body:has(.cfg-mbar) .wa-float { bottom: 92px; } }
