/* Page Layout */
main {
  padding: 40px 20px;
  max-width: 1200px;
  margin: auto;
}

main h1 {
  text-align: center;
  font-size: 28px;
  color: #17499e;
  margin-bottom: 30px;
}

/* Grid Layout */
#bagContainer {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
}

/* bag Item Card */
.bag-item {
  border: 1px solid #ddd;
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.bag-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.bag-item img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Product Info */
.bag-item h3 {
  font-size: 18px;
  color: #17499e;
  margin-bottom: 8px;
}

.bag-item p {
  font-size: 14px;
  color: #555;
  margin: 4px 0;
}

.bag-price-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.bag-original-price {
  text-decoration: line-through;
  color: #9e9e9e;
}

.bag-discounted-price {
  font-weight: 700;
  color: #17499e;
}

/* Remove Button */
.bag-item button {
  margin-top: 10px;
  padding: 8px 16px;
  background-color: #1E90FF;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-bottom: 30px;
}

.bag-item button:hover {
  background-color: #187bcd;
}

/* bag Summary */
#bagSummary {
  margin: 40px auto 0;
  text-align: center;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

#totalAmount {
  font-size: 20px;
  font-weight: bold;
  color: #000;
  margin-bottom: 20px;
}

/* Checkout Button */
#checkoutBtn {
  background-color: #1E90FF;
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: bold;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#checkoutBtn:hover {
  background-color: #187bcd;
}

.price-breakdown {
  max-width: 400px;
  margin: 0 auto;
  font-family: sans-serif;
}

.row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
}

.total {
  font-weight: bold;
  border-top: 1px solid #ccc;
  margin-top: 8px;
  padding-top: 8px;
}

.weight-info {
  font-size: 0.9em;
  color: #555;
}

@media (max-width: 1400px) {
  #bagContainer {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 992px) {
  #bagContainer {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  #bagContainer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  #bagContainer {
    grid-template-columns: 1fr;
  }
}