/**
 * Medical Kit Builder — Frontend Stylesheet (Aurix Redesign)
 * @package Medical_Kit_Builder
 */

/* ── GOOGLE FONTS ── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Outfit:wght@400;500;600;700&display=swap');

/* ── DESIGN TOKENS ─────────────────────────────────────────────── */
#mkb-wrap {
  --navy:      #111827;
  --navy-2:    #1e2b42;
  --gold:      #c9a84c;
  --gold-dark: #a9853a;
  --gold-pale: #faf5e8;
  --off:       #f7f6f2;
  --white:     #ffffff;
  --text:      #5b5f66;
  --text-dark: #1f2430;
  --border:    #e7e3da;
  --border-2:  #d8d2c4;
  --success:   #1d9e75;
  --danger:    #e24b4a;
  --warning:   #f59e0b;
  --radius:    14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 10px rgba(17,24,39,.05);
  --shadow:    0 8px 30px rgba(17,24,39,.08);
  --shadow-lg: 0 20px 60px rgba(17,24,39,.14);

  font-family: 'Outfit', system-ui, sans-serif;
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background: var(--off);
}
#mkb-wrap *, #mkb-wrap *::before, #mkb-wrap *::after { box-sizing: border-box; }
#mkb-wrap a { color: inherit; }
#mkb-wrap button { font-family: 'Outfit', sans-serif; }

/* ── HEADER ─────────────────────────────────────────────────────── */
#mkb-wrap .kb-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 28px 24px;
  margin: 0 0 0 0;
}
#mkb-wrap .kb-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  max-width: 1360px;
  margin: 0 auto;
}
#mkb-wrap .kb-eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 6px;
}
#mkb-wrap .kb-h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 600;
  color: var(--text-dark);
  letter-spacing: -.3px;
  line-height: 1.1;
  margin: 0 0 6px;
}
#mkb-wrap .kb-h1 em { font-style: italic; color: var(--gold-dark); }
#mkb-wrap .kb-header-sub { font-size: 13.5px; color: var(--text); margin: 0; max-width: 520px; }

/* ── STEP RAIL ──────────────────────────────────────────────────── */
#mkb-wrap .step-rail {
  display: flex;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}
#mkb-wrap .step {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 18px 9px 10px;
  border-radius: 100px;
  transition: background .3s, color .3s;
}
#mkb-wrap .step-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--border-2);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px; font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
  transition: all .3s;
}
#mkb-wrap .step-label { font-size: 12.5px; font-weight: 600; color: var(--text); white-space: nowrap; }
#mkb-wrap .step-arrow { color: var(--border-2); font-size: 14px; padding: 0 2px; }

#mkb-wrap .step.active { background: var(--gold-pale); }
#mkb-wrap .step.active .step-num { background: var(--gold); border-color: var(--gold); color: #fff; }
#mkb-wrap .step.active .step-label { color: var(--text-dark); }
#mkb-wrap .step.done .step-num { background: var(--success); border-color: var(--success); color: #fff; content: '✓'; }
#mkb-wrap .step.done .step-num::after { content: '✓'; font-family: sans-serif; font-size: 12px; }
#mkb-wrap .step.done .step-num span { display: none; }

/* ── SEARCH SECTION ─────────────────────────────────────────────── */
#mkb-wrap .kb-search-section {
  padding: 28px 24px 0;
  max-width: 1360px;
  margin: 0 auto;
}
#mkb-wrap .kb-search-box {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
#mkb-wrap .kb-search-row { display: flex; gap: 10px; }
#mkb-wrap .kb-search-input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}
#mkb-wrap .kb-search-input-wrap svg {
  position: absolute; left: 16px;
  width: 18px; height: 18px;
  stroke: var(--text); opacity: .5;
  pointer-events: none;
}
#mkb-wrap .kb-search-input {
  width: 100%;
  padding: 15px 16px 15px 46px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  color: var(--text-dark);
  outline: none;
  background: var(--off);
  transition: border-color .2s, box-shadow .2s;
}
#mkb-wrap .kb-search-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(201,168,76,.15);
  background: #fff;
}
#mkb-wrap .kb-search-btn {
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0 28px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  transition: background .2s, transform .15s;
  white-space: nowrap;
}
#mkb-wrap .kb-search-btn:hover { background: var(--navy-2); transform: translateY(-1px); }
#mkb-wrap .kb-search-btn svg { width: 16px; height: 16px; }

