﻿/* Spike Engineering - Premium Industrial & WordPress Professional Theme Engine */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&display=swap');

/* ─── THEME VARIABLES ────────────────────────────────────────────── */
:root {
  /* Light Mode (Realistic WordPress Corporate Theme by default) */
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --bg-surface-subtle: #f8fafc;
  --bg-blueprint: #f1f5f9;
  --blueprint-grid: rgba(2, 132, 199, 0.05);
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --text-inverse: #ffffff;
  
  --border-color: #e2e8f0;
  --border-subtle: #cbd5e1;
  --border-highlight: rgba(2, 132, 199, 0.5);
  
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --card-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --card-hover-shadow: 0 20px 35px -10px rgba(2, 132, 199, 0.18), 0 4px 12px -2px rgba(15, 23, 42, 0.08);
  
  --nav-glass: rgba(255, 255, 255, 0.92);
  --nav-border: rgba(226, 232, 240, 0.8);
  --topbar-bg: #0b1727;
  --topbar-text: #94a3b8;
  
  --brand-blue: #0284c7;
  --brand-blue-hover: #0369a1;
  --brand-cyan: #0284c7;
  --brand-red: #e11d48;
  --brand-red-glow: rgba(225, 29, 72, 0.18);
  --brand-amber: #d97706;
  
  --badge-bg: #e0f2fe;
  --badge-text: #0369a1;
  --badge-border: #bae6fd;
  
  --input-bg: #ffffff;
  --input-border: #cbd5e1;
  --input-text: #0f172a;
  --input-placeholder: #94a3b8;

  --modal-bg: #ffffff;
  --modal-border: #e2e8f0;
  --table-alt-row: rgba(241, 245, 249, 0.6);
  --table-hover-row: rgba(2, 132, 199, 0.06);
}

/* Dark Mode Overrides */
html.dark {
  --bg-body: #070d1e;
  --bg-surface: #0f172a;
  --bg-surface-elevated: #162038;
  --bg-surface-subtle: #0b1329;
  --bg-blueprint: #070d1e;
  --blueprint-grid: rgba(56, 189, 248, 0.04);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-inverse: #0f172a;
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.05);
  --border-highlight: rgba(56, 189, 248, 0.4);
  
  --card-bg: linear-gradient(145deg, rgba(17, 24, 39, 0.85) 0%, rgba(15, 23, 42, 0.98) 100%);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  --card-hover-shadow: 0 20px 45px -15px rgba(2, 132, 199, 0.35);
  
  --nav-glass: rgba(7, 13, 30, 0.88);
  --nav-border: rgba(255, 255, 255, 0.08);
  --topbar-bg: #030712;
  --topbar-text: #94a3b8;
  
  --brand-blue: #0284c7;
  --brand-blue-hover: #38bdf8;
  --brand-cyan: #38bdf8;
  --brand-red: #e11d48;
  --brand-red-glow: rgba(225, 29, 72, 0.25);
  --brand-amber: #fbbf24;
  
  --badge-bg: rgba(2, 132, 199, 0.18);
  --badge-text: #38bdf8;
  --badge-border: rgba(56, 189, 248, 0.3);
  
  --input-bg: rgba(15, 23, 42, 0.85);
  --input-border: rgba(255, 255, 255, 0.12);
  --input-text: #f8fafc;
  --input-placeholder: #64748b;

  --modal-bg: #0f172a;
  --modal-border: rgba(255, 255, 255, 0.12);
  --table-alt-row: rgba(255, 255, 255, 0.02);
  --table-hover-row: rgba(56, 189, 248, 0.06);
}

/* ─── BASE RESET & TYPOGRAPHY ────────────────────────────────────── */
* {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: 'Plus Jakarta Sans', sans-serif;
  letter-spacing: -0.025em;
  font-weight: 700;
}

.font-mono-spec {
  font-family: 'JetBrains Mono', monospace;
}

/* ─── WORDPRESS THEME HELPERS ────────────────────────────────────── */
.wp-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: 1rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.wp-card:hover {
  box-shadow: var(--card-hover-shadow);
  border-color: var(--border-highlight);
}

.wp-surface {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
}

