/* Monstergoing 1.2.3: isolated, LAST-loaded layout repair.
   The classes on body are rendered by PHP, not dependent on JS readiness. */

/* HOME: actual fixed-height ratio box instead of an image's intrinsic height.
   Both WooCommerce square thumbs and tall originals fit without distortion. */
body.mgv123-ui-home .mgv112-home,
body.mgv123-ui-home .mgv112-main .mgv112-home{min-width:0!important;overflow-x:clip!important}
body.mgv123-ui-home .mgv112-product-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;align-items:start!important;grid-auto-rows:auto!important;gap:18px!important}
body.mgv123-ui-home .mgv112-product{min-width:0!important;display:flex!important;flex-direction:column!important;align-self:start!important;min-height:0!important;max-width:100%!important}
body.mgv123-ui-home .mgv123-card-media{
  display:block!important;position:relative!important;width:100%!important;
  padding-top:125%!important;height:0!important;max-height:none!important;
  overflow:hidden!important;background:#f2eee6!important;border-radius:5px!important;
}
body.mgv123-ui-home .mgv123-card-media>a,
body.mgv123-ui-home .mgv123-card-media>a.mgv112-product-image{
  position:absolute!important;inset:0!important;width:100%!important;height:100%!important;
  aspect-ratio:auto!important;display:block!important;overflow:hidden!important;
  margin:0!important;padding:0!important;background:transparent!important;line-height:0!important;
}
body.mgv123-ui-home .mgv123-card-media>a img,
body.mgv123-ui-home .mgv123-card-media>a img.attachment-woocommerce_single{
  position:absolute!important;inset:0!important;width:100%!important;height:100%!important;
  max-width:100%!important;max-height:100%!important;min-height:0!important;
  object-fit:contain!important;object-position:center!important;aspect-ratio:auto!important;
  margin:0!important;padding:0!important;transform:none!important;
}
body.mgv123-ui-home .mgv112-product-info{display:flex!important;flex-direction:column!important;flex:1!important;padding:8px 0 0!important;min-height:0!important;gap:6px!important}
body.mgv123-ui-home .mgv112-product-heading{display:flex!important;justify-content:space-between!important;align-items:flex-start!important;gap:8px!important;min-height:0!important}
body.mgv123-ui-home .mgv112-product-heading h3{margin:0!important;min-height:0!important;max-height:2.8em!important;line-height:1.4!important;font-size:14px!important;display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important;word-break:break-word!important}
body.mgv123-ui-home .mgv112-product-price{flex:0 0 auto!important;font-size:14px!important;line-height:1.4!important;max-width:48%!important;white-space:normal!important;text-align:right!important}
body.mgv123-ui-home .mgv112-product-button{margin-top:auto!important;min-height:39px!important;padding:5px 8px!important;border-radius:6px!important;font-size:13px!important}
body.mgv123-ui-home .mgv112-section-heading h2{font-size:clamp(23px,3.7vw,38px)!important;line-height:1.25!important;margin-bottom:10px!important;word-break:keep-all!important;overflow-wrap:normal!important}
body.mgv123-ui-home .mgv112-block{margin:0!important;min-width:0!important}
body.mgv123-ui-home .mgv112-home{gap:clamp(14px,2vw,28px)!important}

/* Carousel: no slide is removed from layout, including on Safari BFCache restore. */
body.mgv123-ui-home .mgv112-carousel-track{display:flex!important;width:100%!important;min-width:0!important;min-height:1px!important;overflow-x:auto!important;scroll-snap-type:x mandatory!important;scrollbar-width:none!important;-webkit-overflow-scrolling:touch!important}
body.mgv123-ui-home .mgv112-carousel-track::-webkit-scrollbar{display:none}
body.mgv123-ui-home .mgv112-carousel-track>[data-mgv112-slide],
body.mgv123-ui-home .mgv112-carousel-track>.mgv112-carousel-slide{
  display:block!important;position:relative!important;flex:0 0 100%!important;
  width:100%!important;max-width:100%!important;min-width:0!important;
  opacity:1!important;visibility:visible!important;scroll-snap-align:start!important;
}
body.mgv123-ui-home .mgv112-carousel-track picture,
body.mgv123-ui-home .mgv112-carousel-track img{display:block!important;max-width:100%!important;width:100%!important;height:auto!important;object-fit:contain!important}

