:root {
  color-scheme: light;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --text: #17191f;
  --muted: #737987;
  --border: #e3e6eb;
  --accent: #2457d6;
  --shadow: 0 8px 28px rgba(22, 31, 51, .055);
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101216;
  --surface: #191d24;
  --surface-2: #222833;
  --text: #f1f3f6;
  --muted: #a0a8b5;
  --border: #303744;
  --accent: #83a5ff;
  --shadow: 0 8px 28px rgba(0, 0, 0, .18);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
  transition: background .2s ease, color .2s ease;
}
.wrap { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }
header {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; color: inherit; text-decoration: none; }
.brand-logo { width: 48px; height: 48px; object-fit: contain; display: block; }
.brand-fallback {
  display: none; width: 48px; height: 48px; border-radius: 13px;
  align-items: center; justify-content: center; background: var(--text);
  color: var(--bg); font-weight: 850; letter-spacing: -2px; font-size: 17px;
}
.brand-name { font-size: 20px; font-weight: 850; letter-spacing: 1.4px; line-height: 1.1; }
.brand-by { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 2px; margin-top: 5px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.theme-btn, .back-btn {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 12px; padding: 10px 13px; display: inline-flex; gap: 9px;
  align-items: center; cursor: pointer; text-decoration: none; font: inherit;
  font-size: 13px; font-weight: 650; transition: .2s ease;
}
.theme-btn:hover, .back-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
main { padding: 62px 0 72px; }
.eyebrow {
  color: var(--accent); font-size: 11px; font-weight: 800;
  letter-spacing: 2.2px; text-transform: uppercase; margin-bottom: 13px;
}
h1 { font-size: clamp(30px, 5vw, 44px); letter-spacing: -1.8px; margin: 0; line-height: 1.12; }
.intro { color: var(--muted); font-size: 15px; line-height: 1.65; max-width: 610px; margin: 14px 0 0; }
.section-head {
  display: flex; align-items: end; justify-content: space-between;
  gap: 16px; margin: 38px 0 18px;
}
.section-head h2 { margin: 0; font-size: 17px; letter-spacing: -.3px; }
.count { color: var(--muted); font-size: 12px; }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.brand-card, .category-card {
  min-height: 150px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 17px; padding: 18px 14px 15px; display: flex;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 13px; text-align: center; box-shadow: var(--shadow); color: var(--text);
  text-decoration: none; transition: transform .18s ease, border-color .18s ease, background .2s ease;
}
.brand-card:hover, .category-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.logo-box { width: 100%; height: 72px; display: flex; align-items: center; justify-content: center; }
.logo-box img { max-width: 150px; max-height: 62px; width: auto; height: auto; object-fit: contain; display: block; }
.brand-card .name { font-size: 13px; font-weight: 700; line-height: 1.25; }
.missing-logo {
  display: none; color: var(--muted); font-size: 11px; border: 1px dashed var(--border);
  border-radius: 8px; padding: 8px 12px;
}
.category-card { min-height: 170px; gap: 15px; font-size: 14px; font-weight: 700; }
.icon-wrap { width: 96px; height: 96px; display: grid; place-items: center; }
.icon-wrap img { width: 96px; height: 96px; object-fit: contain; }
.icon-fallback {
  display: none; width: 70px; height: 70px; border-radius: 18px;
  background: var(--surface-2); color: var(--muted); place-items: center;
  font-size: 27px; font-weight: 800;
}
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.product-filters {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px; margin: 0 0 18px; padding: 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 17px; box-shadow: var(--shadow);
}
.filter-field { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.filter-control {
  width: 100%; min-width: 0; border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px; background: var(--bg);
  color: var(--text); font: inherit; font-size: 13px;
}
.filter-control:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.product-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 17px;
  padding: 20px; box-shadow: var(--shadow);
}
.product-card[hidden] { display: none; }
.product-image {
  display: block; width: 100%; height: 190px; object-fit: contain;
  margin-bottom: 16px; border-radius: 10px;
}
.product-card h3 { margin: 0 0 8px; font-size: 16px; }
.product-card p { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.product-specs {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 12px;
  margin: 14px 0 18px; padding-top: 13px; border-top: 1px solid var(--border);
  font-size: 12px;
}
.product-specs dt { color: var(--muted); }
.product-specs dd { margin: 0; text-align: right; font-weight: 700; }
.pdf-link {
  display: inline-flex; align-items: center; gap: 8px; color: var(--accent);
  font-size: 13px; font-weight: 750; text-decoration: none;
}
.pdf-link:hover { text-decoration: underline; }
.empty-state {
  grid-column: 1 / -1; border: 1px dashed var(--border); border-radius: 17px;
  padding: 34px 20px; text-align: center; color: var(--muted); background: var(--surface);
}
footer {
  border-top: 1px solid var(--border); padding: 22px 0 28px;
  color: var(--muted); font-size: 12px; display: flex;
  justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
@media (max-width: 850px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 590px) {
  .wrap { width: calc(100% - 28px); }
  header { height: 72px; }
  main { padding: 43px 0 54px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .brand-card { min-height: 135px; padding: 14px 9px; border-radius: 14px; }
  .category-card { min-height: 148px; padding: 12px 8px; }
  .logo-box { height: 65px; }
  .logo-box img { max-width: 125px; max-height: 54px; }
  .icon-wrap, .icon-wrap img { width: 82px; height: 82px; }
  .product-grid { grid-template-columns: 1fr; }
  .section-head { margin-top: 30px; }
  .theme-btn .btn-text { display: none; }
}
