/* tigerauto.kz — kasa filtresi + karo listesi */

:root {
  --kf-accent: #f6921e;   /* temanizdaki turuncu */
  --kf-border: #e4e4e4;
  --kf-bg: #fafafa;
  --kf-text: #333;
  --kf-muted: #8a8a8a;
}

/* ---------- filtre bari ---------- */

.kf-bar {
  clear: both;
  background: var(--kf-bg);
  border: 1px solid var(--kf-border);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 0 0 20px;
}

.kf-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.kf-row + .kf-row {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--kf-border);
}

.kf-label { min-width: 56px; font-size: 13px; color: var(--kf-muted); }

.kf-chip {
  height: 32px;
  padding: 0 14px;
  font-size: 14px;
  line-height: 1;
  color: var(--kf-text);
  background: #fff;
  border: 1px solid var(--kf-border);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}

.kf-chip:hover { border-color: var(--kf-accent); }

.kf-chip.is-on {
  background: var(--kf-accent);
  border-color: var(--kf-accent);
  color: #fff;
}

.kf-input {
  height: 32px;
  padding: 0 10px;
  font-size: 14px;
  color: var(--kf-text);
  background: #fff;
  border: 1px solid var(--kf-border);
  border-radius: 4px;
}

.kf-q {
  flex: 1 1 auto;
  max-width: 460px;
  height: 42px;
  padding: 0 14px 0 38px;
  font-size: 15px;
  border: 2px solid var(--kf-border);
  border-radius: 6px;
  background: #fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%238a8a8a' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 12px center;
}

.kf-q:focus {
  border-color: var(--kf-accent);
  outline: none;
}

.kf-q::placeholder { color: #aaa; }

.kf-count { margin-left: auto; font-size: 13px; color: var(--kf-muted); }

.kf-clear {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  color: var(--kf-muted);
  background: none;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
}

.kf-clear:hover { color: var(--kf-text); border-color: var(--kf-border); }

.kf-chip:focus-visible,
.kf-input:focus-visible,
.kf-clear:focus-visible,
.kf-tile:focus-visible {
  outline: 2px solid var(--kf-accent);
  outline-offset: 2px;
}

/* ---------- karo listesi ---------- */

.kf-grid {
  clear: both;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.kf-tile {
  display: block;
  padding: 12px;
  text-align: center;
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--kf-border);
  border-radius: 8px;
  transition: border-color .15s, box-shadow .15s;
}

.kf-tile:hover,
.kf-tile:focus {
  text-decoration: none;
  border-color: var(--kf-accent);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .07);
}

.kf-img {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 96px;
  margin-bottom: 8px;
}

.kf-img img {
  max-width: 100%;
  max-height: 96px;
  width: auto;
  height: auto;
}

.kf-img--empty { background: var(--kf-bg); border-radius: 4px; }

.kf-name {
  display: block;
  font-size: 14px;
  line-height: 1.3;
  color: var(--kf-text);
}

.kf-tile:hover .kf-name { color: var(--kf-accent); }

.kf-empty {
  padding: 36px 16px;
  text-align: center;
  font-size: 15px;
  color: var(--kf-muted);
}

/* ---------- mobil: chip satirlari yatay kayar ---------- */

@media (max-width: 767px) {
  .kf-bar { padding: 12px; }

  .kf-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .kf-row::-webkit-scrollbar { display: none; }

  .kf-label {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--kf-bg);
    padding-right: 4px;
  }

  .kf-chip, .kf-clear { flex: 0 0 auto; }
  .kf-count { margin-left: 12px; white-space: nowrap; }

  /* mobil: arama satiri kaymasin, tam genislik */
  .kf-row:last-child { flex-wrap: wrap; overflow: visible; }
  .kf-q { max-width: none; width: 100%; }

  .kf-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .kf-img { height: 72px; }
  .kf-img img { max-height: 72px; }
}

/* Sahne modu: blok, JS acana kadar gizli durur */
.kf-off { display: none !important; }
