/* Manufacturer brand pages (/brands/*). Loaded after styles.css. */

.bp-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Panoramic source photos lose too much when cropped to the default 4:5 split. */
.split img.bp-wide {
  aspect-ratio: 3 / 2;
}

.bp-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 34px;
  border: 1px solid var(--line);
  background: var(--white);
}

.bp-summary > div {
  padding: 22px 24px;
  border-left: 1px solid var(--line);
  min-width: 0;
}

.bp-summary > div:first-child {
  border-left: 0;
  display: flex;
  align-items: center;
}

.bp-summary dt {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--stone-700);
}

.bp-summary dd {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.35;
}

.bp-logo {
  display: block;
  height: calc(var(--logo-h, 26px) * 1.25);
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.bp-tier {
  display: inline-block;
  font-family: var(--grotesk);
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--wood);
  white-space: nowrap;
}

.bp-line-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 26px);
}

.bp-line {
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  min-width: 0;
}

.bp-line h3 {
  margin-top: 10px;
  font-size: 21px;
}

.bp-line p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.bp-line .bp-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--stone-700);
}

.bp-line .bp-meta + * {
  margin-top: 14px;
}

.bp-line > p:last-of-type {
  margin-bottom: 18px;
}

.bp-group + .bp-group {
  margin-top: clamp(40px, 6vw, 70px);
}

.bp-group-head {
  margin-bottom: 22px;
}

.bp-group-head h3 {
  font-size: clamp(24px, 3vw, 32px);
}

.bp-group-head p {
  margin-top: 10px;
  max-width: 760px;
}

.bp-checklist {
  display: grid;
  gap: 14px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.bp-checklist li {
  position: relative;
  padding-left: 26px;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.6;
}

.bp-checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 12px;
  height: 2px;
  background: var(--wood);
}

.wood-section .bp-checklist li,
.dark-section .bp-checklist li {
  color: rgba(251, 250, 246, 0.9);
}

.wood-section .bp-checklist li::before,
.dark-section .bp-checklist li::before {
  background: var(--wood-on-dark);
}

.bp-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 15px;
}

.bp-table th,
.bp-table td {
  padding: 14px 12px;
  text-align: left;
  vertical-align: top;
  border-top: 1px solid var(--line-invert);
}

.bp-table thead th {
  border-top: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--wood-on-dark);
}

.bp-table tbody th {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
}

.bp-table .bp-tier {
  color: var(--lion-yellow);
}

.bp-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 22px);
}

.bp-gallery figure {
  margin: 0;
  min-width: 0;
}

.bp-gallery img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: var(--stone-100);
}

.bp-photo {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--stone-100);
  cursor: zoom-in;
}

.bp-photo:focus-visible {
  outline: 3px solid var(--wood);
  outline-offset: 4px;
}

.bp-line h3 .bp-tier,
.bp-series h3 .bp-tier {
  margin-left: 8px;
  font-size: 16px;
}

.bp-resources {
  border-top: 1px solid var(--line);
}

.bp-gallery figcaption {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--stone-700);
}

.bp-note-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 26px);
}

.bp-note {
  padding: 26px;
}

.bp-note h3 {
  font-size: 21px;
}

.bp-note p {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.65;
}

.bp-note .text-link {
  margin-top: 16px;
}

.bp-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 16px;
}

/* Milgard series guide */
.bp-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.bp-chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  transition: background 200ms var(--ease), color 200ms var(--ease);
}

.bp-chip:hover,
.bp-chip:focus-visible {
  background: var(--ink);
  color: var(--white);
}

.bp-chip-row.subtle .bp-chip {
  border-color: var(--line);
  color: var(--stone-700);
}

.bp-callout {
  margin-top: 26px;
  padding: 20px 24px;
  border-left: 3px solid var(--lion-yellow);
  background: var(--paper);
  line-height: 1.6;
}

.bp-callout strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bp-best-for {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
  margin-top: 14px;
  font-size: 15px;
  color: var(--stone-700);
}

.bp-best-for strong {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink);
}

.bp-series-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 26px);
}

.bp-series {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  min-width: 0;
}

.bp-series img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--stone-100);
}

.bp-series-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px;
}

.bp-series h3 {
  margin-top: 8px;
  font-size: 22px;
}

.bp-series-body > p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.6;
}

.bp-facts {
  display: grid;
  gap: 6px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

.bp-facts strong {
  color: var(--ink);
}

.bp-series details {
  margin-top: 16px;
  border-top: 1px solid var(--line);
}

.bp-series summary {
  cursor: pointer;
  padding: 14px 0 0;
  font-weight: 700;
  font-size: 15px;
}

.bp-series details p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.6;
}

.bp-series .bp-links {
  margin-top: auto;
  padding-top: 20px;
}

/* Brands overview */
.bp-brand-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 26px);
}

.bp-brand-card {
  display: flex;
  flex-direction: column;
  padding: 28px 26px;
  background: var(--white);
  border: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  min-width: 0;
  transition: box-shadow 260ms ease, transform 260ms ease;
}

.bp-brand-card:hover,
.bp-brand-card:focus-visible {
  box-shadow: var(--shadow-sm);
  transform: translateY(-3px);
}

.bp-brand-card .bp-logo-wrap {
  display: flex;
  align-items: center;
  height: 52px;
}

.bp-brand-card h2 {
  margin-top: 20px;
  font-size: 24px;
}

.bp-brand-card p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.6;
}

.bp-brand-card .bp-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 14px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--stone-700);
}

.bp-brand-card > p:last-of-type {
  margin-bottom: 20px;
}

.bp-brand-card .text-link {
  align-self: flex-start;
  margin-top: 16px;
}

@media (max-width: 1080px) {
  .bp-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bp-summary > div:nth-child(3) {
    border-left: 0;
  }

  .bp-summary > div:nth-child(n+3) {
    border-top: 1px solid var(--line);
  }

  .bp-line-grid,
  .bp-gallery,
  .bp-brand-grid,
  .bp-note-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .bp-summary,
  .bp-line-grid,
  .bp-gallery,
  .bp-brand-grid,
  .bp-note-grid,
  .bp-series-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .bp-summary > div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .bp-summary > div:first-child {
    border-top: 0;
  }
}
