:root {
  --bg: #ffffff;
  --surface: #f8fafc;
  --card: #ffffff;
  --text: #111827;
  --muted: #667085;
  --line: #e5e7eb;
  --accent: #2563eb;
  --accent-soft: #eff6ff;
  --warning-bg: #fff7ed;
  --warning-text: #9a3412;
  --radius: 20px;
  --shadow: 0 18px 55px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  background: var(--bg);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  padding: 0.75rem 1rem;
  color: var(--text);
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: top 160ms ease;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  display: grid;
  gap: 2rem;
  width: min(100% - 2rem, 1160px);
  margin: 0 auto;
  padding: clamp(2rem, 7vw, 5rem) 0 2rem;
}

.back-link {
  width: fit-content;
  color: var(--muted);
  font-weight: 750;
  text-decoration: none;
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--accent);
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 13ch;
  margin-bottom: 1rem;
  font-size: clamp(3rem, 8vw, 6.25rem);
  line-height: 0.9;
  letter-spacing: -0.07em;
}

.intro {
  max-width: 36rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.12rem;
}

.page-shell {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
  width: min(100% - 2rem, 1160px);
  margin: 0 auto;
  padding-bottom: 4rem;
}

.category-panel {
  position: sticky;
  top: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.category-panel h2 {
  margin-bottom: 0.75rem;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.category-panel nav {
  display: grid;
  gap: 0.35rem;
}

.category-panel a {
  padding: 0.7rem 0.8rem;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  border-radius: 12px;
}

.category-panel a:hover,
.category-panel a:focus-visible {
  color: var(--accent);
  background: white;
}

.product-content {
  min-width: 0;
}

.category-section {
  scroll-margin-top: 1.5rem;
}

.category-section + .category-section {
  margin-top: 3rem;
}

.category-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.category-heading h2 {
  margin-bottom: 0;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  letter-spacing: -0.04em;
}

.category-heading span {
  color: var(--muted);
  font-weight: 700;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.product-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.product-card img {
  width: 100%;
  aspect-ratio: 1 / 0.78;
  object-fit: cover;
  background: var(--surface);
}

.product-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
}

.product-card h3 {
  margin-bottom: 0;
  font-size: 1.04rem;
  letter-spacing: -0.02em;
}

.product-description {
  margin: -0.35rem 0 auto;
  color: var(--muted);
  font-size: 0.93rem;
}

.product-link,
.link-pending {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  min-height: 2.45rem;
  padding: 0.65rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 800;
  border-radius: 999px;
}

.product-link {
  color: #ffffff;
  text-decoration: none;
  background: var(--accent);
}

.product-link:hover,
.product-link:focus-visible {
  background: #1d4ed8;
}

.link-pending {
  color: var(--warning-text);
  background: var(--warning-bg);
}

.empty-state {
  padding: 2rem;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  width: min(100% - 2rem, 1160px);
  margin: 0 auto;
  padding: 2rem 0 3rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.site-footer p {
  max-width: 44rem;
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .page-shell {
    grid-template-columns: 1fr;
  }

  .category-panel {
    position: static;
  }

  .category-panel nav {
    display: flex;
    overflow-x: auto;
    padding-bottom: 0.2rem;
  }

  .category-panel a {
    white-space: nowrap;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .site-header {
    gap: 1.5rem;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .category-heading,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}
