 /* ===== Cart Section ===== */
.cart-section {
  padding: 40px 20px;
  background: #f9f9f9;
}

.cart-container {
  max-width: 1200px;
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.08);
  padding: 30px;
}

.cart-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 25px;
  color: #222;
  text-align: left;
}

/* Cart Items */
.cart-items {
  border-bottom: 1px solid #eee;
  margin-bottom: 20px;
}

.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr 150px 120px 40px;
  align-items: center;
  gap: 20px;
  padding: 15px 0;
  border-top: 1px solid #eee;
}

.cart-item:first-child {
  border-top: none;
}

.cart-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.item-details h3 {
  font-size: 16px;
  margin-bottom: 6px;
  color: #333;
  display: -webkit-box;
  -webkit-line-clamp: 1; /* limit to 1 line */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-details .price {
  color: #1D435F;
  font-weight: 600;
}

/* Quantity Buttons */
.item-qty {
  display: flex;
  align-items: center;
  gap: 5px;
}

.qty-btn {
  width: 30px;
  height: 30px;
  border: 1px solid #ccc;
  background: #f8f8f8;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.3s;
}
.qty-btn:hover {
  background: #1D435F;
  color: #fff;
}

.item-qty input {
  width: 50px;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 6px;
  font-size: 14px;
  background: #fff;
}

.item-total {
  font-weight: 700;
  color: #333;
  font-size: 15px;
  text-align: right;
}

/* Remove Button */
.remove-btn {
  background: transparent;
  border: none;
  font-size: 22px;
  font-weight: bold;
  color: #999;
  cursor: pointer;
  transition: color 0.3s;
}
.remove-btn:hover {
  color: #e60023;
}

/* Summary */
.cart-summary {
  text-align: right;
  margin-top: 20px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  margin-bottom: 10px;
  color: #444;
}
.summary-row.total {
  font-size: 18px;
  font-weight: 700;
  color: #222;
}

.checkout-btn {
  margin-top: 15px;
  padding: 14px 28px;
  background: #1D435F;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}
.checkout-btn:hover {
  background: #6d9abf;
}

/* ===== Mobile-Only Cart Styles (max-width: 768px) ===== */
@media (max-width: 768px) {

  .cart-section {
    padding: 20px 10px;
  }

  .cart-container {
    padding: 15px;
    border-radius: 8px;
  }

  .cart-title {
    font-size: 20px;
    margin-bottom: 15px;
    text-align: center;
  }

  .cart-item {
    display: grid;
    grid-template-columns: 60px 1fr;
    grid-template-areas:
      "img title"
      "img qty"
      "img total"
      "img remove";
    align-items: start;
    gap: 8px;
    padding: 12px 0;
    border-top: 1px solid #eee;
  }

  .cart-item img {
    grid-area: img;
    width: 60px;
    height: 60px;
  }

  .item-details {
    grid-area: title;
  }

  .item-details h3 {
    font-size: 14px;
    margin-bottom: 4px;
    -webkit-line-clamp: 1;
  }

  .item-details .price {
    font-size: 13px;
  }

  .item-qty {
    grid-area: qty;
    gap: 5px;
  }

  .item-qty input {
    width: 40px;
    font-size: 13px;
    padding: 4px;
  }

  .qty-btn {
    width: 26px;
    height: 26px;
    font-size: 16px;
  }

  .item-total {
    grid-area: total;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
  }

  .remove-btn {
    grid-area: remove;
    font-size: 20px;
    justify-self: start;
  }

  .cart-summary {
    text-align: center;
    margin-top: 25px;
  }

  .summary-row {
    font-size: 14px;
  }

  .summary-row.total {
    font-size: 16px;
  }

  .checkout-btn {
    width: 100%;
    font-size: 15px;
    padding: 12px;
    border-radius: 6px;
  }
}
