/* ================= PAGE LAYOUT ================= */

.cart-page {
  display: flex;
  gap: 50px;
  margin: 50px auto;
}

/* ================= LEFT SIDE ================= */

.cart-left {
  flex: 2;
}

.cart-left h2 {
  font-size: 28px;
  margin-bottom: 30px;
}

/* ================= CART ITEM ================= */

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 25px 0;
  border-bottom: 1px solid #e5e5e5; /* thin separator line */
}

/* Product image */
.cart-item img {
  width: 85px;
  height: 85px;
  object-fit: cover;
  border-radius: 6px;
}

/* ================= PRODUCT DETAILS ================= */

.cart-details {
  flex: 1;
  margin-left: 25px;
}

/* Product name - GREEN */
.cart-details h4 {
  font-size: 18px;
  font-weight: 600;
  color: #1b8e44;
  margin-bottom: 8px;
}

/* Remove | Save for later - GREEN */
.cart-actions {
  font-size: 14px;
  color: #1b8e44;
}

.cart-actions a {
  color: #1b8e44;
  text-decoration: none;
}

.cart-actions a:hover {
  text-decoration: underline;
}

/* ================= QUANTITY RIGHT SIDE ================= */

.cart-qty {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-left: 40px; /* gap between product & qty */
}

/* Quantity buttons */
.qty-btn {
  width: 36px;
  height: 36px;
  border: 1px solid #ccc;
  background: #f5f5f5;
  font-size: 18px;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.2s ease;
}

.qty-btn:hover {
  background: #1b8e44;
  color: white;
  border-color: #1b8e44;
}

/* Quantity number */
.qty-number {
  min-width: 25px;
  text-align: center;
  font-weight: 600;
  font-size: 16px;
}

/* ================= RIGHT SIDE SUMMARY ================= */

.cart-right {
  flex: 1;
}

.summary-box {
  background: #fafafa;
  padding: 30px;
  border-radius: 10px;
  border: 1px solid #eee;
  position: sticky;
  top: 100px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  font-size: 15px;
}

.summary-row.total {
  font-weight: 700;
  font-size: 18px;
  margin-top: 10px;
}

/* ================= DISCOUNT ================= */

.discount {
  display: flex;
  margin: 15px 0;
}

.discount input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px 0 0 6px;
}

.discount button {
  background: #e53935;
  color: white;
  border: none;
  padding: 10px 14px;
  border-radius: 0 6px 6px 0;
  cursor: pointer;
}

/* ================= BUTTONS ================= */

.checkout-btn {
  width: 100%;
  padding: 14px;
  background: #1b8e44;
  color: white;
  border: none;
  border-radius: 6px;
  margin-top: 10px;
  font-size: 15px;
  cursor: pointer;
}

.checkout-btn:hover {
  background: #147c39;
}

/* ================= CONTINUE SHOPPING ================= */

.continue-link {
  text-align: center;
  margin-top: 18px;
}

.continue-link a {
  color: #1b8e44;
  text-decoration: none;
  font-weight: 500;
}

.continue-link a:hover {
  text-decoration: underline;
}

/* ================= MOBILE ================= */

@media (max-width: 768px) {

  .cart-page {
    flex-direction: column;
    gap: 30px;
  }

  .cart-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .cart-qty {
    align-self: flex-end;
    margin-left: 0;
  }

  .summary-box {
    position: static;
  }
}


/* Product name link */
.cart-product-link {
  color: #1b8e44;
  text-decoration: none;
  font-weight: 600;
  transition: 0.2s ease;
}

.cart-product-link:hover {
  text-decoration: underline;
  color: #147c39;
}