/* ORSEN — checkout page */

.co-body { background: #fff; }
.co-header { border-bottom: 1px solid var(--line); background: #fff; }
.co-header__bar { height: 76px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.co-back { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--ink-2); width: fit-content; transition: color .25s; }
.co-back:hover { color: var(--accent); }
.co-back svg { transition: transform .4s var(--ease); }
.co-back:hover svg { transform: translateX(-3px); }
.co-secure { justify-self: end; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--steel); }

.co { min-height: calc(100vh - 77px); }
.co__grid { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 0; padding: 0; max-width: none; }
.co__grid[hidden] { display: none; }
.co-form { padding: 48px 64px 96px max(40px, calc((100vw - 1320px) / 2 + 40px)); display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.co-title { font-family: var(--display); font-weight: 400; font-size: clamp(28px, 3vw, 40px); line-height: 1.12; }

/* step indicator */
.co-steps { display: flex; gap: 6px; padding: 0; margin: 0; list-style: none; counter-reset: s; flex-wrap: wrap; }
.co-steps li { counter-increment: s; display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--ground); color: var(--steel); font-size: 13px; font-weight: 500; cursor: pointer; transition: background .3s, color .3s; }
.co-steps li::before { content: counter(s); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--ink); font-size: 12px; transition: background .3s, color .3s; }
.co-steps li.is-on { background: var(--ink); color: #fff; }
.co-steps li.is-done::before { content: '\2713'; background: var(--accent); color: #fff; }

/* sections */
.co-sec { border: 0; margin: 0; padding: 0; min-width: 0; display: block; scroll-margin-top: 24px; }
.co-sec > * + * { margin-top: 16px; }
.co-sec > .co-sec__h + * { clear: both; margin-top: 0; }
.co-sec__h { float: left; width: 100%; display: flex; align-items: center; gap: 12px; padding: 0; font-family: var(--display); font-size: 18px; margin-bottom: 18px; }
.co-sec__n { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; font-family: var(--body); font-size: 13px; font-weight: 600; }
.co-sec + .co-sec { padding-top: 28px; border-top: 1px solid var(--line); }
.co-sec--gift > * + * { margin-top: 14px; }

/* floating-label fields */
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { position: relative; display: flex; flex-direction: column; }
.field--full { grid-column: 1 / -1; }
.field input, .field select, .field textarea { width: 100%; min-height: 58px; padding: 24px 16px 8px; border-radius: 14px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); font-size: 16px; outline: none; transition: border-color .25s, box-shadow .25s; -webkit-appearance: none; appearance: none; }
.field textarea { resize: vertical; min-height: 96px; padding-top: 28px; line-height: 1.5; }
.field label { position: absolute; left: 17px; top: 18px; color: var(--steel); font-size: 16px; pointer-events: none; transform-origin: left top; transition: transform .3s var(--ease), color .25s; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(35, 71, 198, .12); }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label,
.field--select select:focus + label, .field--select.has-val label { transform: translateY(-10px) scale(.78); color: var(--steel); }
.field input:focus + label, .field textarea:focus + label, .field--select select:focus + label { color: var(--accent); }
.field--select::after { content: ''; position: absolute; right: 18px; top: 26px; width: 8px; height: 8px; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: rotate(45deg); pointer-events: none; }
.field--select select { cursor: pointer; padding-right: 44px; }
.field--phone input { padding-left: 56px; }
.field--phone label { left: 57px; }
.field__pre { position: absolute; left: 17px; top: 25px; font-size: 16px; color: var(--ink-2); padding-right: 10px; border-right: 1px solid var(--line); line-height: 1.1; }
.field__help { font-size: 13px; color: var(--steel); margin-top: 6px; }
.field__err { font-size: 13px; color: #B3261E; margin-top: 6px; }
.field__err:empty { display: none; }
.field.is-err input, .field.is-err select { border-color: #B3261E; }
.field.is-err input:focus, .field.is-err select:focus { box-shadow: 0 0 0 4px rgba(179, 38, 30, .12); }

/* checkbox */
.check { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-size: 15px; width: fit-content; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check__box { flex: none; width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid #A9B0BA; background: #fff; display: grid; place-items: center; transition: background .25s, border-color .25s; }
.check__box::after { content: ''; width: 6px; height: 11px; margin-top: -2px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg) scale(0); transition: transform .35s var(--ease); }
.check input:checked + .check__box { background: var(--accent); border-color: var(--accent); }
.check input:checked + .check__box::after { transform: rotate(45deg) scale(1); }
.check input:focus-visible + .check__box { outline: 2px solid var(--accent); outline-offset: 2px; }
.gift { overflow: hidden; }

/* radio option cards */
.opts { display: flex; flex-direction: column; gap: 10px; }
.opt { position: relative; display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--line-2); cursor: pointer; transition: border-color .25s, background .25s, box-shadow .25s; }
.opt:hover { border-color: var(--ink); }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt__dot { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #A9B0BA; display: grid; place-items: center; transition: border-color .25s; }
.opt__dot::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); transform: scale(0); transition: transform .35s var(--ease); }
.opt__txt { flex: 1; display: flex; flex-direction: column; line-height: 1.35; }
.opt__t { font-weight: 500; }
.opt__s { font-size: 14px; color: var(--steel); }
.opt__p { font-weight: 600; white-space: nowrap; }
.opt__icon { color: var(--steel); display: grid; transition: color .25s; }
.opt:has(input:checked) { border-color: var(--accent); background: #F7F9FE; box-shadow: inset 0 0 0 1px var(--accent); }
.opt:has(input:checked) .opt__dot { border-color: var(--accent); }
.opt:has(input:checked) .opt__dot::after { transform: scale(1); }
.opt:has(input:checked) .opt__icon { color: var(--accent); }
.opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.pay-note { font-size: 14px; color: var(--ink-2); padding: 14px 16px; border-radius: 12px; background: var(--ground); }

/* place order */
.co-place { display: flex; flex-direction: column; gap: 12px; padding-top: 8px; }
.co-place__btn { min-height: 60px; font-size: 16px; }
#placeLabel { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 16px; }
.co-place__btn.is-loading #placeLabel { justify-content: center; }
.co-place__btn:disabled { cursor: progress; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* summary */
.summary { background: var(--ground); border-left: 1px solid var(--line); }
.summary__in { position: sticky; top: 0; padding: 48px max(40px, calc((100vw - 1320px) / 2 + 40px)) 48px 40px; display: flex; flex-direction: column; gap: 20px; }
.summary__h { font-family: var(--display); font-weight: 400; font-size: 18px; }
.summary__items { display: flex; flex-direction: column; gap: 16px; }
.si { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: start; overflow: hidden; }
.si__img { position: relative; width: 72px; height: 72px; border-radius: 12px; background: var(--disc); border: 1px solid var(--line); }
.si__img img { width: 100%; height: 100%; object-fit: cover; border-radius: 11px; }
.si__q { position: absolute; right: -7px; top: -7px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--ink); color: #fff; font-size: 12px; display: grid; place-items: center; }
.si__meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.si__name { font-family: var(--display); font-size: 14px; }
.si__ctrl { display: flex; align-items: center; gap: 4px; margin-top: 8px; }
.si__ctrl button { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-2); background: #fff; display: grid; place-items: center; transition: border-color .25s; }
.si__ctrl button:hover { border-color: var(--ink); }
.si__ctrl span { min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; font-size: 14px; }
.si__ctrl .si__rm { width: auto; height: auto; border: 0; background: none; margin-left: 10px; font-size: 13px; color: var(--steel); text-decoration: underline; text-underline-offset: 3px; }
.si__ctrl .si__rm:hover { color: #B3261E; }
.si__price { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }

.promo { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding-top: 18px; border-top: 1px solid var(--line); }
.promo .field { grid-column: auto; }
.promo .field input { min-height: 54px; background: #fff; }
.promo .field label { top: 16px; }
.promo__btn { min-height: 54px; padding: 0 20px; background: #fff; }
.promo__msg { font-size: 13px; min-height: 0; margin-top: -10px; }
.promo__msg:empty { display: none; }
.promo__msg.is-ok { color: #1C7C4A; }
.promo__msg.is-err { color: #B3261E; }

.totals { display: flex; flex-direction: column; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.totals > div { display: flex; justify-content: space-between; gap: 16px; font-size: 15px; }
.totals dt { color: var(--ink-2); }
.totals dd { font-variant-numeric: tabular-nums; text-align: right; }
.totals__disc dd { color: #1C7C4A; }
.totals__grand { padding-top: 12px; margin-top: 4px; border-top: 1px solid var(--line); align-items: baseline; }
.totals__grand dt { font-weight: 600; color: var(--ink); }
.totals__grand dd { font-family: var(--display); font-size: 22px; }
.assure { display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--ink-2); padding-top: 6px; }
.assure li { display: flex; align-items: center; gap: 10px; }
.assure svg { color: var(--accent); flex: none; }

.co-mob-sum { display: none; }

/* empty + done */
.co-empty, .co-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding-top: 90px; padding-bottom: 110px; max-width: 640px; }
.co-empty[hidden], .co-done[hidden] { display: none; }
.co-empty .btn, .co-done__ctas { margin-top: 10px; }
.co-done:focus { outline: none; }
.co-done__mark { margin-bottom: 6px; }
.co-done__p { color: var(--ink-2); max-width: 520px; }
.co-done__box { width: 100%; margin-top: 18px; padding: 22px; border-radius: 18px; background: var(--ground); display: flex; flex-direction: column; gap: 14px; text-align: left; }
.co-done__ctas { justify-content: center; }

/* ---------- tablet and mobile ---------- */
@media (max-width: 1100px) {
  .co__grid { grid-template-columns: minmax(0, 1fr) 380px; }
  .co-form { padding: 40px 40px 80px; }
  .summary__in { padding: 40px 28px; }
}
@media (max-width: 960px) {
  .co-header__bar { height: 64px; grid-template-columns: auto 1fr auto; }
  .co-header .logo { justify-self: center; font-size: 18px; }
  .co-back span, .co-secure span { display: none; }
  .co__grid { grid-template-columns: 1fr; }
  .co-mob-sum { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 16px 20px; background: var(--ground); border-bottom: 1px solid var(--line); font-size: 15px; color: var(--accent); }
  .co-mob-sum[hidden] { display: none; }
  .co-mob-sum__l { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
  .co-mob-sum[aria-expanded="true"] .chev { transform: rotate(180deg); }
  .co-mob-sum strong { color: var(--ink); font-family: var(--display); font-weight: 400; }
  .summary { order: -1; border-left: 0; border-bottom: 1px solid var(--line); }
  .summary__in { position: static; padding: 20px; }
  .summary__h { display: none; }
  .co-form { padding: 28px 20px 64px; gap: 24px; }
  .fields { grid-template-columns: 1fr; }
  .field--full { grid-column: auto; }
  .co-steps li { padding-right: 12px; font-size: 12px; }
  .opt { padding: 14px; gap: 12px; }
  .opt__icon { display: none; }
}
