/* ==========================================================================
   Kitchen Configurator – application styles
   Self-contained design system (no Bootstrap / template CSS required).
   Everything is scoped under .kc so it can be embedded in a storefront page.
   ========================================================================== */

.kc,
.kc *,
.kc *::before,
.kc *::after {
  box-sizing: border-box;
}

.kc {
  /* ---- tokens ---- */
  --kc-bg: #f4f2ee;
  --kc-surface: #ffffff;
  --kc-surface-2: #faf9f6;
  --kc-surface-3: #f1eee8;
  --kc-ink: #1c1b19;
  --kc-ink-2: #45423d;
  --kc-muted: #7b766d;
  --kc-line: #e7e3db;
  --kc-line-2: #d5cfc4;
  --kc-accent: #c8571b;
  --kc-accent-600: #ad4912;
  --kc-accent-soft: #fbeee5;
  --kc-accent-ink: #ffffff;
  --kc-success: #2f8f5b;
  --kc-success-soft: #e6f4ec;
  --kc-danger: #c93b3b;
  --kc-danger-soft: #fbe9e9;
  --kc-warn: #b9780c;
  --kc-warn-soft: #fdf3dd;
  --kc-radius-sm: 8px;
  --kc-radius: 12px;
  --kc-radius-lg: 18px;
  --kc-shadow-sm: 0 1px 2px rgba(28, 27, 25, 0.06), 0 1px 3px rgba(28, 27, 25, 0.04);
  --kc-shadow-md: 0 6px 18px rgba(28, 27, 25, 0.1), 0 2px 6px rgba(28, 27, 25, 0.06);
  --kc-shadow-lg: 0 18px 44px rgba(28, 27, 25, 0.16), 0 4px 12px rgba(28, 27, 25, 0.08);
  --kc-header-h: 60px;
  --kc-catalog-w: 372px;
  --kc-summary-w: 340px;
  --kc-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  font-family: var(--kc-font);
  font-size: 14px;
  line-height: 1.45;
  color: var(--kc-ink);
  background: var(--kc-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  height: 100vh;
  height: 100dvh;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.kc.kc--embedded {
  height: clamp(600px, calc(100dvh - 140px), 960px);
  border-radius: var(--kc-radius-lg);
  box-shadow: var(--kc-shadow-md);
}

/* Base resets use :where() so they never out-rank component classes (.kc-*) */
:where(.kc) button,
:where(.kc) input,
:where(.kc) select {
  font: inherit;
  color: inherit;
  margin: 0;
}
:where(.kc) button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
  text-align: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  text-transform: none;
  border-radius: 0;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
}
:where(.kc) button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
:where(.kc) img {
  max-width: 100%;
  display: block;
}
:where(.kc) a {
  color: var(--kc-accent);
  text-decoration: none;
}
:where(.kc) :focus-visible {
  outline: 2px solid var(--kc-accent);
  outline-offset: 2px;
  border-radius: 6px;
}
:where(.kc) h1,
:where(.kc) h2,
:where(.kc) h3,
:where(.kc) h4,
:where(.kc) p,
:where(.kc) ul,
:where(.kc) ol,
:where(.kc) li {
  margin: 0;
  padding: 0;
  font-weight: inherit;
  font-size: inherit;
  line-height: inherit;
}
:where(.kc) ul,
:where(.kc) ol {
  list-style: none;
}
:where(.kc) svg {
  display: inline-block;
  vertical-align: middle;
}
:where(.kc) label {
  margin: 0;
  font-weight: inherit;
}
:where(.kc) input[type='number'],
:where(.kc) input[type='search'] {
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
  box-shadow: none;
}
:where(.kc) input[type='search']::-webkit-search-decoration,
:where(.kc) input[type='search']::-webkit-search-cancel-button {
  -webkit-appearance: none;
}
.kc .kc-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.kc .kc-icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.kc .kc-icon--sm {
  width: 16px;
  height: 16px;
}
.kc .kc-icon--lg {
  width: 26px;
  height: 26px;
}

/* --------------------------------------------------------------- buttons */
.kc .kc-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid var(--kc-line-2);
  background: var(--kc-surface);
  color: var(--kc-ink);
  transition: background 0.15s, border-color 0.15s, transform 0.08s, box-shadow 0.15s;
  white-space: nowrap;
}
.kc .kc-btn:hover {
  background: var(--kc-surface-2);
  border-color: #c7c0b3;
}
.kc .kc-btn:active {
  transform: translateY(1px);
}
.kc .kc-btn--primary {
  background: var(--kc-accent);
  border-color: var(--kc-accent);
  color: var(--kc-accent-ink);
  box-shadow: 0 6px 16px rgba(200, 87, 27, 0.28);
}
.kc .kc-btn--primary:hover {
  background: var(--kc-accent-600);
  border-color: var(--kc-accent-600);
}
.kc .kc-btn--dark {
  background: var(--kc-ink);
  border-color: var(--kc-ink);
  color: #fff;
}
.kc .kc-btn--dark:hover {
  background: #2f2d2a;
}
.kc .kc-btn--ghost {
  background: transparent;
  border-color: transparent;
}
.kc .kc-btn--ghost:hover {
  background: var(--kc-surface-3);
}
.kc .kc-btn--danger {
  color: var(--kc-danger);
}
.kc .kc-btn--danger:hover {
  background: var(--kc-danger-soft);
  border-color: #efc7c7;
}
.kc .kc-btn--sm {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
}
.kc .kc-btn--lg {
  height: 48px;
  padding: 0 24px;
  font-size: 15px;
}
.kc .kc-btn--block {
  width: 100%;
}
.kc .kc-btn--icon {
  width: 40px;
  padding: 0;
}
.kc .kc-btn--icon.kc-btn--sm {
  width: 32px;
}

