.page-title {
  text-align: center;
  padding: 70px 20px;
  background: #eef2ff;
  margin-top: 90px;
}

.page-title h1 {
  font-size: 36px;
  margin-bottom: 8px;
}

.page-title p {
  color: #666;
}
.clear-cart-btn {
  display: inline-block;
  margin-top: 15px;
  padding: 8px 16px;
  background-color: #ff4d4d;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 500;
  transition: 0.3s;
}

.clear-cart-btn:hover {
  background-color: #e60000;
}

.cart-section {
  display: grid;
  grid-template-columns: 3fr 1.2fr;
  gap: 40px;
  padding: 50px 10%;
  align-items: start;
}

.cart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 280px));
  justify-content: center;
  gap: 25px;
  margin-bottom: 30px;
}

.cart-card {
  background: white;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cart-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 25px rgba(0,0,0,0.12);
}

.cart-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 10px;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.cart-card img:hover {
  transform: scale(1.08);
}

.cart-card h3 {
  font-size: 18px;
  margin: 10px 0 8px;
  color: #111;
  line-height: 1.3;
  min-height: 48px;  
  max-height: 48px;
  overflow: hidden;
}

.cart-card p {
  color: #2563eb;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 8px;
  min-height: 20px;
}

.rating {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
  color: #fbbf24;
  font-size: 18px;
  min-height: 22px;
}

.rating i {
  transition: transform 0.25s ease, color 0.25s ease;
  cursor: pointer;
}

.rating i:hover {
  transform: scale(1.3) rotate(-10deg);
  color: #f59e0b;
}

.cart-card input[type=number] {
  width: 70px;
  padding: 8px;
  margin: 10px 0;
  border: 1px solid #ddd;
  border-radius: 6px;
  text-align: center;
}

.cart-card button.remove {
  background: #ff4d4d;
  margin-top: 10px;
  width: 100%;
  padding: 10px;
  border: none;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: 0.25s;
}

.cart-card button.remove:hover {
  background: #d93636;
}

.cart-summary {
  background: #ffffff;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
  position: sticky;
  top: 120px;
  text-align: left;
}

.cart-summary p {
  display: flex;
  justify-content: space-between;
  font-size: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

.cart-summary span {
  font-weight: bold;
  color: #111;
}

.cart-summary button {
  width: 100%;
  padding: 14px;
  border: none;
  background: linear-gradient(45deg, #2563eb, #1e40af);
  color: white;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: 0.3s;
}

.cart-summary button:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 20px rgba(37,99,235,0.3);
}

#emptyMessage {
  margin-top: 40px;
  color: #777;
  font-size: 16px;
}

/* MOBILE RESPONSIVE */
@media(max-width:768px) {
  .cart-section {
    grid-template-columns: 1fr;
    padding: 50px 20px;
  }

  .cart-summary {
    position: static;
    margin-top: 20px;
  }

  .page-title h1 {
    font-size: 28px;
  }
}

/* TOAST */
#toast {
  position: fixed;
  top: 150px;
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  padding: 14px 22px;
  border-radius: 12px;
  color: white;
  font-weight: 500;
  transition: transform 0.5s ease, opacity 0.5s ease;
  opacity: 0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

#toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

#toast.success {
  background: linear-gradient(45deg, #00c853, #64dd17);
}

#toast.error {
  background: linear-gradient(45deg, #d50000, #ff1744);
}

#toast.info {
  background: linear-gradient(45deg, #065de0, #0166ff);
}

#paymentBox {
  display: none; 
  max-width: 400px;
  margin: 50px auto;
  background: #ffffff;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.12);
  text-align: left;
  transition: all 0.3s ease;
}

#paymentBox h2 {
  font-size: 24px;
  margin-bottom: 20px;
  color: #111;
}

#paymentBox input[type="text"] {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  outline: none;
  transition: 0.25s;
}

#paymentBox input[type="text"]:focus {
  border-color: #2563eb;
  box-shadow: 0 0 8px rgba(37,99,235,0.2);
}

#paymentBox p {
  font-size: 18px;
  color: #111;
  display: flex;
  justify-content: space-between;
  margin: 15px 0;
  font-weight: 600;
}

#paymentBox button {
  width: 100%;
  padding: 14px;
  border: none;
  background: linear-gradient(45deg, #2563eb, #1e40af);
  color: white;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: 0.3s;
}

#paymentBox button:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 20px rgba(37,99,235,0.3);
}

/* MOBILE */
@media(max-width:768px) {
  #paymentBox {
    width: 90%;
    margin: 30px auto;
    padding: 20px;
  }

  #paymentBox h2 {
    font-size: 20px;
  }

  #paymentBox input[type="text"] {
    font-size: 15px;
    padding: 10px;
  }

  #paymentBox button {
    font-size: 15px;
    padding: 12px;
  }
}