﻿/* Мелкие правки поверх Tailwind. */
html { -webkit-text-size-adjust: 100%; }
body { text-rendering: optimizeLegibility; }

select[multiple] { min-height: 3rem; }
select[multiple] option { padding: 3px 6px; border-radius: 6px; }
select:focus, input:focus, textarea:focus { outline: none; }

details > summary::-webkit-details-marker { display: none; }
details > summary { list-style: none; }

/* Горизонтальная прокрутка пилюль брендов */
.aa-scroll::-webkit-scrollbar { height: 6px; }
.aa-scroll::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 3px; }
.aa-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
.aa-scroll::-webkit-scrollbar-thumb:hover { background: #94a3b8; }


@keyframes aa-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.overflow-x-auto::-webkit-scrollbar { height: 8px; }
.overflow-x-auto::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }

@media (max-width: 640px) {
  select[multiple] { min-height: 2.5rem; }
}

/* --- Выбор марки: плитки с акцентной обводкой (как на mycarjp, в нашей палитре) --- */
.brand-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 14rem;
  overflow-y: auto;
  padding: 8px 9px;
  margin: -6px -7px;
}
.brand-tile {
  position: relative;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 12px;
  padding: 9px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #475569;
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .15s, border-color .15s, background .15s, box-shadow .18s, transform .18s;
}
.brand-tile:hover {
  border-color: #c3defd;
  background: #f0f6ff;
  color: #0040cc;
  transform: translateY(-1px);
}
.brand-tile.is-active,
.brand-tile.is-active:hover {
  background: #eff5ff;
  border-color: #bcd7fe;
  color: #003199;
  transform: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(0, 82, 255, .18);
}
.brand-tile:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(0, 82, 255, .22);
}

/* Единая обводка полей фильтров: рамка + мягкое кольцо с отступом */
#filters input:focus,
#filters select:focus,
#filters textarea:focus {
  outline: none;
  border-color: #0052ff;
  box-shadow: 0 0 0 3px rgba(0, 82, 255, .16);
}
/* --- Карточка проданного лота: фото и миниатюры --- */
.lot-thumb {
  width: 40px;
  height: 30px;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, .92);
  background-size: cover;
  background-position: center;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .25);
  opacity: .82;
  transition: opacity .15s, border-color .15s, transform .15s;
}
.lot-thumb:hover { opacity: 1; transform: translateY(-1px); }
.lot-thumb.is-active { opacity: 1; border-color: #0052ff; }
.lot-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.lot-card .js-cover { transition: transform .5s ease; }
.lot-card:hover .js-cover { transform: scale(1.04); }
/* Плитки марок на главной: шире экран — больше колонок */
#brandPills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { #brandPills { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1024px) { #brandPills { grid-template-columns: repeat(6, minmax(0, 1fr)); max-height: 11rem; } }
/* не даём странице разъезжаться на узких экранах */
html, body { overflow-x: hidden; }
