/* v561U — Order review rail: keep the total visible outside the scrollable details area. */
@media (min-width: 981px){
  body:has(#orderForm) .order-layout{
    grid-template-columns: minmax(0, 1fr) minmax(390px, 430px) !important;
  }

  body:has(#orderForm) .order-summary{
    max-width: 430px !important;
    overflow: visible !important;
    display: flex !important;
    flex-direction: column !important;
    max-height: calc(100vh - 84px) !important;
  }

  body:has(#orderForm) .order-review-scroll-v561U{
    flex: 1 1 auto !important;
    min-height: 360px !important;
    max-height: calc(100vh - 280px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-right: 6px !important;
    margin-right: -2px !important;
  }

  body:has(#orderForm) .order-review-total-v561U{
    flex: 0 0 auto !important;
    margin-top: 12px !important;
    padding-top: 12px !important;
    border-top: 1px solid #e2e8f0 !important;
    background: #fff !important;
  }

  body:has(#orderForm) .order-review-total-v561U .total-line{
    border-bottom: 0 !important;
    padding: 12px 14px !important;
    border-radius: 18px !important;
    background: #fff7f7 !important;
    border: 1px solid #fecaca !important;
    align-items: center !important;
  }

  body:has(#orderForm) .order-review-total-v561U .total-line span{
    font-weight: 900 !important;
    color: #0f172a !important;
  }

  body:has(#orderForm) .order-review-total-v561U .total-line strong{
    font-size: 24px !important;
    color: #dc2626 !important;
    white-space: nowrap !important;
  }

  body:has(#orderForm) .order-review-note-v561U{
    flex: 0 0 auto !important;
    margin-top: 10px !important;
  }
}

@media (min-width: 981px) and (max-height: 720px){
  body:has(#orderForm) .order-review-scroll-v561U{
    min-height: 300px !important;
    max-height: calc(100vh - 250px) !important;
  }
}

@media (max-width: 980px){
  body:has(#orderForm) .order-review-scroll-v561U{
    max-height: none !important;
    overflow: visible !important;
  }
  body:has(#orderForm) .order-review-total-v561U .total-line,
  body:has(#orderForm) .review-mobile .total-line{
    border-bottom: 0 !important;
    padding: 12px 14px !important;
    border-radius: 16px !important;
    background: #fff7f7 !important;
    border: 1px solid #fecaca !important;
    margin-top: 10px !important;
  }
}
