/* Full-width behavior is opt-in, limited to standard blocks in B content. */
.product-content:has(> .product-content__inner > .wp-block-group.alignfull),
.lower-wrap:has(> .inner2 > .wp-block-group.alignfull) {
  width: var(--weds-b-viewport-width, 100%);
  max-width: 100%;
  overflow-x: clip;
}

.product-content__inner > .wp-block-group.alignfull,
.lower-wrap > .inner2 > .wp-block-group.alignfull {
  width: var(--weds-b-viewport-width, 100vw);
  max-width: none;
  margin-inline: calc((100% - var(--weds-b-viewport-width, 100vw)) / 2);
}

.product-content__inner > .wp-block-group.alignwide,
.lower-wrap > .inner2 > .wp-block-group.alignwide {
  width: min(calc(var(--weds-b-viewport-width, 100vw) - 6rem), 1240px);
  max-width: none;
  margin-inline: calc((100% - min(calc(var(--weds-b-viewport-width, 100vw) - 6rem), 1240px)) / 2);
}

/* Inner groups remain within their selected parent, rather than breaking out twice. */
.wp-block-group.alignfull .wp-block-group.alignfull,
.wp-block-group.alignwide .wp-block-group.alignfull {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

.single-product-page .wp-block-embed.is-type-video .wp-block-embed__wrapper {
  position: relative;
  aspect-ratio: 16 / 9;
}

.single-product-page .wp-block-embed.is-type-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

@media (max-width: 767px) {
  .product-content__inner > .wp-block-group.alignwide,
  .lower-wrap > .inner2 > .wp-block-group.alignwide {
    width: calc(var(--weds-b-viewport-width, 100vw) - 3rem);
    margin-inline: calc((100% - (var(--weds-b-viewport-width, 100vw) - 3rem)) / 2);
  }
}
