/* Shared timber catalogue and species sections, approved in November 2026. */
.p77-beam-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.p77-chead > .p77-wrap > .p77-beam-nav { margin: 12px 0; }
.p77-beam-nav__label { margin: 0; font-size: 15px; font-weight: 500; color: var(--p77-ink-2); }
.p77-beam-nav .p77-subcats { margin: 0; min-width: 0; max-width: 100%; }
.p77-beam-nav .p77-chip { gap: 8px; font-size: 15px; }
.p77-beam-nav .p77-chip[aria-current="page"] { background: #e6efe9; border-color: var(--p77-accent); color: var(--p77-accent); font-weight: 600; cursor: default; }
.p77-beam-group + .p77-beam-group { margin-top: 32px; }
.p77-beam-group > .p77-h3 { margin-bottom: 8px; }
.p77-beam-group .p77-promo { margin-bottom: 12px; }
.p77-beam-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; font-size: 15px; }
.p77-beam-facts .p77-note { margin: 0; }
.p77-beam-table.p77-lt { width: 100%; max-width: none; margin-top: 0; overflow-x: auto; }
/* The product gets the remaining width; service columns only keep the space they need. */
.p77-beam-table table { width: 100%; min-width: 940px; table-layout: auto; font-size: 16px; }
.p77-beam-table thead th:nth-child(1) { width: auto; }
.p77-beam-table thead th:nth-child(2) { width: 66px; }
.p77-beam-table thead th.p77-beam-grade { width: 108px; }
.p77-beam-table thead th.p77-beam-moisture { width: 144px; }
.p77-beam-table thead th:last-child { width: 116px; }
.p77-beam-table td, .p77-beam-table th { padding-left: 10px; padding-right: 10px; }
.p77-beam-table td { height: 64px; }
.p77-beam-table .p77-lt__sz a { white-space: nowrap; }
.p77-beam-name { font-weight: 400; }
.p77-beam-size { font-weight: 600; white-space: nowrap; }
.p77-beam-table .p77-lt__len { white-space: nowrap; }
.p77-beam-table .p77-lt__pr, .p77-beam-table thead th:last-child { text-align: left; }
.p77-beam-table .p77-lt__old { display: block; margin: 3px 0 0; font-size: 13px; }
.p77-beam-table .p77-lt__rub, .p77-beam-mobile-grade { display: none; }
.p77-beam-table th:nth-child(2), .p77-beam-table td:nth-child(2) { display: table-cell; }
.p77-beam-guide .p77-sptiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.p77-timber-guide .p77-sptiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.p77-beam-guide .p77-sptile__name { line-height: 1.35; }
.p77-beam-guide .p77-sptile__note { font-size: 15px; line-height: 1.5; margin-top: 4px; }
.p77-beam-guide .p77-sptile__more { display: block; font-size: 15px; }
.p77-beam-card .p77-pcard__name { font-size: 16px; line-height: 1.4; }
.p77-beam-card__facts { display: grid; gap: 6px; margin: 12px 0 4px; font-size: 15px; line-height: 1.4; }
.p77-beam-card__facts > div { display: flex; flex-wrap: nowrap; align-items: baseline; gap: 5px; white-space: nowrap; }
.p77-beam-card__facts dt { flex: 0 0 auto; color: var(--p77-muted); }
.p77-beam-card__facts dd { margin: 0; color: var(--p77-ink-2); white-space: nowrap; }
.p77-beam-card .p77-beam-card__dry { display: inline-block; align-self: flex-start; margin: 0 0 4px; font-size: 15px; white-space: nowrap; }
.p77-beam-card .p77-stock { font-size: 15px; }
.p77-beam-card .p77-timber-wet.is-natural { display: inline-block; align-self: flex-start; margin: 0 0 4px; padding: 2px 8px; border-radius: 6px; background: #f5eee3; color: #795b2f; font-size: 15px; line-height: 1.35; }
.p77-timber-mobile-wet { display: none; }
/* These combined roots start with the table; other timber sections keep their A/B variant.
   The existing DOM-ready code removes p77-ab-b, so the view switch remains available. */
html.p77-ab-b .p77-beam-price:not(.p77-timber-price) [data-p77-pane="table"],
html.p77-ab-b .p77-timber-price--combined [data-p77-pane="table"] { display: block !important; }
html.p77-ab-b .p77-beam-price:not(.p77-timber-price) [data-p77-pane="cards"],
html.p77-ab-b .p77-timber-price--combined [data-p77-pane="cards"] { display: none !important; }
@media (min-width: 1024px) {
  .p77-beam-facts { display: none; }
}
/* This width range uses the theme's fixed 992px container. */
@media (min-width: 1024px) and (max-width: 1365px) {
  .p77-main > .p77-beam-price > .p77-wrap { padding-left: 24px; padding-right: 24px; }
}
@media (max-width: 1023px) {
  .p77-beam-table .p77-beam-grade, .p77-beam-table .p77-beam-moisture,
  .p77-beam-table .p77-beam-name, .p77-beam-table .p77-lt__hd,
  .p77-beam-table .p77-lt__u { display: none; }
  .p77-beam-table .p77-lt__hm, .p77-beam-table .p77-lt__rub { display: inline; }
  .p77-beam-table thead th:nth-child(1) { width: 40%; }
  .p77-beam-table thead th:nth-child(2) { width: 19%; }
  .p77-beam-table thead th:last-child { width: 41%; }
  .p77-beam-mobile-grade { display: block; margin-top: 4px; font-size: 13px; font-weight: 400; color: var(--p77-muted); }
  .p77-beam-table table { min-width: 0; table-layout: fixed; font-size: 15px; }
  .p77-beam-table th { font-size: 13.5px; }
  .p77-beam-table td, .p77-beam-table th { padding: 12px; }
  .p77-beam-table .p77-lt__pr, .p77-beam-table thead th:last-child { text-align: right; }
  .p77-beam-table .p77-lt__pr { white-space: normal; }
  .p77-beam-table .p77-lt__now { white-space: nowrap; }
  .p77-beam-table .p77-lt__sz a { font-size: 15px; white-space: nowrap; }
  .p77-beam-table .p77-timber-mobile-wet { display: block; margin-top: 4px; font-size: 15px; line-height: 1.35; white-space: normal; overflow-wrap: anywhere; color: var(--p77-muted); }
}
@media (max-width: 767px) {
  .p77-beam-guide .p77-sptiles { grid-template-columns: 1fr; gap: 16px; }
  .p77-beam-guide .p77-sptile__img { height: 120px; aspect-ratio: auto; }
  .p77-beam-guide .p77-sptile__img img { height: 100%; object-fit: cover; }
  .p77-beam-guide .p77-sptile__body { padding: 14px 16px 16px; }
  .p77-beam-guide .p77-sptile__name { font-size: 18px; }
  /* Keep two readable cards even at 320 px: full text wraps instead of being clipped. */
  .p77-beam-price .p77-pcards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .p77-beam-card, .p77-beam-card .p77-pcard__body { min-width: 0; }
  .p77-beam-card .p77-pcard__body { padding: 10px 8px 12px; }
  .p77-beam-card .p77-pcard__img { height: auto; min-height: 0; aspect-ratio: 4/3; flex: 0 0 auto; overflow: hidden; }
  .p77-beam-card .p77-pcard__img > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .p77-beam-card .p77-pcard__name { font-size: 15px; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; hyphens: auto; }
  .p77-beam-card__facts { min-width: 0; }
  .p77-beam-card__facts > div { display: block; white-space: normal; }
  .p77-beam-card__facts dt { display: inline; margin-right: 4px; }
  .p77-beam-card__facts dd { display: inline; white-space: normal; overflow-wrap: anywhere; }
  .p77-beam-card .p77-beam-card__dry,
  .p77-beam-card .p77-timber-wet.is-natural { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
  .p77-beam-card .p77-stock { max-width: 100%; font-size: 15px; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; }
  .p77-beam-card .p77-pcard__foot,
  .p77-beam-card .p77-pcard__price { min-width: 0; }
  .p77-beam-card .p77-pcard__price > span:last-child { white-space: normal; }
  .p77-beam-card [data-p77-lenprice],
  .p77-beam-card [data-p77-oldnum] { white-space: nowrap; }
  .p77-beam-card .p77-pcard__price small { display: inline-block; font-size: 15px; white-space: nowrap; }
  .p77-beam-card .p77-pcard__btn { width: 100%; min-width: 0; min-height: 44px; padding-left: 6px; padding-right: 6px; font-size: 15px; line-height: 1.3; }
}

/* 0.14.796: approved desktop price column balance. */
@media (min-width: 1024px) {
  .p77-beam-table table { table-layout: fixed; }
  .p77-beam-table thead th:first-child { width: 52%; }
  .p77-beam-table thead th:nth-child(2) { width: 10%; }
  .p77-beam-table thead th.p77-beam-grade { width: 12%; }
  .p77-beam-table thead th.p77-beam-moisture { width: 14%; }
  .p77-beam-table thead th:last-child { width: 12%; }
  /* Rough-sawn larch has four columns: no empty grade column is added. */
  .p77-beam-table thead th:nth-child(2):nth-last-child(3) { width: 12%; }
  .p77-beam-table thead th.p77-beam-moisture:nth-child(3) { width: 20%; }
  .p77-beam-table thead th:last-child:nth-child(4) { width: 16%; }
  .p77-beam-table .p77-lt__sz a { white-space: normal; }
}

/* 0.14.798: approved 500px glued-beam title column. */
@media (min-width: 1024px) {
  .p77-beam-price:not(.p77-timber-price) .p77-beam-table thead th:first-child { width: 500px; }
  .p77-beam-price:not(.p77-timber-price) .p77-beam-table thead th.p77-beam-moisture { width: auto; }
  .p77-beam-price:not(.p77-timber-price) .p77-beam-table .p77-lt__sz a { white-space: nowrap; }
}

/* 0.14.800: use the approved larch glued-beam column layout on the same seven timber pages. */
@media (min-width: 1024px) {
  .p77-timber-price .p77-timber-table[data-p77-price-root]:not([data-p77-price-root="mebelnyj-shchit"]) thead th:first-child { width: 500px; }
  .p77-timber-price .p77-timber-table[data-p77-price-root]:not([data-p77-price-root="mebelnyj-shchit"]) thead th:nth-child(2) { width: 10%; }
  .p77-timber-price .p77-timber-table[data-p77-price-root]:not([data-p77-price-root="mebelnyj-shchit"]) thead th.p77-beam-grade { width: 12%; }
  .p77-timber-price .p77-timber-table[data-p77-price-root]:not([data-p77-price-root="mebelnyj-shchit"]) thead th.p77-beam-moisture { width: auto; }
  .p77-timber-price .p77-timber-table[data-p77-price-root]:not([data-p77-price-root="mebelnyj-shchit"]) thead th:last-child { width: 12%; }
  .p77-timber-price .p77-timber-table[data-p77-price-root]:not([data-p77-price-root="mebelnyj-shchit"]) .p77-lt__sz a { white-space: nowrap; }
}
