* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f5f6f7;
  color: #1d2327;
}

.topbar {
  background: #111;
  color: #fff;
  padding: 20px max(24px, calc((100vw - 1180px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar h1 {
  margin: 2px 0 0;
  font-size: 24px;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: #cfd3d6;
}

.status {
  font-size: 13px;
  border: 1px solid #555;
  border-radius: 999px;
  padding: 7px 11px;
}

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 60px;
}

.search-panel,
.diagnostics {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

label {
  display: block;
  font-weight: 700;
  margin-bottom: 9px;
}

.search-row {
  display: flex;
  gap: 10px;
}

.search-row input {
  flex: 1;
  font-size: 18px;
  padding: 14px 16px;
  border: 1px solid #aeb4b9;
  border-radius: 8px;
}

.search-row button {
  font-size: 16px;
  font-weight: 700;
  padding: 0 24px;
  border: 0;
  border-radius: 8px;
  background: #111;
  color: #fff;
  cursor: pointer;
}

.examples {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.examples button {
  border: 1px solid #d6d9dc;
  background: #fafafa;
  border-radius: 999px;
  padding: 7px 11px;
  cursor: pointer;
}

.diagnostics {
  font-size: 14px;
}

.diag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.diag-item strong {
  display: block;
  font-size: 12px;
  color: #667085;
  margin-bottom: 3px;
}

.filters {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #eee;
}

.hidden {
  display: none;
}

.message {
  margin: 16px 0;
}

.results {
  display: grid;
  gap: 14px;
}

.product-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 22px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 18px;
}

.image-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 170px;
}

.product-image {
  max-width: 100%;
  max-height: 170px;
  object-fit: contain;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: #667085;
}

.stock.in {
  color: #137333;
  font-weight: 700;
}

.stock.out {
  color: #a61b1b;
  font-weight: 700;
}

h2 {
  font-size: 20px;
  margin: 7px 0;
}

h2 a {
  color: #111;
  text-decoration: none;
}

h2 a:hover {
  text-decoration: underline;
}

.price {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 10px;
}

.details {
  font-size: 14px;
  color: #475467;
  margin-bottom: 10px;
}

.variant-summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
}

.variants {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}

.variant {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  background: #f7f7f8;
  border-radius: 6px;
  font-size: 13px;
}

.variant .available {
  color: #137333;
}

.variant .unavailable {
  color: #a61b1b;
}

.actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
}

.view-product {
  display: inline-block;
  background: #111;
  color: #fff;
  text-decoration: none;
  border-radius: 7px;
  padding: 9px 13px;
  font-weight: 700;
  font-size: 14px;
}

.parent-sku {
  font-size: 12px;
  color: #667085;
}

.error {
  color: #a61b1b;
  font-weight: 700;
}

@media (max-width: 700px) {
  .topbar {
    padding: 16px 18px;
  }

  .status {
    display: none;
  }

  main {
    padding: 18px 12px 40px;
  }

  .search-row {
    display: block;
  }

  .search-row button {
    width: 100%;
    padding: 13px;
    margin-top: 8px;
  }

  .product-card {
    grid-template-columns: 100px 1fr;
    gap: 12px;
    padding: 12px;
  }

  .image-link {
    min-height: 100px;
  }

  .product-image {
    max-height: 100px;
  }

  .variant {
    display: block;
  }

  .variant span:last-child {
    display: block;
    margin-top: 3px;
  }
}