/* ------------------------------------------------------------------ header */
.kc-header {
  height: var(--kc-header-h);
  flex: none;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  background: var(--kc-surface);
  border-bottom: 1px solid var(--kc-line);
  position: relative;
  z-index: 20;
}
.kc-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.kc-brand__logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--kc-ink);
  color: #fff;
  display: grid;
  place-items: center;
  flex: none;
}
.kc-brand__logo .kc-icon {
  width: 22px;
  height: 22px;
}
.kc-brand__title {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.kc-brand__sub {
  font-size: 12px;
  color: var(--kc-muted);
  line-height: 1.2;
}
.kc-steps {
  display: flex;
  align-items: center;
  justify-self: center;
  width: max-content;
  gap: 4px;
  background: var(--kc-surface-3);
  padding: 4px;
  border-radius: 999px;
}
.kc-steps li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  border-radius: 999px;
  color: var(--kc-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: default;
  transition: background 0.15s, color 0.15s;
}
.kc-steps li .kc-steps__num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  background: var(--kc-surface);
  color: var(--kc-muted);
  border: 1px solid var(--kc-line-2);
}
.kc-steps li.is-active {
  background: var(--kc-surface);
  color: var(--kc-ink);
  box-shadow: var(--kc-shadow-sm);
}
.kc-steps li.is-active .kc-steps__num {
  background: var(--kc-accent);
  border-color: var(--kc-accent);
  color: #fff;
}
.kc-steps li.is-done {
  color: var(--kc-ink-2);
  cursor: pointer;
}
.kc-steps li.is-done .kc-steps__num {
  background: var(--kc-success);
  border-color: var(--kc-success);
  color: #fff;
}
.kc-steps li.is-done:hover,
.kc-steps li.is-link:hover {
  background: var(--kc-surface);
}
.kc-steps li.is-link {
  cursor: pointer;
  color: var(--kc-ink-2);
}
.kc-header__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.kc-total-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--kc-surface-3);
  border: 1px solid var(--kc-line);
  align-items: center;
}
.kc-total-pill__label {
  font-size: 12px;
  color: var(--kc-muted);
  font-weight: 500;
}
.kc-total-pill__value {
  font-weight: 700;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.kc-status {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--kc-muted);
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--kc-surface-3);
}
.kc-status::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b9b3a8;
}
.kc-status.is-online {
  color: var(--kc-success);
  background: var(--kc-success-soft);
}
.kc-status.is-online::before {
  background: var(--kc-success);
}
.kc-status.is-offline {
  color: var(--kc-warn);
  background: var(--kc-warn-soft);
}
.kc-status.is-offline::before {
  background: var(--kc-warn);
}

/* -------------------------------------------------------------------- main */
.kc-main {
  flex: 1;
  min-height: 0;
  position: relative;
}
.kc-view {
  position: absolute;
  inset: 0;
  display: none;
}
.kc-view.is-active {
  display: flex;
}

