/* MOON RC32 — definitive single-product flow and screenshot remediation. */

/* WordPress places single-product and woocommerce on the same body element. */
body.single-product.woocommerce .moon-shop-main>.moon-container{
  width:min(1380px,calc(100% - 48px))!important;max-width:1380px!important;
}
body.single-product.woocommerce div.product{
  display:grid!important;grid-template-columns:minmax(0,1.04fr) minmax(380px,.96fr)!important;
  gap:clamp(28px,4vw,58px)!important;align-items:start!important;width:100%!important;max-width:100%!important;
}
body.single-product.woocommerce div.product div.images,
body.single-product.woocommerce div.product div.summary{
  float:none!important;width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important;
}
body.single-product.woocommerce div.product div.images{
  grid-column:1!important;overflow:hidden!important;border-radius:22px!important;
}
body.single-product.woocommerce div.product div.images .woocommerce-product-gallery__wrapper{
  width:100%!important;max-width:100%!important;margin:0!important;overflow:hidden!important;
}
body.single-product.woocommerce div.product div.images .woocommerce-product-gallery__image,
body.single-product.woocommerce div.product div.images .woocommerce-product-gallery__image a{
  display:block!important;width:100%!important;max-width:100%!important;overflow:hidden!important;
}
body.single-product.woocommerce div.product div.images img{
  display:block!important;width:100%!important;height:auto!important;max-width:100%!important;margin:0!important;
  object-fit:cover!important;object-position:center top!important;
}
body.single-product.woocommerce div.product div.summary{
  grid-column:2!important;position:sticky!important;top:104px!important;align-self:start!important;
  padding:clamp(22px,2.5vw,36px)!important;overflow:hidden!important;border-radius:24px!important;
}
body.single-product.woocommerce div.product .product_title{
  max-width:14ch!important;margin:0 0 16px!important;font-size:clamp(2.5rem,4.8vw,4.8rem)!important;
  font-weight:900!important;line-height:.96!important;letter-spacing:-.055em!important;
  overflow-wrap:break-word!important;word-break:normal!important;text-wrap:balance!important;
}
body.single-product.woocommerce div.product form.cart{width:100%!important;max-width:100%!important}
body.single-product.woocommerce div.product form.cart .moon-buy-now-wrap{
  width:100%!important;max-width:100%!important;grid-template-columns:minmax(0,1fr) minmax(118px,.34fr)!important;
}
body.single-product.woocommerce .moon-product-trust>div{min-width:0!important;overflow:hidden!important}
body.single-product.woocommerce .moon-delivery-confidence{width:100%!important;max-width:100%!important;overflow:hidden!important}

/* Every post-summary component is a normal, full-width row. */
body.single-product.woocommerce div.product>.woocommerce-tabs,
body.single-product.woocommerce div.product>.related.products,
body.single-product.woocommerce div.product>.upsells.products,
body.single-product.woocommerce div.product>.moon-recently-viewed{
  grid-column:1/-1!important;position:static!important;inset:auto!important;float:none!important;clear:both!important;
  width:100%!important;max-width:100%!important;min-width:0!important;margin-inline:0!important;transform:none!important;
}
body.single-product.woocommerce div.product>.woocommerce-tabs{margin-top:44px!important}
body.single-product.woocommerce div.product>.related.products,
body.single-product.woocommerce div.product>.upsells.products{margin-top:12px!important}
body.single-product.woocommerce div.product>.moon-recently-viewed{margin-top:44px!important;padding-top:30px!important}
body.single-product.woocommerce .related.products ul.products,
body.single-product.woocommerce .upsells.products ul.products{
  display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:clamp(12px,1.5vw,20px)!important;
  width:100%!important;max-width:100%!important;margin:0!important;
}
body.single-product.woocommerce .related.products ul.products li.product,
body.single-product.woocommerce .upsells.products ul.products li.product{min-width:0!important;width:auto!important;margin:0!important}
body.single-product.woocommerce .related.products .moon-loop-buybar,
body.single-product.woocommerce .upsells.products .moon-loop-buybar{grid-template-columns:1fr!important;overflow:visible!important}
body.single-product.woocommerce .related.products .moon-loop-buybar .button,
body.single-product.woocommerce .upsells.products .moon-loop-buybar .button{
  width:100%!important;min-width:0!important;min-height:44px!important;padding:0 9px!important;border-radius:12px!important;
  white-space:normal!important;overflow:visible!important;text-overflow:clip!important;line-height:1.15!important;
}
body.single-product.woocommerce .moon-recently-viewed .moon-mini-grid{
  display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:14px!important;width:100%!important;
}
body.single-product.woocommerce .moon-recently-viewed .moon-mini-card{
  position:relative!important;inset:auto!important;z-index:auto!important;float:none!important;width:100%!important;max-width:100%!important;
  min-width:0!important;margin:0!important;transform:none;overflow:hidden!important;
}
body.single-product.woocommerce .moon-recently-viewed .moon-mini-card-media{width:100%!important;max-width:100%!important}