#mkb-wrap .kb-chips-label { font-size: 12px; color: var(--text); margin: 16px 0 8px; font-weight: 500; }
#mkb-wrap .kb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
#mkb-wrap .kb-chip {
  background: var(--off);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 7px 15px;
  font-size: 12.5px; font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  transition: all .2s;
  user-select: none;
}
#mkb-wrap .kb-chip:hover { background: var(--gold-pale); border-color: var(--gold); color: var(--gold-dark); }

#mkb-wrap .kb-search-meta {
  font-size: 11.5px;
  color: var(--text);
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
#mkb-wrap .kb-search-meta span { opacity: .75; }

/* ── MAIN LAYOUT ────────────────────────────────────────────────── */
#mkb-wrap .kb-main {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
  padding: 24px 24px 60px;
  max-width: 1360px;
  margin: 0 auto;
}

/* ── RESULTS ────────────────────────────────────────────────────── */
#mkb-wrap .kb-results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
#mkb-wrap .kb-results-title { font-size: 13px; font-weight: 700; color: var(--text-dark); text-transform: uppercase; letter-spacing: .5px; }
#mkb-wrap .kb-results-count { font-size: 12px; color: var(--text); }

#mkb-wrap .kb-results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

/* Result cards */
#mkb-wrap .kb-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow .25s, transform .25s;
}
#mkb-wrap .kb-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
#mkb-wrap .kb-card-img {
  background: var(--off);
  border-radius: var(--radius-sm);
  height: 110px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
#mkb-wrap .kb-card-img img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
#mkb-wrap .kb-card-img svg { width: 36px; height: 36px; stroke: var(--border-2); }
#mkb-wrap .kb-card-name { font-size: 13px; font-weight: 700; color: var(--text-dark); line-height: 1.35; flex: 1; }
#mkb-wrap .kb-card-source { font-size: 11px; color: var(--text); }
#mkb-wrap .kb-card-desc { font-size: 11.5px; color: var(--text); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#mkb-wrap .kb-card-add {
  margin-top: auto;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--off);
  border: 1.5px solid var(--border);
  color: var(--text-dark);
  font-size: 12.5px; font-weight: 700;
  border-radius: var(--radius-sm);
  padding: 9px;
  cursor: pointer;
  transition: all .2s;
  width: 100%;
}
#mkb-wrap .kb-card-add svg { width: 13px; height: 13px; }
#mkb-wrap .kb-card-add:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
#mkb-wrap .kb-card-add.added { background: var(--success); border-color: var(--success); color: #fff; }
#mkb-wrap .kb-card-link { font-size: 11px; color: var(--gold-dark); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
#mkb-wrap .kb-card-link:hover { text-decoration: underline; }

/* Skeleton loaders */
#mkb-wrap .kb-card-skeleton { pointer-events: none; }
#mkb-wrap .kb-skel {
  background: linear-gradient(90deg, #ede9e1 25%, #f5f2ec 50%, #ede9e1 75%);
  background-size: 200% 100%;
  animation: mkb-shimmer 1.4s infinite;
  border-radius: 6px;
}
#mkb-wrap .kb-skel-line { height: 14px; margin-bottom: 6px; }
#mkb-wrap .kb-skel-btn { height: 38px; border-radius: var(--radius-sm); margin-top: 8px; }
@keyframes mkb-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── EMPTY STATE ─────────────────────────────────────────────────── */
#mkb-wrap .kb-empty {
  background: var(--white);
  border: 1.5px dashed var(--border-2);
  border-radius: var(--radius-lg);
  padding: 56px 24px;
  text-align: center;
}
#mkb-wrap .kb-empty svg { width: 44px; height: 44px; stroke: var(--border-2); margin-bottom: 16px; display: block; margin-left: auto; margin-right: auto; }
#mkb-wrap .kb-empty-title { font-family: 'Cormorant Garamond', serif; font-size: 22px; font-weight: 600; color: var(--text-dark); margin-bottom: 8px; }
#mkb-wrap .kb-empty-desc { font-size: 13.5px; color: var(--text); max-width: 340px; margin: 0 auto; }

