/* ===== Site-Wide Cart System ===== */
/* Shared cart styles used across all pages */

/* Floating Cart Icon */
.site-cart-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9997;
  background: linear-gradient(45deg, #00FFD1, #00bfa5);
  border: none;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 255, 209, 0.4);
  transition: all 0.3s ease;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
}

.site-cart-fab.visible {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.site-cart-fab:hover {
  box-shadow: 0 6px 30px rgba(0, 255, 209, 0.6);
  transform: scale(1.08);
}

.site-cart-fab svg {
  width: 34px;
  height: 34px;
  fill: #000;
}

.site-cart-fab .site-cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ff4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Arial, sans-serif;
  transition: transform 0.2s ease;
}

.site-cart-fab.visible .site-cart-badge {
  animation: cartBadgePop 0.3s ease;
}

@keyframes cartBadgePop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* Nav Cart Button (inside navigation bar) */
.nav-cart-btn {
  position: relative;
  background: none;
  border: 1px solid rgba(0, 255, 209, 0.3);
  border-radius: 8px;
  color: #00FFD1;
  cursor: pointer;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-cart-btn:hover {
  background: rgba(0, 255, 209, 0.1);
  border-color: rgba(0, 255, 209, 0.5);
}

.nav-cart-btn svg {
  width: 18px;
  height: 18px;
  fill: #00FFD1;
}

.nav-cart-btn .nav-cart-badge {
  background: #ff4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: -6px;
  right: -6px;
}

.nav-cart-btn .nav-cart-badge:empty,
.nav-cart-btn .nav-cart-badge[data-count="0"] {
  display: none;
}

/* Cart Overlay */
.site-cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.site-cart-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* Cart Panel */
.site-cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 90vw;
  height: 100%;
  background: #111;
  border-left: 1px solid rgba(0, 255, 209, 0.2);
  z-index: 9999;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  font-family: Arial, sans-serif;
}

.site-cart-panel.open {
  transform: translateX(0);
}

/* Cart Header */
.site-cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(0, 255, 209, 0.15);
}

