/* Base Container */
.cart-container {
  max-width: 800px;
  margin: 40px auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #333;
}

/* Individual Cart Items */
.cart-item {
  display: flex;
  align-items: center;
  margin-bottom: 25px;
}

.item-img {
  width: 220px;
  height: 120px;
  object-fit: cover;
  border-radius: 4px;
}

.item-details {
  flex-grow: 1; /* Pushes the quantity controls to the right */
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.item-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 400;
}

.item-price {
  font-size: 0.85rem;
  font-weight: 700;
}

/* Quantity Controls */
.item-quantity {
  display: flex;
  align-items: center;
  gap: 15px;
}

.qty-btn {
  width: 32px;
  height: 32px;
  background: white;
  border: 1px solid #9cbd75; /* Matches the green in the image */
  color: #9cbd75;
  font-size: 1.2rem;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

.qty-value {
  font-size: 1rem;
  font-weight: 500;
}

/* Totals Section */
.cart-totals {
  margin-top: 40px;
  color: #0b4f6c; /* Matches the dark teal text */
  font-size: 1.1rem;
}

.total-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.grand-total {
  border-top: 1px solid #eee;
  padding-top: 15px;
  margin-top: 15px;
  margin-bottom: 20px;
}

/* Add Button */
.cart-actions {
  display: flex;
  justify-content: flex-end;
}

.add-btn {
  background-color: #9cbd75;
  color: white;
  border: none;
  padding: 10px 30px;
  font-size: 1.1rem;
  border-radius: 8px;
  cursor: pointer;
}
/* Responsive styling for smaller screens (mobile) */
@media (max-width: 600px) {
  .cart-container {
    margin: 20px;
  }

  .cart-item {
    display: grid;
    /* Creates two columns: 150px for the image, and the rest for the text/buttons */
    grid-template-columns: 150px 1fr; 
    grid-template-rows: auto auto;
    column-gap: 15px;
    row-gap: 10px;
    align-items: start;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
  }

  .item-img {
    grid-column: 1;
    grid-row: 1 / 3; /* Spans the image across both rows on the left */
    width: 100%;
    height: 100px;
  }

  .item-details {
    grid-column: 2;
    grid-row: 1;
    padding: 0;
    justify-content: center;
  }

  /* Matches the blue/teal text color for the title in the image */
  .item-title {
    color: #0b4f6c; 
    margin-bottom: 4px;
  }

  .item-quantity {
    grid-column: 2;
    grid-row: 2;
    padding: 0;
    gap: 8px; /* Tighter gap for mobile */
  }

  /* New style for the input box */
  .qty-input {
    width: 70px;
    height: 32px;
    border: 1px solid #555;
    border-radius: 2px;
    font-size: 1rem;
    padding-left: 8px; /* Aligns the "1,00" slightly off the left edge */
    font-family: inherit;
    color: #333;
  }

  .cart-actions {
    justify-content: stretch;
  }

  .add-btn {
    width: 100%;
  }
}