:root {
  --ink: #17212b;
  --muted: #66727d;
  --line: #dfe7ec;
  --paper: #ffffff;
  --shell: #f6f8f9;
  --aqua: #0d7c86;
  --aqua-dark: #07545c;
  --coral: #d86f5a;
  --sand: #f4d7a1;
  --shadow: 0 12px 30px rgba(25, 43, 54, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--shell);
  font-family: Arial, "Microsoft JhengHei", "PingFang TC", sans-serif;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
  font-weight: 700;
}

.brand span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 36px;
  height: 36px;
  color: white;
  background: var(--aqua);
  border-radius: 6px;
  letter-spacing: 0;
}

.line-link,
.button,
.inquiry-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 6px;
  font-weight: 700;
}

.line-link,
.button {
  padding: 0 16px;
  color: white;
  background: var(--aqua);
}

.hero {
  display: grid;
  align-items: end;
  min-height: 360px;
  padding: 72px 24px 42px;
  color: white;
  background:
    linear-gradient(90deg, rgba(7, 42, 50, 0.86), rgba(7, 42, 50, 0.28)),
    url("https://images.unsplash.com/photo-1507525428034-b723cf961d3e?auto=format&fit=crop&w=1800&q=80") center/cover;
}

.hero > div,
.toolbar,
.catalog-wrap,
.line-panel,
footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--sand);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 12px;
  font-size: clamp(38px, 8vw, 76px);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.15;
  letter-spacing: 0;
}

.hero-copy,
.line-panel p {
  max-width: 640px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 17px;
  line-height: 1.7;
}

.toolbar {
  position: sticky;
  top: 64px;
  z-index: 10;
  display: grid;
  gap: 10px;
  padding: 14px 0;
  background: rgba(246, 248, 249, 0.94);
  backdrop-filter: blur(12px);
}

.filter-group {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.filter-button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 14px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.filter-button[aria-pressed="true"] {
  color: white;
  background: var(--aqua-dark);
  border-color: var(--aqua-dark);
}

.subfilters[hidden] {
  display: none;
}

.catalog-wrap {
  padding: 24px 0 64px;
}

.catalog-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.catalog-heading span {
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.product-card {
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.product-media {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  background:
    linear-gradient(135deg, rgba(13, 124, 134, 0.14), rgba(216, 111, 90, 0.12)),
    #eef5f6;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-fallback {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  color: var(--aqua-dark);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(13, 124, 134, 0.22);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
}

.product-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.sku {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
}

.product-meta {
  display: grid;
  gap: 8px;
  margin: 0;
}

.product-meta div {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
  min-height: 24px;
  color: var(--ink);
}

.product-meta dt {
  color: var(--muted);
  font-weight: 700;
}

.product-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.inquiry-link {
  margin-top: 4px;
  color: white;
  background: #06c755;
}

.empty-state {
  padding: 36px 20px;
  color: var(--muted);
  text-align: center;
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.line-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 28px;
  align-items: center;
  margin-bottom: 56px;
  padding: 30px;
  color: white;
  background: var(--aqua-dark);
  border-radius: 8px;
}

.line-panel .button {
  margin-top: 8px;
  background: #06c755;
}

.line-qr {
  width: 180px;
  height: 180px;
  object-fit: contain;
  padding: 10px;
  background: white;
  border-radius: 8px;
}

.line-qr.is-hidden {
  display: none;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0 32px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@media (max-width: 1020px) {
  .catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

  .hero > div,
  .toolbar,
  .catalog-wrap,
  .line-panel,
  footer {
    width: min(100% - 28px, 1180px);
  }

  .hero {
    min-height: 330px;
    padding: 60px 0 32px;
  }

  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .product-body {
    padding: 14px;
  }

  .product-meta div {
    grid-template-columns: 50px minmax(0, 1fr);
  }

  .line-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 470px) {
  .brand span:last-child {
    max-width: 156px;
  }

  .line-link {
    min-height: 38px;
    padding: 0 12px;
    font-size: 14px;
  }

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

  footer {
    flex-direction: column;
  }
}
