/**
 * Single product: gallery trái, thông tin phải (thiết kế 527 + 32 + 641).
 * Body có .single-product + .woocommerce cùng lúc — không dùng .single-product .woocommerce (descendant).
 */

.single-product div.product,
body.single-product.woocommerce div.product {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 32px;
  max-width: 100%;
  width: 100%;
  position: relative;
}

/* Badge plugin — không chiếm cột flex */
.single-product div.product > .wobd-badges-wrapper {
  position: absolute;
  top: 16px;
  right: 16px;
  left: auto;
  z-index: 12;
  width: auto;
  max-width: calc(100% - 32px);
  margin: 0;
  pointer-events: none;
  flex: none;
}

.single-product div.product > .wobd-badges-wrapper:empty {
  display: none;
}

@media (min-width: 992px) {
  .single-product div.product .woocommerce-product-gallery,
  .single-product div.product .woo-variation-product-gallery,
  .single-product div.product > div.images {
    flex: 0 0 43.9166666667%;
    width: 43.9166666667% !important;
    max-width: 43.9166666667% !important;
    min-width: 0;
    float: none !important;
    margin-right: 0 !important;
  }

  .single-product div.product .summary.entry-summary {
    flex: 0 0 53.4166666667%;
    width: 53.4166666667%;
    max-width: 53.4166666667%;
    min-width: 0;
    float: none !important;
  }
}

@media (max-width: 991px) {
  .single-product div.product,
  body.single-product.woocommerce div.product {
    flex-wrap: wrap;
    gap: 24px;
  }

  .single-product div.product .woocommerce-product-gallery,
  .single-product div.product .woo-variation-product-gallery,
  .single-product div.product > div.images,
  .single-product div.product .summary.entry-summary {
    flex: 0 0 100%;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    float: none !important;
  }
}
