/* Shopping Cart Styles - BITCOINAIRE theme (noir/orange) */

/* Cart icon button in header */
.cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--grey-1, #1d1d1f);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.28, 0, 0.63, 1);
  color: var(--white-soft, #f5f5f7);
}

.cart-btn:hover {
  border-color: var(--orange, #F7931A);
  background: rgba(247,147,26,0.12);
}

.cart-icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--orange, #F7931A);
  color: var(--noir, #000000);
  font-size: 0.625rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

/* Cart Modal */
.cart-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.cart-modal.open {
  display: flex;
}

.cart-panel {
  background: var(--noir, #000000);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0,0,0,0.7);
}

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

.cart-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white, #ffffff);
  margin: 0;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--grey-6, #8e8e93);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: var(--white, #ffffff);
}

.cart-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
}

/* Empty cart state */
.empty-cart {
  text-align: center;
  padding: 60px 20px;
}

.empty-cart p {
  font-size: 1.125rem;
  color: var(--grey-6, #8e8e93);
  margin-bottom: 24px;
}

.browse-btn {
  display: inline-block;
  padding: 12px 32px;
  background: var(--orange, #F7931A);
  color: var(--noir, #000000);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.browse-btn:hover {
  background: #ffa42e;
  transform: translateY(-2px);
}

/* Cart items */
.cart-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 16px;
  padding: 16px;
  background: var(--grey-1, #1d1d1f);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
}

.cart-item-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--grey-2, #2c2c2e);
}

.cart-item-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cart-item-details h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--white, #ffffff);
  margin: 0 0 4px 0;
}

.cart-item-meta {
  font-size: 0.8125rem;
  color: var(--grey-6, #8e8e93);
  margin: 0 0 6px 0;
}

.cart-item-price {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--white-soft, #f5f5f7);
  margin: 0;
}

.cart-item-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--grey-2, #2c2c2e);
  border-radius: 8px;
  padding: 4px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--white-soft, #f5f5f7);
  font-size: 1.25rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.qty-btn:hover {
  background: var(--grey-3, #3a3a3c);
  color: var(--orange, #F7931A);
}

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

.qty {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--white, #ffffff);
  min-width: 20px;
  text-align: center;
}

.remove-btn {
  background: transparent;
  border: none;
  color: var(--grey-5, #636366);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s ease;
}

.remove-btn:hover {
  color: #ff3b30;
}

/* Cart footer */
.cart-footer {
  padding: 24px 32px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.cart-summary {
  margin-bottom: 20px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.125rem;
  color: var(--white-soft, #f5f5f7);
  margin-bottom: 8px;
}

.summary-value {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--white, #ffffff);
}

.cart-footnote {
  font-size: 0.8125rem;
  color: var(--grey-6, #8e8e93);
  margin: 0;
  text-align: center;
}

.checkout-btn {
  width: 100%;
  padding: 16px;
  background: var(--orange, #F7931A);
  color: var(--noir, #000000);
  border: none;
  border-radius: 12px;
  font-size: 1.0625rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.28, 0, 0.63, 1);
}

.checkout-btn:hover {
  background: #ffa42e;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(247,147,26,0.24);
}

.checkout-btn:active {
  transform: scale(0.98);
}

/* Mobile responsive */
@media (max-width: 640px) {
  .cart-panel {
    max-height: 100vh;
    border-radius: 0;
  }
  
  .cart-header, .cart-content, .cart-footer {
    padding-left: 20px;
    padding-right: 20px;
  }
  
  .cart-item {
    grid-template-columns: 64px 1fr auto;
    gap: 12px;
    padding: 12px;
  }
  
  .cart-item-img {
    width: 64px;
    height: 64px;
  }
  
  .cart-item-details h4 {
    font-size: 0.9375rem;
  }
  
  .cart-item-meta {
    font-size: 0.75rem;
  }
}

/* Add to cart success animation */
@keyframes cartPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.cart-btn.pulse {
  animation: cartPulse 0.4s ease;
}

.cart-count.pulse {
  animation: cartPulse 0.4s ease;
}