/* ================================================================== SETUP */
.kc-setup {
  overflow: auto;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 24px 60px;
  background:
    radial-gradient(1200px 500px at 50% -200px, #fff 0%, rgba(255, 255, 255, 0) 70%),
    var(--kc-bg);
}
.kc-setup__inner {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
}
.kc-setup__head {
  text-align: center;
  margin-bottom: 32px;
}
.kc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--kc-accent);
  margin-bottom: 12px;
}
.kc-setup__title {
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.kc .kc-setup__lead {
  margin: 10px auto 0;
  color: var(--kc-muted);
  font-size: 15px;
  max-width: 560px;
}

/* layout cards */
.kc-layouts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.kc-layout-card {
  position: relative;
  text-align: left;
  background: var(--kc-surface);
  border: 2px solid var(--kc-line);
  border-radius: var(--kc-radius-lg);
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  box-shadow: var(--kc-shadow-sm);
}
.kc-layout-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--kc-shadow-md);
  border-color: var(--kc-line-2);
}
.kc-layout-card.is-selected {
  border-color: var(--kc-accent);
  box-shadow: 0 0 0 4px var(--kc-accent-soft), var(--kc-shadow-md);
}
.kc-layout-card__check {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--kc-accent);
  color: #fff;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.15s, transform 0.15s;
}
.kc-layout-card.is-selected .kc-layout-card__check {
  opacity: 1;
  transform: scale(1);
}
.kc-layout-card__art {
  height: 168px;
  border-radius: var(--kc-radius);
  background: var(--kc-surface-3);
  display: grid;
  place-items: center;
  padding: 10px;
}
.kc-layout-card__art svg {
  width: 100%;
  height: 100%;
}
.kc-plan-shape {
  fill: #ffffff;
  stroke: #9a9488;
  stroke-width: 1.5;
}
.kc-plan-shape.is-active {
  fill: var(--kc-accent-soft);
  stroke: var(--kc-accent);
  stroke-width: 2;
}
.kc-plan-dim {
  stroke: var(--kc-accent);
  stroke-width: 1.5;
}
.kc-plan-dim-text {
  font-family: var(--kc-font);
  font-size: 7px;
  font-weight: 700;
  fill: var(--kc-accent);
}
.kc-plan-badge {
  font-family: var(--kc-font);
  font-size: 7.5px;
  font-weight: 700;
  fill: #ffffff;
}
.kc-plan-badge-bg {
  fill: var(--kc-ink);
}
.kc-plan-badge-bg.is-active {
  fill: var(--kc-accent);
}
.kc-plan-front {
  font-family: var(--kc-font);
  font-size: 6px;
  font-weight: 600;
  fill: var(--kc-muted);
  letter-spacing: 0.15em;
}
.kc-layout-card__name {
  font-weight: 700;
  font-size: 16px;
}
.kc-layout-card__desc {
  color: var(--kc-muted);
  font-size: 13px;
  line-height: 1.4;
}
.kc-layout-card__meta {
  font-size: 12px;
  color: var(--kc-ink-2);
  font-weight: 600;
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

/* dimensions step */
.kc-dims {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 24px;
  align-items: stretch;
}
.kc-card {
  background: var(--kc-surface);
  border: 1px solid var(--kc-line);
  border-radius: var(--kc-radius-lg);
  box-shadow: var(--kc-shadow-sm);
}
.kc-dims__plan {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.kc-dims__plan svg {
  width: 100%;
  height: auto;
  max-height: 380px;
}
.kc-dims__hint {
  font-size: 13px;
  color: var(--kc-muted);
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.kc-dims__form {
  padding: 22px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.kc-dims__form h3 {
  font-size: 16px;
  font-weight: 700;
}
.kc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.kc-field__label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--kc-ink-2);
}
.kc-field__label .kc-badge {
  margin-right: 8px;
}
.kc-field__hint {
  font-size: 12px;
  color: var(--kc-muted);
  font-weight: 500;
}
.kc-input {
  display: flex;
  align-items: center;
  height: 46px;
  border: 1.5px solid var(--kc-line-2);
  border-radius: var(--kc-radius);
  background: var(--kc-surface);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.kc-input:focus-within {
  border-color: var(--kc-accent);
  box-shadow: 0 0 0 4px var(--kc-accent-soft);
}
.kc-input.is-invalid {
  border-color: var(--kc-danger);
}
.kc-input input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  padding: 0 14px;
  font-size: 18px;
  font-weight: 600;
  background: transparent;
  outline: none;
  font-variant-numeric: tabular-nums;
}
.kc-input input::-webkit-outer-spin-button,
.kc-input input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}
.kc-input input[type='number'] {
  -moz-appearance: textfield;
}
.kc-input__unit {
  padding: 0 14px;
  color: var(--kc-muted);
  font-weight: 600;
  font-size: 13px;
  border-left: 1px solid var(--kc-line);
  height: 100%;
  display: grid;
  place-items: center;
  background: var(--kc-surface-2);
}
.kc-input__step {
  width: 38px;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--kc-muted);
  border-left: 1px solid var(--kc-line);
}
.kc-input__step:hover {
  background: var(--kc-surface-3);
  color: var(--kc-ink);
}
.kc-badge {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--kc-ink);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.kc-badge--accent {
  background: var(--kc-accent);
}
.kc-badge--soft {
  background: var(--kc-surface-3);
  color: var(--kc-ink-2);
}
.kc-dims__summary {
  margin-top: 4px;
  padding: 14px 16px;
  border-radius: var(--kc-radius);
  background: var(--kc-surface-3);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
}
.kc-stat__label {
  font-size: 12px;
  color: var(--kc-muted);
  font-weight: 500;
}
.kc-stat__value {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.kc-stat__value small {
  font-size: 12px;
  color: var(--kc-muted);
  font-weight: 500;
  margin-left: 4px;
}
.kc-form-error {
  color: var(--kc-danger);
  font-size: 13px;
  font-weight: 500;
  display: none;
  gap: 8px;
  align-items: flex-start;
}
.kc-form-error.is-visible {
  display: flex;
}
.kc-setup__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}
.kc-setup__actions .kc-btn--primary {
  min-width: 200px;
}

