/* ================== CONTAINER ================== */
.storage-container {
  max-width: 90rem;
  width: 100%;
  background: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 3rem 2rem;
  border-radius: 0.5rem;
  margin: 2rem auto;
  margin-top: 14rem;
}

/* ================== PAGE LAYOUT ================== */
.cart-page {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px;
}

/* ================== CART TABLE ================== */
.shoping__cart__table {
  flex: 1 1 65%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ================== HEADER & ROW ================== */
.cart__header,
.cart__row {
  display: grid;
  grid-template-columns: 3fr 1fr 1fr 1fr 0.5fr;
  align-items: center;
  gap: 10px;
  padding: 12px 10px;
  border-bottom: 1px solid #ccc;
  min-height: 100px;
}

/* Header */
.cart__header {
  font-weight: bold;
  background-color: #f9f9f9;
  border-radius: 6px;
  text-align: center;
}

/* Header cột sản phẩm căn trái */
.cart__header > div:first-child {
  text-align: left;
}

/* ================== COLUMNS ================== */
.cart__row > .cart__col {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Riêng cột sản phẩm */
.cart__product {
  justify-content: flex-start;
}

/* ================== PRODUCT ================== */
.cart__item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart__item img {
  width: 80px;
  height: auto;
  border-radius: 6px;
}

.cart__name {
  font-weight: 500;
}

/* ================== PRICE & TOTAL ================== */
.cart__price,
.cart__total {
  font-weight: 500;
  text-align: center;
}

/* ================== QUANTITY ================== */
.cart__quantity {
  justify-content: center;
}

.quantity {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pro-qty {
  display: flex;
  align-items: center;
  border: 1px solid #ccc;
  border-radius: 5px;
  overflow: hidden;
}

.pro-qty .dec,
.pro-qty .inc {
  background-color: #eee;
  padding: 6px 12px;
  cursor: pointer;
  user-select: none;
  border: none;
}

.quantity-input {
  width: 5rem;
  text-align: center;
  padding: 6px;
  border: none;
  background: white;
}

/* ================== REMOVE ================== */
.cart__remove {
  display: flex;
  align-items: center;
  justify-content: center;
}

.remove-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.icon_close::before {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  content: "\f00d";
  color: #888;
  font-size: 18px;
  transition: color 0.2s ease;
}

.icon_close:hover::before {
  color: red;
}

/* ================== ORDER SUMMARY ================== */
.order-summary {
  flex: 1 1 30%;
  border-top: 1px solid #ccc;
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 1rem;
  height: fit-content;
}

.order-summary h2 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
  text-align: center;
}

/* ================== ADDRESS ================== */
.address-input,
.address-textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 0.95rem;
  outline: none;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.address-input:focus,
.address-textarea:focus {
  border-color: #000;
}

.address-textarea {
  resize: none;
}

/* ================== TOTAL ================== */
.total {
  font-size: 1.2rem;
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

/* ================== CHECKOUT ================== */
.checkout-btn {
  background-color: #000;
  color: #fff;
  border: none;
  padding: 12px 20px;
  cursor: pointer;
  border-radius: 4px;
  width: 100%;
  transition: background-color 0.2s ease;
}

.checkout-btn:hover {
  background-color: #333;
}

/* ================== HEADER PLACEHOLDER ================== */
.cart__header .image-placeholder {
  width: 80px;
  height: 1px;
  visibility: hidden;
}

/* ================== RESPONSIVE ================== */
@media (max-width: 768px) {
  .cart-page {
    flex-direction: column;
  }

  .shoping__cart__table {
    width: 100%;
  }

  .cart__header,
  .cart__row {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .cart__product {
    justify-content: center;
  }

  .cart__item {
    flex-direction: column;
    justify-content: center;
  }

  .cart__price,
  .cart__quantity,
  .cart__total,
  .cart__remove {
    justify-content: center;
    margin-top: 5px;
  }

  .order-summary {
    width: 100%;
    margin-top: 20px;
  }
}
