/* Major Bud Shop 0.5.7 – original photo proportions and an unobstructed mobile cart rail. */
/* Keep the original flower/photo aspect ratio: do not stretch or hard-crop. */
.mbs-shop .mbs-product-media-button > img:not(.mbs-card-pack){
  display:block!important;
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  object-position:center center!important;
  max-width:100%!important;
  transform:none!important;
}
.mbs-shop .mbs-product:hover .mbs-product-media-button > img:not(.mbs-card-pack){transform:none!important;}
.mbs-shop .mbs-product-media-button{background:#102e21!important;}
.mbs-shop .mbs-product-media-button .mbs-card-pack{
  width:20%!important;height:auto!important;max-height:44%!important;object-fit:contain!important;
}
/* Desktop remains three cards in a row, but the image never fills by distortion. */
@media (max-width:620px){
  /* Reserve a continuous, light-colored right rail for the fixed basket character. */
  .mbs-shop .mbs-collection{
    box-sizing:border-box!important;
    width:calc(100% - 116px)!important;
    max-width:calc(100% - 116px)!important;
    margin-left:0!important;
    margin-right:116px!important;
    min-width:0!important;
  }
  .mbs-shop .mbs-collection-heading{display:block!important;margin-bottom:12px!important;}
  .mbs-shop .mbs-collection-heading h3{
    font-size:clamp(23px,6.8vw,32px)!important;
    overflow-wrap:normal!important;
    line-height:1.12!important;
  }
  .mbs-shop .mbs-collection-heading .mbs-kicker{font-size:9px!important;letter-spacing:.08em!important;}
  .mbs-shop .mbs-collection-aside{display:none!important;}
  .mbs-shop .mbs-tools{padding:10px!important;gap:9px!important;border-radius:16px!important;}
  .mbs-shop .mbs-search{height:44px!important;min-height:44px!important;padding:2px 7px!important;}
  .mbs-shop .mbs-search-icon{font-size:21px!important;}
  .mbs-shop .mbs-search input{min-width:0!important;min-height:37px!important;font-size:12px!important;padding:0 4px!important;}
  .mbs-shop .mbs-filters{gap:6px!important;flex-wrap:wrap!important;}
  .mbs-shop .mbs-filters button{min-height:32px!important;font-size:10px!important;padding:5px 9px!important;}
  .mbs-shop .mbs-result-count{font-size:10px!important;}
  .mbs-shop .mbs-products{grid-template-columns:minmax(0,1fr)!important;width:100%!important;min-width:0!important;}
  .mbs-shop .mbs-product{width:100%!important;min-width:0!important;box-sizing:border-box!important;border-radius:17px!important;}
  .mbs-shop .mbs-product-media,.mbs-shop .mbs-product-media-button{
    height:180px!important;min-height:0!important;
  }
  .mbs-shop .mbs-product-media-button > img:not(.mbs-card-pack){object-fit:contain!important;}
  /* Packaging is still in the detail popup; omit it only from the phone catalog. */
  .mbs-shop .mbs-product-media-button .mbs-card-pack{display:none!important;}
  .mbs-shop .mbs-media-label{left:8px!important;bottom:8px!important;font-size:9px!important;padding:5px 8px!important;}
  .mbs-shop .mbs-product-body{padding:11px 11px 13px!important;gap:6px!important;}
  .mbs-shop .mbs-product-cat{font-size:8px!important;letter-spacing:.065em!important;}
  .mbs-shop .mbs-product-name h3{font-size:clamp(18px,5vw,23px)!important;overflow-wrap:anywhere!important;}
  .mbs-shop .mbs-product-bottom{
    flex-direction:column!important;
    align-items:stretch!important;
    gap:10px!important;
    margin-top:5px!important;
  }
  .mbs-shop .mbs-product-bottom .mbs-price strong{font-size:22px!important;}
  .mbs-shop .mbs-product-bottom .mbs-price small{font-size:11px!important;}
  .mbs-shop .mbs-product-bottom button{width:100%!important;justify-content:space-between!important;padding:7px 9px!important;font-size:12px!important;}
  .mbs-shop .mbs-view-link{margin-top:2px!important;font-size:10px!important;overflow-wrap:anywhere;}
  .mbs-shop .mbs-tax-hint{font-size:10px!important;line-height:1.35!important;overflow-wrap:anywhere;}
  /* The cart follows scrolling, but only inside the reserved side rail. */
  .mbs-shop .mbs-floating-cart.mbs-basket-trigger{
    --mbs-fab-size:105px!important;
    right:3px!important;
    top:clamp(130px,23vh,205px)!important;
  }
  .mbs-shop .mbs-floating-cart-label{font-size:10px!important;max-width:105px!important;text-align:center!important;line-height:1.05!important;}
  body.admin-bar .mbs-shop .mbs-floating-cart.mbs-basket-trigger{top:clamp(160px,26vh,235px)!important;}
  /* When opened, the existing cart overlays the viewport as designed in 0.5.6. */
  .mbs-shop:has(.mbs-basket.is-open) .mbs-floating-cart{display:none!important;}
}
@media (max-width:370px){
  .mbs-shop .mbs-collection{width:calc(100% - 99px)!important;max-width:calc(100% - 99px)!important;margin-right:99px!important;}
  .mbs-shop .mbs-floating-cart.mbs-basket-trigger{--mbs-fab-size:91px!important;right:2px!important;}
  .mbs-shop .mbs-floating-cart-label{font-size:9px!important;max-width:91px!important;}
  .mbs-shop .mbs-product-media,.mbs-shop .mbs-product-media-button{height:155px!important;}
}
