@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;700;800&family=Space+Grotesk:wght@500;700&display=swap");

:root {
  --text: #111111;
  --muted: #5f5f5f;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-line: rgba(17, 17, 17, 0.1);
  --accent-soft: rgba(17, 17, 17, 0.06);
  --shadow: 0 20px 48px rgba(17, 17, 17, 0.08);
  --radius-lg: 28px;
  --radius-md: 18px;
  --font-heading: "Space Grotesk", "Segoe UI Semibold", sans-serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at top left, rgba(0, 0, 0, 0.05), transparent 24%),
    radial-gradient(circle at 82% 18%, rgba(0, 0, 0, 0.04), transparent 18%),
    linear-gradient(180deg, #ffffff 0%, #f4f4f4 100%);
}

.page-shell {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 48px;
}

.search-header,
.results-panel {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.search-header {
  position: relative;
  z-index: 20;
  display: grid;
  gap: 18px;
  padding: 28px;
  justify-items: center;
  text-align: center;
}

.page-title,
.results-header h2 {
  margin: 0;
  font-family: var(--font-heading);
  letter-spacing: 0.01em;
}

.page-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 0.98;
  text-align: center;
}

.header-autocomplete {
  position: relative;
  z-index: 30;
  width: min(760px, 100%);
  margin: 0 auto;
}

.search-input {
  width: 100%;
  padding: 18px 20px;
  border: 1px solid rgba(17, 17, 17, 0.2);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  box-shadow: 0 10px 22px rgba(17, 17, 17, 0.05);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.search-input:focus {
  outline: none;
  border-color: rgba(17, 17, 17, 0.28);
  box-shadow: 0 0 0 5px rgba(17, 17, 17, 0.08);
  transform: translateY(-1px);
}

.suggestions {
  position: absolute;
  z-index: 999;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  padding: 8px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 36px rgba(17, 17, 17, 0.12);
}

.suggestion-item,
.suggestion-empty {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
}

.suggestion-item {
  cursor: pointer;
}

.suggestion-item:hover,
.suggestion-item.is-active {
  background: var(--accent-soft);
}

.suggestion-count {
  flex-shrink: 0;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.06);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.main-content {
  margin-top: 8px;
}

.generation-strip {
  display: grid;
  gap: 18px;
  width: min(1220px, calc(100% - 32px));
  margin: 8px auto 0;
  padding: 0 28px;
}

.generation-strip-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.generation-strip-copy {
  max-width: 760px;
}

.generation-strip-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  line-height: 1.02;
}

.generation-strip-subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.generation-clear-button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(17, 17, 17, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.generation-clear-button:hover,
.generation-clear-button:focus {
  outline: none;
  transform: translateY(-1px);
  border-color: rgba(17, 17, 17, 0.24);
  box-shadow: 0 12px 22px rgba(17, 17, 17, 0.08);
}

.generation-rail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 280px));
  justify-content: center;
  gap: 14px;
}

.generation-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow);
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.generation-card:hover,
.generation-card:focus {
  outline: none;
  transform: translateY(-2px);
  border-color: rgba(17, 17, 17, 0.18);
  box-shadow: 0 18px 32px rgba(17, 17, 17, 0.1);
}

.generation-card.is-active {
  border-color: rgba(17, 17, 17, 0.32);
  box-shadow: 0 0 0 2px rgba(17, 17, 17, 0.08), 0 18px 32px rgba(17, 17, 17, 0.1);
}

.generation-thumb {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(228, 228, 228, 0.92)),
    linear-gradient(180deg, rgba(17, 17, 17, 0.06), rgba(17, 17, 17, 0));
}

.generation-thumb img,
.generation-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: block;
}

.generation-thumb img {
  object-fit: cover;
  object-position: center;
}

.generation-thumb-placeholder {
  background:
    radial-gradient(circle at 25% 30%, rgba(255, 255, 255, 0.92), transparent 24%),
    linear-gradient(135deg, rgba(17, 17, 17, 0.08), rgba(17, 17, 17, 0.02));
}

.generation-copy {
  display: grid;
  gap: 4px;
}

.generation-copy strong {
  font-family: var(--font-heading);
  font-size: 1rem;
  line-height: 1.12;
}

.generation-copy span {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.generation-license {
  display: inline-flex;
  width: fit-content;
  margin-top: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.06);
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.results-panel {
  padding: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.results-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.results-subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.query-badge {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.results-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
}

.sort-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.sort-select {
  min-height: 42px;
  padding: 0 38px 0 14px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font: inherit;
  font-weight: 800;
}

.sort-select:focus {
  outline: none;
  border-color: rgba(17, 17, 17, 0.28);
  box-shadow: 0 0 0 5px rgba(17, 17, 17, 0.08);
}

.table-shell {
  margin-top: 18px;
  overflow: auto;
  border-radius: 24px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 18px 16px;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: left;
  text-transform: uppercase;
}

tbody tr {
  transition: background-color 180ms ease;
}

.result-row {
  cursor: pointer;
}

tbody tr:hover {
  background: rgba(17, 17, 17, 0.035);
}

.result-row:focus {
  outline: 3px solid rgba(17, 17, 17, 0.16);
  outline-offset: -3px;
}

tbody td {
  padding: 18px 16px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.06);
  vertical-align: middle;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.lot-title {
  font-weight: 800;
  line-height: 1.28;
}

.status-pill {
  display: inline-flex;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
}

.row-winning-bid {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 800;
}

.meta-label {
  white-space: nowrap;
}

.locked-value {
  display: inline-block;
  filter: blur(4px);
  user-select: none;
}

.access-unlocked .locked-value {
  filter: none;
  user-select: text;
}

.locked-value.is-short {
  min-width: 94px;
}

.lot-bid,
.lot-fipe {
  font-weight: 800;
}

.lot-auction-date {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
  white-space: nowrap;
}

.fipe-missing {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.empty-state,
.noscript-warning {
  margin-top: 18px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  border: 1px dashed rgba(17, 17, 17, 0.18);
}

.empty-state strong {
  display: block;
}

.empty-state p {
  margin: 8px 0 0;
  color: var(--muted);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 1220px);
    padding-top: 20px;
  }

  .generation-strip {
    width: min(100% - 20px, 1220px);
    padding: 0 18px;
  }

  .generation-strip-header {
    align-items: start;
    flex-direction: column;
  }

  .generation-rail {
    grid-template-columns: 1fr;
  }

  .search-header,
  .results-panel {
    padding: 18px;
  }

  .results-header {
    flex-direction: column;
  }

  .query-badge {
    white-space: normal;
  }

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

  .sort-control {
    width: 100%;
    justify-content: space-between;
  }

  .sort-select {
    min-width: 170px;
  }

  .table-shell {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
  }

  thead {
    display: none;
  }

  tbody {
    display: grid;
    gap: 12px;
  }

  tbody tr {
    border: 1px solid rgba(17, 17, 17, 0.08);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow);
    overflow: hidden;
  }

  tbody td {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 16px;
    border-bottom: 1px solid rgba(17, 17, 17, 0.06);
  }

  tbody td::before {
    content: attr(data-label);
    flex-shrink: 0;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  tbody td:last-child {
    border-bottom: 0;
  }

  .row-winning-bid {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}


.fipe-badge {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 5px;
  font-size: 0.68em;
  font-weight: 500;
  color: #888;
  border: 1px solid #ccc;
  border-radius: 3px;
  vertical-align: middle;
  white-space: nowrap;
}