/* =============================================================== DESIGNER */
.kc-designer {
  grid-template-columns: var(--kc-catalog-w) minmax(0, 1fr) var(--kc-summary-w);
  grid-template-rows: minmax(0, 1fr);
}
.kc-view.kc-designer.is-active {
  display: grid;
}

/* ---- catalog (left) ---- */
.kc-catalog {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  border-right: 1px solid var(--kc-line);
  background: var(--kc-surface);
  min-height: 0;
}
.kc-rail {
  border-right: 1px solid var(--kc-line);
  background: var(--kc-surface-2);
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}
.kc-rail__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 2px 8px;
  border-radius: 12px;
  color: var(--kc-muted);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  text-align: center;
  transition: background 0.15s, color 0.15s;
  position: relative;
  width: 100%;
}
.kc-rail__btn .kc-icon {
  width: 22px;
  height: 22px;
}
.kc-rail__btn:hover {
  background: var(--kc-surface-3);
  color: var(--kc-ink);
}
.kc-rail__btn.is-active {
  background: var(--kc-ink);
  color: #fff;
}
.kc-rail__btn .kc-rail__count {
  position: absolute;
  top: 6px;
  right: 8px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--kc-accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.kc-rail__sep {
  height: 1px;
  background: var(--kc-line);
  margin: 6px 6px;
}
.kc-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}
.kc-panel__head {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--kc-line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.kc-panel__title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.kc-panel__title h2 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.kc-panel__title span {
  font-size: 12px;
  color: var(--kc-muted);
  font-weight: 500;
}
.kc-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--kc-line-2);
  background: var(--kc-surface-2);
  color: var(--kc-muted);
}
.kc-search:focus-within {
  border-color: var(--kc-accent);
  background: #fff;
}
.kc-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 13px;
  color: var(--kc-ink);
}
.kc-search .kc-search__clear {
  display: none;
  color: var(--kc-muted);
}
.kc-search.has-value .kc-search__clear {
  display: inline-flex;
}
.kc-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.kc-chip {
  height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--kc-line-2);
  background: var(--kc-surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--kc-ink-2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.kc-chip:hover {
  background: var(--kc-surface-3);
}
.kc-chip.is-active {
  background: var(--kc-ink);
  border-color: var(--kc-ink);
  color: #fff;
}
.kc-chip img {
  height: 14px;
  width: auto;
}
.kc-target {
  display: flex;
  align-items: center;
  white-space: nowrap;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--kc-accent-soft);
  color: var(--kc-accent-600);
  font-size: 12px;
  font-weight: 600;
}
.kc-target .kc-seg {
  margin-left: auto;
}
.kc-seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(200, 87, 27, 0.25);
}
.kc-seg button {
  height: 24px;
  min-width: 30px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--kc-accent-600);
}
.kc-seg button.is-active {
  background: var(--kc-accent);
  color: #fff;
}
.kc-panel__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 16px 24px;
  scrollbar-width: thin;
}
.kc-panel__body::-webkit-scrollbar {
  width: 8px;
}
.kc-panel__body::-webkit-scrollbar-thumb {
  background: var(--kc-line-2);
  border-radius: 8px;
}
.kc-products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.kc-product {
  text-align: left;
  border: 1px solid var(--kc-line);
  border-radius: var(--kc-radius);
  background: var(--kc-surface);
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  cursor: pointer;
}
.kc-product:hover {
  border-color: var(--kc-line-2);
  box-shadow: var(--kc-shadow-md);
  transform: translateY(-1px);
}
.kc-product:hover .kc-product__add {
  opacity: 1;
  transform: translateY(0);
}
.kc-product.is-loading {
  pointer-events: none;
  border-color: var(--kc-accent);
}
.kc-product.is-loading .kc-product__add {
  opacity: 1;
  transform: none;
  gap: 6px;
  padding-left: 9px;
}
.kc-product.is-loading .kc-spinner {
  width: 12px;
  height: 12px;
}
.kc-product__img {
  aspect-ratio: 1;
  border-radius: 8px;
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.kc-product__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.kc-product__name {
  font-weight: 600;
  font-size: 13px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.kc-product__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--kc-muted);
}
.kc-product__price {
  font-weight: 700;
  color: var(--kc-ink);
  font-variant-numeric: tabular-nums;
  flex: none;
}
.kc-product__sku {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}
.kc-product__brand {
  font-size: 11px;
  color: var(--kc-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.kc-product__add {
  position: absolute;
  top: 8px;
  right: 8px;
  height: 28px;
  padding: 0 10px 0 6px;
  border-radius: 999px;
  background: var(--kc-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.15s, transform 0.15s;
  box-shadow: var(--kc-shadow-sm);
}
.kc-product__add .kc-icon {
  width: 16px;
  height: 16px;
}
.kc-product__qty {
  position: absolute;
  top: 8px;
  left: 8px;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--kc-ink);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  padding: 0 6px;
}
.kc-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--kc-muted);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.kc-empty .kc-icon {
  width: 32px;
  height: 32px;
  color: var(--kc-line-2);
}
.kc-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--kc-muted);
  margin: 6px 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.kc-section-title + .kc-products {
  margin-bottom: 20px;
}
.kc-section-title .kc-badge {
  display: inline-block;
  line-height: 22px;
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: none;
  letter-spacing: 0;
}
.kc-swatches {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}
.kc-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 10px 6px;
  border-radius: var(--kc-radius);
  border: 1px solid transparent;
  text-align: center;
  transition: background 0.15s, border-color 0.15s;
}
.kc-swatch:hover {
  background: var(--kc-surface-2);
  border-color: var(--kc-line);
}
.kc-swatch.is-active {
  border-color: var(--kc-accent);
  background: var(--kc-accent-soft);
}
.kc-swatch__img {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px var(--kc-line-2), var(--kc-shadow-sm);
  background: var(--kc-surface-3);
  display: grid;
  place-items: center;
  position: relative;
}
.kc-swatch.is-active .kc-swatch__img {
  box-shadow: 0 0 0 2px var(--kc-accent), var(--kc-shadow-sm);
}
.kc-swatch__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.kc-swatch__img .kc-icon {
  color: var(--kc-muted);
}
.kc-swatch__check {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--kc-accent);
  color: #fff;
  display: none;
  place-items: center;
  border: 2px solid #fff;
}
.kc-swatch.is-active .kc-swatch__check {
  display: grid;
}
.kc-swatch__check .kc-icon {
  width: 12px;
  height: 12px;
  color: #fff;
}
.kc-swatch__name {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
}
.kc-swatch__price {
  font-size: 11px;
  color: var(--kc-muted);
}
.kc-swatches.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}
.kc-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--kc-warn-soft);
  color: #7a5100;
  font-size: 12.5px;
  margin-bottom: 14px;
  line-height: 1.4;
}
.kc-note .kc-icon {
  width: 16px;
  height: 16px;
  margin-top: 1px;
}
.kc-note--info {
  background: var(--kc-surface-3);
  color: var(--kc-ink-2);
}

