/* Dealer portal: cart with the order form (/sepet) */

/* shared with the quote and account pages */
.dp-discount .k, .dp-discount .v { color: var(--success) !important; }
.dealer .choice-desc, .dealer .choice-title:not(.row-sm) { display: block; }

/* ---------------------------------------------------------------- layout */
.ck { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.ck-main { display: grid; gap: 18px; min-width: 0; }
.ck-alerts { display: grid; gap: 10px; }
.ck-alerts:empty { display: none; }
.ck-min-meter { margin-top: 8px; height: 6px; background: color-mix(in srgb, var(--tape) 22%, transparent); }
.ck-card { overflow: hidden; }
.ck-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; }
.ck-head h2 { font-size: 16.5px; font-weight: 750; }
.ck-head p { margin-top: 2px; font-size: 13px; color: var(--muted); font-weight: 550; }
.ck-step { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--surface); font-weight: 800; font-size: 13.5px; display: grid; place-items: center; flex: none; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- lines */
.ck-lines { list-style: none; margin: 0; padding: 0 20px; }
.ck-line { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto 130px 36px; gap: 16px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line-2); transition: opacity 0.15s; }
.ck-line.is-busy { opacity: 0.65; }
.ck-line.is-leaving { opacity: 0.3; }
.ck-line.has-problem { margin: 0 -20px; padding-left: 20px; padding-right: 20px; background: color-mix(in srgb, var(--danger-soft) 55%, transparent); }
.ck-tile { width: 56px; height: 56px; border-radius: 15px; display: grid; place-items: center; text-decoration: none !important; overflow: hidden; }
.ck-tile .icon { stroke-width: 1.75; }
.ck-tile.has-image { background: var(--surface); border: 1px solid var(--line); }
.ck-tile img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.ck-info { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.ck-name { display: block; font-weight: 700; line-height: 1.3; color: var(--ink); text-decoration: none !important; }
.ck-name:hover { color: var(--brand-text); }
.ck-variant { color: var(--muted); font-weight: 600; }
.ck-info small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 1px; }
.ck-unit { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; font-variant-numeric: tabular-nums; }
.ck-unit:hover { color: var(--ink-2); }
.ck-unit s { color: var(--faint); font-weight: 600; }
.ck-unit .icon { color: var(--faint); }
.ck-camp, .ck-problem { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 12px; font-weight: 750; color: var(--danger); }
.ck-problem { font-weight: 650; }
.ck-steps { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); display: grid; gap: 3px; min-width: 240px; max-width: 360px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.ck-steps div { display: flex; justify-content: space-between; gap: 12px; }
.ck-steps b { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ck-qty .stepper { height: 40px; border-radius: 11px; }
.ck-qty .stepper button { width: 34px; border-radius: 10px; }
.ck-qty .stepper input { width: 52px; font-size: 14.5px; }
.ck-qty-ro { font-weight: 750; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.ck-amt { text-align: right; font-variant-numeric: tabular-nums; }
.ck-amt b { display: block; font-size: 15.5px; font-weight: 800; }
.ck-amt small { display: block; font-size: 12.5px; color: var(--faint); font-weight: 600; }
.ck-rm { width: 34px; height: 34px; border-radius: 10px; border: 0; background: none; color: var(--faint); display: grid; place-items: center; cursor: pointer; }
.ck-rm:hover { background: var(--danger-soft); color: var(--danger); }
.ck-rm:focus-visible { outline: 3px solid color-mix(in srgb, var(--danger) 30%, transparent); outline-offset: 0; }

/* bought-together suggestions */
.ck-xsell { margin: 4px 20px 20px; padding: 14px; border-radius: 16px; background: var(--brand-soft); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ck-xsell-title { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--brand-text); }
.ck-xs { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 12px; border-radius: 12px; background: var(--surface); font-size: 13.5px; font-weight: 650; min-width: 0; }
.ck-xs-name { color: var(--brand-text); text-decoration: none !important; }
.ck-xs-name:hover { color: var(--ink); }
.ck-xs em { font-style: normal; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* empty cart */
.ck-blank { padding: 40px 20px; text-align: center; color: var(--muted); font-weight: 600; border-top: 1px solid var(--line-2); }
.ck-blank > b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.ck-blank-acts { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.ck-lists { max-width: 560px; margin: 26px auto 0; text-align: left; display: grid; gap: 8px; }
.ck-lists-title { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.ck-list { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.ck-list-main { flex: 1; min-width: 0; line-height: 1.35; }
.ck-list-main b { display: block; color: var(--ink); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ck-list-main small { color: var(--muted); }

/* ---------------------------------------------------------------- choice cards (address, carrier, payment) */
.ck-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 20px 20px; }
.ck-opts-1 { grid-template-columns: minmax(0, 1fr); }
.ck-opts-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ck-card .field-error { margin: -10px 20px 16px; }
.ck-opt { position: relative; display: flex; gap: 12px; align-items: flex-start; width: 100%; padding: 14px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); text-align: left; font: inherit; color: var(--ink); cursor: pointer; transition: border-color 0.15s, background 0.15s, box-shadow 0.15s; }
.ck-opt:hover { border-color: color-mix(in srgb, var(--line-strong) 70%, var(--faint)); }
.ck-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.ck-opt:has(input:checked), .ck-opt.is-static { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 4%, var(--surface)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent); }
.ck-opt:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--brand) 35%, transparent); outline-offset: 2px; }
.ck-opt.is-disabled { opacity: 0.6; cursor: not-allowed; }
.ck-opt.is-static { cursor: default; }
.ck-rd { width: 20px; height: 20px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--line-strong) 75%, var(--muted)); flex: none; margin-top: 1px; display: grid; place-items: center; background: var(--surface); }
.ck-opt:has(input:checked) .ck-rd, .ck-rd.is-on { border-color: var(--brand); }
.ck-opt:has(input:checked) .ck-rd::after, .ck-rd.is-on::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.ck-opt .ti { width: 36px; height: 36px; border-radius: 11px; }
.ck-opt-body { min-width: 0; }
.ck-opt-body b { display: block; font-weight: 750; line-height: 1.3; }
.ck-opt-body small { display: block; font-size: 13px; color: var(--muted); font-weight: 550; line-height: 1.45; margin-top: 2px; }
.ck-opt-body .ck-opt-why { color: var(--danger); font-weight: 650; }
.ck-opt-new { justify-content: center; align-items: center; border-style: dashed; color: var(--brand-text); font-weight: 700; min-height: 64px; }
.ck-opt-new:hover { background: color-mix(in srgb, var(--brand) 4%, var(--surface)); border-color: var(--brand); }

