:root {
  color-scheme: dark;
  --bg: #080808;
  --ink: #f7f2ea;
  --muted: #a8a29a;
  --line: rgba(255, 255, 255, 0.12);
  --panel: rgba(23, 23, 23, 0.86);
  --panel-strong: #f5efe3;
  --good: #7ddc8d;
  --warn: #f4b860;
  --bad: #ff7a7a;
  --accent: #f4ff47;
  --hot: #ff3d2e;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 8%, rgba(244, 255, 71, 0.14), transparent 24rem),
    radial-gradient(circle at 85% 12%, rgba(255, 61, 46, 0.14), transparent 22rem),
    linear-gradient(135deg, #080808 0%, #111 45%, #050505 100%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  overflow: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  content: "";
  mask-image: linear-gradient(to bottom, black, transparent 76%);
}

a {
  color: inherit;
}

button {
  font: inherit;
}

.shell {
  width: min(1560px, calc(100% - 32px));
  height: 100vh;
  margin: 0 auto;
  padding: 21px 0 15px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
}

.topbar {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 12px 18px !important;
}

.topbar > div:first-child {
  flex: 0 0 180px;
  align-self: center;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 8ch;
  font-size: clamp(2.25rem, 7.5vw, 6.375rem);
  line-height: 0.78;
  text-transform: uppercase;
  text-wrap: balance;
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #f5efe3;
  padding: 7px 11px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.search-panel {
  position: relative;
  z-index: 1;
  margin: 0;
  overflow: hidden;
}

.topbar .search-panel {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(195px, 1fr) minmax(225px, 255px);
  gap: 8px 12px;
  align-items: center;
  align-content: start;
  padding: 9px 11px;
}

.search-panel input {
  border: 1px solid rgba(244, 255, 71, 0.48);
  background: #f5efe3;
  color: #101010;
  font-size: clamp(0.9rem, 2.25vw, 1.6rem);
  font-weight: 950;
  padding: 13px 14px;
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.34);
}

.topbar .search-panel > #productSearch {
  grid-column: 1;
  grid-row: 1;
  font-size: clamp(0.86rem, 1.5vw, 1.3rem);
  padding: 9px 12px;
}

.quick-searches {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.topbar .quick-searches {
  grid-column: 1;
  grid-row: 2;
  margin-top: 0;
}

.quick-searches button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 7px 9px;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    transform 140ms ease;
}

.quick-searches button:hover {
  border-color: rgba(244, 255, 71, 0.7);
  background: rgba(244, 255, 71, 0.13);
  transform: translateY(-1px);
}

.size-filter {
  display: grid;
  grid-template-columns: auto minmax(8rem, 12rem);
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.topbar .size-filter {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  grid-template-columns: auto minmax(92px, 1fr);
  gap: 5px;
  margin-top: 0;
}

.topbar .sort-filter {
  grid-row: 2;
}

.topbar .size-filter label {
  font-size: 0.64rem;
}

.topbar .size-filter select {
  font-size: 0.72rem;
  padding: 7px 9px;
}

.size-filter label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.size-filter select {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 900;
  padding: 10px 13px;
  box-shadow: none;
}

.search-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.topbar .search-meta {
  grid-column: 2;
  grid-row: 3;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 5px;
  margin-top: 0;
  font-size: 0.68rem;
  white-space: nowrap;
}

.topbar .match-badge {
  padding: 5px 7px;
}

.match-badge {
  border: 1px solid rgba(244, 255, 71, 0.55);
  border-radius: 999px;
  background: rgba(244, 255, 71, 0.12);
  color: var(--accent);
  padding: 7px 11px;
  text-transform: uppercase;
}

.results-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 9px;
}

h2 {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.results-head p {
  margin: 0;
  color: var(--muted);
  text-align: right;
}

.content-with-ads {
  display: grid;
  grid-template-columns: 225px minmax(0, 1fr) 225px;
  gap: 15px;
  align-items: stretch;
  min-height: 0;
  overflow: hidden;
}

.main-column {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr));
  grid-auto-rows: max-content;
  gap: 11px;
  align-content: start;
  align-items: stretch;
  justify-content: stretch;
  min-height: 0;
  height: 100%;
  margin-bottom: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 6px;
  scrollbar-color: rgba(244, 255, 71, 0.55) rgba(255, 255, 255, 0.08);
  scrollbar-width: thin;
}

.ad-rail {
  position: static;
  z-index: 1;
  display: grid;
  gap: 8px;
  min-height: 0;
}

.ad-slot {
  height: 100%;
  min-height: 0;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 17px;
  background:
    radial-gradient(circle at 50% 16%, rgba(244, 255, 71, 0.09), transparent 11rem),
    rgba(255, 255, 255, 0.045);
  color: var(--muted);
  padding: 17px;
  text-align: center;
  box-shadow: 0 18px 53px rgba(0, 0, 0, 0.26);
  overflow: hidden;
}

.sponsor-card-link,
.sponsor-card-link strong,
.sponsor-card-link small {
  display: block;
}