/* ---- stage (centre) ---- */
.kc-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  background: #e9e6df;
  overflow: hidden;
}
#kc-viewport {
  position: absolute;
  inset: 0;
}
#kc-viewport canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  outline: none;
}
.kc-stage__overlay {
  position: absolute;
  pointer-events: none;
}
.kc-stage__overlay > * {
  pointer-events: auto;
}
.kc-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  z-index: 5;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.2s;
}
.kc-progress.is-visible {
  opacity: 1;
}
.kc-progress__bar {
  height: 100%;
  width: 0%;
  background: var(--kc-accent);
  transition: width 0.2s ease-out;
}
.kc-progress.is-indeterminate .kc-progress__bar {
  width: 30%;
  animation: kc-indeterminate 1.1s infinite ease-in-out;
}
@keyframes kc-indeterminate {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(400%);
  }
}
.kc-hint {
  top: 14px;
  left: 14px;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--kc-shadow-sm);
  font-size: 12px;
  color: var(--kc-ink-2);
  font-weight: 500;
  transition: opacity 0.4s;
}
.kc-hint kbd {
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--kc-surface-3);
  border: 1px solid var(--kc-line-2);
}
.kc-hint.is-hidden,
.kc-stage.has-selection .kc-hint {
  opacity: 0;
  pointer-events: none;
}
.kc-hint__close {
  color: var(--kc-muted);
  display: inline-flex;
}
.kc-loading-chip {
  top: 14px;
  right: 14px;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(28, 27, 25, 0.86);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  backdrop-filter: blur(6px);
}
.kc-loading-chip.is-visible {
  display: inline-flex;
}
.kc-spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: kc-spin 0.8s linear infinite;
}
@keyframes kc-spin {
  to {
    transform: rotate(360deg);
  }
}
.kc-toolbar {
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--kc-shadow-md);
  border: 1px solid rgba(28, 27, 25, 0.06);
}
.kc-toolbar__btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--kc-ink-2);
  position: relative;
  transition: background 0.15s, color 0.15s;
}
.kc-toolbar__btn:hover {
  background: var(--kc-surface-3);
  color: var(--kc-ink);
}
.kc-toolbar__btn.is-accent {
  background: var(--kc-accent);
  color: #fff;
  width: auto;
  padding: 0 14px 0 10px;
  gap: 6px;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.kc-toolbar__btn.is-accent:hover {
  background: var(--kc-accent-600);
}
.kc-toolbar__sep {
  width: 1px;
  height: 22px;
  background: var(--kc-line);
  margin: 0 4px;
}
.kc-tip {
  position: relative;
}
.kc-tip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--kc-ink);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 8px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
}
.kc-tip:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.kc-island-label {
  position: absolute;
  transform: translate(-50%, -100%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(28, 27, 25, 0.08);
  box-shadow: var(--kc-shadow-sm);
  font-size: 12px;
  font-weight: 700;
  color: var(--kc-ink-2);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  will-change: left, top;
}
.kc-island-label .kc-badge {
  width: 18px;
  min-width: 18px;
  height: 18px;
  font-size: 11px;
  padding: 0;
}
.kc-island-label.is-active {
  background: var(--kc-accent);
  color: #fff;
  border-color: var(--kc-accent);
}
.kc-island-label.is-active .kc-badge {
  background: #fff;
  color: var(--kc-accent);
}
.kc-island-label.is-hidden {
  display: none;
}
.kc-selection {
  left: 14px;
  top: 14px;
  width: 300px;
  max-width: calc(100% - 28px);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-radius: var(--kc-radius-lg);
  box-shadow: var(--kc-shadow-lg);
  border: 1px solid rgba(28, 27, 25, 0.06);
  padding: 12px;
  display: none;
  flex-direction: column;
  gap: 10px;
  animation: kc-pop 0.18s ease-out;
}
.kc-selection.is-visible {
  display: flex;
}
@keyframes kc-pop {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.kc-selection__head {
  display: flex;
  gap: 10px;
  align-items: center;
}
.kc-selection__img {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--kc-line);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: none;
}
.kc-selection__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.kc-selection__title {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
}
.kc-selection__sub {
  font-size: 12px;
  color: var(--kc-muted);
  margin-top: 2px;
}
.kc-selection__close {
  margin-left: auto;
  align-self: flex-start;
  color: var(--kc-muted);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
}
.kc-selection__close:hover {
  background: var(--kc-surface-3);
  color: var(--kc-ink);
}
.kc-selection__row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.kc-selection__row .kc-seg {
  background: var(--kc-surface-3);
  border-color: var(--kc-line);
}
.kc-selection__row .kc-seg button {
  color: var(--kc-ink-2);
}
.kc-selection__row .kc-seg button.is-active {
  background: var(--kc-ink);
  color: #fff;
}
.kc-selection__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--kc-muted);
}
.kc-selection__actions {
  display: flex;
  gap: 8px;
}
.kc-selection__actions .kc-btn {
  flex: 1;
}

