:root {
  color-scheme: dark;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #020617;
  color: #e5e7eb;
  font-family: inherit;
}

a {
  color: inherit;
}

header {
  padding: 12px 24px;
  background: #020617;
  border-bottom: 1px solid #1f2937;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 20;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #1d4ed8;
}

.nav-brand {
  font-weight: 700;
  font-size: 18px;
}

.nav-links {
  display: flex;
  gap: 18px;
  margin-left: 32px;
  font-size: 14px;
}

.nav-links a,
.nav-right a {
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-right a:hover {
  color: #e5e7eb;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-cta {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #38bdf8;
  color: #e0f2fe;
  font-size: 13px;
  text-decoration: none;
  background: #0f172a;
}

.page {
  max-width: 1400px;
  margin: 24px auto 40px;
  padding: 0 16px;
}

.page-header h1 {
  font-size: 26px;
  margin: 0 0 4px;
}

.page-header p {
  margin: 0;
  color: #9ca3af;
  font-size: 14px;
}

.results-meta {
  margin-top: 8px;
  font-size: 13px;
  color: #9ca3af;
}

.layout {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: flex-start;
}

.sidebar {
  background: #020617;
  border-radius: 16px;
  border: 1px solid #1f2937;
  padding: 16px 14px;
  position: sticky;
  top: 72px;
}

.sidebar h2 {
  font-size: 16px;
  margin: 0 0 8px;
}

.sidebar-section {
  margin-top: 14px;
}

.sidebar-section h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9ca3af;
  margin: 0 0 6px;
}

.sidebar label {
  font-size: 13px;
  display: block;
  margin-bottom: 6px;
  color: #e5e7eb;
}

.sidebar input[type="text"],
.sidebar input[type="number"],
.sidebar select {
  width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid #1f2937;
  background: #020617;
  color: #e5e7eb;
  font-size: 13px;
}

.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 13px;
}

.checkbox-row label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 0;
}

.sidebar-footer-btns {
  margin-top: 14px;
  display: flex;
  gap: 8px;
}

.btn {
  flex: 1;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: #2563eb;
  color: #f9fafb;
}

.btn-secondary {
  background: #020617;
  color: #e5e7eb;
  border: 1px solid #374151;
}

.status-banner {
  border: 1px solid #374151;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  background: #0f172a;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  padding: 4px 4px 20px;
}

.deal-card {
  background: #020617;
  border-radius: 20px;
  border: 1px solid #1f2937;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
  min-height: 100%;
}

.deal-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  border-color: #2563eb;
}

.deal-card img {
  width: 100%;
  height: 160px;
  object-fit: contain;
  background: #0b1223;
  border-radius: 14px;
  padding: 12px;
}

.deal-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.deal-title {
  font-size: 15px;
  font-weight: 600;
  min-height: 40px;
}

.deal-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.deal-price {
  font-size: 17px;
  font-weight: 700;
}

.deal-badge {
  font-size: 11px;
  color: #22c55e;
}

.deal-meta {
  font-size: 12px;
  color: #9ca3af;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.deal-footer {
  margin-top: auto;
}

.deal-footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  background: #2563eb;
  color: #f9fafb;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  gap: 6px;
}

.load-more {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

.load-more button {
  padding: 8px 16px;
  border-radius: 999px;
  background: #020617;
  color: #e5e7eb;
  font-size: 13px;
  border: 1px solid #374151;
  cursor: pointer;
}

.empty-state {
  border: 1px dashed #374151;
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  color: #9ca3af;
  margin-top: 16px;
}

.product-layout {
  max-width: 1200px;
  margin: 24px auto 40px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 24px;
}

.product-media,
.card {
  background: #020617;
  border-radius: 16px;
  border: 1px solid #1f2937;
  padding: 16px;
}

.product-media img.main-img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  background: #020617;
  border-radius: 12px;
}

.keepa-graph {
  margin-top: 16px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #1f2937;
}

.keepa-graph img {
  width: 100%;
  display: block;
}

.product-info {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.badge-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
}

.badge {
  background: #020617;
  border-radius: 999px;
  padding: 4px 10px;
  border: 1px solid #1f2937;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.description {
  font-size: 14px;
  color: #d1d5db;
  line-height: 1.5;
}

.flex-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.price-block {
  font-size: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px 16px;
}

.label {
  color: #9ca3af;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.value {
  font-size: 14px;
  font-weight: 600;
}

.highlight {
  color: #22c55e;
}

.links-list a {
  display: inline-flex;
  margin-right: 10px;
  margin-bottom: 6px;
  font-size: 12px;
  color: #93c5fd;
  text-decoration: none;
}

.links-list a::before {
  content: "↗ ";
  font-size: 11px;
}

.buttons-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.btn-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  gap: 6px;
}

.btn-inline.primary {
  background: #2563eb;
  color: #f9fafb;
}

.btn-inline.secondary {
  background: #020617;
  color: #e5e7eb;
  border: 1px solid #1f2937;
}

.breakdown-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 13px;
}

.breakdown-table th,
.breakdown-table td {
  text-align: left;
  padding: 6px 4px;
}

.breakdown-table tr + tr td {
  border-top: 1px solid #1f2937;
}

.footer-note,
.small-muted {
  font-size: 11px;
  color: #9ca3af;
  line-height: 1.4;
}

footer {
  border-top: 1px solid #1f2937;
  padding: 14px 24px 20px;
  font-size: 12px;
  color: #9ca3af;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

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

@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 960px) {
  .product-layout {
    grid-template-columns: 1fr;
  }
}
