/* C01–C05: shared category container and hero. Loaded after page-specific styles. */
.category-page {
  --category-hero-top: 28px;
  --category-content-width: min(100% - 48px, 1240px);
  --category-title-size: clamp(46px, 5vw, 72px);
  --category-title-mobile: 43px;
  --category-title-max: 10ch;
  --category-figure-ratio: 16 / 10;
  --category-image-size: 100%;
}

.category-page.c01-wood { --category-figure-ratio: 1672 / 941; }
.category-page.c02-brick { --category-image-size: 106%; }
.category-page.c04-solid {
  --category-title-size: clamp(42px, 4.6vw, 67px);
  --category-title-mobile: clamp(36px, 9vw, 43px);
  --category-title-max: 16ch;
  --category-figure-ratio: 1672 / 941;
}

/* The legacy Fluted page styles bare header elements; protect the shared shell. */
.category-page > tg-header .tg-shell-header {
  display: block;
  padding: 0;
}

.category-page main > .page-breadcrumb {
  width: var(--category-content-width);
  margin-bottom: 0;
  padding-bottom: 18px;
}

/* Align every outer section to the same baseline as the shared header. */
.category-page main > section > :is(.c01-container, .c02-container, .c03-container, .shell) {
  width: var(--category-content-width);
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 0;
}

/* Keep the Stone Look photo group compact without indenting its heading. */
.category-page.c03-stone #applications > .c03-container {
  max-width: 1240px;
}
.category-page.c03-stone #applications .c03-case-grid {
  max-width: 960px;
  margin-inline: auto;
}

/* One layout and type scale for the five category banners. */
.category-page .category-hero {
  padding: var(--category-hero-top) 0 52px;
  border-bottom: 1px solid #dde5e8;
  background: #fff;
}
.category-page .category-hero .category-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}
.category-page .category-hero__grid > * { min-width: 0; }
.category-page .category-hero .category-hero__eyebrow {
  margin: 0 0 16px;
  color: #245b78;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 800;
  letter-spacing: .075em;
  text-transform: uppercase;
}
.category-page .category-hero .category-hero__title {
  max-width: var(--category-title-max);
  margin: 0 0 22px;
  font-size: var(--category-title-size);
  line-height: 1.02;
  letter-spacing: -.05em;
  text-wrap: balance;
}
.category-page .category-hero .category-hero__lead {
  max-width: 55ch;
  margin: 0;
  color: #60727b;
  font-size: 19px;
  line-height: 1.62;
}
.category-page .category-hero .category-hero__actions {
  display: flex;
  align-items: center;
  gap: 12px 16px;
  flex-wrap: wrap;
  margin-top: 26px;
}
.category-page .category-hero .category-hero__media { min-width: 0; max-width: 100%; }
.category-page .category-hero .category-hero__figure {
  display: grid;
  place-items: center;
  align-self: start;
  width: 100%;
  aspect-ratio: var(--category-figure-ratio);
  margin: 0;
  overflow: hidden;
  background: linear-gradient(145deg, #fff, #f1f4f5);
}
.category-page .category-hero__media .category-hero__figure { border-bottom: 4px solid #d8c7a8; }
.category-page.c04-solid .category-hero__figure { background: #fff; border-bottom-color: #59676b; }
.category-page.c01-wood .category-hero__figure { background: #fff; }
.category-page .category-hero .category-hero__figure img {
  display: block;
  width: var(--category-image-size);
  height: var(--category-image-size);
  max-width: none;
  object-fit: contain;
}
.category-page .category-hero .category-hero__guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid #dde5e8;
  border-top: 0;
  background: #fff;
}
.category-page .category-hero__guide li {
  min-width: 0;
  padding: 12px 14px;
  color: #60727b;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}
.category-page.c04-solid .category-hero__guide li { font-size: 14px; }
.category-page .category-hero__guide li + li { border-left: 1px solid #dde5e8; }

@media (max-width: 900px) {
  .category-page .category-hero .category-hero__grid { grid-template-columns: 1fr; gap: 26px; }
  .category-page .category-hero .category-hero__media,
  .category-page .category-hero__grid > .category-hero__figure { max-width: 780px; }
}

@media (max-width: 767px) {
  .category-page {
    --category-hero-top: 24px;
  }
  .category-page .category-hero { padding-bottom: 40px; }
  .category-page .category-hero .category-hero__title { font-size: var(--category-title-mobile); }
  .category-page .category-hero .category-hero__lead { font-size: 17px; }
  .category-page .category-hero .category-hero__actions { align-items: stretch; flex-direction: column; }
  .category-page .category-hero__actions .page-btn { width: 100%; }
  .category-page .category-hero .category-hero__guide { grid-template-columns: 1fr; }
  .category-page .category-hero__guide li { text-align: left; }
  .category-page .category-hero__guide li + li { border-left: 0; border-top: 1px solid #dde5e8; }
  .category-page.c03-stone #applications .c03-case-grid {
    max-width: 420px;
  }
}

@media (max-width: 420px) {
  .category-page:not(.c04-solid) { --category-title-mobile: 39px; }
}

@media (max-width: 560px) {
  .category-page {
    --category-content-width: min(100% - 32px, 1240px);
  }
}
