/* Shopping Cart Styles */

/* Cart Button */
.cart-button {
  position: relative;
  background: none;
  border: none;
  color: var(--accent-color-static);
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.3s ease;
}

.cart-button:hover {
  color: var(--text-color);
}

.cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--accent-color-static);
  color: #000;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
}

/* Cart Modal */
.cart-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.cart-modal-content {
  position: absolute;
  right: 0;
  top: 0;
  width: 400px;
  height: 100%;
  background: var(--bg-color);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.cart-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-header h3 {
  margin: 0;
  color: var(--accent-color-static);
  font-family: var(--font-heading);
}

.cart-close {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.cart-close:hover {
  color: var(--accent-color-static);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.empty-cart {
  text-align: center;
  color: var(--text-color-muted);
  margin-top: 2rem;
}

.cart-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.cart-item-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 0.5rem;
}

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

.cart-item-details h4 {
  margin: 0 0 0.5rem 0;
  color: var(--text-color);
  font-size: 1rem;
}

.cart-item-details p {
  margin: 0.25rem 0;
  color: var(--text-color-muted);
  font-size: 0.875rem;
}

.cart-item-price {
  color: var(--accent-color-static) !important;
  font-weight: bold;
}

.cart-item-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.quantity-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-color);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  transition: all 0.3s ease;
}

.quantity-btn:hover {
  background: var(--accent-color-static);
  color: #000;
}

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

.remove-btn {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  transition: background 0.3s ease;
}

.remove-btn:hover {
  background: rgba(239, 68, 68, 0.1);
}

.cart-footer {
  padding: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.3);
}

.cart-total {
  margin-bottom: 1rem;
  text-align: center;
  color: var(--text-color);
  font-size: 1.25rem;
}

.checkout-btn {
  width: 100%;
  background: var(--accent-color-static);
  color: #000;
  border: none;
  padding: 1rem;
  border-radius: 0.5rem;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.checkout-btn:hover {
  background: var(--accent-color-hover);
  transform: translateY(-2px);
}

.checkout-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Cart Message */
.cart-message {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--accent-color-static);
  color: #000;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: bold;
  z-index: 1001;
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s ease;
}

.cart-message.show {
  transform: translateX(0);
  opacity: 1;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .cart-modal-content {
    width: 100%;
    right: 0;
  }
  
  .cart-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .cart-item-controls {
    flex-direction: row;
    justify-content: center;
  }
}
