/* ============================================================
   ACE UNLOCKS — Key & Fob Part Lookup
   Loads after style.css + pages.css and inherits their tokens.
   ============================================================ */

.kl-section {
  padding: 90px 40px 110px;
  background: var(--bg);
}
.kl-inner {
  max-width: 1000px;
  margin: 0 auto;
}

/* ── Picker ─────────────────────────────────────────────── */
.kl-form {
  display: grid;
  grid-template-columns: repeat(3, 1fr) auto;
  gap: 18px;
  align-items: end;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 10px 40px rgba(26, 26, 26, 0.06);
}
.kl-field-group {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
}
.kl-field-group label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.kl-form select {
  height: 56px;
  width: 100%;
  padding: 0 42px 0 16px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  background-color: var(--bg-off);
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23444'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 22px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.kl-form select:hover:not(:disabled) { background-color: #EAE7E3; }
.kl-form select:focus-visible {
  outline: none;
  border-color: var(--red);
  background-color: var(--white);
}
.kl-form select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  color: var(--text-muted);
}
.kl-form .btn {
  height: 56px;
  padding: 0 34px;
  border: 0;
  white-space: nowrap;
  justify-content: center;
}
.kl-form .btn:disabled {
  background: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* ── Status line ────────────────────────────────────────── */
.kl-status {
  margin: 18px 2px 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-mid);
}
.kl-status-warn { color: var(--red); }

.kl-source {
  margin: 14px 2px 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

/* ── Results ────────────────────────────────────────────── */
.kl-results { margin-top: 48px; }

.kl-chip {
  display: inline-block;
  background: var(--bg-dark);
  color: var(--white);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  padding: 12px 24px;
  border-radius: var(--radius);
  margin-bottom: 26px;
}

.kl-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.kl-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--red);
  border-radius: var(--radius);
  padding: 24px;
}
.kl-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.kl-card-head h3 {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0;
}
.kl-years {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--bg-off);
  padding: 5px 10px;
  border-radius: var(--radius);
  white-space: nowrap;
}

/* Price is what customers scan for, so it gets its own band rather
   than sitting in the list of part numbers. */
.kl-price {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--bg-off);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 18px;
}
.kl-price-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.kl-price-value {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.25;
  /* Prices are free text, so "$285 cut & programmed" has to wrap tidily
     without shrinking a plain "$285". */
  text-wrap: balance;
}

.kl-card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.kl-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.kl-field-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.kl-field-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}

.kl-note {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--text-mid);
}

/* ── Nothing on file yet ────────────────────────────────── */
.kl-empty {
  grid-column: 1 / -1;
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--yellow);
  border-radius: var(--radius);
  padding: 34px;
}
.kl-empty h3 {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.kl-empty p {
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.7;
  color: var(--text-mid);
  max-width: 60ch;
  margin: 0 0 24px;
}

/* ── Disclaimer ─────────────────────────────────────────── */
.kl-disclaimer {
  margin-top: 44px;
  padding: 26px 30px;
  background: var(--bg-off);
  border-radius: var(--radius);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.7;
  color: var(--text-mid);
}
.kl-disclaimer strong { color: var(--text); font-weight: 800; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .kl-form { grid-template-columns: 1fr 1fr; }
  .kl-form .btn { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .kl-section { padding: 60px 20px 80px; }
  .kl-form { grid-template-columns: 1fr; padding: 22px; gap: 16px; }
  .kl-cards { grid-template-columns: 1fr; }
  .kl-chip { font-size: 0.95rem; padding: 10px 18px; }
  .kl-empty { padding: 26px 22px; }
  .kl-disclaimer { padding: 22px; }
}