.wp-surface-elevated {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
}

.wp-text-main {
  color: var(--text-main);
}

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

.wp-border {
  border-color: var(--border-color);
}

/* ─── BACKGROUNDS & GRIDS ────────────────────────────────────────── */
.bg-blueprint {
  background-color: var(--bg-blueprint);
  background-image: 
    linear-gradient(var(--blueprint-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--blueprint-grid) 1px, transparent 1px);
  background-size: 36px 36px;
  background-position: center center;
}

.bg-radial-glow {
  background: radial-gradient(circle at 50% 0%, rgba(2, 132, 199, 0.12) 0%, transparent 70%);
}

html.dark .bg-radial-glow {
  background: radial-gradient(circle at 50% 0%, rgba(2, 132, 199, 0.22) 0%, rgba(7, 13, 30, 0) 70%);
}

/* ─── 3D ANIMATION & DEPTH SYSTEM ────────────────────────────────── */
.perspective-container {
  perspective: 1200px;
}

.tilt-3d-card {
  transform-style: preserve-3d;
  transition: transform 0.12s ease-out, box-shadow 0.25s ease;
  will-change: transform;
  position: relative;
}

.tilt-3d-card:hover {
  z-index: 10;
}

.tilt-3d-content {
  transform: translateZ(25px);
  transition: transform 0.2s ease-out;
}

.tilt-3d-badge {
  transform: translateZ(35px);
}

.card-sheen {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.22) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 20;
}

html.dark .card-sheen {
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(56, 189, 248, 0.18) 0%, transparent 60%);
}

.tilt-3d-card:hover .card-sheen {
  opacity: 1;
}

/* 3D Button Depth */
.btn-3d {
  position: relative;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateY(0);
}

.btn-3d:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -4px rgba(2, 132, 199, 0.4);
}

.btn-3d:active {
  transform: translateY(1px);
  box-shadow: 0 2px 6px -1px rgba(2, 132, 199, 0.3);
}

/* 3D Floating element animation */
@keyframes float3D {
  0%, 100% {
    transform: translateY(0px) rotateX(0deg) rotateY(0deg);
  }
  50% {
    transform: translateY(-8px) rotateX(2deg) rotateY(-2deg);
  }
}

.animate-float-3d {
  animation: float3D 5s ease-in-out infinite;
}

/* Canvas 3D particle container */
#hero-3d-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.65;
}

/* ─── GLASS HEADER ───────────────────────────────────────────────── */
.glass-header {
  background: var(--nav-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--nav-border);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
}

/* On mobile when scrolled: transparent bar, keep hamburger on the right side */
@media (max-width: 1023px) {
  .navbar-scrolled {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    pointer-events: none;
  }
  .navbar-scrolled > div {
    pointer-events: none;
  }
  .navbar-scrolled #navbar-logo {
    display: none !important;
  }
  .navbar-scrolled #mobile-theme-pill {
    display: none !important;
  }
  .navbar-scrolled #navbar-brand-text {
    display: none !important;
  }
  .navbar-scrolled .lg\:hidden {
    margin-left: auto !important;
    pointer-events: auto;
  }
  .navbar-scrolled #mobile-menu-btn {
    pointer-events: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
  .navbar-scrolled .hidden.sm\:flex {
    display: none !important;
  }
}