.site-cart-header h2 {
  margin: 0;
  color: #00FFD1;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-cart-close {
  background: none;
  border: none;
  color: #888;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}

.site-cart-close:hover {
  color: #fff;
}

/* Cart Body */
.site-cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* Cart Empty State */
.site-cart-empty {
  text-align: center;
  color: #666;
  padding: 60px 20px;
  font-size: 15px;
}

.site-cart-empty svg {
  width: 48px;
  height: 48px;
  fill: #333;
  margin-bottom: 16px;
}

.site-cart-empty a {
  display: inline-block;
  margin-top: 16px;
  color: #00FFD1;
  text-decoration: none;
  font-size: 13px;
  border: 1px solid rgba(0, 255, 209, 0.3);
  padding: 8px 16px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.site-cart-empty a:hover {
  background: rgba(0, 255, 209, 0.1);
  border-color: #00FFD1;
}

/* Cart Item */
.site-cart-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.site-cart-item-img {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(0, 255, 209, 0.15);
}

.site-cart-item-info {
  flex: 1;
  min-width: 0;
}

.site-cart-item-name {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-cart-item-artist {
  color: #888;
  font-size: 12px;
  margin-bottom: 12px;
}

.site-cart-item-price {
  color: #00FFD1;
  font-size: 14px;
  font-weight: 600;
}

.site-cart-item-price-usd {
  color: #888;
  font-size: 12px;
  font-weight: 400;
  margin-left: 6px;
}

/* Quantity Selector */
.site-qty-selector {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 12px;
  border: 1px solid rgba(0, 255, 209, 0.25);
  border-radius: 8px;
  overflow: hidden;
  width: fit-content;
}

.site-qty-btn {
  background: rgba(0, 255, 209, 0.08);
  border: none;
  color: #00FFD1;
  width: 36px;
  height: 36px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  font-family: Arial, sans-serif;
}

.site-qty-btn:hover {
  background: rgba(0, 255, 209, 0.18);
}

.site-qty-btn:disabled {
  color: #444;
  cursor: not-allowed;
  background: transparent;
}

.site-qty-value {
  width: 44px;
  text-align: center;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  background: transparent;
  border: none;
  border-left: 1px solid rgba(0, 255, 209, 0.15);
  border-right: 1px solid rgba(0, 255, 209, 0.15);
  height: 36px;
  font-family: Arial, sans-serif;
}

/* Cart Footer / Checkout */
.site-cart-footer {
  padding: 20px 24px;
  border-top: 1px solid rgba(0, 255, 209, 0.15);
  background: #0a0a0a;
}

.site-cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 14px;
}

.site-cart-summary-row .label {
  color: #888;
}

.site-cart-summary-row .value {
  color: #fff;
  font-weight: 600;
}

.site-cart-summary-row.total {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 255, 209, 0.15);
  font-size: 16px;
}

.site-cart-summary-row.total .label {
  color: #fff;
  font-weight: 700;
}

.site-cart-summary-row.total .value {
  color: #00FFD1;
  font-weight: 700;
}

.site-cart-gas-note {
  font-size: 11px;
  color: #666;
  text-align: center;
  margin: 8px 0 16px;
}

/* Remove button */
.site-cart-remove {
  background: none;
  border: none;
  color: #666;
  font-size: 12px;
  cursor: pointer;
  padding: 4px 0;
  margin-top: 8px;
  transition: color 0.2s;
  font-family: Arial, sans-serif;
}

.site-cart-remove:hover {
  color: #ff4444;
}

/* Pay with Card button */
.site-pay-btn {
  display: flex;
  width: 100%;
  background: linear-gradient(45deg, #00FFD1, #00bfa5);
  color: #000;
  border: none;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: Arial, sans-serif;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.site-pay-btn:hover {
  background: linear-gradient(45deg, #00bfa5, #00FFD1);
  box-shadow: 0 4px 15px rgba(0, 255, 209, 0.4);
}

.site-pay-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Alt pay options */
.site-cart-alt-options {
  text-align: center;
  margin-top: 12px;
  font-size: 12px;
  color: #666;
}

.site-cart-alt-options a {
  color: #00FFD1;
  text-decoration: none;
  transition: color 0.2s;
}

.site-cart-alt-options a:hover {
  color: #fff;
}

/* ===== Mobile Responsive ===== */
@media (max-width: 768px) {
  .site-cart-panel {
    width: 100%;
    max-width: 100vw;
    border-left: none;
  }

  .site-cart-fab {
    bottom: 20px;
    right: 16px;
    width: 52px;
    height: 52px;
    box-shadow: 0 4px 20px rgba(0, 255, 209, 0.5);
  }

  .site-cart-fab svg {
    width: 24px;
    height: 24px;
  }

  .site-cart-header {
    padding: 16px 18px;
  }

  .site-cart-header h2 {
    font-size: 18px;
  }

  .site-cart-body {
    padding: 18px;
  }

  .site-cart-item {
    gap: 12px;
  }

  .site-cart-item-img {
    width: 70px;
    height: 70px;
  }

  .site-cart-item-name {
    font-size: 14px;
  }

  .site-cart-footer {
    padding: 16px 18px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .site-cart-summary-row {
    font-size: 13px;
  }

  .site-cart-summary-row.total {
    font-size: 15px;
  }

  .site-pay-btn {
    padding: 14px 20px;
    font-size: 15px;
    min-height: 50px;
  }

  /* Cart text stays visible on mobile — handled by nav-action-row */
}

@media (max-width: 480px) {
  .site-cart-item-img {
    width: 60px;
    height: 60px;
  }

  .site-qty-btn {
    width: 34px;
    height: 34px;
  }

  .site-qty-value {
    width: 40px;
    height: 34px;
    font-size: 15px;
  }
}

