/* Base table styles */
.cart-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

/* Product image styles */
.cart__image {
  display: block;
  width: 120px;
}

/* Table row and cell styles */
.cart__row {
  position: relative;
}

.cart__row td {
  padding: 20px 10px;
  vertical-align: middle;
}

.cart__row--title {
  display: block;
  margin-bottom: 5px;
  font-weight: var(--font-weight-body-bold);
  word-break: break-word;
}

/* Reset responsive table behavior */
@media screen and (max-width: 767px) {
  .cart-table thread {
    display: none;
  }

  .cart-table,
  .cart-table tbody,
  .cart-table tr {
    display:block;
    width: 100%;
  }
  
   /* Show only first (image) and second (details) columns */
  .cart__row td {
    display: none; /* Hide all cells by default */
    padding: 10px 5px;
  }
  
  .cart__row td:first-child,
  .cart__row td:nth-child(2) {
    display: table-cell; /* Show only image and details columns */
  }
  
  /* Image column */
  .cart__row td:first-child {
    width: 100px;
    padding-right: 15px;
  }
  
  .cart__image {
    width: 100px;
  }
  
  /* Details column */
  .cart__row--product-details {
    vertical-align: top;
    padding-left: 0;
  }
  
  /* Price display in details */
  .cart--detail.cart--price {
    margin-top: 10px;
    font-size: 16px;
    font-weight: var(--font-weight-body-bold);
  }
  
  /* Quantity controls in details */
  .cart--detail.cart--quantity {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .cart--detail.cart--quantity .js-qty {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
  }
  
  .cart--detail.cart--quantity .js-qty__num {
    width: 40px;
    height: 35px;
    border: none;
    text-align: center;
    font-size: 14px;
  }
  
  .cart--detail.cart--quantity .js-qty__adjust {
    width: 35px;
    height: 35px;
    border: none;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Total align right */
  .cart-total-label {
    text-align: right;
    font-weight: var(--font-weight-body-bold);
  }
  
  /* Remove link styling */
  .cart__remove {
    margin-top: 10px;
    display: inline-block;
    text-decoration: underline;
  }
}

/* Product details area */
.cart__row--product-details {
  padding-left: 15px;
}



/* Header labels */
.cart__header-labels th {
  padding: 10px;
  font-weight: var(--font-weight-body-bold);
  font-size: 1rem;
}

@media screen and (max-width: 767px) {
  .cart__header-labels th {
    padding: 8px 5px;
  }
}

/* Cart totals area */
.cart__row--subtotal {
  margin-top: 20px;
  text-align: right;
}

/* Optional: Sticky header for mobile */
@media screen and (max-width: 767px) {
  .cart__header-labels {
    position: sticky;
    top: 0;
    background: var(--color-body);
    z-index: 2;
  }
}

@media screen and (min-width: 769px) {
  .hide-desktop {
    display: none !important;
  }
  .js-qty__adjust {
    font-size: 1.5rem;
  }
}

@media screen and (max-width: 768px) {
  .show-mobile {
    display: block;
  }
}

@media screen and (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }
}