/* =========================================
   Sniksah Technologies — Global Styles
   ========================================= */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-dark:    #080c14;
  --bg-card:    #0d1525;
  --bg-alt:     #0b1120;
  --accent:     #00e5ff;
  --accent2:    #7c3aed;
  --accent-dim: rgba(0, 229, 255, 0.12);
  --text:       #e8edf5;
  --text-muted: #6b7a99;
  --border:     rgba(0, 229, 255, 0.12);
  --radius:     12px;
  --font-head:  'Orbitron', sans-serif;
  --font-body:  'Inter', sans-serif;
  --transition: 0.3s ease;
}

html { scroll-behavior: smooth; }

.hidden { display: none !important; }

body {
  background: var(--bg-dark);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* =========================================
   Navbar
   ========================================= */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.1rem 0;
  transition: background var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
  background: rgba(8, 12, 20, 0.9);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  cursor: pointer;
}

.logo-icon {
  font-size: 1.6rem;
  color: var(--accent);
  line-height: 1;
}

.logo-text {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text);
}

.logo-accent { color: var(--accent); }

.nav-links {
  list-style: none;
  display: flex;
  gap: 2.2rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: color var(--transition);
}

.nav-links a:hover { color: var(--accent); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 700px) {
  .hamburger { display: flex; }
  .nav-links {
    display: none;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(8, 12, 20, 0.97);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    padding: 1rem 0;
  }
  .nav-links.open { display: flex; }
  .nav-links li a {
    display: block;
    padding: 0.85rem 2rem;
    font-size: 1rem;
  }
}

/* =========================================
   Buttons
   ========================================= */
.btn {
  display: inline-block;
  padding: 0.75rem 1.8rem;
  border-radius: 6px;
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: transparent;
  color: var(--accent);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-full { width: 100%; text-align: center; }

/* =========================================
   Hero
   ========================================= */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  padding: 7rem 2rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
  gap: 3rem;
}

.hero-bg {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse 60% 60% at 70% 50%, rgba(0, 229, 255, 0.06) 0%, transparent 70%),
              radial-gradient(ellipse 40% 40% at 20% 80%, rgba(124, 58, 237, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.hero-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: -1;
}

.hero-content {
  flex: 1;
  max-width: 580px;
}

.hero-eyebrow {
  font-family: var(--font-head);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.4rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 2.2rem;
  max-width: 460px;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---- Device Mockup ---- */
.hero-device {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
}

.device-mockup {
  width: 180px;
  background: linear-gradient(160deg, #1a2540 0%, #0d1525 100%);
  border: 2px solid var(--border);
  border-radius: 20px;
  padding: 1rem;
  box-shadow: 0 0 40px rgba(0, 229, 255, 0.12), 0 20px 60px rgba(0,0,0,0.5);
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-14px); }
}

.device-screen {
  background: #050a0f;
  border-radius: 8px;
  aspect-ratio: 1.4 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 0.8rem;
  border: 1px solid rgba(0, 229, 255, 0.2);
}

.screen-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(0, 229, 255, 0.08) 0%, transparent 70%);
}

.pixel-art {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  z-index: 1;
}

.pa-row { display: flex; gap: 4px; }

.px {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: #1a2030;
  transition: background 0.5s;
}

.px.on { background: var(--accent); box-shadow: 0 0 6px var(--accent); }

.device-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0.2rem;
}

.dpad {
  position: relative;
  width: 38px;
  height: 38px;
}

.dpad-h, .dpad-v {
  position: absolute;
  background: #1a2540;
  border-radius: 3px;
}

.dpad-h {
  top: 50%; left: 0;
  width: 100%; height: 33%;
  transform: translateY(-50%);
}

.dpad-v {
  left: 50%; top: 0;
  height: 100%; width: 33%;
  transform: translateX(-50%);
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
}

.btn-a, .btn-b {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 0.55rem;
  font-weight: 700;
  font-family: var(--font-head);
}

