/* Warehouse locations belong only on product pages, never in the cart. */
body[data-path="cart"] .shankar-warehouse-location-detail-badge,
body[data-route="cart"] .shankar-warehouse-location-detail-badge {
  display: none !important;
}

/* Mobile-only repairs for the native Webshop cart layout. */
@media (max-width: 575.98px) {
  #page-cart .cart-container > .row > [class*="col-"] {
    padding-right: 0;
    padding-left: 0;
  }

  #page-cart .cart-container .frappe-card.p-5 {
    padding: 18px !important;
  }

  #page-cart .cart-table {
    width: 100%;
    table-layout: fixed;
  }

  #page-cart .cart-table thead {
    display: none;
  }

  #page-cart .cart-table .cart-items tr {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
  }

  #page-cart .cart-table .cart-items td {
    display: block;
    width: 100% !important;
    padding: 0;
    border: 0;
  }

  #page-cart .cart-table .cart-items td:first-child > .d-flex {
    align-items: flex-start;
  }

  #page-cart .cart-table .cart-item-image {
    flex: 0 0 72px;
    width: 72px;
    min-width: 72px;
    margin-right: 12px !important;
  }

  #page-cart .cart-table .cart-item-image .product-image,
  #page-cart .cart-table .cart-item-image .no-image-cart-item {
    width: 72px;
    height: 72px;
    min-height: 72px;
  }

  #page-cart .cart-table .cart-items .item-title {
    width: 100%;
    overflow-wrap: anywhere;
  }

  #page-cart .cart-table .cart-items .notes {
    width: 100%;
  }

  #page-cart .cart-table .cart-items textarea {
    width: 100%;
    min-width: 0;
    height: 42px;
    resize: vertical;
  }

  #page-cart .cart-table .cart-items td.text-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    text-align: left !important;
  }

  #page-cart .cart-table .cart-items td.text-right > .d-flex {
    align-items: center;
    gap: 6px;
  }

  #page-cart .cart-table .number-spinner {
    width: auto;
    min-width: 105px;
    margin: 0 !important;
  }

  #page-cart .cart-table .remove-cart-item.column-sm-view {
    display: flex !important;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    margin: 0;
    align-items: center;
    justify-content: center;
  }

  #page-cart .cart-table .sm-item-subtotal {
    min-width: 84px;
    margin-left: auto;
    text-align: right;
  }

  #page-cart .cart-tax-items tr {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  #page-cart .cart-tax-items th:first-child {
    display: none;
  }

  #page-cart .cart-tax-items .item-grand-total {
    display: block;
    width: auto !important;
    padding: 14px 0 4px;
    white-space: nowrap;
  }

  #page-cart .cart-tax-items .totals {
    text-align: right !important;
  }

  #page-cart .frappe-card > .row.mt-2 {
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-right: 0;
    margin-left: 0;
  }

  #page-cart .frappe-card > .row.mt-2 > .col-3,
  #page-cart .frappe-card > .row.mt-2 > .col-9 {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
    padding: 0;
  }

  #page-cart .place-order-container .btn {
    margin-right: 0 !important;
    white-space: nowrap;
  }
}
