/* NEXUS DIRECT - Luxury Dark Dropshipping & Middleman Platform CSS */
:root {
  --bg-primary: #0b0f19;
  --bg-card: rgba(21, 29, 46, 0.7);
  --bg-card-hover: rgba(30, 42, 68, 0.85);
  --bg-glass: rgba(18, 25, 41, 0.65);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(99, 102, 241, 0.3);
  
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.4);
  --accent: #10b981;
  --accent-glow: rgba(16, 185, 129, 0.3);
  --warning: #f59e0b;
  --danger: #ef4444;
  --purple: #8b5cf6;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-main: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
  --font-main: 'Inter', sans-serif;
  --font-heading: 'Outfit', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-main);
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.12) 0%, transparent 35%),
    radial-gradient(circle at 85% 75%, rgba(16, 185, 129, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.05) 0%, transparent 60%);
  background-attachment: fixed;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, #a5b4fc 0%, #6366f1 50%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-accent {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Glassmorphism elements */
.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-main);
}

/* Navigation Header */
header.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.85rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-glass);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.4rem;
  font-weight: 800;
  cursor: pointer;
  font-family: var(--font-heading);
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  box-shadow: 0 0 15px var(--primary-glow);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.mode-toggle-btn {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
  padding: 0.6rem 1.2rem;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.3s ease;
}

.mode-toggle-btn:hover {
  background: rgba(99, 102, 241, 0.3);
  box-shadow: 0 0 20px var(--primary-glow);
  transform: translateY(-1px);
}

.cart-btn {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cart-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

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

/* Hero Section */
.hero-banner {
  padding: 3rem 2rem 2.5rem;
  max-width: 1300px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 750px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.hero-badges {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.hero-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-chip i {
  color: var(--accent);
}

/* Search & Filter Bar */
.filter-container {
  max-width: 1300px;
  margin: 0 auto 2rem;
  padding: 0 2rem;
}

.search-box {
  position: relative;
  max-width: 550px;
  margin: 0 auto 1.5rem;
}

.search-box input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  padding: 0.85rem 1rem 0.85rem 2.8rem;
  border-radius: 30px;
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.3s ease;
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 20px var(--primary-glow);
}

.search-box i {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
}

.category-pills {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.pill-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 0.55rem 1.1rem;
  border-radius: 25px;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s ease;
}

.pill-btn:hover, .pill-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 15px var(--primary-glow);
}

/* Product Grid */
.products-container {
  max-width: 1300px;
  margin: 0 auto 4rem;
  padding: 0 2rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.75rem;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.product-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-glow);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
}

.card-img-wrap {
  position: relative;
  width: 100%;
  padding-top: 85%;
  background: #111726;
  overflow: hidden;
}

.card-img-wrap img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .card-img-wrap img {
  transform: scale(1.06);
}

.badge-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 0.3rem 0.65rem;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
}

.badge-fastship {
  background: rgba(16, 185, 129, 0.9);
  color: #000;
}

.badge-pod {
  background: rgba(139, 92, 246, 0.9);
  color: #fff;
}

.badge-roi {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(99, 102, 241, 0.9);
  color: #fff;
  padding: 0.3rem 0.65rem;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
}

.card-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-category {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  line-height: 1.35;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-supplier {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.card-supplier i {
  color: var(--primary);
}

.card-bottom {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.price-block {
  display: flex;
  flex-direction: column;
}

.retail-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-heading);
}

.original-price {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-decoration: line-through;
}

.add-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.25s ease;
}

.add-btn:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 15px var(--primary-glow);
}

/* Product Detail & POD Customizer Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 8, 15, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 1.5rem;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #131b2e;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8);
  display: grid;
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 768px) {
  .modal-card {
    grid-template-columns: 1fr;
  }
}

.modal-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.2s ease;
}

.modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.8);
}

.modal-gallery {
  padding: 1.5rem;
  background: #0d1322;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-main-img {
  width: 100%;
  border-radius: var(--radius-md);
  object-fit: cover;
  aspect-ratio: 1/1;
}

.modal-info {
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
}

.modal-marketing-box {
  background: rgba(99, 102, 241, 0.08);
  border-left: 3px solid var(--primary);
  padding: 0.85rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.88rem;
  color: #c7d2fe;
}

.pod-customizer-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed var(--primary);
  padding: 1rem;
  border-radius: var(--radius-sm);
  margin: 0.5rem 0;
}

.pod-preview-canvas {
  width: 100%;
  height: 140px;
  border-radius: var(--radius-sm);
  background: #090d16;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.75rem;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-glass);
}

/* Cart Drawer */
.cart-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cart-drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 100%;
  height: 100vh;
  background: #111726;
  border-left: 1px solid var(--border-glass);
  z-index: 501;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.cart-drawer.active {
  transform: translateX(0);
}

.drawer-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-body {
  padding: 1.5rem;
  flex-grow: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.cart-item {
  display: flex;
  gap: 1rem;
  background: var(--bg-card);
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
}

.cart-item img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
}

.drawer-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border-glass);
  background: #0b0f19;
}

.checkout-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--accent), #059669);
  color: #000;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.9rem;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.checkout-btn:hover {
  box-shadow: 0 0 25px var(--accent-glow);
  transform: translateY(-1px);
}

/* Technical Blueprint Execution Flow Modal */
.blueprint-pipeline-modal {
  max-width: 680px;
  padding: 2rem;
  text-align: center;
}

.pipeline-steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.5rem 0;
  text-align: left;
}

.pipeline-step {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s ease;
}

.pipeline-step.active {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
}

.pipeline-step.completed {
  border-color: var(--accent);
  background: rgba(16, 185, 129, 0.08);
}

.step-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--text-dim);
}

.pipeline-step.active .step-icon-wrap {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 15px var(--primary-glow);
}

.pipeline-step.completed .step-icon-wrap {
  background: var(--accent);
  color: #000;
}

/* ADMIN MIDDLEMAN DASHBOARD */
.admin-section {
  max-width: 1300px;
  margin: 0 auto 4rem;
  padding: 0 2rem;
  display: none;
}

.admin-section.active {
  display: block;
}

.admin-header {
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.stat-val {
  font-size: 1.8rem;
  font-weight: 800;
  font-family: var(--font-heading);
  margin-top: 0.25rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.stat-icon {
  font-size: 1.75rem;
  opacity: 0.7;
}

/* Pricing & Margin Editor Table */
.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 2.5rem;
  overflow-x: auto;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.custom-table th {
  padding: 0.85rem 1rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-glass);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

.custom-table td {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.custom-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.price-input {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-glass);
  color: var(--accent);
  font-weight: 700;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  width: 90px;
  outline: none;
}

.price-input:focus {
  border-color: var(--primary);
}

/* API Dispatch Logs */
.api-log-card {
  background: #0a0e18;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  font-family: monospace;
  font-size: 0.85rem;
  max-height: 350px;
  overflow-y: auto;
}

.log-entry {
  padding: 0.5rem 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.log-time {
  color: var(--text-dim);
}

.log-status-success {
  color: var(--accent);
}

/* Blueprint Visual Flow */
.blueprint-flow-box {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin-bottom: 2.5rem;
  text-align: center;
}

.node-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.flow-node {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid var(--primary);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  min-width: 180px;
  box-shadow: 0 4px 20px var(--primary-glow);
}

.flow-arrow {
  color: var(--text-dim);
  font-size: 1.2rem;
}

/* Utility Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade {
  animation: fadeIn 0.4s ease forwards;
}