/* ── PAGINATION ──────────────────────────────────────────────────── */
#mkb-wrap .kb-pagination {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  margin-top: 24px; padding: 16px 0;
  font-size: 13px; color: var(--text);
}
#mkb-wrap .kb-page-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 9px 18px;
  font-size: 13px; font-weight: 600; color: var(--text-dark);
  cursor: pointer; transition: all .2s;
}
#mkb-wrap .kb-page-btn:hover:not(:disabled) { border-color: var(--navy); background: var(--off); }
#mkb-wrap .kb-page-btn:disabled { opacity: .4; cursor: default; }
#mkb-wrap .kb-page-btn svg { width: 14px; height: 14px; }

/* ── KIT PANEL ───────────────────────────────────────────────────── */
#mkb-wrap .kit-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 20px;
  overflow: hidden;
}
#mkb-wrap .kit-panel-head {
  background: var(--navy);
  color: #fff;
  padding: 18px 20px;
  display: flex; align-items: center; justify-content: space-between;
}
#mkb-wrap .kit-panel-title { display: flex; align-items: center; gap: 9px; font-size: 14.5px; font-weight: 700; }
#mkb-wrap .kit-panel-title svg { width: 17px; height: 17px; stroke: var(--gold); }
#mkb-wrap .kit-count {
  background: var(--gold); color: var(--navy);
  font-size: 11.5px; font-weight: 800;
  border-radius: 100px; padding: 2px 9px;
  min-width: 20px; text-align: center;
  transition: transform .2s;
}
#mkb-wrap .kit-panel-explain {
  background: var(--gold-pale);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  font-size: 12px; color: #7a5f2b; line-height: 1.6;
}
#mkb-wrap .kit-panel-explain b { color: var(--gold-dark); }

#mkb-wrap .kit-list { max-height: 360px; overflow-y: auto; }
#mkb-wrap .kit-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
#mkb-wrap .kit-item:hover { background: var(--off); }
#mkb-wrap .kit-item-thumb {
  width: 40px; height: 40px;
  background: var(--off); border-radius: 8px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
#mkb-wrap .kit-item-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
#mkb-wrap .kit-item-thumb svg { width: 18px; height: 18px; stroke: var(--border-2); }
#mkb-wrap .kit-item-info { flex: 1; min-width: 0; }
#mkb-wrap .kit-item-name { font-size: 12px; font-weight: 700; color: var(--text-dark); line-height: 1.3; }
#mkb-wrap .kit-item-source { font-size: 10.5px; color: var(--text); margin-top: 1px; }
#mkb-wrap .kit-item-qty-row { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
#mkb-wrap .kit-qty-btn {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--off);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 15px; line-height: 1; color: var(--text-dark);
  transition: all .15s;
}
#mkb-wrap .kit-qty-btn:hover { border-color: var(--navy); background: var(--navy); color: #fff; }
#mkb-wrap .kit-qty-val { font-size: 12px; font-weight: 700; color: var(--text-dark); min-width: 20px; text-align: center; }
#mkb-wrap .kit-item-remove {
  background: none; border: none; color: var(--border-2);
  cursor: pointer; padding: 4px; flex-shrink: 0;
  transition: color .2s;
}
#mkb-wrap .kit-item-remove:hover { color: var(--danger); }
#mkb-wrap .kit-item-remove svg { width: 15px; height: 15px; display: block; }

#mkb-wrap .kit-empty-mini { padding: 36px 20px; text-align: center; }
#mkb-wrap .kit-empty-mini svg { width: 32px; height: 32px; stroke: var(--border-2); margin: 0 auto 10px; display: block; }
#mkb-wrap .kit-empty-mini p { font-size: 12.5px; color: var(--text); max-width: 220px; margin: 0 auto; }

/* Kit actions */
#mkb-wrap .kit-panel-actions { padding: 14px 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
#mkb-wrap .kit-action-row { display: flex; gap: 8px; }
#mkb-wrap .kit-btn {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px; border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 700;
  cursor: pointer; border: 1.5px solid var(--border);
  background: #fff; color: var(--text-dark);
  transition: all .2s;
}
#mkb-wrap .kit-btn:hover:not(:disabled) { border-color: var(--navy); background: var(--off); }
#mkb-wrap .kit-btn:disabled { opacity: .4; cursor: not-allowed; }
#mkb-wrap .kit-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
#mkb-wrap .kit-btn-primary {
  width: 100%; flex: unset;
  background: var(--gold); border-color: var(--gold); color: var(--navy);
}
#mkb-wrap .kit-btn-primary:hover:not(:disabled) { background: var(--gold-dark); border-color: var(--gold-dark); color: #fff; }
#mkb-wrap .kit-btn-ghost { background: var(--off); color: var(--text-dark); border-color: var(--border); }