.btn-a { background: var(--accent); color: #000; }
.btn-b { background: var(--accent2); color: #fff; }

@media (max-width: 800px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 6rem;
    min-height: unset;
    padding-bottom: 3rem;
  }
  .hero-subtitle { margin: 0 auto 2.2rem; }
  .hero-cta { justify-content: center; }
}

/* =========================================
   Stats Bar
   ========================================= */
.stats-bar {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2rem 2rem;
}

.stats-container {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 1rem;
}

.stat-item {
  text-align: center;
  flex: 1;
}

.stat-number {
  font-family: var(--font-head);
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
}

.stat-suffix {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-top: 0.4rem;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* =========================================
   Section Shared
   ========================================= */
.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-tag {
  font-family: var(--font-head);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.section-sub {
  color: var(--text-muted);
  font-size: 1rem;
}

/* =========================================
   Products
   ========================================= */
.products { background: var(--bg-dark); }

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  position: relative;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.product-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 229, 255, 0.1);
}

.product-card.featured {
  border-color: rgba(0, 229, 255, 0.35);
  background: linear-gradient(160deg, #0f1e35 0%, #0d1525 100%);
}

.card-badge {
  position: absolute;
  top: 1rem; right: 1rem;
  background: var(--accent);
  color: #000;
  font-family: var(--font-head);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
}

.card-icon-wrap { margin-bottom: 1.2rem; }

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.gaming-icon { background: rgba(0, 229, 255, 0.12); color: var(--accent); }
.pcb-icon    { background: rgba(124, 58, 237, 0.12); color: #a78bfa; }
.dev-icon    { background: rgba(0, 229, 255, 0.08); color: var(--accent); }

.card-icon svg { width: 100%; height: 100%; }

.card-title {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.card-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 1.2rem;
}

.card-specs {
  list-style: none;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.card-specs li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.spec-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.card-price {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1rem;
  letter-spacing: 0.5px;
}

.card-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: gap var(--transition);
}

.card-link:hover { opacity: 0.8; }

.product-card[data-href] {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.product-card[data-href]:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,229,255,0.15);
  border-color: rgba(0,229,255,0.35);
}

/* ---- Cart-added slide-in panel ---- */
.cart-added-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.cart-added-overlay.visible {
  opacity: 1;
  pointer-events: all;
}
.cart-added-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 360px;
  max-width: 95vw;
  height: 100%;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  z-index: 2001;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
  padding: 2rem 1.75rem;
  gap: 1.25rem;
}
.cart-added-panel.visible { transform: translateX(0); }
.cart-added-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cart-added-panel-header h3 {
  font-family: var(--font-head);
  font-size: 1rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.cart-added-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  font-size: 1.25rem;
  line-height: 1;
  transition: color 0.2s;
}
.cart-added-close:hover { color: var(--text); }
.cart-added-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.cart-added-item-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-dim);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.cart-added-item-info { flex: 1; min-width: 0; }
.cart-added-item-name {
  font-family: var(--font-head);
  font-size: 0.875rem;
  color: var(--text);
  margin-bottom: 0.3rem;
}
.cart-added-item-meta { font-size: 0.78rem; color: var(--text-muted); }
.cart-added-item-price {
  font-family: var(--font-head);
  font-size: 0.9rem;
  color: var(--accent);
  flex-shrink: 0;
}
.cart-added-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: auto;
}
.cart-added-count {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}

/* =========================================
   About
   ========================================= */
.about { background: var(--bg-alt); }

.about-layout {
  display: flex;
  align-items: center;
  gap: 4rem;
}

.about-visual {
  flex: 0 0 280px;
  display: flex;
  justify-content: center;
}

.circuit-visual {
  position: relative;
  width: 220px;
  height: 220px;
}

.cv-node {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: pulse-node 2.5s ease-in-out infinite;
}

.n1 { top: 10%; left: 15%; animation-delay: 0s; }
.n2 { top: 15%; right: 12%; animation-delay: 0.6s; }
.n3 { bottom: 18%; left: 10%; animation-delay: 1.2s; }
.n4 { bottom: 12%; right: 18%; animation-delay: 1.8s; }

@keyframes pulse-node {
  0%, 100% { box-shadow: 0 0 8px var(--accent); transform: scale(1); }
  50%       { box-shadow: 0 0 20px var(--accent); transform: scale(1.15); }
}

.cv-line {
  position: absolute;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  height: 1px;
  animation: trace 3s ease-in-out infinite;
}

.l1 { top: 15%; left: 20%; width: 62%; animation-delay: 0s; }
.l2 { top: 50%; left: 10%; width: 80%; animation-delay: 1s; }
.l3 { top: 82%; left: 15%; width: 70%; animation-delay: 2s; }

@keyframes trace {
  0%   { opacity: 0.2; }
  50%  { opacity: 1; }
  100% { opacity: 0.2; }
}

.cv-chip {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 70px;
  height: 70px;
  background: var(--bg-card);
  border: 2px solid var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.15);
}

.cv-chip span {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--accent);
}