/* ---- summary (right) ---- */
.kc-summary {
  border-left: 1px solid var(--kc-line);
  background: var(--kc-surface);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.kc-summary__scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  scrollbar-width: thin;
}
.kc-summary__scroll::-webkit-scrollbar {
  width: 8px;
}
.kc-summary__scroll::-webkit-scrollbar-thumb {
  background: var(--kc-line-2);
  border-radius: 8px;
}
.kc-summary__section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.kc-summary__section-head h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--kc-muted);
}
.kc-summary__section-head .kc-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--kc-accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.kc-summary__section-head .kc-link:hover {
  text-decoration: underline;
}
.kc-island-card {
  border: 1px solid var(--kc-line);
  border-radius: var(--kc-radius);
  overflow: hidden;
}
.kc-island-card__top {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: var(--kc-surface-2);
}
.kc-island-card__art {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--kc-line);
  padding: 4px;
  flex: none;
}
.kc-island-card__art svg {
  width: 100%;
  height: 100%;
}
.kc-island-card__name {
  font-weight: 700;
  font-size: 14px;
}
.kc-island-card__dims {
  font-size: 12px;
  color: var(--kc-muted);
  margin-top: 2px;
}
.kc-island-card__rows {
  padding: 4px 12px 6px;
}
.kc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--kc-line);
  font-size: 13px;
}
.kc-row:first-child {
  border-top: 0;
}
.kc-row__label {
  color: var(--kc-muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}
.kc-row__value {
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  gap: 8px;
}
.kc-row__value.is-muted {
  color: var(--kc-muted);
  font-weight: 500;
}
.kc-mini-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--kc-line-2);
  object-fit: cover;
}
.kc-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.kc-line-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--kc-line);
  border-radius: 12px;
  background: var(--kc-surface);
  transition: border-color 0.15s, background 0.15s;
}
.kc-line-item.is-selected {
  border-color: var(--kc-accent);
  background: var(--kc-accent-soft);
}
.kc-line-item__img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--kc-line);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.kc-line-item__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.kc-line-item__name {
  font-weight: 600;
  font-size: 13px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kc-line-item__meta {
  font-size: 11.5px;
  color: var(--kc-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kc-line-item__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.kc-line-item__price {
  font-weight: 700;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.kc-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--kc-line-2);
  border-radius: 999px;
  height: 24px;
  overflow: hidden;
  background: #fff;
}
.kc-qty button {
  width: 24px;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--kc-ink-2);
}
.kc-qty button:hover {
  background: var(--kc-surface-3);
}
.kc-qty span {
  min-width: 22px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}
.kc-captures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.kc-capture {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid var(--kc-line);
  aspect-ratio: 4/3;
  background: var(--kc-surface-3);
  cursor: pointer;
}
.kc-capture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.kc-capture.is-included {
  border-color: var(--kc-accent);
}
.kc-capture__check {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--kc-line-2);
  display: grid;
  place-items: center;
  color: transparent;
}
.kc-capture.is-included .kc-capture__check {
  background: var(--kc-accent);
  border-color: var(--kc-accent);
  color: #fff;
}
.kc-capture__check .kc-icon {
  width: 12px;
  height: 12px;
}
.kc-capture__del {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--kc-ink-2);
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.15s;
}
.kc-capture:hover .kc-capture__del {
  opacity: 1;
}
.kc-capture__del .kc-icon {
  width: 12px;
  height: 12px;
}
.kc-summary__footer {
  border-top: 1px solid var(--kc-line);
  padding: 14px 16px 16px;
  background: var(--kc-surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.kc-totals {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}
.kc-totals__row {
  display: flex;
  justify-content: space-between;
  color: var(--kc-muted);
}
.kc-totals__row.is-grand {
  color: var(--kc-ink);
  font-size: 17px;
  font-weight: 800;
  padding-top: 6px;
  margin-top: 4px;
  border-top: 1px dashed var(--kc-line-2);
  letter-spacing: -0.01em;
}
.kc-totals__row span:last-child {
  font-variant-numeric: tabular-nums;
}
.kc-summary__cta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.kc-fineprint {
  font-size: 11px;
  color: var(--kc-muted);
  text-align: center;
}

/* --------------------------------------------------------------- toasts */
.kc-toasts {
  position: absolute;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 60;
  pointer-events: none;
  width: min(92vw, 420px);
}
.kc-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--kc-ink);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--kc-shadow-lg);
  animation: kc-toast-in 0.2s ease-out;
  max-width: 100%;
}
.kc-toast .kc-icon {
  width: 18px;
  height: 18px;
  flex: none;
}
.kc-toast--success .kc-icon {
  color: #7fd6a3;
}
.kc-toast--error {
  background: var(--kc-danger);
}
.kc-toast--warn {
  background: #8a5a00;
}
.kc-toast.is-leaving {
  animation: kc-toast-out 0.2s ease-in forwards;
}
@keyframes kc-toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
@keyframes kc-toast-out {
  to {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* --------------------------------------------------------------- dialog */
.kc-dialog {
  border: 0;
  padding: 0;
  border-radius: var(--kc-radius-lg);
  box-shadow: var(--kc-shadow-lg);
  width: min(92vw, 420px);
  font-family: var(--kc-font);
  color: var(--kc-ink);
}
.kc-dialog::backdrop {
  background: rgba(28, 27, 25, 0.45);
  backdrop-filter: blur(2px);
}
.kc-dialog__body {
  padding: 24px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.kc-dialog__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--kc-warn-soft);
  color: var(--kc-warn);
  display: grid;
  place-items: center;
  margin-bottom: 6px;
}
.kc-dialog__icon .kc-icon {
  width: 24px;
  height: 24px;
}
.kc-dialog h3 {
  font-size: 17px;
  font-weight: 700;
}
.kc-dialog p {
  color: var(--kc-muted);
  font-size: 14px;
}
.kc-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 24px 20px;
}