/* Saved kits dropdown */
#mkb-wrap #mkbSavedKitsList {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden; margin-top: 4px; max-height: 200px; overflow-y: auto;
}
#mkb-wrap .mkb-saved-kit-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-bottom: 1px solid var(--border);
  font-size: 12px;
}
#mkb-wrap .mkb-saved-kit-row:last-child { border-bottom: none; }
#mkb-wrap .mkb-saved-kit-name { flex: 1; font-weight: 600; color: var(--text-dark); }
#mkb-wrap .mkb-saved-kit-date { font-size: 10.5px; color: var(--text); }
#mkb-wrap .mkb-btn-sm {
  background: var(--navy); color: #fff; border: none; border-radius: 6px;
  padding: 4px 10px; font-size: 11px; font-weight: 700; cursor: pointer;
}
#mkb-wrap .mkb-no-saved { padding: 14px; font-size: 12px; color: var(--text); text-align: center; }

/* ── MOBILE FAB ──────────────────────────────────────────────────── */
#mkb-wrap .kit-fab { display: none; }

/* ── MODAL ───────────────────────────────────────────────────────── */
#mkb-wrap .mkb-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(17,24,39,.6);
  display: none;
  align-items: center; justify-content: center;
  z-index: 99999; padding: 20px;
}
#mkb-wrap .mkb-modal-overlay.mkb-modal-active { display: flex; }
#mkb-wrap .mkb-modal-overlay[hidden] { display: none !important; }
#mkb-wrap .mkb-modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 600px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: mkb-modal-in .2s ease;
}
@keyframes mkb-modal-in { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
#mkb-wrap .mkb-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--gold-pale);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
#mkb-wrap .mkb-modal-header h3 { margin: 0; color: var(--navy); font-family: 'Cormorant Garamond', serif; font-size: 22px; font-weight: 600; }
#mkb-wrap .mkb-modal-close {
  background: none; border: none; cursor: pointer; padding: 4px;
  color: var(--text); transition: color .2s;
}
#mkb-wrap .mkb-modal-close:hover { color: var(--danger); }
#mkb-wrap .mkb-modal-close svg { width: 20px; height: 20px; display: block; }
#mkb-wrap .mkb-modal-body { padding: 24px; }
#mkb-wrap .mkb-modal-intro { color: var(--text); font-size: 13.5px; margin: 0 0 20px; }
#mkb-wrap .mkb-modal-footer {
  display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--off);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
#mkb-wrap .mkb-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
#mkb-wrap .mkb-form-group { display: flex; flex-direction: column; gap: 6px; }
#mkb-wrap .mkb-full { grid-column: 1 / -1; margin-bottom: 14px; }
#mkb-wrap .mkb-form-group label { font-size: 12.5px; font-weight: 600; color: var(--text-dark); }
#mkb-wrap .mkb-req { color: var(--danger); }
#mkb-wrap .mkb-form-group input,
#mkb-wrap .mkb-form-group textarea {
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif; font-size: 14px; color: var(--text-dark);
  background: var(--off); outline: none;
  transition: border-color .2s, box-shadow .2s;
}
#mkb-wrap .mkb-form-group input:focus,
#mkb-wrap .mkb-form-group textarea:focus {
  border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,76,.15); background: #fff;
}
#mkb-wrap .mkb-form-group textarea { resize: vertical; min-height: 80px; }

#mkb-wrap .mkb-rfq-message {
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 500; margin-bottom: 16px;
  border-left: 4px solid currentColor;
  animation: mkb-fade-in .2s ease;
}
@keyframes mkb-fade-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
#mkb-wrap .mkb-rfq-message.mkb-msg-success { background: #e8f5e9; color: #1b5e20; }
#mkb-wrap .mkb-rfq-message.mkb-msg-error   { background: #ffeaea; color: #b71c1c; }
#mkb-wrap .mkb-rfq-message.mkb-msg-info    { background: #e3f2fd; color: #0d47a1; }