.about-content { flex: 1; }

.about-content .section-title {
  text-align: left;
  margin-bottom: 1.2rem;
}

.about-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.about-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.pill {
  background: var(--accent-dim);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.35rem 0.9rem;
  font-size: 0.82rem;
  color: var(--text);
}

@media (max-width: 800px) {
  .about-layout { flex-direction: column; }
  .about-visual { flex: unset; width: 100%; }
  .about-content .section-title { text-align: center; }
  .about-pills { justify-content: center; }
}

/* =========================================
   Contact
   ========================================= */
.contact { background: var(--bg-dark); }

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 800px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }
}

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 500px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1.2rem;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.925rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group select option {
  background: var(--bg-card);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.08);
}

.form-group textarea { resize: vertical; min-height: 120px; }

.form-success {
  display: none;
  text-align: center;
  margin-top: 1rem;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
}

.form-success.visible { display: block; }

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: border-color var(--transition);
}

.info-card:hover { border-color: var(--accent); }

.info-icon { font-size: 1.5rem; flex-shrink: 0; }

.info-card h3 {
  font-family: var(--font-head);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

.info-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* =========================================
   Footer
   ========================================= */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  text-align: center;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.footer-brand .logo-icon { font-size: 1.4rem; color: var(--accent); }

.footer-tagline {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.footer-links {
  display: flex;
  gap: 1.8rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--accent); }

.footer-copy {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* =========================================
   Fade-in animation on scroll
   ========================================= */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   Logo SVG image
   ========================================= */
.logo-img {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

/* Active nav link */
.nav-links a.active { color: var(--accent); }

/* Footer brand logo alignment */
.footer-brand .logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* =========================================
   Page Hero (inner pages)
   ========================================= */
.page-hero {
  padding: 8rem 2rem 4rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.page-hero-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.page-hero-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

/* =========================================
   Section CTA (centred button below grids)
   ========================================= */
.section-cta {
  text-align: center;
  margin-top: 2.5rem;
}

/* =========================================
   Services Teaser (home page)
   ========================================= */
.services-teaser { background: var(--bg-alt); }

.services-teaser-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.service-teaser-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: border-color var(--transition), transform var(--transition);
}

.service-teaser-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.st-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 1rem;
}

.service-teaser-card h3 {
  font-family: var(--font-head);
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
  letter-spacing: 0.05em;
}

.service-teaser-card p {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* =========================================
   Home CTA Banner
   ========================================= */
.home-cta { background: var(--bg-dark); }

.cta-box {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3.5rem 2.5rem;
}

.cta-box .section-tag  { margin-bottom: 0.5rem; }
.cta-box .section-title { margin-bottom: 0.75rem; }
.cta-box .section-sub   { margin-bottom: 2rem; }

/* =========================================
   Services page — Service Cards
   ========================================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.service-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 229, 255, 0.1);
}

.service-card h3 {
  font-family: var(--font-head);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.service-card > p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 1.2rem;
}

.service-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.service-card ul li {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

/* =========================================
   Process Steps (services page)
   ========================================= */
.process-section { background: var(--bg-alt); }

.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
}

.process-step {
  text-align: center;
  padding: 1.5rem 1rem;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1rem;
}

.process-step h4 {
  font-family: var(--font-head);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.process-step p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

/* =========================================
   About page — Values Section
   ========================================= */
.values-section { background: var(--bg-dark); }

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.value-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  transition: border-color var(--transition);
}

.value-card:hover { border-color: var(--accent); }

.value-icon {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 1rem;
}

.value-card h3 {
  font-family: var(--font-head);
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.value-card p {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* =========================================
   Breadcrumb
   ========================================= */
.breadcrumb {
  display: inline-block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  transition: color var(--transition);
}
.breadcrumb:hover { color: var(--accent); }

/* =========================================
   Product Detail Hero
   ========================================= */
.product-detail-hero { text-align: left; padding-top: 7rem; }
.product-detail-hero .page-hero-content { max-width: 680px; }

.product-badge-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.badge-new {
  background: rgba(124,58,237,0.2);
  color: #a78bfa;
  border: 1px solid rgba(124,58,237,0.4);
}

/* =========================================
   Product Overview Layout
   ========================================= */
.product-overview { padding: 5rem 0; }

.product-overview-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

@media (max-width: 800px) {
  .product-overview-layout { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* =========================================
   SnikDeck Mockup
   ========================================= */
.device-mockup {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.5rem;
  position: relative;
  max-width: 360px;
  margin: 0 auto;
  box-shadow: 0 0 60px rgba(0,229,255,0.08);
}

.snikdeck-mockup .device-screen {
  background: #050810;
  border-radius: 12px;
  border: 1px solid var(--border);
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  overflow: hidden;
}

.screen-content { text-align: center; }
.screen-icon { font-size: 2.5rem; display: block; margin-bottom: 0.25rem; }
.screen-label { font-family: var(--font-head); font-size: 0.95rem; color: var(--accent); letter-spacing: 2px; }
.screen-sublabel { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.2rem; }

.device-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 0.5rem;
}
.left-controls { justify-content: flex-start; }
.right-controls { justify-content: flex-end; margin-top: -3.5rem; }

.dpad {
  position: relative;
  width: 52px;
  height: 52px;
}
.dpad > div {
  position: absolute;
  background: var(--bg-dark);
  border: 1px solid var(--border);
}
.dpad-up, .dpad-down { width: 16px; height: 20px; left: 18px; border-radius: 3px 3px 0 0; top: 0; }
.dpad-down           { top: auto; bottom: 0; border-radius: 0 0 3px 3px; }
.dpad-left, .dpad-right { width: 20px; height: 16px; top: 18px; border-radius: 3px 0 0 3px; left: 0; }
.dpad-right          { left: auto; right: 0; border-radius: 0 3px 3px 0; }
.dpad-center         { width: 16px; height: 16px; top: 18px; left: 18px; }

.thumbstick {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-dark);
  border: 2px solid var(--accent);
  opacity: 0.6;
}

.face-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  width: 64px;
}
.face-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-dark);
  border: 1.5px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 0.65rem;
  color: var(--accent);
}
.btn-a { border-color: #68d391; color: #68d391; }
.btn-b { border-color: #fc8181; color: #fc8181; order: 1; }
.btn-x { border-color: #63b3ed; color: #63b3ed; order: -1; }
.btn-y { border-color: #b794f4; color: #b794f4; }

.device-shoulders {
  display: flex;
  justify-content: space-between;
  margin-top: 0.75rem;
}
.shoulder-btn {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.65rem;
  font-family: var(--font-head);
  color: var(--text-muted);
  letter-spacing: 1px;
}

/* =========================================
   Controller Diagram
   ========================================= */
.controller-diagram {
  text-align: center;
  padding: 1rem 0;
}
.controller-svg {
  width: 100%;
  max-width: 420px;
  filter: drop-shadow(0 0 20px rgba(0,229,255,0.12));
}
.diagram-caption {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* =========================================
   Product Specs Section
   ========================================= */
.product-specs-section {
  background: var(--bg-alt);
  padding: 5rem 0;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.spec-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.spec-group-title {
  font-family: var(--font-head);
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.spec-list { list-style: none; }
.spec-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.85rem;
}
.spec-list li:last-child { border-bottom: none; }
.spec-key { color: var(--text-muted); flex-shrink: 0; }
.spec-val { color: var(--text); text-align: right; }

/* =========================================
   Product Configurator
   ========================================= */
.product-configurator { padding: 5rem 0; }

.configurator-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .configurator-layout { grid-template-columns: 1fr; }
}

/* ---- Config groups ---- */
.config-group { margin-bottom: 2rem; }

.config-label {
  font-family: var(--font-head);
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.config-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.config-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.config-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  min-width: 160px;
  text-align: left;
}
.config-btn:hover        { border-color: var(--accent); }
.config-btn.active       { border-color: var(--accent); background: var(--accent-dim); }

.config-btn-title {
  font-family: var(--font-head);
  font-size: 0.8rem;
  color: var(--text);
  letter-spacing: 0.5px;
}
.config-btn-sub   { font-size: 0.72rem; color: var(--text-muted); }
.config-btn-price { font-size: 0.72rem; color: var(--accent); margin-top: 0.2rem; }

/* ---- Colour Swatches ---- */
.config-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.swatch {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--swatch-color, #333);
  border: 2.5px solid transparent;
  cursor: pointer;
  position: relative;
  transition: border-color var(--transition), transform var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.swatch:hover  { transform: scale(1.1); border-color: rgba(255,255,255,0.5); }
.swatch.active { border-color: var(--accent); transform: scale(1.1); }

.swatch-check {
  font-size: 0.7rem;
  color: white;
  text-shadow: 0 0 4px rgba(0,0,0,0.8);
  opacity: 0;
  transition: opacity var(--transition);
}
.swatch.active .swatch-check { opacity: 1; }

.swatch-selected-label { font-size: 0.8rem; color: var(--text-muted); }
.swatch-selected-label span { color: var(--accent); }

/* ---- Checkboxes ---- */
.config-checkboxes { display: flex; flex-direction: column; gap: 0.6rem; }

.config-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: border-color var(--transition);
}
.config-checkbox:has(input:checked) { border-color: var(--accent); background: var(--accent-dim); }
.config-checkbox input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--accent); flex-shrink: 0; }

.checkbox-title { font-size: 0.85rem; color: var(--text); display: block; }
.checkbox-sub   { font-size: 0.75rem; color: var(--text-muted); }

/* ---- Summary panel ---- */
.configurator-summary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  position: sticky;
  top: 90px;
}

.summary-title {
  font-family: var(--font-head);
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.summary-list { list-style: none; margin-bottom: 1.25rem; }
.summary-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.82rem;
}
.summary-list li:last-child { border-bottom: none; }
.summary-list li span:first-child { color: var(--text-muted); }
.summary-list li span:last-child  { color: var(--text); text-align: right; }

.summary-extras { margin-bottom: 1rem; }
.summary-extra-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--accent);
  padding: 0.25rem 0;
}

.summary-price {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1rem 0 0.5rem;
  border-top: 1px solid var(--border);
  margin-bottom: 0.5rem;
}
.price-label { font-size: 0.78rem; color: var(--text-muted); }
.price-value {
  font-family: var(--font-head);
  font-size: 1.5rem;
  color: var(--accent);
}

.price-note {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.currency-selector { display: none; } /* legacy — selector now in navbar */

.nav-currency {
  background: var(--bg-alt);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  color: var(--text-primary);
  padding: 0.25rem 0.5rem;
  font-size: 0.78rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: border-color 0.2s;
}

.nav-currency:focus {
  outline: none;
  border-color: var(--accent);
}

@media (max-width: 700px) {
  .nav-currency { display: none; }
}

/* =========================================
   Card badge positioning fix
   ========================================= */
.product-card { position: relative; }
.card-badge {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
}

/* =========================================
   Nav Actions (Cart + Account Icons)
   ========================================= */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 1rem;
}

.nav-icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition), background var(--transition);
}
.nav-icon-btn:hover,
.nav-icon-btn.active { color: var(--accent); background: var(--accent-dim); }