/* ─── FLOATING CALL / WHATSAPP CIRCLE BUTTONS ───────────────────── */
#spike-floating-actions {
  position: fixed;
  bottom: 100px;
  right: 24px;
  z-index: 49;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.spike-float-btn {
  width: 52px;
  height: 52px;
  border-radius: 9999px;
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.spike-float-btn:hover {
  transform: scale(1.1);
}

.spike-float-call {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  box-shadow: 0 10px 25px -4px rgba(2, 132, 199, 0.5), 0 0 0 0 rgba(2, 132, 199, 0.4);
  animation: pulseCallBtn 3s infinite;
}

.spike-float-wa {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  box-shadow: 0 10px 25px -4px rgba(34, 197, 94, 0.5), 0 0 0 0 rgba(34, 197, 94, 0.4);
  animation: pulseWaBtn 3s infinite 0.5s;
}

@keyframes pulseCallBtn {
  0%   { box-shadow: 0 10px 25px -4px rgba(2,132,199,0.5), 0 0 0 0 rgba(2,132,199,0.4); }
  70%  { box-shadow: 0 10px 25px -4px rgba(2,132,199,0.5), 0 0 0 12px rgba(2,132,199,0); }
  100% { box-shadow: 0 10px 25px -4px rgba(2,132,199,0.5), 0 0 0 0 rgba(2,132,199,0); }
}

@keyframes pulseWaBtn {
  0%   { box-shadow: 0 10px 25px -4px rgba(34,197,94,0.5), 0 0 0 0 rgba(34,197,94,0.4); }
  70%  { box-shadow: 0 10px 25px -4px rgba(34,197,94,0.5), 0 0 0 12px rgba(34,197,94,0); }
  100% { box-shadow: 0 10px 25px -4px rgba(34,197,94,0.5), 0 0 0 0 rgba(34,197,94,0); }
}

.spike-float-tooltip {
  position: absolute;
  right: 62px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  border: 1px solid var(--border-color);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.spike-float-btn:hover .spike-float-tooltip {
  opacity: 1;
}


/* ─── THEME SWITCHER CONTROLS ────────────────────────────────────── */
.theme-switch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
  border-radius: 9999px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-switch-btn:hover {
  color: var(--brand-blue);
  border-color: var(--brand-blue);
  transform: scale(1.05);
}

.theme-segmented-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem;
  border-radius: 9999px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  gap: 0.15rem;
}

.theme-segmented-opt {
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-muted);
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  background: transparent;
}

.theme-segmented-opt.active {
  background: var(--bg-surface);
  color: var(--brand-blue);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

html.dark .theme-segmented-opt.active {
  background: #0284c7;
  color: #ffffff;
}

/* ─── SPECIFICATION TABLE STYLING ────────────────────────────────── */
.spec-table tr:nth-child(even) {
  background-color: var(--table-alt-row);
}
.spec-table tr:hover {
  background-color: var(--table-hover-row);
}

/* ─── INPUTS & FORM CONTROLS ─────────────────────────────────────── */
.industrial-input {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--input-text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.industrial-input::placeholder {
  color: var(--input-placeholder);
}

.industrial-input:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.18);
}