#mkb-wrap .mkb-rfq-kit-summary { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--border); }
#mkb-wrap .mkb-rfq-kit-summary h4 { margin: 0 0 10px; font-size: 12px; color: var(--text); text-transform: uppercase; letter-spacing: .5px; font-weight: 700; }
#mkb-wrap .mkb-rfq-summary-scroll { max-height: 170px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
#mkb-wrap .mkb-rfq-kit-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; font-size: 12.5px; border-bottom: 1px solid var(--border); }
#mkb-wrap .mkb-rfq-kit-item:last-child { border-bottom: none; }
#mkb-wrap .mkb-rfq-item-num { font-weight: 700; color: var(--text); min-width: 20px; }
#mkb-wrap .mkb-rfq-item-name { flex: 1; color: var(--text-dark); font-weight: 500; }
#mkb-wrap .mkb-rfq-item-qty { color: var(--text); white-space: nowrap; }

#mkb-wrap .mkb-btn {
  padding: 11px 24px; border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif; font-size: 13.5px; font-weight: 700;
  cursor: pointer; transition: all .2s; border: 1.5px solid transparent;
}
#mkb-wrap .mkb-btn-outline { background: #fff; border-color: var(--border); color: var(--text-dark); }
#mkb-wrap .mkb-btn-outline:hover { border-color: var(--navy); }
#mkb-wrap .mkb-btn-primary { background: var(--gold); border-color: var(--gold); color: var(--navy); }
#mkb-wrap .mkb-btn-primary:hover:not(:disabled) { background: var(--gold-dark); border-color: var(--gold-dark); color: #fff; }
#mkb-wrap .mkb-btn-primary:disabled { opacity: .5; cursor: not-allowed; }

/* ── TOAST ───────────────────────────────────────────────────────── */
#mkb-wrap .mkb-toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--navy); color: #fff;
  padding: 12px 22px; border-radius: 100px;
  font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none;
  transition: all .3s; z-index: 100000;
  display: flex; align-items: center; gap: 8px;
  white-space: nowrap;
}
#mkb-wrap .mkb-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#mkb-wrap .mkb-toast svg { width: 14px; height: 14px; stroke: var(--gold); flex-shrink: 0; }
#mkb-wrap .mkb-toast.mkb-toast-error { background: var(--danger); }
#mkb-wrap .mkb-toast.mkb-toast-error svg { stroke: #fff; }

/* ── RESPONSIVE ──────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  #mkb-wrap .kb-results-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  #mkb-wrap .kb-main { grid-template-columns: 1fr; }
  #mkb-wrap .kit-panel {
    position: fixed;
    left: 0; right: 0; bottom: 0; top: auto;
    max-height: 0; opacity: 0; pointer-events: none;
    transition: max-height .35s ease, opacity .3s;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border-bottom: none;
    z-index: 50;
  }
  #mkb-wrap .kit-panel.mkb-panel-open {
    max-height: 80vh; opacity: 1; pointer-events: auto; overflow-y: auto;
  }
  #mkb-wrap .kit-fab {
    display: flex;
    position: fixed; right: 16px; bottom: 16px; z-index: 51;
    background: var(--navy); color: #fff;
    border: none; border-radius: 100px;
    padding: 14px 20px;
    align-items: center; gap: 9px;
    font-size: 13px; font-weight: 700;
    box-shadow: var(--shadow-lg); cursor: pointer;
  }
  #mkb-wrap .kit-fab svg { width: 16px; height: 16px; stroke: var(--gold); }
  #mkb-wrap .kit-fab-count { background: var(--gold); color: var(--navy); border-radius: 100px; padding: 1px 8px; font-size: 11px; }
}
@media (max-width: 760px) {
  #mkb-wrap .kb-header { padding: 20px 16px; }
  #mkb-wrap .step-rail { width: 100%; justify-content: space-between; }
  #mkb-wrap .step { padding: 9px; }
  #mkb-wrap .step-label { display: none; }
  #mkb-wrap .kb-search-section { padding: 16px 16px 0; }
  #mkb-wrap .kb-main { padding: 16px 16px 100px; }
  #mkb-wrap .kb-results-grid { grid-template-columns: repeat(2, 1fr); }
  #mkb-wrap .mkb-form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  #mkb-wrap .kb-results-grid { grid-template-columns: 1fr; }
  #mkb-wrap .kb-search-row { flex-direction: column; }
  #mkb-wrap .kb-search-btn { padding: 14px; width: 100%; justify-content: center; }
}


/* ══════════════════════════════════════════════════════════════════
   ALTERNATIVE INPUT — Paste Link + Drag & Drop Photo (Redesign)
   All rules scoped under #mkb-wrap to beat theme specificity.
   ══════════════════════════════════════════════════════════════════ */