.cart-count {
  display: none;
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  padding: 0 3px;
  border-radius: 9px;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  border: 2px solid var(--bg-dark);
  line-height: 1;
}
.cart-count:not(:empty) { display: flex; }

@media (max-width: 700px) {
  .nav-actions { margin-left: auto; margin-right: 0.25rem; }
}

/* =========================================
   Auth Page
   ========================================= */
.auth-body { min-height: 100vh; }

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7rem 1rem 3rem;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 0 60px rgba(0,229,255,0.06);
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.75rem;
}

/* ---- Tabs ---- */
.auth-tabs {
  display: flex;
  gap: 0;
  background: var(--bg-dark);
  border-radius: 8px;
  padding: 3px;
  margin-bottom: 1.75rem;
}
.auth-tab {
  flex: 1;
  background: none;
  border: none;
  border-radius: 6px;
  padding: 0.55rem 0;
  font-family: var(--font-head);
  font-size: 0.72rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.auth-tab.active { background: var(--bg-card); color: var(--accent); }

.auth-panel { }
.auth-panel.hidden { display: none; }

/* ---- Form ---- */
.auth-form { display: flex; flex-direction: column; gap: 0; }

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

.form-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-label-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 400;
  font-size: 0.75rem;
}
.form-label-link:hover { text-decoration: underline; }

