@import url('variables.css');

#overlay-cart {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
.overlay-content {
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  padding: 30px;
  width: 90%;
  max-width: 600px;
  position: relative;
  overflow-y: auto;
  max-height: 80%;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.overlay-content h2 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(45deg, #2c3e50, #34495e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    margin-bottom: 20px;
  }  

.listcart {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 20px;
  color: #222;
}

.empty-cart-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  margin: 2rem auto;
  max-width: 400px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
  font-family: 'Roboto', sans-serif;
  color: #333;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.empty-cart-message:hover {
  transform: scale(1.02);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
}

.empty-cart-message h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.empty-cart-message p {
  font-size: 1rem;
  margin: 0;
}

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.9);
  padding: 20px;
  margin-bottom: 15px;
  border-radius: 15px;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cart-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.cart-item img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
}

.cart-item div {
  flex: 1;
  margin: 0 15px;
  font-size: 1.1rem;
  color: #444;
}

.cart-item .remove {
  background: linear-gradient(45deg, #ff7e5f, #feb47b);
  color: #fff;
  padding: 10px 16px;
  font-size: 1rem;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.cart-item .remove:hover {
  background: linear-gradient(45deg, #ff6a3d, #ff8a5b);
  transform: scale(1.05);
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
  }
  
  .cart-item-quantity button {
    background: linear-gradient(45deg, #ff6b6b, #ff4757);
    border: none;
    color: #fff;
    font-size: 1rem;
    padding: 5px 10px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  }
  
  .cart-item-quantity button:hover {
    transform: scale(1.1);
    background: linear-gradient(45deg, #ff4757, #ff6b6b);
  }  

.btn {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  gap: 20px;
}

.total-price {
  color: #222;
}

.close {
  background-color: transparent;
  font-size: 2rem;
  color: #ff4500;
  border: none;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.2s ease;
  position: absolute;
  top: 10px;
  right: 15px;
}

.close:hover {
  color: #0078ff;
  transform: rotate(90deg);
}

.checkout {
  background: linear-gradient(45deg, #00c6ff, #0072ff);
  color: white;
  border: none;
  padding: 14px 24px;
  font-size: 1.1rem;
  font-weight: bold;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
  width: 48%;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  background-color: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 10px 20px;
  border-radius: 4px;
  opacity: 0;
  transition: transform 0.5s ease, opacity 0.5s ease;
  z-index: 4000;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}


.checkout:hover {
  background: linear-gradient(45deg, #00a8e8, #005bb5);
  transform: scale(1.05);
}

.checkout:active {
  background: linear-gradient(45deg, #008ecf, #004c99);
  transform: scale(1);
}

@media (max-width: 768px) {
  .cart-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .cart-item img {
    margin-bottom: 10px;
  }

  .btn {
    flex-direction: column;
    gap: 10px;
  }

  .checkout {
    width: 100%;
  }

  .cart-item-quantity button {
    width: 35px;
    height: 35px;
    font-size: 18px;
  }
}