/* ── Section wrapper ── */
#mkb-wrap .kb-alt-inputs {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1.5px dashed var(--border-2);
}
#mkb-wrap .kb-alt-inputs-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text);
  margin-bottom: 12px;
}

/* ── Tab row ── */
#mkb-wrap .kb-alt-tabs {
  display: flex !important;
  flex-direction: row !important;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
#mkb-wrap .kb-alt-tab {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  padding: 9px 18px !important;
  border-radius: 100px !important;
  border: 1.5px solid var(--border) !important;
  background: var(--white) !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--text-dark) !important;
  cursor: pointer !important;
  transition: all .2s !important;
  line-height: 1 !important;
  text-decoration: none !important;
  box-shadow: none !important;
  outline: none !important;
  min-height: unset !important;
  width: auto !important;
  white-space: nowrap;
}
#mkb-wrap .kb-alt-tab svg {
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  flex-shrink: 0 !important;
  stroke: var(--text) !important;
  fill: none !important;
  display: inline-block !important;
  vertical-align: middle !important;
  transition: stroke .2s;
}
#mkb-wrap .kb-alt-tab:hover {
  border-color: var(--gold) !important;
  background: var(--gold-pale) !important;
  color: var(--gold-dark) !important;
}
#mkb-wrap .kb-alt-tab:hover svg { stroke: var(--gold-dark) !important; }
#mkb-wrap .kb-alt-tab.active {
  background: var(--navy) !important;
  border-color: var(--navy) !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(17,24,39,.18) !important;
}
#mkb-wrap .kb-alt-tab.active svg { stroke: var(--gold) !important; }

/* ── Panel base ── */
#mkb-wrap .kb-alt-panel {
  animation: mkb-fade-in .2s ease;
}
#mkb-wrap .kb-alt-hint {
  font-size: 13px;
  color: var(--text);
  margin: 0 0 16px;
  line-height: 1.6;
  background: var(--gold-pale);
  border-left: 3px solid var(--gold);
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ── URL paste panel ── */
#mkb-wrap .kb-url-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
#mkb-wrap .kb-url-input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}
#mkb-wrap .kb-url-input-wrap > svg {
  position: absolute;
  left: 14px;
  width: 16px !important;
  height: 16px !important;
  stroke: var(--text) !important;
  fill: none !important;
  opacity: .45;
  pointer-events: none;
  flex-shrink: 0;
  top: 50%;
  transform: translateY(-50%);
}
#mkb-wrap .kb-url-input-wrap input[type="url"],
#mkb-wrap .kb-url-input-wrap input[type="text"] {
  width: 100%;
  padding: 13px 14px 13px 44px !important;
  border: 1.5px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 13.5px !important;
  color: var(--text-dark) !important;
  background: var(--off) !important;
  outline: none !important;
  box-shadow: none !important;
  transition: border-color .2s, box-shadow .2s;
  line-height: normal !important;
}
#mkb-wrap .kb-url-input-wrap input:focus {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px rgba(201,168,76,.15) !important;
  background: #fff !important;
}
#mkb-wrap .kb-url-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  padding: 0 22px !important;
  height: 48px !important;
  background: var(--gold) !important;
  border: none !important;
  border-radius: var(--radius-sm) !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  color: var(--navy) !important;
  cursor: pointer !important;
  white-space: nowrap;
  transition: all .2s !important;
  flex-shrink: 0;
  line-height: 1 !important;
}
#mkb-wrap .kb-url-btn:hover:not(:disabled) { background: var(--gold-dark) !important; color: #fff !important; }
#mkb-wrap .kb-url-btn:disabled { opacity: .55 !important; cursor: not-allowed !important; }
#mkb-wrap .kb-url-btn svg {
  width: 15px !important;
  height: 15px !important;
  stroke: currentColor !important;
  fill: none !important;
}

/* URL result card */
#mkb-wrap .kb-url-result { margin-top: 16px; animation: mkb-fade-in .2s ease; }
#mkb-wrap .kb-url-result-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  background: #fff;
}
#mkb-wrap .kb-url-result-card.success { border-color: #a3d9b1; background: #f0faf5; }
#mkb-wrap .kb-url-result-card.error   { border-color: #f5b8b8; background: #fff5f5; }
#mkb-wrap .kb-url-result-thumb {
  width: 80px; height: 80px; flex-shrink: 0;
  border-radius: 10px; overflow: hidden;
  background: var(--off); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