/* PRODUCT: keep only compact, useful data in the main column. */
body.mgv123-ui-product .woocommerce div.product .summary{min-width:0!important;max-width:100%!important;box-sizing:border-box!important}
body.mgv123-ui-product .woocommerce div.product .summary .product_meta{
  display:flex!important;flex-flow:row wrap!important;gap:3px 10px!important;
  border-top:1px solid #e8e2db!important;border-bottom:1px solid #e8e2db!important;
  margin:9px 0!important;padding:9px 0!important;line-height:1.5!important;font-size:12px!important;
}
body.mgv123-ui-product .woocommerce div.product .summary .product_meta>span{display:inline!important;margin:0!important;padding:0!important;width:auto!important;}
body.mgv123-ui-product .woocommerce div.product .summary .mgv4-share{margin:7px 0 0!important;padding:0!important;clear:none!important;border:0!important;max-width:none!important}
body.mgv123-ui-product .woocommerce div.product .summary .mgv4-share>strong{display:block!important;margin:0 0 6px!important;font-size:14px!important}
body.mgv123-ui-product .woocommerce div.product .summary .mgv4-share-links{
  display:flex!important;flex-flow:row nowrap!important;gap:6px!important;
  overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:none!important;
  padding:0 0 4px!important;margin:0!important;
}
body.mgv123-ui-product .woocommerce div.product .summary .mgv4-share-links::-webkit-scrollbar{display:none}
body.mgv123-ui-product .woocommerce div.product .summary .mgv4-share-links>*{
  flex:0 0 auto!important;white-space:nowrap!important;min-height:32px!important;
  padding:5px 9px!important;font-size:12px!important;line-height:1.2!important;
  border-radius:999px!important;display:inline-flex!important;align-items:center!important;gap:5px!important;
}
body.mgv123-ui-product .woocommerce div.product .summary .mgv4-copy-status:empty{display:none!important}
body.mgv123-ui-product .woocommerce div.product .summary .mgv102-product-offers{margin:10px 0!important;padding:10px!important}
body.mgv123-ui-product .woocommerce div.product .summary .mgv102-offer{padding:8px 9px!important;gap:6px!important}
body.mgv123-ui-product .woocommerce div.product .summary form.cart{margin:9px 0!important;padding:10px!important}

