/* Carrinho no celular: tela inteira, produtos e frete roláveis, total sempre à mão. */
body.storefront #cart-dialog .cart-mobile-breakdown,
body.storefront #cart-dialog .cart-cep-jump { display: none; }

@media (max-width: 700px) {
  body.storefront #cart-dialog.cart-dialog {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    box-sizing: border-box;
    margin: 0;
    padding: 0 14px;
    border: 0;
    border-radius: 0;
  }

  body.storefront #cart-dialog[open] {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  body.storefront #cart-dialog .dialog-head {
    flex: 0 0 auto;
    padding: max(10px, env(safe-area-inset-top)) 0 9px;
  }

  body.storefront #cart-dialog .dialog-head h2 {
    margin: 1px 0 3px;
    font-size: 22px;
  }

  body.storefront #cart-dialog .cart-secure-copy { line-height: 1.35; }

  body.storefront #cart-dialog #cart-content {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0 2px 22px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  body.storefront #cart-dialog .cart-checkout-footer {
    position: relative;
    flex: 0 0 auto;
    min-height: 0;
    max-height: min(52dvh, 320px);
    margin: 0 -14px;
    padding: 8px 14px max(12px, env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #f4f8ef;
    border-top: 1px solid #bed2bc;
    box-shadow: 0 -7px 18px #153e3514;
  }

  body.storefront #cart-dialog .cart-checkout-footer > h3,
  body.storefront #cart-dialog .cart-summary-desktop { display: none; }

  body.storefront #cart-dialog .cart-savings-banner {
    margin: 0 0 5px;
    padding: 5px 8px;
  }

  body.storefront #cart-dialog .cart-mobile-breakdown {
    display: block;
    margin: 0 0 3px;
  }

  body.storefront #cart-dialog .cart-mobile-breakdown summary {
    display: list-item;
    min-height: 38px;
    box-sizing: border-box;
    padding: 10px 2px;
    color: #1e5542;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.4;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    touch-action: manipulation;
  }

  body.storefront #cart-dialog .cart-mobile-breakdown .cart-summary-lines {
    max-height: min(23dvh, 165px);
    overflow-y: auto;
    margin: 3px 0 7px;
    padding: 7px 2px;
    border-top: 1px solid #d5e3d1;
  }

  body.storefront #cart-dialog .cart-summary-action {
    position: sticky;
    bottom: 0;
    z-index: 1;
    padding-top: 3px;
    background: #f4f8ef;
  }

  body.storefront #cart-dialog .cart-grand-total {
    margin: 0;
    padding: 8px 0 3px;
  }

  body.storefront #cart-dialog .cart-grand-total strong {
    font-size: 21px;
    overflow-wrap: anywhere;
  }

  body.storefront #cart-dialog .cart-cep-jump:not([hidden]) {
    display: block;
    width: 100%;
    min-height: 40px;
    padding: 7px 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #1a5940;
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
  }

  body.storefront #cart-dialog .online-action {
    min-height: 48px !important;
    margin: 5px 0 4px;
  }

  body.storefront #cart-dialog .checkout-footnote {
    margin: 2px 0 0;
    text-align: center;
  }
}

@media (max-width: 700px) and (max-height: 560px) {
  body.storefront #cart-dialog .dialog-head { padding-top: 6px; padding-bottom: 5px; }
  body.storefront #cart-dialog .cart-checkout-footer { max-height: 55dvh; padding-top: 5px; }
  body.storefront #cart-dialog .cart-savings-banner { display: none; }
}
