/* ===============================
   CART PAGE BASE
================================ */
.cart-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 15px;
}

.page-header {
  background: #f8f9fa;
  padding: 2.5rem 0;
  margin-bottom: 2rem;
}

.page-header h1 {
  font-weight: 700;
}

.cart-items {
  background: #fff;
  border-radius: 10px;
  padding: 1rem;
}

.cart-item {
  display: grid;
  grid-template-columns: 90px 1fr auto auto auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid #eee;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-image img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
}


.cart-item-title {
  font-weight: 600;
  color: #222;
  text-decoration: none;
}

.cart-item-title:hover {
  color: #06492d;
}

.cart-item-category {
  font-size: 0.85rem;
  color: #777;
}

.cart-item-price {
  font-weight: 700;
  margin-top: 4px;
}

/* ===============================
   QUANTITY CONTROLS
================================ */
.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 6px;
}

.quantity-btn {
  width: 34px;
  height: 34px;
  border: 1px solid #ddd;
  background: #f8f9fa;
  border-radius: 6px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
}

.quantity-btn:hover {
  background: #0f5a44;
  color: #fff;
  border-color: #0f5a44;
}

.quantity-value {
  width: 45px;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 4px;
}

/* ===============================
   ITEM TOTAL & DELETE
================================ */
.cart-item-total {
  font-weight: 700;
  white-space: nowrap;
}

.cart-item .fa-trash-alt {
  color: #dc3545;
  cursor: pointer;
}

.cart-item .fa-trash-alt:hover {
  color: #b02a37;
}

/* ===============================
   ORDER SUMMARY
================================ */
.cart-summary {
  background: #fff;
  padding: 1.5rem;
  border-radius: 10px;
  position: sticky;
  top: 100px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.summary-total {
  font-weight: 800;
  font-size: 1.1rem;
  border-top: 1px solid #eee;
  padding-top: 10px;
}

/* ===============================
   BUTTONS
================================ */
.btn-checkout {
  display: block;
  background: #05694b;
  color: #fff;
  text-align: center;
  padding: 12px;
  border-radius: 8px;
  margin-top: 1rem;
  font-weight: 600;
  text-decoration: none;
}

.btn-checkout:hover {
  background: #0f5a44;
  color: #fff;
}

.continue-shopping {
  display: block;
  text-align: center;
  margin-top: 12px;
  color: #555;
  text-decoration: none;
}

/* ===============================
   EMPTY CART
================================ */
.empty-cart {
  text-align: center;
  padding: 4rem 1rem;
}

.empty-cart-icon {
  font-size: 4rem;
  color: #ddd;
  margin-bottom: 1rem;
}

.btn-shopping {
  display: inline-block;
  background: #198754;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}

/* ===============================
   CART TOAST MESSAGES
================================ */
.cart-toast-message {
  color: #fff;
  padding: 12px 18px;
  margin-top: 10px;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cart-toast-message.success {
  background: #2ecc71;
}

.cart-toast-message.error {
  background: #e74c3c;
}

.cart-toast-message.info {
  background: #3498db;
}

/* ===============================
   RESPONSIVE
================================ */
@media (max-width: 768px) {
  .cart-item {
    grid-template-columns: 70px 1fr;
    grid-template-areas:
      "image details"
      "image quantity"
      "total total";
  }

  .cart-item-image {
    grid-area: image;
  }

  .cart-item-details {
    grid-area: details;
  }

  .cart-item-quantity {
    grid-area: quantity;
  }

  .cart-item-total {
    grid-area: total;
    text-align: right;
  }
}
