/* Telescopic family and size pages only. */
body.telescopic-series-page { padding-bottom: 0; }
.telescopic-series-page .detail-page__buySupportLinks { display: flex; flex-wrap: nowrap; gap: clamp(6px,1vw,12px); }
.telescopic-series-page .detail-page__buySupportLinks a { white-space: nowrap; flex: 0 0 auto; }
.telescopic-series-page .telescopic-series__matrix { min-width: 0; width: 100%; }
.telescopic-series-page .telescopic-series__matrix table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.telescopic-series__matrix th,.telescopic-series__matrix td { padding: 10px 8px; border: 1px solid #d2dce8; text-align: center; font: 13px/1.45 Arial,sans-serif; overflow-wrap: anywhere; }
.telescopic-series__matrix th { font-weight: bold; }
.telescopic-series__matrix th:first-child { width: 33.333%; }
.telescopic-series__matrix thead th,.telescopic-series__matrix tbody tr:nth-last-child(2) > * { background: #003366; color: white; }
.telescopic-series__matrix tbody th,.telescopic-series__matrix tbody td { background: #bdc9d7; color: #17374f; }
.telescopic-series__matrix thead a { display: inline-block; color: #fff; }
.telescopic-series__matrix .telescopic-series__select { display: inline-block; box-sizing: border-box; padding: 10px 3px; width: 100%; max-width: 88px; border-radius: 2px; background: #003366; color: #fff; font-weight: bold; text-decoration: none; white-space: nowrap; }
.telescopic-series__matrix caption,.telescopic-series__note { caption-side: bottom; margin: 0; padding: 10px; background: transparent; color: #17374f; font: italic 13px/1.6 Arial,sans-serif; text-align: center; }
.telescopic-series-page a:focus-visible { outline: 3px solid #b77400; outline-offset: 2px; }
.telescopic-series-page [id] { scroll-margin-top: 150px; }
.telescopic-size__hero { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); gap: 24px; align-items: start; }
.telescopic-size__hero > * { min-width: 0; }
.telescopic-size__figure { margin: 0; }
.telescopic-size__figure img { display: block; max-width: 100%; width: auto; height: auto; max-height: 500px; margin: 0 auto; object-fit: contain; cursor: default; }
.telescopic-size__figure figcaption { margin: 10px 0; font: 12px/1.5 Arial,sans-serif; color: #53677c; }
.telescopic-size p { line-height: 1.6; }
.telescopic-size a { color: #03406d; }
.telescopic-size a:hover { color: #005b99; }
.telescopic-size__pending { padding: 14px; background: #f3f7fa; border: 1px solid #c3d0e0; margin-bottom: 16px; }
.telescopic-size__pending strong { font-weight: 700; }
.telescopic-size__pending p { margin-bottom: 0; }
.telescopic-size__pending .telescopic-size__price { margin: 10px 0; color: #003366; font-size: 28px; font-weight: bold; line-height: 1.3; }
.telescopic-size__sizes { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; }
.telescopic-size__sizes a { display: flex; justify-content: center; align-items: center; min-height: 44px; border: 1px solid #9cafc2; font-weight: bold; text-decoration: none; }
.telescopic-size__sizes a[aria-current] { background: #003366; color: #fff; }
.telescopic-size__subheading { font-size: 17px; line-height: 1.4; }
.telescopic-size__specs { margin: 0; border: 1px solid #cfdae5; }
.telescopic-size__specs > div { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.2fr); border-bottom: 1px solid #cfdae5; }
.telescopic-size__specs > div:last-child { border-bottom: 0; }
.telescopic-size__specs dt,.telescopic-size__specs dd { margin: 0; padding: 9px 10px; line-height: 1.5; overflow-wrap: anywhere; }
.telescopic-size__specs dt { background: #f1f6fa; font-weight: bold; }
.telescopic-size__copy { padding: 14px 16px; border: 1px solid #cfdae5; }
.telescopic-size__copy p:first-child { margin-top: 0; }
@media(max-width:640px) {
 .telescopic-series__matrix th,.telescopic-series__matrix td { padding: 8px 4px; font-size: 12px; }
 .telescopic-series__matrix th:first-child { width: 29%; }
 .telescopic-size__hero { grid-template-columns: minmax(0,1fr); gap: 16px; }
 .telescopic-size__figure img { max-height: 330px; }
}
@media(max-width:480px) {
 .telescopic-series__matrix tbody tr:last-child td { padding: 6px 2px; }
 .telescopic-series__matrix .telescopic-series__select { padding: 10px 1px; font-size: 10px; }
}

/* Use existing shared purchase controls, scope layout to new pages. */
body.page-product-detail--telescopic-size #ycp-purchase.ycp-purchase--size > strong {
  grid-column: 1 / -1;
}
@container ycp-size (max-width: 320px) {
  body.page-product-detail--telescopic-size #ycp-purchase .detail-page__price,
  body.page-product-detail--telescopic-size #ycp-purchase .ycp-purchase__buttons {
    grid-column: 1 / -1;
  }
}

/* Bases: keep each image beside its own description and optional separate price. */
body.telescopic-series-page .detail-page.detail-page--telescopic [aria-labelledby="telescopic-bases-title"] .detail-page__offerGrid {
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px;
  grid-auto-rows: auto; align-items: stretch;
}
body.telescopic-series-page .detail-page.detail-page--telescopic [aria-labelledby="telescopic-bases-title"] .detail-page__offerCard {
  display: grid; grid-template-columns: 100px minmax(0,1fr);
  grid-template-areas: "media title" "media text" "media price";
  grid-template-rows: auto 1fr auto; gap: 8px 12px;
  align-content: start; align-items: start; min-width: 0; height: auto;
  padding: 12px; border: 1px solid #d2dce8; border-radius: 0;
  background: #fff; box-shadow: none;
}
body.telescopic-series-page .detail-page.detail-page--telescopic [aria-labelledby="telescopic-bases-title"] .detail-page__offerMedia {
  grid-area: media; display: flex; align-items: center; justify-content: center;
  box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%;
  min-height: 140px; height: 140px; margin: 0; padding: 0; border: 0;
}
body.telescopic-series-page .detail-page.detail-page--telescopic [aria-labelledby="telescopic-bases-title"] .detail-page__offerMedia img {
  display: block; width: auto; height: auto; max-width: 100%; max-height: 140px; object-fit: contain;
}
body.telescopic-series-page .detail-page.detail-page--telescopic [aria-labelledby="telescopic-bases-title"] .detail-page__offerTitle {
  grid-area: title; width: auto; min-height: 0; height: auto; padding: 0; margin: 0;
  color: #003964; background: transparent; border: 0; text-align: left;
  font: 700 16px/1.3 Arial,sans-serif;
}
body.telescopic-series-page .detail-page.detail-page--telescopic [aria-labelledby="telescopic-bases-title"] .detail-page__offerText {
  grid-area: text; width: auto; min-width: 0; margin: 0; padding: 0;
  font: 400 13px/1.5 Arial,sans-serif;
}
body.telescopic-series-page .detail-page.detail-page--telescopic [aria-labelledby="telescopic-bases-title"] .telescopic-base__price {
  grid-area: price; width: auto; margin: 0; font: 400 13px/1.5 Arial,sans-serif;
}
@media(max-width:640px) {
  body.telescopic-series-page .detail-page.detail-page--telescopic [aria-labelledby="telescopic-bases-title"] .detail-page__offerGrid {
    grid-template-columns: minmax(0,1fr);
  }
}

/* Gallery Main & Full-size Zoom */
.telescopic-size__galleryMain {
  position: relative;
  background: #fff;
  border: 1px solid #d8e2eb;
  border-radius: 4px;
  overflow: hidden;
  text-align: center;
}
.telescopic-size__galleryLink {
  display: block;
  background: #fafcff;
  cursor: zoom-in;
}
.telescopic-size__galleryLink:focus-visible {
  outline: 3px solid #003366;
  outline-offset: -3px;
}
.telescopic-size__galleryMain img {
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto;
  max-height: 520px;
  margin: 0 auto;
  object-fit: contain;
}
.telescopic-size__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #007a4d;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 3px;
  z-index: 2;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}
.telescopic-size__zoom-hint {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: rgba(0, 51, 102, 0.85);
  color: #fff;
  border-radius: 4px;
  padding: 4px 7px;
  font-size: 11px;
  font-weight: 600;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 2;
  line-height: 1;
}
.telescopic-size__galleryLink:hover .telescopic-size__zoom-hint {
  background: #003366;
}

/* Thumbnails: 4-column responsive grid */
.telescopic-size__thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 8px;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  padding: 0;
}
.telescopic-size__thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  padding: 5px 2px;
  border: 2px solid #d8e2eb;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 11px;
  line-height: 1.2;
  color: #435b73;
  min-width: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.telescopic-size__thumb:hover {
  border-color: #003366;
  color: #003366;
}
.telescopic-size__thumb.is-active {
  border-color: #003366;
  background: #f0f6fc;
  color: #003366;
  font-weight: 700;
  box-shadow: 0 0 0 1px #003366;
}
.telescopic-size__thumb img {
  display: block;
  width: 100%;
  height: 48px;
  object-fit: contain;
  margin-bottom: 2px;
  pointer-events: none;
}

/* Advantages row under 'Подготовка площадки и перевозка' in 1 row */
.telescopic-size__advantages-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 16px;
  width: 100%;
  box-sizing: border-box;
}
.telescopic-size__adv-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #f4f8fb;
  border: 1px solid #d5e2ed;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.25;
  color: #1a3850;
  font-weight: 500;
  box-sizing: border-box;
  min-width: 0;
}
.telescopic-size__adv-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  min-width: 18px;
  border-radius: 50%;
  background: #007a4d;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}
.telescopic-size__adv-chip span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .telescopic-size__advantages-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .telescopic-size__advantages-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .telescopic-size__adv-chip {
    padding: 7px 10px;
    font-size: 12px;
  }
}


/* Gallery more link */
.telescopic-size__gallery-more-wrap {
  margin: 10px 0 2px;
  text-align: center;
}
.telescopic-size__gallery-more-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font: 600 12px/1.3 Arial, sans-serif;
  color: #003366;
  text-decoration: underline;
  text-decoration-color: rgba(0, 51, 102, 0.4);
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
.telescopic-size__gallery-more-link:hover {
  color: #001a33;
  text-decoration-color: #001a33;
}

/* Hero gallery on telescopic series hub page: bulletproof sizing, zero distortion */
.telescopic-series-page .telescopic-size__figure {
  margin: 0;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #d7e0ea;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(15, 43, 76, 0.06);
  box-sizing: border-box;
  width: 100%;
}

.telescopic-series-page .telescopic-size__galleryMain {
  position: relative;
  background: #ffffff;
  border: 1px solid #e1e8f0;
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
  padding: 8px 4px;
  box-sizing: border-box;
}

.telescopic-series-page .telescopic-size__galleryMain img,
.telescopic-series-page #telescopicMainImg {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-height: 460px !important;
  object-fit: contain !important;
  margin: 0 auto !important;
}

.telescopic-series-page .telescopic-size__thumbs {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 4px;
  margin-top: 8px;
}

.telescopic-series-page .telescopic-size__thumb {
  padding: 4px 2px;
  font-size: 10.5px;
}

.telescopic-series-page .telescopic-size__thumb img {
  height: 42px;
  object-fit: contain;
}

@media (max-width: 900px) {
  .telescopic-series-page .telescopic-size__galleryMain img,
  .telescopic-series-page #telescopicMainImg {
    max-height: 360px !important;
  }
}
