@media (max-width: 1024px) {
  #cart.section-p1 {
    padding: 40px 20px;
  }
  #cart table {
    width: 100%;
  }

  #cart table thead td {
    width: 80%;
  }
  #cart table tbody td {
    width: 80%;
  }

  #cart table tbody td img {
    width: 100px;
    height: auto;
  }

  #cart table img {
    width: 40%;
  }

  #coupon {
    width: 100%;
  }

  #coupon input {
    width: 100%;
  }

  #subtotal {
    width: 100%;
  }

  #cart div.form {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .cart-container {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 477px) {
  .section-p1 {
    padding: 20px;
  }

  #cart table {
    white-space: nowrap;
  }

  #cart-add {
    flex-direction: column;
  }

  #coupon {
    width: 100%;
    margin-bottom: 30px;
  }

  #subtotal {
    width: 100%;
    padding: 20px;
  }
}

.cart-container {
  display: flex;
  align-items: unset;
}

.cart-table {
  flex: 2;
}

.cart-totals {
  flex: 1;
}

#detailpro {
  flex: 1;
  max-height: 425px;
  overflow-y: auto;
  border: 1px solid #ddd;
  box-sizing: border-box;
}

#detailpro table {
  width: 100%;
  border-collapse: collapse;
}

#detailpro thead {
  position: sticky;
  top: 0;
  background-color: #fff;
  z-index: 10;
}

#detailpro th,
#detailpro td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

#subtotal {
  width: 300px;
  border: 1px solid #ddd;
  padding: 10px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

#coupon {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 10px;
}

#coupon input {
  flex: 1;
  padding: 5px;
}

#coupon button {
  padding: 5px 10px;
}

button.normal {
  width: 80%;
  padding: 10px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  text-align: center;
}

button.normal:hover {
  background-color: #0056b3;
}

.section-p1 {
  position: relative;
}

.cart-totals {
  position: sticky;
  top: 0;
  background-color: #fff;
  padding: 10px;
}
