.cart-popup {
  display: none;
  position: absolute;
  top: 45px;
  right: 10px;
  width: 350px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  padding: 1.5rem;
  animation: slideIn 0.3s ease;
}

.cart-popup::before {
  content: "";
  position: absolute;
  top: -8px;
  right: 35px;
  width: 16px;
  height: 16px;
  background: white;
  transform: rotate(45deg);
  box-shadow: -2px -2px 5px rgba(0, 0, 0, 0.04);
}

.cart-popup.show {
  display: block;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 1rem;
}

.cart-header h3 {
  margin: 0;
  font-size: 1.5rem;
  color: #0066cc;
  font-weight: 600;
  text-align: center;
  width: 100%;
}

.cart-header .cart-count {
  color: #666;
  font-size: 0.9rem;
  background: #f8f9fa;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
}

.cart-items {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 1rem;
  padding: 0.5rem 0;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cart-item-details {
  flex: 1;
  padding: 0 0.5rem;
}

.cart-item-name {
  font-weight: 500;
  color: #333;
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}

.cart-item-info {
  color: #666;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-item-size {
  margin-bottom: 0.25rem;
  color: #666;
}

.cart-item-price {
  color: #0066cc;
  font-weight: 600;
}

.cart-footer {
  padding-top: 1rem;
  border-top: 1px solid #f0f0f0;
  display: flex;
  justify-content: center;
}

.cart-buttons {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 0 1rem;
}

.checkout-btn {
  display: block;
  width: 100%;
  max-width: 200px;
  padding: 0.75rem 1.5rem;
  background: #0066cc;
  color: white;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  font-size: 1rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  margin: 0 auto;
}

.checkout-btn:hover {
  background: #0052a3;
  transform: translateY(-2px);
}

.empty-cart-message {
  text-align: center;
  color: #666;
  padding: 2rem 0;
  font-size: 0.95rem;
}

/* Cart Icon Animation */
.cart-shake {
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  .cart-popup {
    position: fixed;
    top: auto;
    bottom: 80px;
    right: 20px;
    width: calc(100% - 40px);
    max-width: 320px;
  }

  .cart-popup::before {
    display: none;
  }

  .checkout-btn {
    max-width: none;
  }
}