.sponsor-card-link {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.sponsor-card-link strong {
  margin-top: auto;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.1;
}

.sponsor-card-link small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.25;
}

.sponsor-image {
  display: block;
  width: 100%;
  min-height: 135px;
  max-height: none;
  flex: 1 1 auto;
  margin: 0 auto;
  object-fit: contain;
}

.product-card {
  display: grid;
  grid-template-rows: auto 1fr;
  align-self: stretch;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.product-card:hover {
  border-color: rgba(244, 255, 71, 0.55);
  box-shadow: 0 18px 53px rgba(0, 0, 0, 0.42);
  transform: translateY(-2px);
}

.product-image {
  position: relative;
  display: block;
  aspect-ratio: 1;
  background: #201f1c;
  overflow: hidden;
}

.product-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.product-card:hover .product-image img {
  transform: scale(1.045);
}

.image-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--muted);
}

.product-body {
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  gap: 8px;
  padding: 10px;
}

.product-kicker {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--accent);
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h3 {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 950;
  line-height: 1.15;
}

h3 a {
  text-decoration: none;
}

.product-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.sale-price {
  color: var(--accent);
}

.product-meta s {
  margin-left: 4px;
  color: rgba(245, 239, 227, 0.52);
}

.variant-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(2.45rem, 1fr));
  gap: 5px;
}

.variant-links a,
.more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 29px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 7px;
  color: var(--ink);
  font-size: 0.64rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.variant-links a:hover {
  border-color: rgba(244, 255, 71, 0.8);
  background: rgba(244, 255, 71, 0.1);
}

.primary-link {
  display: block;
  border-color: var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: #101010;
  padding: 11px 14px;
  font-size: 0.68rem;
  font-weight: 950;
  line-height: 1;
  text-decoration: none;
  text-align: center;
  text-transform: uppercase;
  transition:
    background 140ms ease,
    transform 140ms ease;
}

.primary-link:hover {
  background: #ffffff;
  transform: translateY(-1px);
}

.empty {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  padding: 18px;
}

.directory {
  margin-top: 14px;
}

.directory summary {
  cursor: pointer;
  font-weight: 800;
  margin-bottom: 12px;
}

.controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 220px 230px;
  gap: 10px;
  margin-bottom: 14px;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  font: inherit;
  padding: 11px 12px;
}

select option {
  background: #111;
  color: var(--ink);
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

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

.retailer-name {
  display: block;
  font-weight: 800;
}

.url {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 3px;
}

.status-available {
  color: var(--good);
  border-color: color-mix(in srgb, var(--good), white 70%);
}

.status-unavailable {
  color: var(--bad);
  border-color: color-mix(in srgb, var(--bad), white 70%);
}

.status-unchecked {
  color: var(--warn);
  border-color: color-mix(in srgb, var(--warn), white 70%);
}

.links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.links a {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  text-decoration: none;
}

.site-footer {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 11px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
}

.site-footer a {
  color: var(--accent);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

@media (min-width: 1181px) and (max-width: 1320px) {
  .content-with-ads {
    grid-template-columns: minmax(0, 1fr);
  }

  .ad-rail {
    display: none;
  }
}

@media (max-width: 760px) {
  body {
    overflow: auto;
  }

  .shell {
    display: block;
    height: auto;
    padding-bottom: 48px;
  }

  .topbar {
    display: block;
  }

  .topbar > div:first-child {
    flex-basis: auto;
  }

  .topbar .search-panel {
    display: block;
    margin-top: 16px;
  }

  .topbar .search-meta {
    justify-content: flex-start;
    flex-wrap: wrap;
    white-space: normal;
  }

  .topbar #indexFreshness {
    flex: 1 1 100%;
    min-width: 0;
  }

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

  .results-head {
    display: block;
  }

  .results-head p {
    margin-top: 6px;
    text-align: left;
  }

  .content-with-ads {
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .ad-rail {
    position: static;
    grid-template-columns: 1fr;
  }

  .ad-slot {
    min-height: 320px;
  }

  .product-grid {
    height: auto;
    min-height: 0;
    overflow: visible;
    padding-right: 0;
  }

  .ad-rail-left {
    order: 2;
  }

  .product-grid {
    order: 1;
  }

  .ad-rail-right {
    order: 3;
  }
}

@media (max-width: 1180px) {
  body {
    overflow: auto;
  }

  .shell {
    display: block;
    height: auto;
    padding-bottom: 48px;
  }

  .topbar {
    display: block;
  }

  .topbar > div:first-child {
    flex-basis: auto;
  }

  .topbar .search-panel {
    display: block;
    margin-top: 16px;
  }

  .content-with-ads {
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .ad-rail {
    position: static;
  }

  .ad-slot {
    min-height: 320px;
  }

  .product-grid {
    height: auto;
    min-height: 0;
    overflow: visible;
    padding-right: 0;
  }

  .ad-rail-left {
    order: 2;
  }

  .product-grid {
    order: 1;
  }

  .ad-rail-right {
    order: 3;
  }
}
