/* ==========================================================
   Omega Store — Modern Tech & Lifestyle Design System
   Color Palette: Deep Obsidian, Electric Indigo, Neon Cyan & Clean White
   ========================================================== */

:root {
  --bg-primary: #090d16;
  --bg-surface: #111726;
  --bg-surface-elevated: #1a2236;
  --bg-card: rgba(17, 23, 38, 0.78);
  
  --accent-primary: #3b82f6;
  --accent-hover: #2563eb;
  --accent-indigo: #6366f1;
  --accent-cyan: #06b6d4;
  --accent-light: #e0f2fe;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --status-online: #10b981;
  --status-checking: #f59e0b;
  --status-error: #ef4444;
  
  --border-subtle: rgba(59, 130, 246, 0.2);
  --border-focus: rgba(99, 102, 241, 0.5);
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.55);
  --glass-blur: blur(16px);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;
  
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(59, 130, 246, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(99, 102, 241, 0.1) 0%, transparent 50%);
  background-attachment: fixed;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================
   Header & Navigation
   ========================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  background: rgba(9, 13, 22, 0.85);
  border-bottom: 1px solid var(--border-subtle);
  padding: 16px 0;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-icon {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px;
  font-weight: 800;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-indigo));
  color: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 18px rgba(59, 130, 246, 0.4);
}

.brand-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, #ffffff, #93c5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
}

/* System Status Badge */
.system-status-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: var(--transition);
}

.status-badge.status-online {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.35);
}

.status-badge.status-checking {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
}

.status-badge.status-error {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.25); }
}

.author-tag {
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-surface);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.author-tag strong {
  color: var(--accent-cyan);
}

/* Cart Button */
.cart-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-indigo));
  color: #ffffff;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.35);
}

.cart-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(59, 130, 246, 0.5);
}

.cart-badge {
  background: #ffffff;
  color: var(--accent-hover);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* ==========================================================
   Hero Section
   ========================================================== */
.hero-section {
  padding: 60px 0 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 18px;
}

.hero-heading {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 46px;
  line-height: 1.15;
  margin-bottom: 20px;
  color: #ffffff;
}

.hero-heading em {
  font-style: normal;
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 580px;
  margin-bottom: 30px;
}

/* Tier Nodes Strip */
.tier-nodes-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tier-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
}

.tier-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status-online);
}

.tier-name {
  font-weight: 600;
  color: var(--text-main);
}

.tier-port {
  color: var(--accent-cyan);
  font-family: monospace;
}

/* Hero Glassmorphism Card */
.glassmorphism {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 28px;
}

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

.card-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.pulse-tag {
  font-size: 11px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.metrics-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 22px;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.metric-label {
  color: var(--text-muted);
}

.metric-val {
  font-weight: 600;
}

.text-accent { color: var(--accent-cyan); }
.text-success { color: #34d399; }

.quick-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.quick-link-btn {
  display: inline-block;
  text-align: center;
  background: var(--bg-surface-elevated);
  color: var(--text-main);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  transition: var(--transition);
}

.quick-link-btn:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
}

/* ==========================================================
   Catalog Section & 4-Column Grid
   ========================================================== */
.menu-section {
  padding: 50px 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 35px;
}

.section-tag {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent-cyan);
  display: block;
  margin-bottom: 6px;
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 34px;
  font-weight: 700;
}

/* Category Filters */
.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  background: var(--bg-surface);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover {
  color: var(--text-main);
  border-color: var(--accent-primary);
}

.filter-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

/* 4-Columns Product Grid (Requirement) */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.product-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-focus);
  box-shadow: 0 12px 28px rgba(59, 130, 246, 0.2);
}

.card-img-wrap {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #000;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.category-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(9, 13, 22, 0.8);
  backdrop-filter: blur(8px);
  color: var(--accent-cyan);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

.card-rating {
  font-size: 13px;
  color: #fbbf24;
  font-weight: 600;
  white-space: nowrap;
}

.card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  flex-grow: 1;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.card-price {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
}

.add-btn {
  background: var(--bg-surface-elevated);
  color: #ffffff;
  border: 1px solid var(--border-subtle);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.add-btn:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
}

/* ==========================================================
   Real-Time Orders Section
   ========================================================== */
.orders-section {
  padding: 30px 0 60px;
}

.orders-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 14px;
}

.orders-box-header h3 {
  font-size: 20px;
  font-weight: 600;
}

.orders-box-header p {
  font-size: 13px;
  color: var(--text-muted);
}

.refresh-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.refresh-btn:hover {
  background: var(--accent-primary);
  color: #ffffff;
}

.orders-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.order-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
}

.order-card-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 10px;
  color: var(--text-muted);
}

.order-badge-confirmed {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.order-name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.order-items-snippet {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.order-total-bar {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 8px;
  color: var(--accent-cyan);
}

.empty-orders {
  grid-column: 1 / -1;
  text-align: center;
  padding: 30px;
  color: var(--text-dim);
  font-size: 14px;
}

/* ==========================================================
   Checkout Modal
   ========================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: var(--glass-blur);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 520px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-backdrop.open .modal-card {
  transform: translateY(0);
}

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

.modal-header h3 {
  font-size: 20px;
  font-weight: 700;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
}

.close-btn:hover {
  color: #ffffff;
}

.modal-body {
  padding: 24px;
  max-height: 75vh;
  overflow-y: auto;
}

.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.cart-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-surface-elevated);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.cart-item-info h4 {
  font-size: 14px;
  font-weight: 600;
}

.cart-item-info span {
  font-size: 12px;
  color: var(--accent-cyan);
}

.cart-qty-ctrl {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qty-btn {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  width: 26px;
  height: 26px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 700;
}

.cart-summary {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 0;
  margin-bottom: 20px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.summary-line.total {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin-top: 10px;
}

.summary-line.total span:last-child {
  color: var(--accent-cyan);
}

.order-form .form-group {
  margin-bottom: 14px;
}

.order-form label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.order-form input {
  width: 100%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}

.order-form input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.checkout-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-indigo));
  color: #ffffff;
  border: none;
  padding: 14px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
  margin-top: 10px;
}

.checkout-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

/* Toast Message */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--accent-primary);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  font-size: 14px;
  font-weight: 600;
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: rgba(9, 13, 22, 0.95);
  padding: 30px 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
}

.footer-content p {
  margin-bottom: 6px;
}

.footer-content strong {
  color: var(--accent-cyan);
}

.footer-content code {
  color: var(--text-muted);
  background: var(--bg-surface);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Loading & Spinner */
.loading-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 0;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(59, 130, 246, 0.2);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================
   Responsive Breakpoints
   ========================================================== */
@media (max-width: 1100px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
  .header-container {
    flex-direction: column;
    align-items: flex-start;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .hero-heading {
    font-size: 32px;
  }
}