/* ─── HERO SLIDER ENHANCEMENTS ───────────────────────────────────── */
.hero-slider-container {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 55%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  box-shadow: 0 20px 50px -12px rgba(15, 23, 42, 0.08), 0 4px 16px -2px rgba(15, 23, 42, 0.04);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

html.dark .hero-slider-container {
  background: radial-gradient(circle at 75% 50%, rgba(15, 23, 42, 0.95) 0%, rgba(5, 9, 20, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.hero-slider-viewport {
  overflow: hidden;
  width: 100%;
  position: relative;
}

.hero-slider-track {
  display: flex;
  width: 100%;
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.hero-slide {
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  flex-shrink: 0;
  box-sizing: border-box;
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-timer-bar {
  height: 3px;
  background: linear-gradient(90deg, #0284c7, #38bdf8, #e11d48);
  width: 0%;
  transition: width 0.1s linear;
}

/* ─── SPIKE AI AGENT CHATBOT STYLES ──────────────────────────────── */
#spike-ai-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-launcher-btn {
  width: 58px;
  height: 58px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 50%, #0f172a 100%);
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 12px 30px -4px rgba(2, 132, 199, 0.5), 0 0 0 0 rgba(2, 132, 199, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  animation: pulseAiButton 3s infinite;
}

@keyframes pulseAiButton {
  0% { box-shadow: 0 10px 25px -4px rgba(2, 132, 199, 0.5), 0 0 0 0 rgba(2, 132, 199, 0.4); }
  70% { box-shadow: 0 10px 25px -4px rgba(2, 132, 199, 0.5), 0 0 0 14px rgba(2, 132, 199, 0); }
  100% { box-shadow: 0 10px 25px -4px rgba(2, 132, 199, 0.5), 0 0 0 0 rgba(2, 132, 199, 0); }
}

.ai-launcher-btn:hover {
  transform: scale(1.08) rotate(5deg);
  border-color: #38bdf8;
}

.ai-tooltip-badge {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
  padding: 8px 14px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  white-space: nowrap;
  animation: floatBadge 4s ease-in-out infinite;
}

/* AI Chat Window */
#spike-ai-window {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: min(420px, calc(100vw - 32px));
  height: min(620px, calc(100vh - 120px));
  background: var(--modal-bg);
  border: 1px solid var(--modal-border);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.25), 0 0 0 1px var(--border-color);
  border-radius: 1.5rem;
  z-index: 50;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: bottom right;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#spike-ai-window.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.85) translateY(20px);
}

.ai-chat-header {
  padding: 16px 20px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.ai-messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background-color: var(--bg-surface-subtle);
}

/* Chat bubble styling */
.ai-msg {
  display: flex;
  flex-direction: column;
  max-width: 86%;
  animation: fadeInMsg 0.25s ease-out;
}

@keyframes fadeInMsg {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.ai-msg-agent {
  align-self: flex-start;
}

.ai-msg-user {
  align-self: flex-end;
}

.ai-msg-bubble {
  padding: 12px 16px;
  border-radius: 1.25rem;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.ai-msg-agent .ai-msg-bubble {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-bottom-left-radius: 0.25rem;
}

.ai-msg-user .ai-msg-bubble {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border-bottom-right-radius: 0.25rem;
}

/* Typing indicator */
.ai-typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  border-bottom-left-radius: 0.25rem;
  width: fit-content;
}

.ai-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-blue);
  animation: aiBounce 1.4s infinite ease-in-out both;
}

.ai-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.ai-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes aiBounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* Quick Action Suggestion Chips */
.ai-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.ai-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--brand-blue);
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.ai-chip:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  transform: translateY(-1px);
}

/* AI Inline Machine Price Card */
.ai-machine-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  overflow: hidden;
  margin-top: 8px;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease;
}

.ai-machine-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-blue);
}

/* AI Chat Input Area */
.ai-input-area {
  padding: 12px 16px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-chat-input {
  flex: 1;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s;
}

.ai-chat-input:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.ai-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #0284c7;
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.ai-send-btn:hover {
  background: #0369a1;
  transform: scale(1.05);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--brand-blue);
}


/* ═══════════════════════════════════════════════════════════════
   MOBILE OPTIMIZATION — Full Responsive Polish
   Covers: nav, hero, cards, modal, about, gallery, footer, AI chat
   ═══════════════════════════════════════════════════════════════ */

/* ── Global mobile base ── */
@media (max-width: 768px) {
  html { font-size: 15px; }

  /* Prevent any horizontal overflow */
  body, #app-root, main, section { max-width: 100vw; overflow-x: hidden; }

  /* Better tap highlight */
  a, button { -webkit-tap-highlight-color: transparent; }

  /* Minimum touch target size */
  button, a { min-height: 40px; }

  /* Headings scale down smoothly */
  h1 { font-size: clamp(1.4rem, 6vw, 2rem) !important; line-height: 1.15 !important; }
  h2 { font-size: clamp(1.2rem, 5vw, 1.6rem) !important; }
  h3 { font-size: clamp(1rem, 4vw, 1.25rem) !important; }
}

/* ── Navigation ── */
@media (max-width: 768px) {
  /* Topbar — hide on very small screens */
  #topbar { display: none !important; }

  /* Main nav compact */
  #main-nav {
    padding: 0.5rem 1rem !important;
  }

  /* Logo text size */
  #main-nav .font-heading { font-size: 1rem !important; }

  /* Mobile menu full-width */
  #mobile-menu {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    border-radius: 0 0 1rem 1rem !important;
    padding: 1rem !important;
  }

  #mobile-menu a {
    padding: 0.65rem 0.5rem !important;
    font-size: 0.9rem !important;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

