:root {
  --bg: #0f1115;
  --surface: #171a21;
  --surface-2: #1d212a;
  --border: #262b35;
  --text: #edeff3;
  --text-dim: #9aa3b2;
  --accent: #35e0a1;
  --accent-dim: #1f8f66;
  --price: #ffb454;
  --danger: #ff6b6b;
  --radius: 4px;
  --font-display: "Space Grotesk", "Arial Narrow", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.logo {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.logo__key { color: var(--accent); }

.search-form {
  flex: 1;
  min-width: 220px;
  display: flex;
}

.search-form input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius) 0 0 var(--radius);
  padding: 10px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.search-form input::placeholder { color: var(--text-dim); }

.search-form button {
  background: var(--accent);
  color: #06251a;
  border: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0 18px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
}

.search-form button:hover { background: #4bf0b3; }

/* Ticker - signature element */
.ticker {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  white-space: nowrap;
  padding: 9px 0;
}

.ticker__inner {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.ticker__prompt { color: var(--text-dim); }

.ticker__cursor {
  display: inline-block;
  width: 7px;
  height: 1em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
}

@media (prefers-reduced-motion: reduce) {
  .ticker__cursor { animation: none; }
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* Breadcrumbs */
.breadcrumbs {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  padding: 16px 0 0;
}

.breadcrumbs a:hover { color: var(--accent); }

/* Main */
main {
  padding: 28px 0 60px;
}

.container > main,
main.container {
  padding-top: 28px;
}

h1 {
  font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.1rem);
}

/* Category menu (top-level catalogs with a flyout of their subcategories) */
.main-nav {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.main-nav__list {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav__item {
  position: relative;
}

.main-nav__item > a {
  display: block;
  padding: 11px 16px;
  font-size: 0.86rem;
  color: var(--text-dim);
  transition: color 0.15s, background 0.15s;
}

.main-nav__item:hover > a {
  color: var(--text);
  background: var(--surface-2);
}

.main-nav__dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 20;
  min-width: 240px;
  max-height: 60vh;
  overflow-y: auto;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  padding: 6px 0;
}

.main-nav__item:hover .main-nav__dropdown {
  display: block;
}

.main-nav__dropdown ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav__dropdown a {
  display: block;
  padding: 8px 16px;
  font-size: 0.84rem;
  color: var(--text-dim);
  white-space: nowrap;
}

.main-nav__dropdown a:hover {
  color: var(--accent);
  background: var(--surface);
}

/* Product grid + cards (signature: clipped corner) */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
  position: relative;
}

/* Fills the clipped corner (clip-path leaves it transparent otherwise) with
   the accent color, like a torn-corner tag - the card's signature detail. */
.product-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 18px;
  height: 18px;
  background: var(--accent-dim);
  clip-path: polygon(100% 0, 0 0, 100% 100%);
  transition: background 0.15s;
}

.product-card:hover {
  border-color: var(--accent);
  background: #17251f;
  transform: translateY(-2px);
}

.product-card:hover::after {
  background: var(--accent);
}

.product-card__media {
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 10px;
}

.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-card__body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.product-card__id {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}

.product-card__title {
  font-size: 0.92rem;
  line-height: 1.35;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.product-card__footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 4px;
}

.product-card__price {
  font-family: var(--font-mono);
  color: var(--price);
  font-weight: 600;
  font-size: 1rem;
}

.product-card__seller {
  font-size: 0.74rem;
  color: var(--text-dim);
}

/* Product detail */
.product-detail {
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: 32px;
}

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

.product-detail__media {
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 0 100%);
  border: 1px solid var(--border);
  background: var(--surface);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.product-detail__media::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 24px;
  height: 24px;
  background: var(--accent-dim);
  clip-path: polygon(100% 0, 0 0, 100% 100%);
}

.product-detail__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-detail__thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
}

.product-detail__thumbs img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  cursor: pointer;
  transition: border-color 0.15s;
}

.product-detail__thumbs img:hover,
.product-detail__thumbs img.active {
  border-color: var(--accent);
}

.product-detail__meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.product-detail__price {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  color: var(--price);
  font-weight: 600;
  margin: 12px 0;
}

.btn-buy {
  display: inline-block;
  background: var(--accent);
  color: #06251a;
  font-weight: 700;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-buy:hover { background: #4bf0b3; }

.product-detail__responses {
  display: flex;
  gap: 14px;
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.resp-good { color: var(--accent); }
.resp-bad { color: var(--danger); }

.trust-badges {
  display: flex;
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.similar {
  margin-top: 40px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

.trademark-note {
  margin-top: 28px;
  font-size: 0.72rem;
  color: var(--text-dim);
  max-width: 70ch;
}

.product-detail__unavailable {
  color: var(--text-dim);
  font-style: italic;
}

.product-detail__description {
  margin-top: 24px;
  color: var(--text-dim);
  white-space: pre-line;
  line-height: 1.7;
  max-width: 60ch;
}

.disclaimer-note {
  margin-top: 16px;
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* Pagination */
.pagination {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 28px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-dim);
}

.pagination a {
  color: var(--accent);
}

/* Filter form (category page) */
.filter-form {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.filter-form input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
  color: var(--text);
  width: 130px;
  font-family: var(--font-body);
}

.filter-form button {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 8px 16px;
  cursor: pointer;
}

.filter-form button:hover { border-color: var(--accent); }

/* Reviews */
.reviews {
  margin-top: 48px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
  max-width: 70ch;
}

.reviews__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.review {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.review--bad { border-color: var(--danger); }

.review__meta {
  display: flex;
  gap: 10px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.review__text { margin: 0; color: var(--text); }

.review__comment {
  margin: 8px 0 0;
  padding-left: 12px;
  border-left: 2px solid var(--border);
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* Seller stats */
.seller-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 0 0 28px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.seller-stats div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.seller-stats dt {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.seller-stats dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--accent);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0 40px;
  color: var(--text-dim);
  font-size: 0.82rem;
}

.site-footer p {
  max-width: 70ch;
  margin: 0;
}

/* Empty state */
.empty-state {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  padding: 40px 0;
}
