/* VELOX Cart Styles */

/* Cart Button */
.cart-button {
  position: relative;
  background: none;
  border: none;
  color: #333;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.cart-button:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #ff0000;
}

.cart-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ff0000;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 12px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* Floating Cart Button */
.floating-cart {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #ff0000;
  color: white;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255, 0, 0, 0.3);
  z-index: 1000;
  transition: all 0.3s ease;
}

.floating-cart:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(255, 0, 0, 0.4);
}

/* Cart Overlay */
.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Cart Sidebar */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  height: 100%;
  background: white;
  z-index: 9999;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
}

.cart-sidebar.open {
  transform: translateX(0);
}

/* Cart Header */
.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #eee;
  background: #f8f9fa;
}

.cart-header h3 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
}

.cart-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
  padding: 5px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.cart-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #333;
}

/* Cart Items Container */
.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

/* Empty Cart */
.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 40px 20px;
  color: #666;
}

.cart-empty i {
  font-size: 4rem;
  margin-bottom: 20px;
  color: #ddd;
}

.cart-empty p {
  font-size: 1.1rem;
  margin-bottom: 20px;
}

/* Cart Item */
.cart-item {
  display: flex;
  padding: 20px;
  border-bottom: 1px solid #eee;
  gap: 15px;
  align-items: center;
}

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

.cart-item-image {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-details {
  flex: 1;
}

.cart-item-details h4 {
  margin: 0 0 5px 0;
  font-size: 1rem;
  color: #333;
}

.cart-item-size {
  margin: 0 0 10px 0;
  font-size: 0.9rem;
  color: #666;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quantity-btn {
  background: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 4px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quantity-btn:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

.quantity-btn:active {
  transform: scale(0.95);
}

.quantity {
  font-weight: bold;
  min-width: 20px;
  text-align: center;
}

.cart-item-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.item-total {
  font-weight: bold;
  font-size: 1.1rem;
  color: #333;
}

.remove-item {
  background: none;
  border: none;
  color: #dc3545;
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.remove-item:hover {
  background: rgba(220, 53, 69, 0.1);
  color: #c82333;
}

/* Cart Footer */
.cart-footer {
  padding: 20px;
  border-top: 1px solid #eee;
  background: #f8f9fa;
}

.cart-total {
  font-size: 1.3rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: 15px;
  color: #333;
}

.cart-checkout {
  width: 100%;
  margin-bottom: 10px;
  padding: 12px;
  font-weight: bold;
  background: #ff0000;
  border-color: #ff0000;
}

.cart-checkout:hover {
  background: #e60000;
  border-color: #e60000;
}

.cart-clear {
  width: 100%;
  padding: 10px;
}

/* Body modifications when cart is open */
body.cart-open {
  overflow: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {
  .cart-sidebar {
    width: 100%;
    max-width: 400px;
  }
  
  .floating-cart {
    bottom: 15px;
    right: 15px;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
  
  .cart-item {
    padding: 15px;
  }
  
  .cart-item-image {
    width: 60px;
    height: 60px;
  }
  
  .cart-item-details h4 {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .cart-sidebar {
    width: 100vw;
  }
}

/* Animation for cart items */
.cart-item {
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from {
    transform: translateX(20px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Scrollbar styling for cart items */
.cart-items::-webkit-scrollbar {
  width: 6px;
}

.cart-items::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.cart-items::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.cart-items::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}