/* Cart Styles */
.cart-container {
  width: 350px;
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  height: calc(100vh - 140px);
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  transition: transform var(--animation);
}

.cart-header {
  padding: 16px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-header h3 {
  font-size: 20px;
}

.close-cart {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--gray-600);
  display: none;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.cart-item {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.cart-item-image {
  width: 60px;
  height: 60px;
  border-radius: var(--border-radius);
  overflow: hidden;
  margin-right: 12px;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-details {
  flex: 1;
}

.cart-item-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.cart-item-price {
  color: var(--gray-600);
  font-size: 14px;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  margin-top: 4px;
}

.cart-quantity-btn {
  width: 24px;
  height: 24px;
  border: 1px solid var(--gray-300);
  background: none;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.cart-quantity {
  margin: 0 8px;
  font-size: 14px;
}

.remove-item-btn {
  margin-left: 8px;
  background: none;
  border: none;
  color: var(--error);
  font-size: 14px;
  opacity: 0.8;
  transition: opacity var(--animation);
}

.remove-item-btn:hover {
  opacity: 1;
}

.cart-footer {
  padding: 16px;
  border-top: 1px solid var(--gray-200);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  font-weight: 600;
}

.checkout-btn {
  width: 100%;
  background-color: var(--primary);
  color: var(--text-light);
  border: none;
  padding: 12px;
  border-radius: var(--border-radius);
  font-weight: 600;
  transition: background-color var(--animation);
}

.checkout-btn:hover {
  background-color: var(--primary-dark);
}

.empty-cart {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 16px;
  text-align: center;
}

.empty-cart p {
  font-weight: 600;
  margin-bottom: 8px;
}

.empty-cart small {
  color: var(--gray-500);
}

/* Mobile cart styles */
@media (max-width: 768px) {
  .cart-container {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 350px;
    z-index: 200;
    height: 100vh;
    transform: translateX(100%);
  }

  .cart-container.active {
    transform: translateX(0);
  }

  .close-cart {
    display: block;
  }
}