/* Product and category pages. Tokens, nav, footer, .btn, .notice and the product
   grid (.catalog-grid, .product-card) live in common.css. */

main :is(a, button):focus-visible {
  outline: 2px solid var(--lavender-deep);
  outline-offset: 3px;
}

/* ── Breadcrumb, at the top of the page heading ── */

.crumbs {
  margin-bottom: 16px;
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.crumbs li + li::before {
  content: "›";
  margin: 0 8px;
  color: var(--text-faint);
}

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

.crumbs a:hover {
  color: var(--lavender-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.crumbs [aria-current="page"] {
  font-weight: 600;
  color: var(--text);
}

/* ── Page heading: category, name, one-line description ── */

.page-head h1 {
  font-size: clamp(1.75rem, 4.4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

.page-lead {
  max-width: 56ch;
  margin-top: 14px;
  font-size: 1.02rem;
  color: var(--text-muted);
}

.hub-head {
  margin-bottom: clamp(18px, 3vw, 24px);
}

/* Category pages: the search box above the product groups */

.hub-search {
  max-width: 420px;
  margin-bottom: clamp(28px, 5vw, 44px);
}

/* ── Product: heading, photo, details. Stacked and centred on phones, photo beside the text from 640px ── */

.product-layout {
  display: grid;
  grid-template-areas: "head" "photo" "body";
  gap: clamp(20px, 4vw, 32px);
}

.product-layout .page-head {
  grid-area: head;
}

.product-photo {
  grid-area: photo;
  width: min(100%, 360px);
  margin-inline: auto;
}

.product-photo img {
  width: 100%;
  aspect-ratio: var(--photo-w) / var(--photo-h);
  object-fit: cover;
}

.product-body {
  grid-area: body;
}

.kicker {
  margin-bottom: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.product-points {
  display: grid;
  gap: 8px;
  margin-bottom: 28px;
  list-style: none;
}

.product-points li {
  position: relative;
  padding-left: 18px;
}

.product-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lavender-deep);
}

.product-note {
  max-width: 56ch;
  margin-bottom: 24px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (min-width: 640px) {
  .product-layout {
    grid-template-columns: minmax(240px, min(36%, 400px)) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas: "photo head" "photo body";
    column-gap: clamp(36px, 6vw, 80px);
    align-items: start;
  }

  .product-photo {
    width: 100%;
    margin-inline: 0;
  }
}

/* ── Product cards on these pages are whole-card links ── */

a.product-card {
  color: inherit;
  text-decoration: none;
}

a.product-card:hover h3 {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Related products and category groups ── */

.page-subhead {
  margin-bottom: clamp(16px, 3vw, 24px);
  font-size: clamp(1.2rem, 2.8vw, 1.5rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
}

.more-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-top: 24px;
  font-size: 0.92rem;
  font-weight: 600;
}

.hub-group {
  margin-bottom: clamp(36px, 7vw, 64px);
}
