/* Final mobile-only Checkout compaction. Loaded after the accepted desktop Checkout layer. */
@media (max-width: 760px) {
  .has-mobile-checkout .page-title {
    padding: 14px 12px 8px;
  }

  .has-mobile-checkout .page-title small {
    font-size: 9px;
  }

  .has-mobile-checkout .page-title h1 {
    margin-block: 2px;
    font-size: 22px;
  }

  .has-mobile-checkout .page-title p {
    font-size: 11px;
  }

  .checkout {
    gap: 10px;
    padding: 6px 10px 10px;
  }

  .checkout-progress {
    min-height: 48px;
    padding: 4px;
    border-radius: 11px;
    box-shadow: none;
  }

  .checkout-progress ol {
    gap: 2px;
  }

  .checkout-progress li {
    gap: 3px;
    min-height: 38px;
    padding: 3px 2px;
    border-radius: 8px;
  }

  .checkout-progress li span {
    width: 19px;
    height: 19px;
    font-size: 9px;
  }

  .checkout-progress li b {
    font-size: 9px;
  }

  .checkout-desktop-totals {
    display: none;
  }

  .checkout-products {
    width: 100%;
  }

  .checkout.is-stepped[data-checkout-current="1"] .checkout-products {
    display: block;
  }

  .checkout.is-stepped[data-checkout-current="2"] .checkout-products,
  .checkout.is-stepped[data-checkout-current="3"] .checkout-products {
    display: none;
  }

  .checkout-products .checkout-section-heading {
    margin-block-end: 7px;
  }

  .checkout-products .checkout-section-heading h2 {
    margin: 0;
    font-size: 17px;
  }

  .checkout-line {
    position: relative;
    grid-template-columns: 68px minmax(0, 1fr);
    grid-template-rows: 76px auto;
    gap: 6px 9px;
    margin-block-end: 7px;
    padding: 8px;
    border-radius: 11px;
  }

  .checkout-line > img {
    grid-column: 1;
    grid-row: 1;
    width: 68px;
    height: 76px;
    border-radius: 8px;
  }

  .checkout-line-info {
    display: contents;
  }

  .checkout-line-identity {
    grid-column: 2 !important;
    grid-row: 1;
    min-width: 0;
    padding-block-end: 21px;
  }

  .checkout-line-title {
    font-size: 12px;
    line-height: 1.35;
  }

  .checkout-line-identity > small {
    display: -webkit-box;
    margin-block-start: 2px;
    overflow: hidden;
    font-size: 9px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
  }

  .checkout-line-metrics {
    grid-column: 1 / -1 !important;
    grid-row: 2;
    grid-template-columns: minmax(0, 1fr) minmax(104px, 1.15fr) minmax(0, 1fr);
    gap: 5px;
    align-items: end;
    padding-block-start: 5px;
    border-top: 1px solid var(--sf-line);
  }

  .checkout-line-metrics > div {
    gap: 1px;
  }

  .checkout-line-metrics small {
    font-size: 8px;
  }

  .checkout-line-metrics b {
    overflow: hidden;
    font-size: 9px;
    text-overflow: ellipsis;
  }

  .checkout-quantity {
    grid-template-columns: 36px minmax(30px, 1fr) 36px;
    max-width: 108px;
    min-height: 36px;
    height: 36px;
  }

  .checkout-quantity button {
    min-width: 36px;
    min-height: 36px;
    height: 36px;
    max-height: 36px;
    padding: 0;
    font-size: 13px;
    line-height: 1;
  }

  .checkout .checkout-quantity input {
    box-sizing: border-box !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    padding: 2px !important;
    font-size: 12px;
  }

  .remove-line {
    position: absolute;
    inset-inline-end: 8px;
    top: 55px;
    padding: 2px 6px;
    border: 0;
    background: transparent;
    font-size: 9px;
  }

  .customer-form {
    width: 100%;
    max-width: none;
    margin-inline: 0;
    padding: 14px;
    border-radius: 14px;
  }

  .checkout-section-heading {
    margin-block-end: 9px;
  }

  .checkout-section-heading small {
    font-size: 9px;
  }

  .checkout-section-heading h2 {
    margin-block: 1px 2px;
    font-size: 19px;
  }

  .checkout-section-heading p {
    font-size: 10px;
    line-height: 1.45;
  }

  .customer-form label {
    margin-block: 7px 4px;
    font-size: 12px;
  }

  .customer-form input,
  .customer-form select,
  .customer-form textarea {
    min-height: 48px;
  }

  .customer-form textarea {
    min-height: 68px;
  }

  .checkout-step-actions {
    margin-block-start: 10px;
    padding-block-start: 10px;
  }

  .checkout-step-actions button {
    min-height: 44px;
  }

  [data-checkout-step="1"] .checkout-step-actions .primary {
    width: 100%;
  }

  .delivery-summary {
    margin-block-start: 12px;
    padding: 10px 12px;
    border-radius: 10px;
  }

  .checkout-review-products {
    display: grid;
    gap: 6px;
    margin-block-end: 8px;
  }

  .checkout-review-product {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    min-width: 0;
    padding: 7px;
    border: 1px solid var(--sf-line);
    border-radius: 10px;
    background: var(--sf-surface-soft);
  }

  .checkout-review-product img {
    width: 52px;
    height: 58px;
    object-fit: cover;
    border-radius: 7px;
  }

  .checkout-review-product > div {
    min-width: 0;
  }

  .checkout-review-product b {
    display: -webkit-box;
    overflow: hidden;
    font-size: 11px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .checkout-review-product small {
    display: block;
    overflow: hidden;
    color: var(--sf-muted);
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .checkout-review-product strong {
    font-size: 10px;
    white-space: nowrap;
  }

  .checkout-review-card,
  .checkout-review-delivery,
  .checkout-review-totals {
    margin-block-end: 6px;
    padding: 9px 10px;
  }

  .checkout-review-totals {
    margin-block-start: 8px;
  }
}

@media (max-width: 370px) {
  .checkout-line {
    grid-template-columns: 62px minmax(0, 1fr);
    grid-template-rows: 70px auto;
  }

  .checkout-line > img {
    width: 62px;
    height: 70px;
  }

  .checkout-line-metrics {
    grid-template-columns: minmax(0, 1fr) 102px minmax(0, 1fr);
  }

  .remove-line {
    top: 50px;
  }
}