.form-input {
  background: var(--bg-dark);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color var(--transition);
  width: 100%;
}
.form-input:focus { outline: none; border-color: var(--accent); }
.form-input::placeholder { color: var(--text-muted); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

.form-error {
  color: #fc8181;
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
  min-height: 1.1rem;
}

.form-success {
  color: #68d391;
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
  min-height: 1.1rem;
}

/* ---- Divider ---- */
.auth-divider {
  position: relative;
  text-align: center;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.78rem;
}
.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}
.auth-divider span {
  position: relative;
  background: var(--bg-card);
  padding: 0 0.75rem;
}

/* ---- OAuth Buttons ---- */
.oauth-buttons { display: flex; gap: 0.6rem; }

.oauth-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--bg-dark);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.5rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  transition: border-color var(--transition), background var(--transition);
}
.oauth-btn:hover { border-color: var(--accent); background: var(--accent-dim); }

/* =========================================
   Shared button extras
   ========================================= */
.btn-full { width: 100%; text-align: center; display: block; }
.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.75rem; }

/* =========================================
   Account Page
   ========================================= */
.account-page {
  padding-top: 6rem;
  padding-bottom: 4rem;
  min-height: 100vh;
}

.account-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 800px) {
  .account-layout { grid-template-columns: 1fr; }
}

