/* Street Legend V5.8 — mobile-only edge treatment.
   Cart and checkout layouts, text and business logic are unchanged.
   Move artwork within its existing image area; never move price or buttons. */
@media (max-width: 900px) {
  /* First checkout screen: the photo is decorative behind the order summary.
     Move it toward the viewport edge without changing summary positioning. */
  body.p6-checkout .p6-summary-visual.sl-v53-product-art img {
    transform: translateX(clamp(14px, 6vw, 35px)) scale(1.065) !important;
    transform-origin: center right;
  }
  /* Second checkout screen: enlarge the selected product inside its own panel.
     Panel clips any overshoot; details and forms are never moved. */
  body.p6-checkout .sl-v53-mobile-product img {
    box-sizing: border-box;
    padding: 0 !important;
    width: 110% !important;
    max-width: none !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: right center !important;
    transform: translateX(clamp(6px, 2.5vw, 16px)) !important;
    transform-origin: right center;
  }
  body.p6-checkout .sl-v53-mobile-product { isolation: isolate; }
  /* Bag previews have a deliberately small image column. Use its full area,
     rather than leaving a strip of unused padding against the outer edge. */
  #sani-bag-dialog .sani-added-preview > img {
    justify-self: end;
    object-position: right center;
    transform: translateX(4px) scale(1.09);
    transform-origin: right center;
  }
  #sani-bag-dialog .sani-bag-dialog__item img {
    object-position: right center;
    transform: translateX(2px) scale(1.035);
    transform-origin: right center;
  }
}
@media (max-width: 520px) {
  body.p6-checkout .p6-summary-visual.sl-v53-product-art img {
    transform: translateX(clamp(12px, 7.5vw, 30px)) scale(1.07) !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.p6-checkout .p6-summary-visual.sl-v53-product-art img,
  body.p6-checkout .sl-v53-mobile-product img,
  #sani-bag-dialog .sani-added-preview > img,
  #sani-bag-dialog .sani-bag-dialog__item img { transition: none !important; }
}
/* Narrow phones have very little vertical room between the item list and
   subtotal. Fit the decorative composition in that gap instead of overlapping. */
@media (max-width: 360px) {
  body.p6-checkout .p6-summary-visual.sl-v53-product-art {
    inset: 228px -7% auto -7% !important;
    height: 120px !important;
    width: 114% !important;
  }
  body.p6-checkout .p6-summary-visual.sl-v53-product-art img {
    transform: translateX(4vw) scale(1.015) !important;
  }
}
/* On orders with multiple cards, never put decorative photography behind
   the item list: smaller artwork takes a back seat to real order information. */
@media (max-width: 900px) {
  body.p6-checkout .p6-summary:has(.p6-summary-item:nth-child(2)) .p6-summary-visual.sl-v53-product-art {
    opacity: .22 !important;
  }
}
