/* Aukcje listing UI - clean layout */

.results-topbar {
  position: sticky;
  top: 76px;
  z-index: 140;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 0 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(2, 6, 23, 0.08);
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.07);
}

.results-meta {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid rgba(2, 6, 23, 0.08);
  color: #475569;
  font-size: 12px;
  font-weight: 1000;
  white-space: nowrap;
}

.results-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.filters-toggle {
  height: 34px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(37, 99, 235, 0.24);
  background: rgba(239, 246, 255, 0.96);
  color: #1d4ed8;
  cursor: pointer;
  font-size: 12px;
  font-weight: 1100;
}

@media (min-width: 981px) {
  .filters-toggle {
    display: none;
  }
}

.seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid rgba(2, 6, 23, 0.12);
  background: rgba(248, 250, 252, 0.9);
}

.seg__btn {
  border: 0;
  background: transparent;
  color: #0f172a;
  cursor: pointer;
  height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 1100;
  opacity: 0.85;
  white-space: nowrap;
}

.seg__btn:hover {
  opacity: 1;
}

.seg__btn.is-active {
  background: #0f172a;
  color: #ffffff;
  opacity: 1;
}

.safePill {
  border: 1px solid rgba(6, 95, 70, 0.35);
  background: linear-gradient(180deg, #065f46, #047857);
  color: #ffffff;
  border-radius: 999px;
  height: 36px;
  padding: 0 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(6, 95, 70, 0.18);
}

.safePill:hover {
  background: linear-gradient(180deg, #047857, #059669);
  box-shadow: 0 4px 14px rgba(6, 95, 70, 0.28);
}

.safePill::before {
  content: "\1F6E1";
  width: auto;
  height: auto;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 400;
  background: transparent;
  border: none;
}

.safePill__title {
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
}

.safePill__sub {
  display: none;
}

.safePill.is-active {
  background: linear-gradient(180deg, #047857, #059669);
  border-color: rgba(5, 150, 105, 0.6);
  color: #ffffff;
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.25), 0 4px 14px rgba(6, 95, 70, 0.3);
}

.page-size {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-size: 12px;
  font-weight: 1000;
}

.page-size__label {
  color: #64748b;
  font-weight: 1000;
}

.page-size__select {
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(2, 6, 23, 0.12);
  background: rgba(248, 250, 252, 0.9);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 1100;
}

.bin-toggle {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(2, 6, 23, 0.12);
  background: rgba(248, 250, 252, 0.95);
  cursor: pointer;
  user-select: none;
  transition: background .15s, border-color .15s;
}

.bin-toggle input {
  display: none;
}

.bin-toggle__label {
  font-size: 12px;
  font-weight: 900;
  color: #475569;
  letter-spacing: .01em;
  transition: color .15s;
}

.bin-toggle__label::before {
  content: '○ ';
  font-size: 13px;
  transition: content .15s;
}

.bin-toggle:has(input:checked) {
  border-color: rgba(22, 163, 74, 0.45);
  background: rgba(240, 253, 244, 0.97);
}

.bin-toggle:has(input:checked) .bin-toggle__label {
  color: #15803d;
}

.bin-toggle:has(input:checked) .bin-toggle__label::before {
  content: '● ';
  color: #16a34a;
}

.sortBox {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(2, 6, 23, 0.12);
  background: rgba(248, 250, 252, 0.95);
}

.sortBox__label {
  color: #475569;
  font-size: 11px;
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding-left: 4px;
}

.sortBox__select {
  border: 1px solid rgba(2, 6, 23, 0.12) !important;
  background: #ffffff !important;
  border-radius: 999px;
  height: 30px;
  padding: 0 12px !important;
  color: #0f172a;
  font-size: 12px;
  font-weight: 1100;
  appearance: none;
  max-width: 180px;
}

.sortBox__dir {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(2, 6, 23, 0.14);
  background: #ffffff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 1200;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(2, 6, 23, 0.12);
  background: #0f172a;
  color: #ffffff;
  text-decoration: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 1100;
  white-space: nowrap;
}

.btn:hover {
  filter: brightness(1.03);
}

.btn-ghost {
  background: #ffffff;
  color: #0f172a;
}

.btn-primary {
  background: #2563eb;
  border-color: rgba(37, 99, 235, 0.35);
}

.btn-wide {
  min-width: 142px;
}

.price-toggle {
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(2, 6, 23, 0.12);
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  cursor: pointer;
  font-size: 12px;
  font-weight: 1100;
}

.price-toggle.active {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.32);
  color: #1e40af;
}

.linklike {
  border: 0;
  background: transparent;
  color: #2563eb;
  padding: 0;
  cursor: pointer;
  font-weight: 1100;
  font-size: 12px;
  text-align: left;
}

.linklike:hover {
  text-decoration: underline;
}

.linklike.is-copied {
  color: #0e7490;
  text-decoration: none;
}

#results.lots-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lot {
  display: grid;
  grid-template-columns: minmax(208px, 0.92fr) minmax(300px, 1.15fr) minmax(248px, 0.96fr) minmax(214px, 0.82fr);
  background: #ffffff;
  border: none;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 0 1.5px rgba(2,6,23,.18), 0 2px 6px rgba(2,6,23,.05);
  transition: none;
  align-items: stretch;
  content-visibility: auto;
  contain-intrinsic-size: auto 220px;
}