/* ---- Sidebar ---- */
.account-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.account-avatar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.avatar-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-head);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.account-name { font-weight: 600; font-size: 0.9rem; color: var(--text); }
.account-email { font-size: 0.75rem; color: var(--text-muted); }

.account-nav { padding: 0.5rem; }

.account-nav-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  background: none;
  border: none;
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition), color var(--transition);
  margin-bottom: 2px;
}
.account-nav-item:hover,
.account-nav-item.active { background: var(--accent-dim); color: var(--accent); }
.account-nav-signout:hover { background: rgba(252,129,129,0.1); color: #fc8181; }

/* ---- Main Content ---- */
.account-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.account-panel-title {
  font-family: var(--font-head);
  font-size: 1rem;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.account-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.account-panel-header .account-panel-title { margin-bottom: 0; }

.account-section-title {
  font-family: var(--font-head);
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.account-empty { color: var(--text-muted); font-size: 0.88rem; }
.account-empty a { color: var(--accent); }

/* ---- Stats ---- */
.account-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.account-stat-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
}

.account-stat-num {
  display: block;
  font-family: var(--font-head);
  font-size: 1.6rem;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

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

/* ---- Orders Table ---- */
.orders-table { display: flex; flex-direction: column; gap: 0.5rem; }

.order-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 1rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  align-items: center;
  font-size: 0.83rem;
}

.order-num { font-family: var(--font-head); font-size: 0.75rem; color: var(--accent); }
.order-date, .order-total { color: var(--text-muted); }

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-family: var(--font-head);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.status-pending  { background: rgba(251,191,36,0.15);  color: #fbbf24; }
.status-paid     { background: rgba(104,211,145,0.15); color: #68d391; }
.status-shipped  { background: rgba(99,179,237,0.15);  color: #63b3ed; }
.status-delivered{ background: rgba(0,229,255,0.15);   color: var(--accent); }
.status-cancelled{ background: rgba(252,129,129,0.15); color: #fc8181; }

/* ---- Addresses ---- */
.address-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  line-height: 1.7;
}
.address-detail { color: var(--text); }

.address-form-wrap {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1rem;
}

.saved-address-list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
.saved-address-option {
  background: var(--bg-alt);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.83rem;
  cursor: pointer;
  transition: border-color var(--transition);
}
.saved-address-option:hover { border-color: var(--accent); }

/* =========================================
   Cart Page
   ========================================= */
.cart-page {
  padding-top: 1rem;
  padding-bottom: 5rem;
  min-height: 60vh;
}

.cart-empty {
  text-align: center;
  padding: 5rem 0;
}
.cart-empty-icon { font-size: 4rem; margin-bottom: 1rem; }
.cart-empty h2 { font-family: var(--font-head); font-size: 1.2rem; margin-bottom: 0.5rem; }
.cart-empty p  { color: var(--text-muted); }

.cart-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 800px) {
  .cart-layout { grid-template-columns: 1fr; }
}

.cart-items { display: flex; flex-direction: column; gap: 0.75rem; }

.cart-item {
  display: grid;
  grid-template-columns: 52px 1fr auto auto auto;
  gap: 1rem;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}

.cart-item-icon {
  width: 48px;
  height: 48px;
  background: var(--bg-alt);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.cart-item-name {
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.2rem;
}

.cart-item-configs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.3rem; }
.cart-item-config {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.qty-btn {
  width: 26px;
  height: 26px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition);
}
.qty-btn:hover { border-color: var(--accent); color: var(--accent); }
.qty-val { font-family: var(--font-head); font-size: 0.85rem; min-width: 18px; text-align: center; }

.cart-item-price { font-family: var(--font-head); font-size: 0.9rem; color: var(--accent); white-space: nowrap; }

.cart-item-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color var(--transition);
}
.cart-item-remove:hover { color: #fc8181; }

.cart-summary-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  position: sticky;
  top: 90px;
}

/* =========================================
   Checkout Page
   ========================================= */
.checkout-page {
  padding-top: 1rem;
  padding-bottom: 5rem;
  min-height: 70vh;
}

.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 900px) {
  .checkout-layout { grid-template-columns: 1fr; }
}

/* ---- Step Indicator ---- */
.checkout-steps {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
}

.checkout-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.checkout-step.active .step-num { background: var(--accent); color: #000; }
.checkout-step.active { color: var(--text); }
.checkout-step.done .step-num { background: rgba(0,229,255,0.2); color: var(--accent); }
.checkout-step.done { color: var(--text-muted); }

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 1.5px solid var(--border);
  font-family: var(--font-head);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition);
}

.step-connector {
  flex: 1;
  height: 1px;
  background: var(--border);
  margin: 0 0.5rem;
}

.checkout-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1rem;
}
.checkout-panel-title {
  font-family: var(--font-head);
  font-size: 0.9rem;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
}

