/* SORFPANEL Mobile Commerce Flow v1.3.5
   Late mobile-only corrections for cart, checkout, address return flow and product detail. */
@media (max-width:768px){
  /* CART: markup has image + info only; remove obsolete phantom selection column. */
  body.page-cart .ty-cart-product{
    grid-template-columns:92px minmax(0,1fr)!important;
    gap:10px!important;
    align-items:start!important;
    padding:11px 12px 13px!important;
    min-height:126px!important;
  }
  body.page-cart .ty-cart-product-link{display:block!important;grid-column:1!important;min-width:0!important;text-decoration:none!important}
  body.page-cart .ty-cart-image{width:92px!important;height:112px!important;margin:0!important;display:block!important}
  body.page-cart .ty-cart-info{grid-column:2!important;min-width:0!important;min-height:112px!important;padding-right:30px!important;display:flex!important;flex-direction:column!important}
  body.page-cart .ty-cart-name{display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;overflow:hidden!important;margin:1px 0 5px!important;font-size:12px!important;line-height:1.35!important;font-weight:750!important;color:#25292e!important}
  body.page-cart .ty-cart-meta{display:grid!important;gap:2px!important;margin:0 0 7px!important}
  body.page-cart .ty-cart-stock{font-size:9.5px!important}
  body.page-cart .ty-cart-delivery{font-size:9.5px!important;white-space:normal!important}
  body.page-cart .ty-cart-row-bottom{margin-top:auto!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important}
  body.page-cart .ty-remove-form{top:9px!important;right:9px!important}
  body.page-cart .ty-cart-checkout-bar{display:grid!important}

  /* CHECKOUT: every section must fill the mobile viewport cleanly. */
  body.page-checkout .sp-checkout-grid,
  body.page-checkout .sp-checkout-main,
  body.page-checkout .sp-checkout-card,
  body.page-checkout .sp-checkout-consents,
  body.page-checkout .sp-checkout-summary{width:100%!important;max-width:none!important;min-width:0!important;box-sizing:border-box!important}
  body.page-checkout .sp-checkout-card{align-self:stretch!important}
  body.page-checkout .sp-form-grid{width:100%!important;grid-template-columns:minmax(0,1fr)!important}
  body.page-checkout .sp-field{width:100%!important;min-width:0!important}
  body.page-checkout .sp-checkout-step:not(.is-done):not(.is-active){color:#a6abb0!important}
  body.page-checkout .sp-checkout-consents{margin-bottom:78px!important}
  body.page-checkout .sp-consent-row{align-items:flex-start!important}
  body.page-checkout .sp-checkout-mobile-bar{bottom:calc(58px + env(safe-area-inset-bottom))!important}

  /* ADDRESSES: compact form, correct active bottom tab, safe continuation back to checkout. */
  body.page-addresses{overflow-x:hidden!important;background:#f5f6f7!important}
  body.page-addresses .account-mobile-page{width:100%!important;max-width:none!important;padding-bottom:calc(92px + env(safe-area-inset-bottom))!important}
  body.page-addresses .amp-head{min-height:58px!important;height:58px!important;margin:0!important;padding:0 14px!important;grid-template-columns:34px minmax(0,1fr) 34px!important;background:#fff!important;border-bottom:1px solid #e8eaed!important}
  body.page-addresses .amp-head h1{font-size:18px!important;line-height:1.2!important;text-align:left!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  body.page-addresses .address-compact-content{width:100%!important;margin:10px 0 0!important;padding:0 10px!important;box-sizing:border-box!important;display:grid!important;grid-template-columns:1fr!important;gap:10px!important}
  body.page-addresses .address-form-compact{width:100%!important;padding:14px!important;border-radius:14px!important;box-sizing:border-box!important}
  body.page-addresses .address-form-compact h2{font-size:18px!important;margin:0 0 12px!important}
  body.page-addresses .address-form-compact form{display:grid!important;grid-template-columns:1fr!important;gap:10px!important}
  body.page-addresses .address-form-compact label{display:grid!important;gap:5px!important}
  body.page-addresses .address-form-compact label>span{font-size:11px!important;font-weight:800!important;color:#555d66!important}
  body.page-addresses .address-form-compact input,
  body.page-addresses .address-form-compact textarea{width:100%!important;min-width:0!important;box-sizing:border-box!important;border:1px solid #dfe3e7!important;border-radius:10px!important;background:#fff!important;font-size:13px!important;padding:0 11px!important}
  body.page-addresses .address-form-compact input{height:44px!important;min-height:44px!important}
  body.page-addresses .address-form-compact textarea{min-height:88px!important;padding-top:10px!important;padding-bottom:10px!important}
  body.page-addresses .address-form-compact .amp-btn{width:100%!important;min-height:46px!important;height:46px!important;margin:2px 0 0!important;border-radius:10px!important;font-size:12px!important}
  body.page-addresses .mobile-nav a{color:#6d7379!important}
  body.page-addresses .mobile-nav a[href*="/account"],
  body.page-addresses .mobile-nav a[href*="account/index"]{color:#f27a1a!important}
  body.page-addresses .mobile-nav a[href*="favorites"]{color:#6d7379!important}
}

@media (max-width:560px){
  /* PRODUCT: remove the duplicate top spacer and reduce oversized gallery while preserving image quality. */
  body.page-product{padding-top:0!important}
  body.page-product .mobile-product-toolbar{position:sticky!important;top:0!important;margin:0!important}
  body.page-product .mp-v1-gallery{height:clamp(320px,88vw,410px)!important;min-height:320px!important}
  body.page-product .mp-v1-gallery>img{padding:8px 14px 2px!important}
  body.page-product .mp-v1-page{padding-bottom:132px!important}
  body.page-product .mobile-product-buybar{min-height:62px!important;padding-top:6px!important;padding-bottom:calc(6px + env(safe-area-inset-bottom))!important}
}

@media (max-width:380px){
  body.page-cart .ty-cart-product{grid-template-columns:82px minmax(0,1fr)!important;padding-left:9px!important;padding-right:9px!important}
  body.page-cart .ty-cart-image{width:82px!important;height:102px!important}
  body.page-cart .ty-cart-info{min-height:102px!important}
}