/* ── Hero Slider ── */
@media (max-width: 768px) {
  .hero-slider-container {
    border-radius: 1rem !important;
    margin: 0 0.5rem !important;
  }

  .hero-slide {
    padding: 1rem 1rem 0.75rem !important;
    min-height: unset !important;
  }

  /* Stack left/right panels vertically, left first */
  .hero-slide.grid { grid-template-columns: 1fr !important; }

  /* Machine image in hero */
  .hero-slide img {
    max-height: 180px !important;
    width: auto !important;
  }

  /* Spec badge chips */
  .hero-slide .grid.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.35rem !important;
  }

  /* Sample product badge — stay compact */
  .sample-product-badge {
    max-width: 160px !important;
    padding: 0.35rem !important;
    gap: 0.5rem !important;
    box-shadow: 0 4px 15px -2px rgba(0,0,0,0.12) !important;
  }
  .sample-product-badge .w-14 { width: 2.25rem !important; height: 2.25rem !important; }
}

/* ── Trust Metrics Strip ── */
@media (max-width: 640px) {
  #trust-metrics .grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
  }

  #trust-metrics .p-6 {
    padding: 0.75rem !important;
  }

  #trust-metrics .text-3xl { font-size: 1.4rem !important; }
  #trust-metrics .text-sm  { font-size: 0.7rem !important; }
}

/* ── Category Filters ── */
@media (max-width: 768px) {
  #category-filters {
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.5rem !important;
    gap: 0.4rem !important;
  }
  #category-filters button {
    scroll-snap-align: start;
    white-space: nowrap;
    flex-shrink: 0;
    padding: 0.4rem 0.85rem !important;
    font-size: 0.7rem !important;
    min-height: 36px;
  }
}

/* ── Machine Grid ── */
@media (max-width: 640px) {
  #machines-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.6rem !important;
  }

  /* Card padding tighter on mobile */
  .industrial-card .p-6 {
    padding: 0.6rem !important;
  }

  /* Card title */
  .industrial-card h3 {
    font-size: 0.75rem !important;
    margin-bottom: 0.25rem !important;
    line-height: 1.3 !important;
  }

  /* Card description — hide on very small to save space */
  .industrial-card p.line-clamp-2 {
    display: none !important;
  }

  /* Card image container */
  .card-img-container {
    min-height: 120px !important;
    max-height: 140px !important;
  }

  /* Spec chips — compact */
  .industrial-card .space-y-1\.5 {
    padding: 0.4rem !important;
  }
  .industrial-card .space-y-1\.5 .text-\[11px\] { font-size: 0.6rem !important; }

  /* Card buttons */
  .industrial-card .grid.grid-cols-2 button {
    font-size: 0.65rem !important;
    padding: 0.45rem 0.3rem !important;
    min-height: 36px !important;
    gap: 0.25rem !important;
  }
  .industrial-card .compare-toggle-btn {
    font-size: 0.6rem !important;
    padding: 0.3rem !important;
    min-height: 32px !important;
  }
}

/* Medium phones — 1 column for machine grid if very narrow */
@media (max-width: 380px) {
  #machines-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  /* Show description again since we have full width */
  .industrial-card p.line-clamp-2 {
    display: block !important;
  }

  .card-img-container {
    min-height: 160px !important;
    max-height: 190px !important;
  }
}

/* ── Machine Detail Modal ── */
@media (max-width: 768px) {
  #machine-detail-modal > div {
    padding: 0 !important;
    margin: 0 !important;
    align-items: flex-end !important;
    min-height: 100vh !important;
  }

  /* Modal slides up from bottom */
  #modal-machine-content {
    border-radius: 1.25rem 1.25rem 0 0 !important;
    max-height: 93vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
  }

  /* Modal inner padding */
  #modal-machine-content > div > div.p-6 {
    padding: 1rem !important;
  }

  /* Modal title */
  #modal-machine-content h2 {
    font-size: 1.1rem !important;
    line-height: 1.25 !important;
  }

  /* Modal image aspect */
  #modal-machine-content .aspect-\[4\/3\] {
    aspect-ratio: 16/10 !important;
  }

  /* Modal specs grid — 2 col */
  #modal-machine-content .grid.grid-cols-2 {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.4rem !important;
  }

  /* Modal view switcher pills */
  #view-crop-btn, #view-360-btn {
    font-size: 0.65rem !important;
    padding: 0.5rem 0.4rem !important;
    min-height: 38px !important;
  }

  /* Modal CTA buttons */
  #modal-machine-content .modal-quote-trigger,
  #modal-machine-content a[href*="wa.me"] {
    font-size: 0.7rem !important;
    padding: 0.6rem 0.5rem !important;
    min-height: 40px !important;
  }

  /* Related machines horizontal scroll */
  #modal-machine-content .flex.gap-3 {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 0.5rem !important;
  }
}