/* --------------------------------------------------------- mobile tabbar */
.kc-tabbar {
  display: none;
}
.kc-sheet-backdrop {
  display: none;
}

/* ============================================================ RESPONSIVE */
@media (max-width: 1360px) {
  .kc {
    --kc-catalog-w: 340px;
    --kc-summary-w: 316px;
  }
}
@media (max-width: 1180px) {
  .kc {
    --kc-catalog-w: 316px;
    --kc-summary-w: 296px;
  }
  .kc-brand__sub {
    display: none;
  }
  .kc-steps li span:not(.kc-steps__num) {
    display: none;
  }
  .kc-steps li {
    padding-right: 8px;
  }
  .kc-steps li.is-active span:not(.kc-steps__num) {
    display: inline;
  }
  .kc-steps li.is-active {
    padding-right: 14px;
  }
}
@media (max-width: 1024px) {
  .kc-layouts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .kc-dims {
    grid-template-columns: 1fr;
  }
  .kc-header {
    grid-template-columns: auto 1fr auto;
    padding: 0 14px;
  }
  .kc-header__actions .kc-btn--hide-mobile,
  .kc-header .kc-status {
    display: none;
  }
  .kc-total-pill {
    display: none;
  }
  .kc-designer {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
  }
  .kc-catalog,
  .kc-summary {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 64px;
    height: min(62vh, 560px);
    z-index: 30;
    border: 0;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -12px 40px rgba(28, 27, 25, 0.18);
    transform: translateY(calc(100% + 80px));
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
    overflow: hidden;
  }
  .kc-catalog.is-open,
  .kc-summary.is-open {
    transform: translateY(0);
  }
  .kc-catalog {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }
  .kc-rail {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 10px 8px;
    gap: 6px;
    border-right: 0;
    border-bottom: 1px solid var(--kc-line);
    scrollbar-width: none;
  }
  .kc-rail::-webkit-scrollbar {
    display: none;
  }
  .kc-rail__btn {
    flex: none;
    width: auto;
    flex-direction: row;
    gap: 6px;
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 999px;
  }
  .kc-rail__btn .kc-icon {
    width: 18px;
    height: 18px;
  }
  .kc-rail__btn .kc-rail__count {
    position: static;
    margin-left: 2px;
  }
  .kc-rail__sep {
    width: 1px;
    height: auto;
    margin: 4px 2px;
  }
  .kc-products {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
  .kc-swatches {
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  }
  .kc-sheet-backdrop {
    display: block;
    position: absolute;
    inset: 0;
    background: rgba(28, 27, 25, 0.28);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
    z-index: 25;
  }
  .kc-sheet-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
  }
  .kc-tabbar {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    align-items: center;
    gap: 6px;
    height: 64px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    background: var(--kc-surface);
    border-top: 1px solid var(--kc-line);
    z-index: 35;
    position: relative;
  }
  .kc-tabbar__btn {
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    font-size: 13px;
    color: var(--kc-ink-2);
    background: var(--kc-surface-3);
    position: relative;
  }
  .kc-tabbar__btn.is-active {
    background: var(--kc-ink);
    color: #fff;
  }
  .kc-tabbar__total {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 0 4px 0 8px;
    line-height: 1.1;
  }
  .kc-tabbar__total small {
    font-size: 10px;
    color: var(--kc-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }
  .kc-tabbar__total strong {
    font-size: 15px;
    font-variant-numeric: tabular-nums;
  }
  .kc-tabbar__badge {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--kc-accent);
    color: #fff;
    font-size: 11px;
    display: grid;
    place-items: center;
  }
  .kc-toolbar {
    bottom: 12px;
  }
  .kc-selection {
    left: 10px;
    top: 10px;
    width: min(360px, calc(100% - 20px));
  }
  .kc-hint {
    left: 10px;
    top: 10px;
    max-width: calc(100% - 20px);
  }
  .kc-toasts {
    bottom: 140px;
  }
}
@media (max-width: 640px) {
  .kc-setup {
    padding: 24px 14px 48px;
  }
  .kc-layouts {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .kc-layout-card {
    padding: 12px;
    gap: 8px;
  }
  .kc-layout-card__desc {
    display: none;
  }
  .kc-setup__actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .kc-setup__actions .kc-btn {
    width: 100%;
  }
  .kc-dims__summary {
    grid-template-columns: 1fr;
  }
  .kc-brand__title {
    font-size: 14px;
  }
  .kc-steps li:not(.is-active) {
    padding: 6px;
  }
  .kc-header__actions .kc-btn:not(.kc-btn--icon) span {
    display: none;
  }
  .kc-header__actions .kc-btn:not(.kc-btn--icon) {
    width: 40px;
    padding: 0;
  }
  .kc-toolbar__btn.is-accent span {
    display: none;
  }
  .kc-toolbar__btn.is-accent {
    width: 40px;
    padding: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kc *,
  .kc *::before,
  .kc *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
