/* Antigro products: one-column layout, but narrow/classic iframe width */

/* Detect products containing Antigro iframe */
body.single-product .product:has(#antigro-customizer-container iframe[data-testid="iframe-customizer"]) .nectar-prod-wrap {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  width: 100% !important;
}

/* Title + iframe first */
body.single-product .product:has(#antigro-customizer-container iframe[data-testid="iframe-customizer"]) .summary.entry-summary {
  order: 1 !important;
  float: none !important;
  clear: both !important;

  width: 100% !important;
  max-width: 860px !important;

  margin-left: auto !important;
  margin-right: auto !important;
  margin-bottom: 36px !important;

  padding-left: 0 !important;
  padding-right: 0 !important;

  flex: 0 0 auto !important;
}

/* Antigro iframe wrapper */
body.single-product #antigro-customizer-container {
  width: 100% !important;
  max-width: 860px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Antigro iframe itself */
body.single-product #antigro-customizer-container iframe[data-testid="iframe-customizer"] {
  width: 100% !important;
  max-width: 100% !important;
  display: block !important;
}

/* Product images below iframe */
body.single-product .product:has(#antigro-customizer-container iframe[data-testid="iframe-customizer"]) .single-product-main-image {
  order: 2 !important;
  float: none !important;
  clear: both !important;

  width: 100% !important;
  max-width: 860px !important;

  margin-left: auto !important;
  margin-right: auto !important;
  margin-top: 24px !important;

  flex: 0 0 auto !important;
}

/* Gallery should not stretch beyond the same width */
body.single-product .product:has(#antigro-customizer-container iframe[data-testid="iframe-customizer"]) .woocommerce-product-gallery,
body.single-product .product:has(#antigro-customizer-container iframe[data-testid="iframe-customizer"]) .product-slider,
body.single-product .product:has(#antigro-customizer-container iframe[data-testid="iframe-customizer"]) .flickity-viewport {
  width: 100% !important;
  max-width: 860px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Hide standard Woo add to cart under Antigro iframe */
body.single-product .product:has(#antigro-customizer-container iframe[data-testid="iframe-customizer"]) form.cart {
  display: none !important;
}

/* Mobile */
@media screen and (max-width: 767px) {
  body.single-product .product:has(#antigro-customizer-container iframe[data-testid="iframe-customizer"]) .summary.entry-summary,
  body.single-product .product:has(#antigro-customizer-container iframe[data-testid="iframe-customizer"]) .single-product-main-image,
  body.single-product #antigro-customizer-container {
    max-width: 100% !important;
  }
}