/* ── About Section ── */
@media (max-width: 768px) {
  /* Stack the 12-col grid */
  .grid.grid-cols-1.lg\:grid-cols-12 {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  /* About feature chips */
  .grid.grid-cols-2.sm\:grid-cols-3 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ── Industries / Process Steps ── */
@media (max-width: 640px) {
  #industries-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }

  /* Process steps — 2 col */
  .grid.grid-cols-1.sm\:grid-cols-2.lg\:grid-cols-5 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }
}

/* ── Gallery Grid ── */
@media (max-width: 640px) {
  #gallery-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
  }
}

/* ── Contact / CTA Section ── */
@media (max-width: 640px) {
  .grid.grid-cols-1.lg\:grid-cols-12.gap-12 {
    gap: 2rem !important;
  }

  /* Contact phone buttons */
  .grid.grid-cols-2.gap-3 a,
  .grid.grid-cols-2.gap-3 button {
    font-size: 0.7rem !important;
    padding: 0.6rem !important;
  }
}

/* ── Footer ── */
@media (max-width: 768px) {
  /* Footer grid — stack columns */
  .grid.grid-cols-1.md\:grid-cols-2.lg\:grid-cols-5 {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  footer { padding: 1.5rem 1rem !important; }
  footer h4, footer .font-bold { font-size: 0.85rem !important; }
  footer li, footer a { font-size: 0.75rem !important; }
}

/* ── Comparison Table ── */
@media (max-width: 768px) {
  #comparison-section .overflow-x-auto {
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }

  #comparison-section table {
    min-width: 560px !important;
    font-size: 0.65rem !important;
  }

  #comparison-section th,
  #comparison-section td {
    padding: 0.4rem 0.5rem !important;
  }
}

/* ── AI Chat Window ── */
@media (max-width: 640px) {
  #spike-ai-window {
    bottom: 0 !important;
    right: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: calc(100vh - 56px) !important;
    border-radius: 1.5rem 1.5rem 0 0 !important;
    max-width: 100vw !important;
  }
}

/* ── Floating Action Buttons (WhatsApp, Call) ── */
@media (max-width: 640px) {
  /* Shift FABs up slightly so they don't overlap bottom bar */
  #floating-actions {
    bottom: 1rem !important;
    right: 0.75rem !important;
    gap: 0.5rem !important;
  }

  #floating-actions a, #floating-actions button {
    width: 3rem !important;
    height: 3rem !important;
    padding: 0.75rem !important;
  }
}

/* ── Quote Modal ── */
@media (max-width: 640px) {
  #quote-modal > div {
    padding: 0.5rem !important;
    align-items: flex-end !important;
  }

  #quote-modal form {
    border-radius: 1.25rem 1.25rem 0 0 !important;
    padding: 1rem !important;
  }

  #quote-modal input,
  #quote-modal select,
  #quote-modal textarea {
    font-size: 1rem !important; /* Prevents iOS zoom on focus */
    padding: 0.6rem 0.75rem !important;
  }
}

/* ── Section Spacing ── */
@media (max-width: 640px) {
  section { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }
  .py-20 { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }
  .py-16 { padding-top: 2rem !important; padding-bottom: 2rem !important; }
  .pt-20 { padding-top: 2.5rem !important; }
  .px-6, .px-8 { padding-left: 1rem !important; padding-right: 1rem !important; }
  .gap-12 { gap: 1.5rem !important; }
  .gap-8  { gap: 1rem !important; }
  .mb-12  { margin-bottom: 1.5rem !important; }
  .mb-16  { margin-bottom: 2rem !important; }
}

/* ── Prevent text overflow everywhere ── */
@media (max-width: 768px) {
  p, span, div, li, td, th {
    word-break: break-word;
    overflow-wrap: break-word;
  }
}

