/* Fitberg — series PDF: light panels (image + table) like «Похожие товары» */

/* DETAIL_TEXT sits in .content--max-width (1200px); variants is full-width — match it */
.catalog-detail .content--max-width:has(.fb-series-pdf),
.catalog-detail .js-detail-description:has(.fb-series-pdf) {
  max-width: none !important;
  width: 100%;
}

.fb-series-pdf {
  margin: 0 0 28px;
  width: 100%;
  max-width: none;
  font-size: 15px;
  line-height: 1.45;
}

/* Light island: scheme + characteristics / dimensions */
.fb-series-pdf__top,
.fb-series-pdf__model {
  width: 100%;
  max-width: none;
  background: #ffffff;
  color: #202223;
  border: 1px solid #d2d4d7;
  border-radius: 6px;
  padding: 16px;
  margin: 0 0 24px;
  box-sizing: border-box;
}

.fb-series-pdf__top {
  display: grid;
  /* Fixed scheme column — characteristics table takes the rest (was shrinking in fr-grid) */
  grid-template-columns: minmax(140px, 240px) minmax(0, 1fr);
  gap: 16px 24px;
  align-items: start;
}

.fb-series-pdf__about {
  min-width: 0;
}

.fb-series-pdf__about > .fb-series-pdf__chars,
.fb-series-pdf__about > table.fb-series-pdf__chars {
  width: 100% !important;
  max-width: none !important;
  min-width: 0;
}

.fb-series-pdf__desc,
.fb-series-pdf__intro {
  margin: 0 0 12px;
  color: #202223;
}

.fb-series-pdf__desc {
  white-space: pre-line;
}

.fb-series-pdf__scheme {
  margin: 0;
}

.fb-series-pdf__scheme img {
  display: block;
  max-width: 100%;
  height: auto;
  background: #ffffff;
}

.fb-series-pdf__scheme--cover {
  width: 100%;
  max-width: none;
}

.fb-series-pdf__scheme--cover img {
  width: 100%;
  border: 1px solid #d2d4d7;
  border-radius: 4px;
}

.fb-series-pdf__scheme figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: #6d7175;
}

.fb-series-pdf__chars {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: #ffffff;
  color: #202223;
}

.fb-series-pdf__chars th,
.fb-series-pdf__chars td {
  padding: 10px 14px;
  border: none;
  border-bottom: 1px solid #e4e6e8;
  text-align: left;
  vertical-align: top;
  color: #202223 !important;
  background: #ffffff !important;
}

.fb-series-pdf__chars th {
  width: 42%;
  font-weight: 600;
  color: #5c5f62 !important;
  background: #f3f4f5 !important;
}

.fb-series-pdf__chars tr:nth-child(even) th {
  background: #eceeef !important;
}

.fb-series-pdf__chars tr:nth-child(even) td {
  background: #fafbfb !important;
}

.fb-series-pdf__chars tr:last-child th,
.fb-series-pdf__chars tr:last-child td {
  border-bottom: none;
}

.fb-series-pdf__model {
  scroll-margin-top: 80px;
  padding: 0;
  overflow: hidden;
}

.fb-series-pdf__dim-title {
  margin: 0;
  padding: 12px 16px;
  background: #e8e9eb;
  color: #202223;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: none;
  border-bottom: 1px solid #d2d4d7;
}

.fb-series-pdf__model-row {
  display: grid;
  grid-template-columns: minmax(140px, 240px) minmax(0, 1fr);
  gap: 16px 24px;
  align-items: start;
  padding: 16px;
  background: #ffffff;
}

.fb-series-pdf__scheme--sub {
  width: 100%;
  max-width: none;
  margin: 0;
}

.fb-series-pdf__scheme--sub img {
  width: 100%;
  height: auto;
  border: none;
  outline: none;
  background: #ffffff;
}

.fb-series-pdf__zoom {
  display: block;
  cursor: zoom-in;
  text-decoration: none;
}

.fb-series-pdf__zoom:hover img {
  opacity: 0.92;
}

.fb-series-pdf__gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 16px;
}

.fb-series-pdf__gallery img {
  width: 140px;
  height: auto;
  background: #fff;
  border: 1px solid #d2d4d7;
}

.fb-series-pdf__table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #d2d4d7;
  border-radius: 4px;
  min-width: 0;
  background: #ffffff;
}

.fb-series-pdf__model-row .fb-series-pdf__table-wrap {
  border-top: 1px solid #d2d4d7;
}

.fb-series-pdf__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 480px;
  background: #ffffff;
  color: #202223;
}

.fb-series-pdf__table th,
.fb-series-pdf__table td {
  padding: 9px 12px;
  border: none;
  border-bottom: 1px solid #dfe1e3;
  text-align: left;
  white-space: nowrap;
  color: #202223 !important;
  background: #ffffff !important;
}

.fb-series-pdf__table thead th {
  background: #e8e9eb !important;
  font-weight: 700;
  color: #202223 !important;
}

.fb-series-pdf__table tbody tr:nth-child(odd) td {
  background: #f3f4f5 !important;
}

.fb-series-pdf__table tbody tr:nth-child(even) td {
  background: #ffffff !important;
}

.fb-series-pdf__table tbody tr[data-url] {
  cursor: pointer;
}

.fb-series-pdf__table tbody tr[data-url]:hover td {
  background: #ebecef !important;
}

.fb-series-pdf__table tbody tr.is-disabled {
  cursor: default;
  opacity: 0.7;
}

.fb-series-pdf__table td:first-child,
.fb-series-pdf__table td:first-child a {
  font-weight: 700;
  color: #202223 !important;
  text-decoration: none;
}

.fb-series-pdf__table td:first-child a:hover {
  color: #ea0000 !important;
  text-decoration: underline;
}

.fb-series-pdf--detail .fb-series-pdf__top {
  margin-bottom: 20px;
}

.fb-series-pdf-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 22, 24, 0.82);
  cursor: zoom-out;
}

.fb-series-pdf-lightbox.is-open {
  display: flex;
}

.fb-series-pdf-lightbox img {
  max-width: min(96vw, 1200px);
  max-height: 92vh;
  width: auto;
  height: auto;
  background: #fff;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
  cursor: default;
}

@media (max-width: 767px) {
  .fb-series-pdf__top,
  .fb-series-pdf__model-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .fb-series-pdf__scheme--sub {
    max-width: 220px;
  }
}
