/**
 * Cart page — dark page background (matches sign-in) + light cart table panel.
 */

body.path-cart,
body.path-cart .dialog-off-canvas-main-canvas {
  background: #2a2f34 !important;
  color: #dde3e9 !important;
}

/* Sticky footer — no empty gap below footer on short/empty cart */
body.path-cart .dialog-off-canvas-main-canvas,
body.path-cart .page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #2a2f34 !important;
}

body.path-cart .page-wrapper > #page {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  background: #2a2f34 !important;
}

body.path-cart #page .layout-main-wrapper,
body.path-cart #page .layout-main,
body.path-cart #page .main-content,
body.path-cart #page .main-content__container,
body.path-cart #page main[role="main"] {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #2a2f34 !important;
  color: #dde3e9 !important;
}

body.path-cart .teal-footer-mockup {
  margin-top: auto;
  flex-shrink: 0;
}

body.path-cart .layout-content,
body.path-cart main,
body.path-cart .cart-page {
  color: #dde3e9 !important;
}

body.path-cart .cart-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #2a2f34 !important;
  padding: 32px 0 48px;
  min-height: 0;
}

body.path-cart .cart-page .container {
  max-width: 1200px;
}

body.path-cart .cart-page .view-header {
  color: #dde3e9 !important;
}

body.path-cart .cart-page .view-empty,
body.path-cart .cart-empty-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  padding: 48px 24px;
  color: #00a3a3 !important;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-align: center;
  background: #2a2f34 !important;
}

/* Table wrapper */
body.path-cart .theme-table-wrapper {
  background: #fff;
  border: 1px solid #d8dee6;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

body.path-cart table.cart-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

body.path-cart table.cart-table thead tr {
  background: #2a2f34;
  border: none;
}

body.path-cart table.cart-table th {
  padding: 14px 16px;
  background: #2a2f34 !important;
  color: #f0f2f4 !important;
  border: none !important;
  text-align: left;
  font-family: 'Barlow', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.path-cart table.cart-table tbody tr {
  border-bottom: 1px solid #e8ecf0;
  transition: background 0.15s ease;
}

body.path-cart table.cart-table tbody tr:hover {
  background: #f8fafb;
}

body.path-cart table.cart-table tbody tr:last-child {
  border-bottom: none;
}

body.path-cart table.cart-table td {
  padding: 16px;
  vertical-align: middle;
  text-align: left;
  background: #fff !important;
  color: #2a2f34 !important;
  border: none !important;
  border-bottom: 1px solid #e8ecf0 !important;
  font-family: 'Barlow', sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
}

body.path-cart table.cart-table td .field,
body.path-cart table.cart-table td .field__item,
body.path-cart table.cart-table td .field__label,
body.path-cart table.cart-table td a {
  color: #2a2f34 !important;
}

body.path-cart table.cart-table td a {
  text-decoration: none;
  font-weight: 600;
}

body.path-cart table.cart-table td a:hover {
  color: #009999 !important;
  text-decoration: underline;
}

/* Product image cell */
body.path-cart .cart-table .table-product,
body.path-cart .cart-table .table-brand,
body.path-cart table.cart-table td img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  border: 1px solid #e8ecf0;
  border-radius: 6px;
  background: #fff;
  padding: 4px;
}

body.path-cart table.cart-table td:first-child {
  text-align: center;
  width: 110px;
}

/* Part number column */
body.path-cart table.cart-table td:nth-child(2) {
  font-weight: 700;
  color: #1a1a1a !important;
  white-space: nowrap;
}

/* Description */
body.path-cart table.cart-table td:nth-child(3) {
  max-width: 360px;
}

/* Price & total columns */
body.path-cart table.cart-table td:nth-child(4),
body.path-cart table.cart-table td:nth-child(6) {
  font-weight: 700;
  color: #751012 !important;
  white-space: nowrap;
}

/* Quantity controls */
body.path-cart .cart-table .js-form-item-edit-quantity-0.form-no-label,
body.path-cart .cart-table .form-type-number {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 140px;
  margin: 0 auto;
}

body.path-cart .quantity-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #eef1f4;
  border: 1px solid #d0d7de;
  border-radius: 4px;
  color: #2a2f34 !important;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  flex: none;
}

