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

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

.floating-cart {
  position: fixed;
  bottom: -100%;
  right: 20px;
  width: 400px;
  max-width: calc(100vw - 40px);
  background: var(--bg-primary);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -10px 30px var(--shadow);
  z-index: 999;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.floating-cart.active {
  bottom: 0;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border);
  background: #16a34a;
  color: white;
  border-radius: 20px 20px 0 0;
}

.cart-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.close-cart {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  transition: all 0.3s ease;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-cart:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.cart-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  min-height: 200px;
}

.cart-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}

.cart-empty i {
  font-size: 48px;
  margin-bottom: 15px;
  opacity: 0.5;
}

.cart-empty p {
  font-size: 16px;
  margin: 0;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border-secondary);
}

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

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

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

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

.cart-item-name {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 5px;
  color: var(--text-primary);
}

.cart-item-brand {
  font-size: 12px;
  color: #16a34a;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.cart-item-price {
  font-weight: 700;
  color: #16a34a;
  font-size: 14px;
}

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

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 5px;
}

.quantity-btn {
  background: var(--bg-primary);
  border: none;
  width: 25px;
  height: 25px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  color: #16a34a;
  transition: all 0.2s ease;
}

.quantity-btn:hover {
  background: #16a34a;
  color: white;
}

.quantity-display {
  font-weight: 600;
  font-size: 14px;
  min-width: 20px;
  text-align: center;
}

.remove-item {
  background: #16a34a;
  border: none;
  color: white;
  width: 25px;
  height: 25px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
}

.remove-item:hover {
  background: #15803d;
  transform: scale(1.1);
}

.cart-footer {
  padding: 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
  border-radius: 0 0 20px 20px;
}

.cart-total {
  text-align: center;
  margin-bottom: 15px;
  font-size: 18px;
  color: var(--text-primary);
}

.cart-total strong {
  color: #16a34a;
  font-size: 20px;
}

.checkout-btn {
  width: 100%;
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: white;
  border: none;
  padding: 15px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.checkout-btn:hover {
  background: linear-gradient(135deg, #15803d 0%, #166534 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(22, 163, 74, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
  .floating-cart {
    right: 10px;
    width: calc(100vw - 20px);
    border-radius: 15px 15px 0 0;
  }

  .cart-header {
    padding: 15px;
    border-radius: 15px 15px 0 0;
  }

  .cart-content {
    padding: 15px;
  }

  .cart-footer {
    padding: 15px;
  }
}

@media (max-width: 480px) {
  .floating-cart {
    right: 5px;
    width: calc(100vw - 10px);
  }

  .cart-item {
    gap: 10px;
  }

  .cart-item-image {
    width: 50px;
    height: 50px;
  }
}
