/**
 * Nova Admin Suite - WooCommerce Floating Cart & Side Drawer
 * @version 2.8.18
 */

:root {
  --nas-fc-gold: #f3cc7a;
  --nas-fc-gold-hover: #e2b75d;
  --nas-fc-gold-dim: rgba(243, 204, 122, 0.15);
  --nas-fc-bg-dark: #0f131a;
  --nas-fc-card-dark: #161b24;
  --nas-fc-border-dark: rgba(255, 255, 255, 0.08);
  --nas-fc-text-light: #f8fafc;
  --nas-fc-text-muted: #94a3b8;
  --nas-fc-success: #10b981;
}

/* =========================================
   1. FLOATING LAUNCHER BUTTON
   ========================================= */
.nas-fc-launcher {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e2430 0%, #0f131a 100%);
  color: var(--nas-fc-gold);
  border: 1.5px solid rgba(243, 204, 122, 0.4);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), 0 0 20px rgba(243, 204, 122, 0.2);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.nas-fc-launcher.nas-pos-left {
  right: auto;
  left: 28px;
}

.nas-fc-launcher:hover {
  transform: scale(1.08) translateY(-2px);
  border-color: var(--nas-fc-gold);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 30px rgba(243, 204, 122, 0.35);
}

.nas-fc-launcher svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
  transition: transform 0.2s ease;
}

.nas-fc-launcher:active svg {
  transform: scale(0.9);
}

/* Counter Badge */
.nas-fc-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: linear-gradient(135deg, #f3cc7a 0%, #d89e34 100%);
  color: #0b0f17;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 11.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0f131a;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nas-fc-launcher.nas-pulse .nas-fc-badge {
  animation: nasFcBounce 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes nasFcBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.45); }
}

/* =========================================
   2. BACKDROP OVERLAY
   ========================================= */
.nas-fc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 11, 16, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.nas-fc-overlay.nas-open {
  opacity: 1;
  visibility: visible;
}

/* =========================================
   3. SIDE DRAWER CONTAINER
   ========================================= */
.nas-fc-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 420px;
  background: #11151e;
  border-left: 1px solid var(--nas-fc-border-dark);
  box-shadow: -15px 0 45px rgba(0, 0, 0, 0.6);
  z-index: 100000;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--nas-fc-text-light);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.nas-fc-drawer.nas-pos-left {
  right: auto;
  left: 0;
  border-left: none;
  border-right: 1px solid var(--nas-fc-border-dark);
  box-shadow: 15px 0 45px rgba(0, 0, 0, 0.6);
  transform: translateX(-100%);
}

.nas-fc-drawer.nas-open {
  transform: translateX(0);
}

/* Drawer Header */
.nas-fc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--nas-fc-border-dark);
  background: rgba(22, 27, 36, 0.7);
}

.nas-fc-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nas-fc-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--nas-fc-text-light);
  margin: 0;
}

.nas-fc-count-pill {
  background: var(--nas-fc-gold-dim);
  color: var(--nas-fc-gold);
  border: 1px solid rgba(243, 204, 122, 0.3);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
}

.nas-fc-close {
  background: transparent;
  border: none;
  color: var(--nas-fc-text-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nas-fc-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* Free Shipping Bar */
.nas-fc-shipping-bar {
  padding: 14px 24px;
  background: rgba(16, 185, 129, 0.08);
  border-bottom: 1px solid rgba(16, 185, 129, 0.2);
}

.nas-fc-shipping-text {
  font-size: 13px;
  color: #e2e8f0;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nas-fc-progress-bg {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.nas-fc-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.nas-fc-shipping-bar.nas-achieved {
  background: rgba(243, 204, 122, 0.1);
  border-bottom-color: rgba(243, 204, 122, 0.3);
}

.nas-fc-shipping-bar.nas-achieved .nas-fc-progress-fill {
  background: linear-gradient(90deg, #f3cc7a 0%, #fbbf24 100%);
}

/* =========================================
   4. PRODUCT ITEMS LIST
   ========================================= */
.nas-fc-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
}

.nas-fc-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  transition: opacity 0.2s ease;
}

.nas-fc-item.nas-updating {
  opacity: 0.4;
  pointer-events: none;
}

.nas-fc-item-thumb {
  width: 68px;
  height: 68px;
  border-radius: 10px;
  background: #1b212c;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--nas-fc-border-dark);
}

.nas-fc-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nas-fc-item-info {
  flex: 1;
  min-width: 0;
}

.nas-fc-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--nas-fc-text-light);
  margin: 0 0 4px;
  text-decoration: none;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nas-fc-item-name:hover {
  color: var(--nas-fc-gold);
}