body.path-cart .quantity-btn:hover {
  background: #009999;
  border-color: #009999;
  color: #fff !important;
}

body.path-cart .quantity-edit-input,
body.path-cart .cart-table input[type=number] {
  width: 52px !important;
  min-width: 52px !important;
  max-width: 52px;
  height: 36px;
  margin: 0 4px;
  padding: 0 4px;
  text-align: center;
  border: 1px solid #d0d7de !important;
  border-radius: 4px;
  background: #fff !important;
  color: #2a2f34 !important;
  font-size: 15px;
  font-weight: 600;
}

/* Remove button */
body.path-cart .delete-order-item,
body.path-cart .cart-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #fff5f5 !important;
  border: 1px solid #ffc9c9 !important;
  border-radius: 6px;
  color: #c0392b !important;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

body.path-cart .delete-order-item:hover,
body.path-cart .cart-delete:hover {
  background: #ffe1e1 !important;
  color: #a82a1e !important;
}

/* Totals panel */
body.path-cart .cart-total-wrapper {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
}

body.path-cart .cart-total {
  width: 100%;
  max-width: 340px;
  background: #fff !important;
  border: 1px solid #d8dee6;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

body.path-cart table.carttot-table tr,
body.path-cart table.carttot-table th,
body.path-cart table.carttot-table td {
  background: transparent !important;
  color: #2a2f34 !important;
  border: none !important;
  font-family: 'Barlow', sans-serif;
}

body.path-cart table.carttot-table tr td {
  padding: 10px 20px !important;
  font-size: 15px;
}

body.path-cart table.carttot-table tr td:first-child {
  text-align: left;
  color: #5a6570 !important;
}

body.path-cart table.carttot-table tr td:last-child {
  text-align: right;
  font-weight: 600;
}

body.path-cart table.carttot-table tr:last-child td {
  background: #fff3f3 !important;
  color: #751012 !important;
  font-size: 18px;
  font-weight: 700;
  padding: 14px 20px !important;
}

body.path-cart table.carttot-table tr:last-child td:last-child {
  text-align: right;
}

/* Action buttons */
body.path-cart .cart-page div#edit-actions,
body.path-cart .cart-buttons-wrapper {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

body.path-cart .cart-buttons-wrapper .button#edit-submit {
  background: #fff !important;
  color: #751012 !important;
  border: 2px solid #751012 !important;
  border-radius: 4px;
  font-weight: 600;
  min-width: 150px;
}

body.path-cart .cart-buttons-wrapper .button#edit-submit:hover {
  background: #fff5f5 !important;
}

body.path-cart .cart-buttons-wrapper .button#edit-checkout {
  background: #751012 !important;
  color: #fff !important;
  border: 2px solid #751012 !important;
  border-radius: 4px;
  font-weight: 600;
  min-width: 150px;
}

body.path-cart .cart-buttons-wrapper .button#edit-checkout:hover {
  background: #5c0d0f !important;
  border-color: #5c0d0f !important;
}

/* Mobile */
@media (max-width: 900px) {
  body.path-cart table.cart-table thead {
    display: none;
  }

  body.path-cart table.cart-table tbody tr {
    display: block;
    margin-bottom: 16px;
    border: 1px solid #d8dee6;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
  }

  body.path-cart table.cart-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: right !important;
    padding: 12px 16px;
    border-bottom: 1px solid #eef1f4 !important;
  }

  body.path-cart table.cart-table td::before {
    content: attr(data-label);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #5a6570;
    margin-right: 12px;
    text-align: left;
  }

  body.path-cart table.cart-table td:first-child {
    justify-content: center;
    width: 100%;
  }

  body.path-cart table.cart-table td:first-child::before {
    display: none;
  }

  body.path-cart .cart-total-wrapper {
    justify-content: stretch;
  }

  body.path-cart .cart-total {
    max-width: 100%;
  }
}