/* ---- Shipping Rates ---- */
.shipping-rates-list { display: flex; flex-direction: column; gap: 0.6rem; }

.shipping-rate-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-alt);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: border-color var(--transition);
}
.shipping-rate-option:has(input:checked) { border-color: var(--accent); }
.shipping-rate-option input { accent-color: var(--accent); flex-shrink: 0; }
.shipping-rate-info { flex: 1; font-size: 0.85rem; }
.shipping-rate-info strong { display: block; }
.shipping-rate-info span { font-size: 0.75rem; color: var(--text-muted); }
.shipping-rate-price { font-family: var(--font-head); font-size: 0.9rem; color: var(--accent); }

.loading-spinner { color: var(--text-muted); font-size: 0.85rem; padding: 1rem 0; }

/* ---- Payment ---- */
.payment-methods {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}
.payment-method-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-dark);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 1rem;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}
.payment-method-tab.active { border-color: var(--accent); color: var(--accent); }

.stripe-card-element {
  background: var(--bg-dark);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  transition: border-color var(--transition);
}
.stripe-card-element:focus-within { border-color: var(--accent); }

/* ---- Checkout Summary ---- */
.checkout-summary-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  position: sticky;
  top: 90px;
}

.checkout-items-list { display: flex; flex-direction: column; gap: 0.5rem; }
.checkout-cart-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.83rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.checkout-cart-item:last-child { border-bottom: none; }
.checkout-item-name { color: var(--text-muted); }
.checkout-item-price { color: var(--text); font-family: var(--font-head); font-size: 0.8rem; }

.secure-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

/* ---- Success ---- */
.checkout-success {
  text-align: center;
  padding: 2rem 0;
}
.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(0,229,255,0.15);
  border: 2px solid var(--accent);
  color: var(--accent);
  font-size: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}
.order-number-display {
  font-family: var(--font-head);
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 2px;
  margin-top: 0.5rem;
}

/* ---- Hero product badges ---- */
.hero-product-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

/* =========================================
   Product Hero Image + Placeholder
   ========================================= */
@keyframes placeholder-shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}

.product-image-wrap {
  position: relative;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--border);
  box-shadow: 0 0 60px rgba(0,229,255,0.07);
  background: var(--bg-card);
}

/* Placeholder — visible by default */
.product-img-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 2rem;
  text-align: center;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(
      135deg,
      var(--bg-card) 0%,
      rgba(0,229,255,0.04) 50%,
      var(--bg-card) 100%
    );
  background-size: 800px 100%;
  animation: placeholder-shimmer 3s ease-in-out infinite;
  position: absolute;
  inset: 0;
  transition: opacity 0.35s ease;
}

.placeholder-brand {
  font-family: var(--font-head);
  font-size: 0.6rem;
  letter-spacing: 4px;
  color: var(--accent);
  opacity: 0.5;
  margin-bottom: 0.25rem;
}
.placeholder-icon  { font-size: 3.5rem; line-height: 1; }
.placeholder-label {
  font-family: var(--font-head);
  font-size: 1rem;
  letter-spacing: 3px;
  color: var(--accent);
}
.placeholder-hint {
  font-size: 0.68rem;
  color: var(--text-muted);
  border: 1px dashed rgba(255,255,255,0.1);
  border-radius: 6px;
  padding: 0.3rem 0.7rem;
  margin-top: 0.25rem;
  font-family: monospace;
}

/* Image — hidden until loaded */
.product-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1rem;
  display: none;
  border-radius: var(--radius);
  transition: opacity 0.4s ease;
}