.nas-fc-item-meta {
  font-size: 12px;
  color: var(--nas-fc-text-muted);
  margin-bottom: 8px;
}

.nas-fc-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nas-fc-item-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--nas-fc-gold);
}

/* Quantity controls */
.nas-fc-qty-box {
  display: flex;
  align-items: center;
  background: #19202c;
  border: 1px solid var(--nas-fc-border-dark);
  border-radius: 8px;
  overflow: hidden;
}

.nas-fc-qty-btn {
  width: 26px;
  height: 26px;
  background: transparent;
  border: none;
  color: var(--nas-fc-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.15s ease;
}

.nas-fc-qty-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nas-fc-qty-val {
  width: 28px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
}

.nas-fc-remove-btn {
  background: transparent;
  border: none;
  color: #ef4444;
  opacity: 0.6;
  cursor: pointer;
  padding: 4px;
  font-size: 15px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.nas-fc-remove-btn:hover {
  opacity: 1;
  background: rgba(239, 68, 68, 0.1);
}

/* Empty State */
.nas-fc-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  padding: 40px 20px;
}

.nas-fc-empty-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--nas-fc-text-muted);
  margin-bottom: 18px;
}

.nas-fc-empty-icon svg {
  width: 36px;
  height: 36px;
  fill: currentColor;
}

.nas-fc-empty-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
}

.nas-fc-empty-desc {
  font-size: 13.5px;
  color: var(--nas-fc-text-muted);
  margin: 0 0 24px;
  max-width: 260px;
}

.nas-fc-shop-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #f3cc7a 0%, #d89e34 100%);
  color: #0b0f17;
  text-decoration: none;
  font-weight: 700;
  font-size: 13.5px;
  padding: 12px 24px;
  border-radius: 9999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 15px rgba(216, 158, 52, 0.35);
}

.nas-fc-shop-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(216, 158, 52, 0.5);
  color: #0b0f17;
}

/* =========================================
   5. DRAWER FOOTER & ACTIONS
   ========================================= */
.nas-fc-footer {
  padding: 20px 24px;
  background: rgba(22, 27, 36, 0.95);
  border-top: 1px solid var(--nas-fc-border-dark);
}

.nas-fc-subtotal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.nas-fc-subtotal-label {
  font-size: 15px;
  color: var(--nas-fc-text-muted);
  font-weight: 600;
}

.nas-fc-subtotal-val {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
}

.nas-fc-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nas-fc-checkout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #f3cc7a 0%, #d89e34 100%);
  color: #0b0f17;
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 800;
  padding: 14px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 18px rgba(216, 158, 52, 0.35);
  transition: all 0.2s ease;
}

.nas-fc-checkout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(216, 158, 52, 0.5);
  color: #0b0f17;
}

.nas-fc-cart-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--nas-fc-border-dark);
  color: #e2e8f0;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.nas-fc-cart-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Trust Badges */
.nas-fc-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 11.5px;
  color: #64748b;
}

.nas-fc-trust-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Responsive */
@media (max-width: 480px) {
  .nas-fc-drawer {
    max-width: 100%;
  }
  .nas-fc-launcher {
    bottom: 20px;
    right: 20px;
    width: 54px;
    height: 54px;
  }
  .nas-fc-launcher.nas-pos-left {
    left: 20px;
  }
}
