/* Shopping Cart Styles for Joe Quinn Music */

/* Cart Button in Navigation */
.cart-button {
  background: none;
  border: none;
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  transition: var(--transition);
  position: relative;
  padding: 0.5rem;
}

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

.cart-icon {
  font-size: 1.2rem;
}

.cart-count {
  background: var(--accent-red);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  position: absolute;
  top: -5px;
  right: -5px;
}

/* Cart Sidebar */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background: var(--bg-white);
  box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
  z-index: 1001;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.cart-sidebar.active {
  right: 0;
}

.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

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

/* Cart Header */
.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-light);
}

.cart-header h3 {
  margin: 0;
  color: var(--primary-color);
  font-size: 1.3rem;
  font-weight: 600;
}

.cart-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
  transition: color 0.2s ease;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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

.cart-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-light);
}

.cart-empty p:first-child {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.cart-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 1rem;
  background: var(--bg-white);
  transition: box-shadow 0.2s ease;
}

.cart-item:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.cart-item-image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.cart-item-details {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary-color);
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
}

.cart-item-price {
  font-size: 1rem;
  font-weight: 600;
  color: var(--secondary-color);
  margin: 0 0 0.75rem 0;
}

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

.cart-item-quantity button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border-color);
  background: var(--bg-light);
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item-quantity button:hover {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

.cart-item-quantity span {
  font-weight: 600;
  min-width: 20px;
  text-align: center;
  color: var(--text-dark);
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  font-size: 1.2rem;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.cart-item-remove:hover {
  color: var(--accent-red);
}

/* Cart Footer */
.cart-footer {
  border-top: 1px solid var(--border-color);
  padding: 1.5rem;
  background: var(--bg-light);
}

.cart-total {
  margin-bottom: 1.5rem;
}

.total-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
}

.total-amount {
  color: var(--primary-color);
  font-size: 1.2rem;
}

.cart-actions {
  display: flex;
  gap: 1rem;
}

.cart-actions .btn {
  flex: 1;
  text-align: center;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  border-radius: 6px;
}

.cart-actions .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Add to Cart Buttons */
.add-to-cart-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.product-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-white);
  transition: all 0.3s ease;
  cursor: pointer;
}

.product-option:hover {
  border-color: var(--accent-color);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.product-option.featured {
  border-color: var(--primary-color);
  background: linear-gradient(135deg, var(--bg-white) 0%, rgba(44, 85, 48, 0.05) 100%);
}

.product-info h4 {
  color: var(--primary-color);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
}

.product-info p {
  color: var(--text-light);
  font-size: 0.9rem;
  margin: 0 0 0.5rem 0;
  line-height: 1.4;
}

.product-price {
  text-align: right;
}

.price-current {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-color);
}

.price-original {
  font-size: 1rem;
  color: var(--text-light);
  text-decoration: line-through;
  margin-right: 0.5rem;
}

.price-savings {
  font-size: 0.85rem;
  color: var(--accent-red);
  font-weight: 600;
  display: block;
  margin-top: 0.25rem;
}

.add-to-cart-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  margin-top: 1rem;
  min-width: 140px;
}

.add-to-cart-btn:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(44, 85, 48, 0.3);
}

/* Cart Notification */
.cart-notification {
  position: fixed;
  top: 100px;
  right: 20px;
  background: var(--primary-color);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  z-index: 1002;
  transform: translateX(400px);
  opacity: 0;
  transition: all 0.3s ease;
  font-weight: 500;
  max-width: 300px;
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
  .cart-sidebar {
    width: 100vw;
    right: -100vw;
  }

  .cart-sidebar.active {
    right: 0;
  }

  .cart-actions {
    flex-direction: column;
  }

  .product-option {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    text-align: left;
  }

  .product-price {
    text-align: left;
    width: 100%;
  }

  .cart-notification {
    right: 10px;
    left: 10px;
    max-width: none;
  }

  .add-to-cart-section {
    margin-top: 1.5rem;
  }
}

@media (max-width: 480px) {
  .cart-header {
    padding: 1rem;
  }

  .cart-items {
    padding: 0.75rem;
  }

  .cart-footer {
    padding: 1rem;
  }

  .cart-item {
    padding: 0.75rem;
  }

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