/* Stop style leakage from the theme's external recommendation grid. */
body.mgv123-ui-product .woocommerce div.product .summary .mgv4-pair-inline,
body.mgv123-ui-product .woocommerce div.product .summary .mgv123-pair{
  display:block!important;position:static!important;float:none!important;grid-column:auto!important;grid-row:auto!important;
  width:100%!important;max-width:100%!important;min-width:0!important;min-height:0!important;
  margin:10px 0 0!important;padding:10px 0 0!important;border-top:1px solid #e8e2db!important;
  box-sizing:border-box!important;
}
body.mgv123-ui-product .woocommerce div.product .summary .mgv4-pair-inline .mgv4-section-header{display:block!important;float:none!important;margin:0 0 8px!important;padding:0!important;}
body.mgv123-ui-product .woocommerce div.product .summary .mgv4-pair-inline .mgv4-section-header h2{font-size:17px!important;margin:0!important;line-height:1.35!important}
body.mgv123-ui-product .woocommerce div.product .summary .mgv4-pair-inline .mgv4-section-header p,
body.mgv123-ui-product .woocommerce div.product .summary .mgv4-pair-inline .mgv4-section-header>span{display:none!important}
body.mgv123-ui-product .woocommerce div.product .summary .mgv4-pair-inline .mgv4-card-grid{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-auto-rows:auto!important;
  gap:8px!important;width:100%!important;margin:0!important;padding:0!important;overflow:visible!important;
}
body.mgv123-ui-product .woocommerce div.product .summary .mgv4-pair-inline .mgv123-related-card,
body.mgv123-ui-product .woocommerce div.product .summary .mgv4-pair-inline .mgv4-product-card{
  margin:0!important;padding:0!important;min-width:0!important;min-height:0!important;
  border:1px solid #e8e2db!important;border-radius:10px!important;box-shadow:none!important;
  background:#fff!important;overflow:hidden!important;
}
body.mgv123-ui-product .woocommerce div.product .summary .mgv4-pair-inline .mgv4-product-card:only-child{grid-column:1/-1!important}
body.mgv123-ui-product .woocommerce div.product .summary .mgv4-pair-inline .mgv4-product-card>a{
  display:grid!important;grid-template-columns:76px minmax(0,1fr)!important;
  grid-template-rows:minmax(0,1fr)!important;gap:8px!important;align-items:center!important;
  min-height:92px!important;width:100%!important;height:auto!important;padding:6px!important;
  margin:0!important;box-sizing:border-box!important;text-decoration:none!important;
}
body.mgv123-ui-product .woocommerce div.product .summary .mgv4-pair-inline .mgv123-related-card-media{
  display:block!important;width:76px!important;height:89px!important;position:relative!important;
  background:#f1eee9!important;overflow:hidden!important;border-radius:6px!important;
}
body.mgv123-ui-product .woocommerce div.product .summary .mgv4-pair-inline .mgv123-related-card-media>img{
  display:block!important;position:absolute!important;inset:0!important;width:100%!important;height:100%!important;
  max-height:none!important;max-width:none!important;object-fit:contain!important;aspect-ratio:auto!important;
  margin:0!important;padding:0!important;
}
body.mgv123-ui-product .woocommerce div.product .summary .mgv4-pair-inline .mgv123-related-card-info{
  display:flex!important;flex-direction:column!important;min-width:0!important;gap:5px!important;padding:0!important;margin:0!important;
}
body.mgv123-ui-product .woocommerce div.product .summary .mgv4-pair-inline .mgv123-related-card-info strong{
  font-size:12px!important;line-height:1.5!important;display:-webkit-box!important;-webkit-line-clamp:2!important;
  -webkit-box-orient:vertical!important;overflow:hidden!important;min-height:0!important;max-height:3em!important;
  margin:0!important;padding:0!important;
}
body.mgv123-ui-product .woocommerce div.product .summary .mgv4-pair-inline .mgv123-related-card-price,
body.mgv123-ui-product .woocommerce div.product .summary .mgv4-pair-inline .mgv123-related-card-price .amount{
  font-size:13px!important;font-weight:750!important;color:#873d49!important;margin:0!important;padding:0!important;
}
/* Also compacts pre-1.2.3 cached card markup when current assets reach page. */
body.mgv123-ui-product .woocommerce div.product .summary .mgv4-pair-inline .mgv4-product-card>a>img{
  display:block!important;width:76px!important;height:89px!important;max-width:76px!important;
  object-fit:contain!important;aspect-ratio:auto!important;grid-column:1!important;grid-row:1/3!important;
}
body.mgv123-ui-product .woocommerce div.product .summary .mgv4-pair-inline .mgv4-product-card>a>strong,
body.mgv123-ui-product .woocommerce div.product .summary .mgv4-pair-inline .mgv4-product-card>a>span:not(.mgv123-related-card-media){
  grid-column:2!important;margin:0!important;padding:0!important;min-width:0!important;
}
body.mgv123-ui-product .woocommerce div.product .summary .mgv4-pair-inline .mgv4-product-card>a>strong{grid-row:1!important;font-size:12px!important;line-height:1.5!important;min-height:0!important;}
body.mgv123-ui-product .woocommerce div.product .summary .mgv4-pair-inline .mgv4-product-card>a>span:not(.mgv123-related-card-media){grid-row:2!important;font-size:13px!important;}
/* Lower secondary recommendations must not leave a giant decorative gap. */
body.mgv123-ui-product .woocommerce div.product>.mgv4-maylike{margin:15px 0 22px!important;padding:0!important;min-width:0!important;}
body.mgv123-ui-product .woocommerce div.product>.mgv4-maylike .mgv4-section-header{margin-bottom:10px!important}
body.mgv123-ui-product .woocommerce div.product>.mgv4-maylike .mgv4-section-header h2{font-size:20px!important}
body.mgv123-ui-product .woocommerce div.product>.mgv4-maylike .mgv4-card-grid{gap:12px!important}
body.mgv123-ui-product .woocommerce div.product>.mgv4-maylike .mgv123-related-card-media{display:block!important;position:relative!important;width:100%!important;padding-top:125%!important;height:0!important;overflow:hidden!important;background:#f1eee9!important;}
body.mgv123-ui-product .woocommerce div.product>.mgv4-maylike .mgv123-related-card-media img{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;object-fit:contain!important;margin:0!important;max-width:none!important;max-height:none!important;}
body.mgv123-ui-product .woocommerce div.product>.mgv4-maylike .mgv123-related-card-info{display:flex!important;flex-direction:column!important;gap:5px!important;padding:10px!important;}

@media(max-width:980px){body.mgv123-ui-home .mgv112-product-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:767px){
 body.mgv123-ui-home .mgv112-product-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px 10px!important}
 body.mgv123-ui-home .mgv112-home{padding:8px 11px 0!important;gap:15px!important}
 body.mgv123-ui-home .mgv112-product-heading{flex-direction:column!important;gap:3px!important}
 body.mgv123-ui-home .mgv112-product-heading h3{font-size:13px!important;max-height:2.8em!important;min-height:2.8em!important}
 body.mgv123-ui-home .mgv112-product-price{max-width:100%!important;text-align:left!important;font-size:14px!important}
 body.mgv123-ui-home .mgv112-product-button{min-height:38px!important;margin-top:2px!important;font-size:13px!important}
 body.mgv123-ui-home .mgv112-section-heading h2{font-size:clamp(23px,6vw,30px)!important;line-height:1.25!important}
 body.mgv123-ui-product .woocommerce div.product .summary{padding:12px!important;box-shadow:none!important;border-radius:12px!important;}
 body.mgv123-ui-product .woocommerce div.product .summary .product_meta{margin:7px 0!important;padding:7px 0!important;gap:2px 8px!important}
 body.mgv123-ui-product .woocommerce div.product .summary .mgv4-share{margin:6px 0 0!important}
 body.mgv123-ui-product .woocommerce div.product .summary .mgv4-pair-inline{margin-top:7px!important;padding-top:8px!important}
 body.mgv123-ui-product .woocommerce div.product .summary .mgv4-pair-inline .mgv4-card-grid{grid-template-columns:1fr!important;gap:7px!important;overflow:visible!important}
 body.mgv123-ui-product .woocommerce div.product .summary .mgv4-pair-inline .mgv4-product-card{flex:0 0 auto!important;width:100%!important;max-width:none!important}
 body.mgv123-ui-product .woocommerce div.product .summary .mgv4-pair-inline .mgv4-product-card>a{grid-template-columns:72px minmax(0,1fr)!important;min-height:87px!important;}
 body.mgv123-ui-product .woocommerce div.product .summary .mgv4-pair-inline .mgv123-related-card-media{width:72px!important;height:86px!important}
 body.mgv123-ui-product .woocommerce div.product>.mgv4-maylike{margin:12px 0 18px!important}
 body.mgv123-ui-product .woocommerce div.product>.mgv4-maylike .mgv4-card-grid{display:flex!important;overflow-x:auto!important;gap:10px!important}
 body.mgv123-ui-product .woocommerce div.product>.mgv4-maylike .mgv4-product-card{flex:0 0 min(46vw,185px)!important;max-width:185px!important}
}
/* Strip generic legacy span padding from the new compact related-card structure. */
body.mgv123-ui-product .woocommerce div.product .summary .mgv4-pair-inline .mgv123-related-card-media,
body.mgv123-ui-product .woocommerce div.product .summary .mgv4-pair-inline .mgv123-related-card-info,
body.mgv123-ui-product .woocommerce div.product .summary .mgv4-pair-inline .mgv123-related-card-price,
body.mgv123-ui-product .woocommerce div.product .summary .mgv4-pair-inline .mgv123-related-card-price *{
  padding:0!important;margin:0!important;box-sizing:border-box!important;
}
body.mgv123-ui-product .woocommerce div.product .summary .mgv4-pair-inline .mgv123-related-card-media{
  grid-column:1!important;grid-row:1!important;
}
body.mgv123-ui-product .woocommerce div.product .summary .mgv4-pair-inline .mgv123-related-card-info{
  grid-column:2!important;grid-row:1!important;
}
body.mgv123-ui-home .mgv112-product-button{width:100%!important;max-width:100%!important;box-sizing:border-box!important}