/* When JS adds .img-loaded — show image, hide placeholder */
.product-image-wrap.img-loaded .product-hero-img {
  display: block;
  opacity: 1;
}
.product-image-wrap.img-loaded .product-img-placeholder {
  opacity: 0;
  pointer-events: none;
}

/* Sale pricing */
.price-display {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
}
.price-original {
  text-decoration: line-through;
  color: var(--text-muted, #64748b);
  font-size: 0.85em;
}
.price-sale {
  color: #ff6b35;
  font-weight: 700;
}
.sale-badge {
  display: inline-flex;
  align-items: center;
  background: #ff6b35;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: var(--font-head);
}
.product-card .sale-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  top: auto;
}

/* Admin toggle switch */
.toggle {
  display: inline-flex;
  align-items: center;
  width: 44px;
  height: 24px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--bg-alt);
  cursor: pointer;
  position: relative;
  transition: background 0.2s, border-color 0.2s;
  padding: 0;
  flex-shrink: 0;
}
.toggle::after {
  content: '';
  position: absolute;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-muted, #64748b);
  transition: left 0.2s, background 0.2s;
}
.toggle.on {
  background: var(--accent);
  border-color: var(--accent);
}
.toggle.on::after {
  left: calc(100% - 18px);
  background: #fff;
}

/* =========================================
   Scroll Progress Bar
   ========================================= */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  z-index: 9999;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* =========================================
   Back-to-Top Button
   ========================================= */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, border-color var(--transition), box-shadow var(--transition);
  pointer-events: none;
}

#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#back-to-top:hover {
  border-color: var(--accent);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.35);
  background: var(--accent-dim);
}

/* =========================================
   Toast Notifications
   ========================================= */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  z-index: 9000;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1.3rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-family: var(--font-body);
  backdrop-filter: blur(12px);
  background: rgba(13, 21, 37, 0.92);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(10px) scale(0.96);
  transition: opacity 0.3s ease, transform 0.3s ease;
  max-width: 360px;
  white-space: nowrap;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.toast-success { border-color: rgba(0, 229, 255, 0.4); }
.toast-success .toast-icon { color: var(--accent); }

.toast-error { border-color: rgba(252, 129, 129, 0.4); }
.toast-error .toast-icon { color: #fc8181; }

.toast-warning { border-color: rgba(251, 191, 36, 0.4); }
.toast-warning .toast-icon { color: #fbbf24; }

.toast-info .toast-icon { color: var(--text-muted); }

/* =========================================
   Active Nav Link Underline
   ========================================= */
.nav-links a.active {
  color: var(--accent);
  position: relative;
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

/* =========================================
   Page Load Fade-In
   ========================================= */
body {
  animation: pageFadeIn 0.4s ease both;
}

@keyframes pageFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* =========================================
   Products Search
   ========================================= */
.products-search-wrap { max-width: 500px; margin: 0 auto 2.5rem; }
.products-search-input { width: 100%; padding: 0.75rem 1.25rem 0.75rem 3rem; background: var(--bg-card); border: 1px solid rgba(0,229,255,0.2); border-radius: 12px; color: var(--text); font-family: var(--font-body); font-size: 0.95rem; outline: none; transition: border-color 0.2s, box-shadow 0.2s; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2300e5ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 0.9rem center; box-sizing: border-box; }
.products-search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,229,255,0.1); }
.products-search-input::placeholder { color: rgba(255,255,255,0.3); }

/* =========================================
   Footer Newsletter
   ========================================= */
.footer-newsletter {
  width: 100%;
  max-width: 420px;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
}
.footer-newsletter-title { font-family: var(--font-head); font-size: 0.72rem; letter-spacing: 2px; color: var(--accent); margin-bottom: 0.8rem; }
.newsletter-form { display: flex; gap: 0.5rem; }
.newsletter-input { flex: 1; min-width: 0; padding: 0.6rem 1rem; background: var(--bg-alt); border: 1px solid rgba(0,229,255,0.2); border-radius: 8px; color: var(--text); font-family: var(--font-body); font-size: 0.85rem; outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
.newsletter-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,229,255,0.08); }
.newsletter-btn { padding: 0.6rem 1.2rem; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; border: none; border-radius: 8px; font-family: var(--font-head); font-weight: 600; font-size: 0.78rem; letter-spacing: 0.5px; cursor: pointer; transition: opacity 0.15s, transform 0.15s; white-space: nowrap; }
.newsletter-btn:hover { opacity: 0.9; transform: translateY(-1px); }