#mkb-wrap .kb-url-result-thumb img {
  width: 100% !important; height: 100% !important;
  object-fit: contain !important; padding: 6px;
  display: block !important;
}
#mkb-wrap .kb-url-result-thumb svg {
  width: 28px !important; height: 28px !important;
  stroke: var(--border-2) !important; fill: none !important;
}
#mkb-wrap .kb-url-result-body { flex: 1; min-width: 0; }
#mkb-wrap .kb-url-result-title { font-size: 14px; font-weight: 700; color: var(--text-dark); margin: 0 0 4px; line-height: 1.3; }
#mkb-wrap .kb-url-result-source { font-size: 11.5px; color: var(--text); margin-bottom: 6px; }
#mkb-wrap .kb-url-result-desc {
  font-size: 12.5px; color: var(--text); line-height: 1.5; margin-bottom: 12px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
#mkb-wrap .kb-url-result-error { font-size: 13px; color: var(--danger); font-weight: 500; }
#mkb-wrap .kb-url-add-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 9px 18px !important;
  background: var(--navy) !important;
  border: none !important;
  border-radius: 8px !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  color: #fff !important;
  cursor: pointer !important;
  transition: all .2s !important;
  line-height: 1 !important;
}
#mkb-wrap .kb-url-add-btn:hover:not(:disabled) { background: var(--navy-2) !important; }
#mkb-wrap .kb-url-add-btn.added { background: var(--success) !important; }
#mkb-wrap .kb-url-add-btn svg { width: 13px !important; height: 13px !important; stroke: currentColor !important; fill: none !important; }

/* ── Drop zone ── */
#mkb-wrap .kb-drop-zone {
  border: 2.5px dashed var(--border-2);
  border-radius: var(--radius-lg);
  background: var(--off);
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color .25s, background .25s, transform .2s;
  position: relative;
  overflow: hidden;
}
#mkb-wrap .kb-drop-zone:hover,
#mkb-wrap .kb-drop-zone:focus-visible { border-color: var(--gold); background: var(--gold-pale); outline: none; }
#mkb-wrap .kb-drop-zone.dragover { border-color: var(--gold); background: var(--gold-pale); transform: scale(1.01); }
#mkb-wrap .kb-drop-inner { text-align: center; padding: 36px 24px; pointer-events: none; width: 100%; }
#mkb-wrap .kb-drop-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--white); border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
  box-shadow: var(--shadow-sm);
}
#mkb-wrap .kb-drop-icon svg {
  width: 24px !important; height: 24px !important;
  stroke: var(--text) !important; fill: none !important;
}
#mkb-wrap .kb-drop-title { font-size: 14.5px; font-weight: 700; color: var(--text-dark); margin-bottom: 6px; }
#mkb-wrap .kb-drop-sub   { font-size: 12.5px; color: var(--text); margin-bottom: 12px; }
#mkb-wrap .kb-drop-browse {
  display: inline-block !important;
  background: var(--navy) !important;
  color: #fff !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  padding: 9px 20px !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  pointer-events: all !important;
  transition: background .2s !important;
  margin-bottom: 10px !important;
  border: none !important;
  line-height: normal !important;
}
#mkb-wrap .kb-drop-browse:hover { background: var(--navy-2) !important; }
#mkb-wrap .kb-drop-formats { font-size: 11px; color: var(--text); opacity: .65; }

/* Drop zone — accepted state */
#mkb-wrap .kb-drop-zone.has-file { border-style: solid; border-color: var(--gold); background: var(--gold-pale); }