/* Product tabs keep readable active text against the dark surface. */
body.single-product.woocommerce div.product .woocommerce-tabs ul.tabs li,
body.single-product.woocommerce div.product .woocommerce-tabs ul.tabs li.active{background:transparent!important;color:#8fa8bd!important}
body.single-product.woocommerce div.product .woocommerce-tabs ul.tabs li.active a{background:transparent!important;color:#fff!important}

@media(max-width:1100px){
  body.single-product.woocommerce .moon-shop-main>.moon-container{width:calc(100% - 32px)!important}
  body.single-product.woocommerce div.product{display:flex!important;flex-direction:column!important;gap:24px!important}
  body.single-product.woocommerce div.product div.images,
  body.single-product.woocommerce div.product div.summary,
  body.single-product.woocommerce div.product>.woocommerce-tabs,
  body.single-product.woocommerce div.product>.related.products,
  body.single-product.woocommerce div.product>.upsells.products,
  body.single-product.woocommerce div.product>.moon-recently-viewed{
    order:initial!important;position:relative!important;top:auto!important;right:auto!important;bottom:auto!important;left:auto!important;
    flex:0 0 auto!important;width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important;transform:none!important;
  }
  body.single-product.woocommerce div.product div.images{max-width:720px!important;align-self:center!important}
  body.single-product.woocommerce div.product div.summary{padding:clamp(22px,4vw,34px)!important;align-self:stretch!important}
  body.single-product.woocommerce div.product .product_title{max-width:16ch!important;font-size:clamp(2.3rem,7vw,4rem)!important}
  body.single-product.woocommerce div.product>.woocommerce-tabs{margin-top:18px!important}
  body.single-product.woocommerce div.product>.related.products,
  body.single-product.woocommerce div.product>.upsells.products,
  body.single-product.woocommerce div.product>.moon-recently-viewed{margin-top:26px!important}
  body.single-product.woocommerce .related.products ul.products,
  body.single-product.woocommerce .upsells.products ul.products,
  body.single-product.woocommerce .moon-recently-viewed .moon-mini-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

@media(max-width:767px){
  body.single-product.woocommerce .moon-shop-main>.moon-container{width:calc(100% - 20px)!important}
  body.single-product.woocommerce div.product{gap:18px!important}
  body.single-product.woocommerce div.product div.images{border-radius:17px!important}
  body.single-product.woocommerce div.product div.summary{padding:20px 15px!important;border-radius:18px!important}
  body.single-product.woocommerce div.product .product_title{font-size:clamp(2rem,10vw,2.9rem)!important;max-width:100%!important}
  body.single-product.woocommerce div.product form.cart .moon-buy-now-wrap{grid-template-columns:1fr!important;gap:8px!important}
  body.single-product.woocommerce div.product form.cart .moon-buy-now-button,
  body.single-product.woocommerce div.product form.cart .single_add_to_cart_button{width:100%!important;min-height:50px!important}
  body.single-product.woocommerce .related.products>h2,
  body.single-product.woocommerce .upsells.products>h2{font-size:clamp(2rem,10vw,3rem)!important}
}

@media(max-width:420px){
  body.single-product.woocommerce .related.products ul.products,
  body.single-product.woocommerce .upsells.products ul.products,
  body.single-product.woocommerce .moon-recently-viewed .moon-mini-grid{grid-template-columns:1fr!important}
}

@media(prefers-reduced-motion:reduce){
  body.single-product.woocommerce .moon-mini-card,body.single-product.woocommerce div.product div.images img{transition:none!important;animation:none!important}
}