.lot:hover {
}

.lot__photo {
  position: relative;
  border: 0;
  background: #e2e8f0;
  padding: 0;
  cursor: pointer;
}

.lot__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 160px;
}

.lot__photo::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 70px;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0));
  pointer-events: none;
}

.lot__photo::before {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 80px;
  height: 16px;
  background: url('/photos/logo-watermark.svg') no-repeat center/contain;
  opacity: var(--watermark-opacity, 0.55);
  pointer-events: none;
  filter: drop-shadow(0 0 3px rgba(255,255,255,.7)) drop-shadow(0 0 1px rgba(255,255,255,.4));
  z-index: 3;
}

.lot__photoCta {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  background: rgba(15, 23, 42, 0.68);
  color: #e2e8f0;
  padding: 4px 9px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.lot__col {
  border-left: 1px solid rgba(2, 6, 23, 0.05);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
}

.lot__head {
  display: flex;
  align-items: flex-start;
}

.lot__idline {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.lot__idline-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.lot__lotId {
  border: 1px solid rgba(37, 99, 235, 0.3);
  background: rgba(239, 246, 255, 1);
  color: #1d4ed8;
  border-radius: 999px;
  height: 24px;
  padding: 0 10px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
  font-family: inherit;
}

.lot__sourceBadge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(0, 87, 184, 0.32);
  background: rgba(219, 234, 254, 0.9);
  color: #003087;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .02em;
  white-space: nowrap;
}

.lot__lotId--vin {
  border-color: rgba(15, 23, 42, 0.22);
  background: rgba(248, 250, 252, 1);
  color: #0f172a;
  font-family: inherit;
  letter-spacing: .04em;
  max-width: 100%;
}

.lot__lotId--empty {
  cursor: default;
  opacity: 0.7;
}

.lot__lotId.is-copied {
  border-color: rgba(14, 116, 144, 0.32);
  background: rgba(236, 254, 255, 0.95);
  color: #0e7490;
}

.lot__title {
  color: #0f172a;
  text-decoration: none;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.lot__title:hover {
  text-decoration: underline;
}

.lot__titleHint {
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
}

.lot__sub {
  margin-top: 2px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-width: 0;
}

.lot__specs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.lot__spec {
  border-radius: 12px;
  border: 1px solid rgba(2, 6, 23, 0.08);
  background: rgba(248, 250, 252, 0.92);
  padding: 8px 9px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.lot__spec small {
  color: #64748b;
  font-size: 10px;
  font-weight: 1000;
  text-transform: uppercase;
}

.lot__spec b {
  color: #0f172a;
  font-size: 12px;
  font-weight: 1100;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lot__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.badge2 {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(100, 116, 139, 0.26);
  background: rgba(248, 250, 252, 1);
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
}

.badge2--ok,
.badge2--safe {
  border-color: rgba(22, 163, 74, 0.28);
  background: rgba(240, 253, 244, 0.97);
  color: #15803d;
}

.badge2--warn {
  border-color: rgba(217, 119, 6, 0.28);
  background: rgba(255, 247, 237, 0.98);
  color: #b45309;
}

.badge2--info {
  border-color: rgba(100, 116, 139, 0.24);
  background: rgba(241, 245, 249, 0.98);
  color: #475569;
}

.lot__meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.lot__meta > div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 6px;
  align-items: baseline;
  padding: 0 0 6px;
  border-bottom: 1px dashed rgba(2, 6, 23, 0.1);
  background: transparent;
}

.lot__meta > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.lot__meta .k {
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.lot__meta .v {
  color: #0f172a;
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.lot__compactMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lot__compactFact {
  border: 1px solid rgba(2, 6, 23, 0.15);
  background: rgba(248, 250, 252, 1);
  color: #0f172a;
  border-radius: 8px;
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.lot__compactFact--copy {
  cursor: pointer;
  font-family: inherit;
  appearance: none;
}

.lot__compactFact--copy.is-copied {
  border-color: rgba(14, 116, 144, 0.32);
  background: rgba(236, 254, 255, 0.95);
  color: #0e7490;
}

.lot__price {
  background: transparent;
  align-items: flex-start;
  justify-content: space-between;
}

.lot__priceMain {
  width: 100%;
  display: grid;
  gap: 10px;
  min-width: 0;
}

.lot__deadline {
  border: none;
  background: none;
  border-radius: 0;
  padding: 0;
  display: grid;
  gap: 2px;
  width: 100%;
}

.lot__deadlineK {
  color: var(--muted, #6b7280);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.lot__deadlineV {
  color: var(--text, #111827);
  font-size: 14px;
  font-weight: 900;
}

.lot__deadlineCountdown {
  display: inline-block;
  margin-top: 3px;
  padding: 0;
  border-radius: 0;
  background: none;
  color: #b45309;
  font-size: 13px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
.lot__deadlineCountdown::before {
  content: none;
}
.lot__deadlineCountdown--none {
  background: none;
  padding: 0;
  margin-top: 2px;
  color: var(--muted);
  font-weight: 700;
  font-size: 11px;
}
.lot__deadlineCountdown--none::before {
  content: none;
}
.lot__deadlineCountdown--urgent {
  background: none;
  color: #dc2626;
  font-weight: 900;
}
.lot__deadlineCountdown--live {
  animation: none;
}
.lot__deadlineCountdown--urgent.lot__deadlineCountdown--live {
  background: none;
  color: #dc2626;
  animation: countdown-blink 1.5s ease-in-out infinite;
}
@keyframes countdown-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.lot__bidBox {
  border: none;
  border-top: 1px solid var(--line-soft, rgba(17, 24, 39, 0.07));
  background: none;
  border-radius: 0;
  padding: 10px 0 0;
  display: grid;
  gap: 2px;
  width: 100%;
}

.lot__bidLabel {
  color: var(--muted, #6b7280);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.lot__money {
  color: #0f172a;
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
}

.lot__moneyHint {
  color: var(--muted, #6b7280);
  font-size: 11px;
  font-weight: 700;
}

.lot__priceMeta {
  display: grid;
  gap: 0;
}

.lot__priceMetaItem {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  border: none;
  border-top: 1px solid var(--line-soft, rgba(17, 24, 39, 0.07));
  border-radius: 0;
  background: none;
  padding: 6px 0;
}

.lot__priceMetaItem span {
  color: var(--muted, #6b7280);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.lot__priceMetaItem b {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

.lot__col--main {
  justify-content: space-between;
}

.lot__actions {
  display: flex;
  gap: 6px;
  width: 100%;
  justify-content: flex-start;
  margin-top: auto;
  padding-top: 4px;
}

.lot__actions .btn {
  flex: 1 1 100%;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  font-size: 11px;
}

.lot__actions .btn-wide {
  flex-basis: 100%;
}

/* Compact chips – hidden in modern view, shown in classic */
.lot__compactMeta {
  display: none;
}

/* Classic view = Copart-like compact rows */
body.view-classic #results.lots-list {
  gap: 8px;
}

body.view-classic .lot {
  grid-template-columns: minmax(134px, 146px) minmax(0, 1fr) minmax(190px, 0.78fr);
  border-radius: 12px;
}

body.view-classic .lot:hover {
}

body.view-classic .lot__photo img {
  height: 100%;
  min-height: 120px;
}

body.view-classic .lot__photo::after {
  height: 20px;
}

body.view-classic .lot__photoCta {
  right: 6px;
  bottom: 6px;
  padding: 3px 7px;
  font-size: 9px;
}

body.view-classic .lot__col {
  padding: 7px 9px;
  gap: 5px;
}

body.view-classic .lot__title {
  font-size: 12px;
  line-height: 1.2;
  -webkit-line-clamp: 1;
}

body.view-classic .lot__titleHint {
  display: none;
}

body.view-classic .lot__sub {
  display: none;
}

body.view-classic .lot__specs {
  display: none;
}

body.view-classic .lot__badges {
  gap: 4px;
  max-height: 26px;
  overflow: hidden;
}

body.view-classic .badge2 {
  padding: 2px 6px;
  font-size: 9px;
}

body.view-classic .lot__idline {
  gap: 5px;
}

body.view-classic .lot__lotId {
  height: 22px;
  font-size: 9px;
  padding: 0 7px;
}

body.view-classic .lot__col--meta {
  display: none;
}

body.view-classic .lot__meta {
  gap: 3px;
}

body.view-classic .lot__meta > div {
  grid-template-columns: 56px 1fr;
  gap: 4px;
}

body.view-classic .lot__meta .k {
  font-size: 9px;
}

body.view-classic .lot__meta .v {
  font-size: 10px;
}

body.view-classic .lot__compactMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 3px;
}

body.view-classic .lot__compactFact {
  font-size: 9px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 7px;
  background: rgba(2, 6, 23, 0.06);
  border: 1px solid rgba(2, 6, 23, 0.09);
  color: var(--ink);
  white-space: nowrap;
  line-height: 1.5;
}

body.view-classic .lot__compactFact--dmg {
  background: rgba(217, 119, 6, 0.12);
  border-color: rgba(217, 119, 6, 0.22);
  color: #92400e;
}

body.view-classic .lot__compactFact--run-run_drive {
  background: rgba(5, 150, 105, 0.12);
  border-color: rgba(5, 150, 105, 0.22);
  color: #065f46;
}

body.view-classic .lot__compactFact--run-starts {
  background: rgba(217, 119, 6, 0.12);
  border-color: rgba(217, 119, 6, 0.22);
  color: #92400e;
}

body.view-classic .lot__price {
  align-items: flex-start;
}

body.view-classic .lot__deadline {
  padding: 6px 7px;
  border-radius: 9px;
}

body.view-classic .lot__deadlineK {
  display: none;
}

body.view-classic .lot__deadlineV {
  font-size: 10px;
}

body.view-classic .lot__deadlineCountdown {
  font-size: 11px;
}

body.view-classic .lot.lot--has-price-meta .lot__money {
  display: none;
}

body.view-classic .lot.lot--has-price-meta .lot__moneyHint {
  display: none;
}

body.view-classic .lot__priceMeta {
  display: grid;
  margin-top: 0;
}

body.view-classic .lot__priceMetaItem span {
  font-size: 9px;
}

body.view-classic .lot__priceMetaItem b {
  font-size: 10px;
}

body.view-classic .lot__actions {
  justify-content: flex-start;
  width: 100%;
  gap: 3px;
}

body.view-classic .lot__actions .btn {
  height: 26px;
  padding: 0 6px;
  font-size: 10px;
  flex: 1 1 100%;
}

body.view-classic .lot__actions .btn-wide {
  flex-basis: auto;
}

/* Desktop/laptop transition */
@media (max-width: 1320px) {
  .lot,
  body.view-classic .lot {
    grid-template-columns: minmax(170px, 206px) minmax(0, 1fr);
  }

  .lot__photo,
  body.view-classic .lot__photo {
    grid-row: 1 / span 3;
  }

  .lot__col--main,
  .lot__col--meta,
  .lot__col--price {
    grid-column: 2;
  }

  .lot__col--meta,
  .lot__col--price {
    border-top: 1px solid rgba(2, 6, 23, 0.05);
  }

  .lot__meta > div {
    grid-template-columns: 90px minmax(0, 1fr);
  }

  .lot__actions {
    max-width: 240px;
  }

  body.view-classic .lot__col--meta {
    display: none;
  }
}

/* Mobile */
@media (max-width: 980px) {
  .results-topbar {
    top: 64px;
    border-radius: 14px;
    gap: 8px;
    margin: 4px 0 10px;
    padding: 8px 10px;
  }

  .results-meta {
    font-size: 11px;
    padding: 6px 9px;
  }

  .results-controls {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
    gap: 6px;
  }

  .results-controls > * {
    flex: 0 0 auto;
  }

  .filters-toggle,
  .archive-link-btn,
  .page-size__select,
  .sortBox__select,
  .sortBox__dir,
  .price-toggle {
    height: 40px;
  }

  .seg__btn {
    height: 36px;
  }

  .sortBox {
    padding: 3px;
  }

  .sortBox__label {
    display: none;
  }

  .lot,
  body.view-classic .lot {
    grid-template-columns: 1fr;
  }

  .lot__photo,
  body.view-classic .lot__photo {
    grid-row: auto;
  }

  .lot__col--main,
  .lot__col--meta,
  .lot__col--price {
    grid-column: auto;
  }

  .lot__col {
    border-left: 0;
    border-top: 1px solid rgba(2, 6, 23, 0.05);
    align-items: flex-start;
    padding: 10px 12px;
  }

  .lot__photo img,
  body.view-classic .lot__photo img {
    aspect-ratio: 4/3;
    height: auto;
    min-height: auto;
  }

  body.view-classic .lot__photoCta {
    font-size: 9px;
    padding: 3px 8px;
  }

  body.view-classic .lot__badges {
    max-height: none;
    overflow: visible;
  }

  .lot__price {
    align-items: flex-start;
    background: rgba(248, 250, 252, 0.9);
  }

  .lot__money,
  .lot__moneyHint {
    text-align: left;
  }

  .lot__meta {
    grid-template-columns: 1fr;
  }

  .lot__priceMetaItem {
    justify-content: flex-start;
    gap: 8px;
  }

  .lot__actions {
    width: 100%;
    justify-content: flex-start;
  }

  .lot__actions .btn-wide {
    grid-column: 1 / -1;
  }

  body.view-classic .lot__actions .btn-wide {
    flex-basis: 100%;
  }
}

@media (max-width: 760px) {
  .results-topbar {
    top: 58px;
    border-radius: 12px;
    flex-direction: column;
    align-items: stretch;
  }

  .results-meta {
    justify-content: center;
    text-align: center;
    white-space: normal;
  }

  .results-controls {
    width: 100%;
    padding-bottom: 4px;
  }

  .page-size__label {
    display: none;
  }

  .safePill__title {
    font-size: 11px;
  }

  .sortBox__select {
    max-width: 140px;
    font-size: 11px;
  }

  .lot {
    border-radius: 14px;
  }

  .lot__col {
    padding: 9px 10px;
    gap: 7px;
  }

  .lot__title {
    font-size: 16px;
  }

  .lot__sub {
    font-size: 11px;
  }

  .lot__idline {
    gap: 6px;
  }

  .lot__lotId {
    height: auto;
    min-height: 24px;
    padding: 4px 9px;
  }

  .lot__lotId--vin {
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: left;
    line-height: 1.25;
  }

  .lot__meta > div {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .lot__meta .k {
    font-size: 11px;
  }

  .lot__meta .v {
    font-size: 11px;
  }

  .lot__money {
    font-size: 22px;
  }

  .lot__priceMetaItem {
    flex-wrap: wrap;
  }

  .lot__actions .btn {
    height: 44px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .results-topbar {
    top: 54px;
    padding: 7px 8px;
  }

  .lot__photo img,
  body.view-classic .lot__photo img {
    aspect-ratio: 4/3;
    height: auto;
    min-height: auto;
  }

  .lot__idline {
    flex-direction: column;
    align-items: flex-start;
  }

  .lot__lotId,
  .lot__sourceBadge {
    max-width: 100%;
  }

  .lot__lotId--vin {
    width: 100%;
  }
}

/* Theme v4: deep navy + amber – premium */

/* Layout fixes */
.results-topbar {
  background: rgba(255, 255, 255, 0.97);
  border-color: var(--line);
  box-shadow: 0 6px 18px rgba(17, 24, 39, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.results-main {
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-width: 0;
  flex-shrink: 0;
}

.results-controls {
  margin-left: auto;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
}

.results-meta {
  background: var(--surface-subtle);
  border-color: var(--line);
  color: var(--muted);
}

/* Filters toggle (mobile) */
.filters-toggle {
  border-color: rgba(30, 58, 95, 0.24);
  background: rgba(240, 244, 250, 0.95);
  color: #1e3a5f;
}

/* Archiwum button — zawsze widoczny */
.archive-link-btn {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.4);
  background: #1e293b;
  color: #fbbf24;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.archive-link-btn:hover {
  background: #2d3f55;
  color: #fde68a;
}
.archive-link-btn.is-active {
  background: #92400e;
  border-color: rgba(251,191,36,.5);
  color: #fde68a;
}
.archive-link-btn.is-active:hover {
  background: #a8501a;
}

/* View segment */
.seg {
  border-color: var(--line);
  background: var(--surface-subtle);
}

.seg__btn {
  color: var(--ink-soft);
}

.seg__btn.is-active {
  background: #1a2f5e;
  color: #ffffff;
}

/* SafePill – green, reserved for "Sprawdzone wybory" */
/* safePill theme – premium dark green (overrides base) */
.safePill {
  border-color: rgba(6, 95, 70, 0.4);
  background: linear-gradient(180deg, #065f46, #047857);
  color: #ffffff;
}

.safePill::before {
  background: transparent;
  border: none;
  color: #ffffff;
}

.safePill.is-active {
  border-color: rgba(5, 150, 105, 0.6);
  background: linear-gradient(180deg, #047857, #059669);
  color: #ffffff;
}

/* SortBox */
.sortBox__label {
  color: var(--muted);
}

.sortBox,
.sortBox__select,
.sortBox__dir {
  border-color: var(--line) !important;
  background: #ffffff !important;
  color: var(--ink-soft);
}

/* Buttons */
.btn {
  border-color: #1e3a5f;
  background: #1e3a5f;
}

.btn-ghost {
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink-soft);
}

.btn-primary {
  border-color: rgba(30, 58, 95, 0.4);
  background: linear-gradient(180deg, #264d7a 0%, #1e3a5f 100%);
}

.price-toggle {
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink-soft);
}

.price-toggle.active {
  border-color: rgba(30, 58, 95, 0.3);
  background: rgba(30, 58, 95, 0.09);
  color: #1e3a5f;
}

.linklike {
  color: var(--brand);
}

.linklike.is-copied {
  color: var(--accent);
}

/* Lot cards */

.lot:hover {
}

.lot__photo {
  background: var(--surface-muted);
}

.lot__photo::after {
  background: linear-gradient(to top, rgba(17, 24, 39, 0.64), rgba(17, 24, 39, 0));
}

.lot__photoCta {
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(17, 24, 39, 0.68);
  color: #f3f4f6;
}

.lot__col {
  border-left-color: var(--line-soft);
}

.lot__lotId {
  border-color: rgba(30, 58, 95, 0.26);
  background: rgba(240, 244, 250, 0.98);
  color: #1e3a5f;
}

.lot__sourceBadge {
  border-color: rgba(0, 87, 184, 0.30);
  background: rgba(219, 234, 254, 0.88);
  color: #003087;
}

.lot__lotId--vin {
  border-color: var(--line);
  background: var(--surface-subtle);
  color: var(--ink-soft);
}

.lot__lotId.is-copied {
  border-color: rgba(5, 150, 105, 0.32);
  background: rgba(236, 253, 245, 0.95);
  color: #065f46;
}

.lot__title,
.lot__spec b,
.lot__meta .v,
.lot__priceMetaItem b,
.lot__deadlineV,
.lot__compactFact {
  color: var(--text);
}

.lot__titleHint,
.lot__sub,
.lot__spec small,
.lot__meta .k,
.lot__moneyHint,
.lot__deadlineK,
.lot__priceMetaItem span {
  color: var(--muted);
}

.lot__spec,
.lot__compactFact {
  border-color: var(--line-soft);
  background: rgba(248, 249, 251, 0.95);
}

.badge2 {
  border-color: var(--line);
  background: rgba(248, 249, 251, 0.98);
  color: var(--ink-soft);
}

.badge2--ok,
.badge2--safe {
  border-color: rgba(22, 163, 74, 0.26);
  background: rgba(240, 253, 244, 0.97);
  color: #15803d;
}

.badge2--warn {
  border-color: rgba(180, 83, 9, 0.26);
  background: rgba(255, 247, 237, 0.98);
  color: var(--warning);
}

.badge2--info {
  border-color: rgba(100, 116, 139, 0.22);
  background: rgba(241, 245, 249, 0.98);
  color: #475569;
}

.lot__meta > div {
  border-bottom-color: var(--line-soft);
}

.lot__compactFact--copy.is-copied {
  border-color: rgba(5, 150, 105, 0.32);
  background: rgba(236, 253, 245, 0.95);
  color: #065f46;
}

/* price section - theme overrides removed, using flat design */

@media (max-width: 1320px) {
  .lot__col--meta,
  .lot__col--price {
    border-top-color: var(--line-soft);
  }
}

@media (max-width: 980px) {
  .results-topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .results-main {
    width: 100%;
    justify-content: flex-start;
  }

  .results-controls {
    margin-left: 0;
    justify-content: flex-start;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }

  .results-controls > * {
    flex: 0 0 auto;
  }

  .lot__col {
    border-top-color: var(--line-soft);
  }

  .lot__price {
    background: rgba(248, 249, 251, 0.92);
  }
}

@media (max-width: 760px) {
  .results-meta {
    flex: 1 1 auto;
  }

}

/* Paginator – prev/next */
#paginator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
  padding: 4px 0 12px;
}

.pag-btn {
  height: 40px;
  padding: 0 20px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.13s, border-color 0.13s, color 0.13s;
  white-space: nowrap;
}

.pag-btn:hover:not(:disabled) {
  background: rgba(30, 58, 95, 0.07);
  border-color: rgba(30, 58, 95, 0.3);
  color: #1e3a5f;
}

.pag-btn:disabled {
  opacity: 0.38;
  cursor: default;
}

.pag-btn--prev {
  padding-left: 16px;
}

.pag-btn--next {
  padding-right: 16px;
}

.pag-btn--first {
  padding: 0 12px;
  font-size: 15px;
}

.pag-info {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  min-width: 100px;
  text-align: center;
}

.pag-info--jump {
  background: none;
  border: 1px solid transparent;
  border-radius: 8px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.13s, background 0.13s;
}

.pag-info--jump:hover {
  border-color: var(--line);
  background: rgba(30, 58, 95, 0.05);
}

.pag-jump-input {
  width: 70px;
  height: 34px;
  border: 2px solid var(--accent, #1e3a5f);
  border-radius: 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  outline: none;
}

@media (max-width: 480px) {
  .pag-btn {
    height: 44px;
    padding: 0 14px;
    font-size: 12px;
  }

  .pag-info {
    font-size: 12px;
    min-width: 80px;
  }
}

/* Lot card ribbon */
.lot__ribbon {
  position: absolute;
  right: 0;
  top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px 5px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px 0 0 6px;
  box-shadow: 0 3px 10px rgba(0,0,0,.18);
  letter-spacing: .01em;
  pointer-events: auto;
  cursor: help;
  z-index: 2;
}

.lot__ribbonIco {
  font-size: 12px;
  line-height: 1;
}

.lot__ribbon--green {
  background: linear-gradient(90deg, #065f46, #047857);
  color: #fff;
}

.lot__ribbon--yellow {
  background: linear-gradient(135deg, #eab308, #ca8a04);
  color: #422006;
}

.lot__ribbon--red {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
}

body.view-classic .lot__ribbon {
  top: 6px;
  padding: 3px 8px 3px 7px;
  font-size: 9px;
  gap: 3px;
}

body.view-classic .lot__ribbonIco {
  font-size: 10px;
}

@media (max-width: 480px) {
  .lot__ribbon {
    font-size: 10px;
    padding: 4px 10px 4px 8px;
    top: 8px;
  }
}

/* ============================================================
   HAMBURGER MENU — mobile overflow actions
   ============================================================ */

/* ---- Desktop: overflow-menu inline w headerze ---- */
.mobile-menu-btn {
  display: none;
}

.mobile-overflow-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto; /* wypycha na prawą stronę headera */
}

/* ---- Mobile (≤980px): hamburger w headerze, dropdown pod nim ---- */
@media (max-width: 980px) {
  /* Hamburger */
  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    margin-left: auto; /* wypycha na prawą stronę headera gdy status ukryty */
    border: 1px solid rgba(2, 6, 23, 0.14);
    border-radius: 10px;
    background: rgba(248, 250, 252, 0.95);
    cursor: pointer;
    padding: 0;
    transition: background 0.13s;
  }

  .mobile-menu-btn:hover,
  .mobile-menu-btn.is-open {
    background: #e8f0fe;
    border-color: rgba(37, 99, 235, 0.3);
  }

  .mobile-menu-btn__bar {
    display: block;
    width: 16px;
    height: 2px;
    background: #374151;
    border-radius: 2px;
    transition: transform 0.18s, opacity 0.18s;
  }

  .mobile-menu-btn.is-open .mobile-menu-btn__bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .mobile-menu-btn.is-open .mobile-menu-btn__bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }

  .mobile-menu-btn.is-open .mobile-menu-btn__bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  /* Dropdown: schowany, pozycjonuje się pod headerem (header jest sticky = zawierający blok) */
  .mobile-overflow-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 8px;
    z-index: 210;
    background: #fff;
    border: 1px solid var(--line, rgba(2,6,23,.1));
    border-radius: 14px;
    padding: 10px;
    gap: 8px;
    flex-direction: column;
    box-shadow: 0 8px 28px rgba(2, 6, 23, 0.13);
    min-width: 180px;
  }

  .mobile-overflow-menu.is-open {
    display: flex;
  }

  /* Elementy w dropdownie */
  .mobile-overflow-menu .archive-link-btn {
    width: 100%;
    height: 44px;
    justify-content: center;
    font-size: 13px;
    border-radius: 10px;
  }

  .mobile-overflow-menu .seg {
    width: 100%;
    border-radius: 10px;
  }

  .mobile-overflow-menu .seg__btn {
    flex: 1;
    height: 40px;
    font-size: 13px;
  }

  /* Topbar: bez overflow-x scroll, bez position:relative (dropdown już nie tu) */
  .results-controls {
    flex-wrap: nowrap;
    overflow-x: visible;
    gap: 8px;
  }

  .results-controls > * {
    flex-shrink: 0;
  }

  .sortBox__select {
    max-width: 120px;
  }
}

@media (max-width: 480px) {
  .sortBox__select {
    max-width: 100px;
    font-size: 11px;
  }
}

/* ============================================================
   LOT IDLINE — badges poziomo na mobile (LOT / VIN / Copart)
   ============================================================ */

/* Naprawka 760px: VIN nie powinien wrapować się do wielu linii */
@media (max-width: 760px) {
  .lot__idline-row {
    flex-wrap: nowrap;
    overflow: hidden;
  }

  .lot__lotId--vin {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
    flex-shrink: 1;
    line-height: inherit;
  }

  .lot__sourceBadge {
    flex-shrink: 0;
  }
}

@media (max-width: 480px) {
  .lot__idline-row {
    flex-wrap: nowrap;
  }

  .lot__lotId--vin {
    width: auto;
    max-width: 130px;
  }
}

/* ============================================================
   Ribbon tooltip — zarządzany przez JS (#ribbon-tooltip w body) */
#ribbon-tooltip {
  position: fixed;
  background: rgba(15,15,15,.92);
  color: #fff;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: normal;
  width: 200px;
  pointer-events: none;
  z-index: 9999;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
  display: none;
}

/* SafePill w sidebarze — pełna szerokość, zaokrąglony jak sekcja filtrów */
.safePill--sidebar {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  justify-content: center;
  font-size: 13px;
  white-space: normal;
  margin-bottom: 4px;
}

/* Gallery watermark — positioned by JS to stay within object-fit:contain image bounds */
.gallery-watermark {
  position: absolute;
  display: none;
  width: 130px;
  height: 26px;
  background: url('/photos/logo-watermark.svg') no-repeat center/contain;
  opacity: var(--watermark-opacity, 0.55);
  pointer-events: none;
  filter: drop-shadow(0 0 3px rgba(255,255,255,.7)) drop-shadow(0 0 1px rgba(255,255,255,.4));
  z-index: 4;
}