/* Drop preview */
#mkb-wrap .kb-drop-preview {
  width: 100%; padding: 24px 20px;
  text-align: center; animation: mkb-fade-in .25s ease;
}
#mkb-wrap .kb-drop-preview img {
  max-height: 150px !important; max-width: 100% !important;
  border-radius: var(--radius-sm) !important;
  object-fit: contain !important; display: block !important;
  margin: 0 auto 12px !important;
  border: 1.5px solid var(--border) !important;
  background: #fff !important; padding: 6px !important;
}
#mkb-wrap .kb-drop-preview-info {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; margin-bottom: 14px; font-size: 12px; color: var(--text);
}
#mkb-wrap .kb-drop-clear {
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  background: none !important; border: 1.5px solid var(--border) !important;
  border-radius: 50% !important; width: 22px !important; height: 22px !important;
  cursor: pointer !important; color: var(--text) !important;
  padding: 0 !important; transition: all .2s !important; flex-shrink: 0;
}
#mkb-wrap .kb-drop-clear:hover { border-color: var(--danger) !important; color: var(--danger) !important; }
#mkb-wrap .kb-drop-clear svg { width: 11px !important; height: 11px !important; stroke: currentColor !important; fill: none !important; display: block !important; }
#mkb-wrap .kb-drop-search-btn {
  display: inline-flex !important; align-items: center !important;
  gap: 8px !important; padding: 12px 26px !important;
  background: var(--gold) !important; border: none !important;
  border-radius: var(--radius-sm) !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 14px !important; font-weight: 700 !important;
  color: var(--navy) !important; cursor: pointer !important;
  transition: all .2s !important; line-height: 1 !important;
}
#mkb-wrap .kb-drop-search-btn:hover:not(:disabled) { background: var(--gold-dark) !important; color: #fff !important; }
#mkb-wrap .kb-drop-search-btn:disabled { opacity: .6 !important; cursor: not-allowed !important; }
#mkb-wrap .kb-drop-search-btn svg { width: 16px !important; height: 16px !important; stroke: currentColor !important; fill: none !important; }

/* Image result area */
#mkb-wrap .kb-image-result { margin-top: 16px; animation: mkb-fade-in .2s ease; }
#mkb-wrap .kb-image-result-label {
  font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
  color: var(--text); margin-bottom: 12px;
  display: flex; align-items: center; gap: 6px;
}

/* Manual entry fallback */
#mkb-wrap .kb-manual-entry {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 14px;
}
#mkb-wrap .kb-manual-entry h4 {
  font-size: 13.5px; font-weight: 700;
  color: var(--text-dark); margin: 0 0 16px;
  display: flex; align-items: center; gap: 7px;
}
#mkb-wrap .kb-manual-row { display: flex; gap: 12px; margin-bottom: 12px; }
#mkb-wrap .kb-manual-field { flex: 1; display: flex; flex-direction: column; gap: 5px; }
#mkb-wrap .kb-manual-field label { font-size: 12px; font-weight: 600; color: var(--text-dark); }
#mkb-wrap .kb-manual-field input[type="text"],
#mkb-wrap .kb-manual-field input[type="url"] {
  padding: 10px 12px !important;
  border: 1.5px solid var(--border) !important;
  border-radius: 8px !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 13px !important;
  color: var(--text-dark) !important;
  background: var(--off) !important;
  outline: none !important;
  box-shadow: none !important;
}
#mkb-wrap .kb-manual-field input:focus { border-color: var(--gold) !important; background: #fff !important; }
#mkb-wrap .kb-manual-add-btn {
  display: inline-flex !important; align-items: center !important;
  gap: 8px !important; padding: 11px 22px !important;
  background: var(--navy) !important; border: none !important;
  border-radius: 8px !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 13.5px !important; font-weight: 700 !important;
  color: #fff !important; cursor: pointer !important;
  transition: background .2s !important; line-height: 1 !important;
}
#mkb-wrap .kb-manual-add-btn:hover { background: var(--navy-2) !important; }
#mkb-wrap .kb-manual-add-btn:disabled { opacity: .6 !important; cursor: not-allowed !important; }
#mkb-wrap .kb-manual-add-btn svg { width: 14px !important; height: 14px !important; stroke: currentColor !important; fill: none !important; }

/* ── Responsive ── */
@media (max-width: 640px) {
  #mkb-wrap .kb-alt-tab { padding: 8px 13px !important; font-size: 12px !important; }
  #mkb-wrap .kb-url-row { flex-direction: column; gap: 8px; }
  #mkb-wrap .kb-url-btn { width: 100% !important; height: 46px !important; justify-content: center !important; }
  #mkb-wrap .kb-manual-row { flex-direction: column; gap: 8px; }
  #mkb-wrap .kb-url-result-card { flex-direction: column; }
  #mkb-wrap .kb-url-result-thumb { width: 100% !important; height: 140px !important; }
}