/* payment details under the methods */
.ck-paybox { margin: 0 20px 20px; padding: 16px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: 13.5px; color: var(--ink-2); font-weight: 600; line-height: 1.5; }
.ck-paybox b { color: var(--ink); }
.ck-paybox a { font-weight: 700; }
.ck-paybox-row { display: flex; align-items: center; gap: 12px; }
.ck-paybox-note { margin-top: 10px; color: var(--muted); }
.ck-iban { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-weight: 750; font-size: 14.5px; color: var(--ink); flex-wrap: wrap; }
.ck-iban > .icon { color: var(--brand); }
.ck-iban > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ck-iban small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.ck-iban .btn { margin-left: auto; }
.ck-secure { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--success-soft); color: var(--success); font-size: 13px; font-weight: 650; line-height: 1.45; }
.ck-secure .icon { margin-top: 1px; flex: none; }
.ck-inst { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.ck-inst span { padding: 6px 10px; border-radius: 9px; background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; font-weight: 650; color: var(--ink-2); }

/* order note */
.ck-note { padding: 0 20px 20px; }
.ck-note .textarea { min-height: 86px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); font-size: 14.5px; }
.ck-note .field-error { margin: 0; }

/* ---------------------------------------------------------------- summary */
.ck-sum { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.ck-sum h2 { font-size: 16.5px; font-weight: 750; }
.ck-sl { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--ink-2); font-weight: 600; }
.ck-sl b { color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ck-sl.is-plus b { color: var(--success); }
.ck-hint { margin-top: -6px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.ck-grand { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-top: 14px; border-top: 1px dashed var(--line-strong); }
.ck-grand span { font-weight: 700; }
.ck-grand strong { font-family: var(--font-display); font-size: 30px; font-stretch: var(--display-stretch); font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ck-save { display: flex; align-items: center; gap: 6px; margin-top: -4px; font-size: 12.5px; color: var(--success); font-weight: 650; }
.ck-lim { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 14px; background: var(--success-soft); color: var(--success); font-size: 13px; font-weight: 650; line-height: 1.45; }
.ck-lim .icon { margin-top: 1px; flex: none; }
.ck-lim.is-warn { background: var(--tape-soft); color: var(--tape-ink); }
.ck-lim.is-bad { background: var(--danger-soft); color: var(--danger); }
.ck-eta { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 650; color: var(--ink-2); line-height: 1.4; }
.ck-eta .ti { width: 32px; height: 32px; border-radius: 10px; }
.ck-cta { width: 100%; }
.ck-terms { font-size: 12.5px; color: var(--muted); font-weight: 550; line-height: 1.5; text-align: center; }
.ck-terms a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.ck-terms a:hover { color: var(--ink); }

/* phone bar */
.ck-sticky { display: none; }

.ck-dialog-form { display: flex; flex-direction: column; min-height: 0; max-height: inherit; }
.ck-dialog-form .modal-body { overflow: auto; }

@media (min-width: 1181px) and (min-height: 640px) {
  .ck-sum { position: sticky; top: 188px; max-height: calc(100dvh - 204px); overflow-y: auto; scrollbar-width: thin; }
}
@media (max-width: 1180px) {
  .ck { grid-template-columns: minmax(0, 1fr); }
  .ck-opts-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1024px) {
  .ck-sticky {
    display: flex; align-items: center; gap: 12px; position: fixed; left: 0; right: 0; z-index: 44;
    bottom: calc(var(--tabbar-h) + var(--safe-b)); padding: 10px 16px; background: var(--surface); border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px -12px rgba(16, 24, 40, 0.18); transition: transform 0.2s var(--ease), opacity 0.2s;
  }
  .ck-sticky.is-hidden { transform: translateY(110%); opacity: 0; pointer-events: none; }
  .ck-sticky-total small { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
  .ck-sticky-total b { font-family: var(--font-display); font-stretch: var(--display-stretch); font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
  .ck-sticky .btn { margin-left: auto; }
}
@media (max-width: 760px) {
  .ck-opts { grid-template-columns: minmax(0, 1fr); }
  .ck-line { grid-template-columns: 48px minmax(0, 1fr) 36px; gap: 8px 14px; align-items: start; }
  .ck-tile { width: 48px; height: 48px; border-radius: 13px; }
  .ck-tile .icon { width: 22px; height: 22px; }
  .ck-qty, .ck-qty-ro { grid-column: 2; }
  .ck-qty .stepper { width: 100%; max-width: 200px; }
  .ck-qty .stepper input { flex: 1; }
  .ck-amt { grid-column: 2; text-align: left; }
  .ck-rm-form { grid-row: 1; grid-column: 3; }
  .ck-steps { min-width: 0; max-width: none; width: 100%; }
  .ck-xs { flex: 1 1 100%; }
  .ck-xs-name { flex: 1; min-width: 0; }
  .ck-grand strong { font-size: 26px; }
}
