/* ==========================================================================
   MECH-TECH INDUSTRIES - STYLESHEET
   Your Partner in Fluid Technology
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --primary-deep: #075985;
  --secondary: #0f172a;
  --secondary-light: #1e293b;
  --accent: #f59e0b;
  --accent-orange: #ea580c;
  --steel: #64748b;
  --light-bg: #f8fafc;
  --card-border: rgba(226, 232, 240, 0.8);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  max-width: 100%;
  overflow-x: hidden !important;
  width: 100%;
}

body {
  max-width: 100%;
  overflow-x: hidden !important;
  width: 100%;
  position: relative;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  -webkit-text-size-adjust: 100%;
}

/* Ensure all major landmark containers never overflow the viewport */
section, header, footer, nav, aside {
  max-width: 100%;
  overflow-x: clip;
}

h1, h2, h3, .font-heading {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  text-wrap: balance;
}

/* Background Grids & Engineering Patterns */
.bg-grid-pattern {
  background-size: 32px 32px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
}

.bg-dot-pattern {
  background-image: radial-gradient(rgba(2, 132, 199, 0.15) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #0f172a;
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #0284c7;
}

/* Glassmorphism Classes */
.glass-panel {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-card-light {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

/* Hero Glows - Strictly contained */
.hero-glow {
  position: absolute;
  width: min(500px, 90vw);
  height: min(500px, 90vw);
  background: radial-gradient(circle, rgba(2, 132, 199, 0.22) 0%, rgba(2, 132, 199, 0) 70%);
  filter: blur(50px);
  pointer-events: none;
  overflow: hidden;
}

/* Infinite Marquee for Clients & Brands - Zero Overflow */
@keyframes marquee {
  0% { transform: translate3d(0%, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

.marquee-container {
  display: flex;
  overflow: hidden;
  user-select: none;
  width: 100%;
  max-width: 100%;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.marquee-content {
  display: flex;
  gap: 1.5rem;
  animation: marquee 30s linear infinite;
  min-width: 100%;
  flex-shrink: 0;
  align-items: center;
  will-change: transform;
}

@media (min-width: 640px) {
  .marquee-content {
    gap: 3rem;
  }
}

.marquee-container:hover .marquee-content {
  animation-play-state: paused;
}

/* Horizontal scroll container for category pills */
.category-scroll-container {
  touch-action: pan-x pan-y;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.category-scroll-container::-webkit-scrollbar {
  display: none;
}

/* Floating Action Button Pulse */
@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.18); opacity: 0.25; }
  100% { transform: scale(1.3); opacity: 0; }
}

.wa-pulse::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 9999px;
  background: #22c55e;
  animation: pulse-ring 2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
  z-index: -1;
}

/* Mobile App-like Bottom Quick Bar */
.mobile-bottom-bar {
  padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
}

/* Product Card Interactions */
.product-card {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, box-shadow;
}
@media (hover: hover) {
  .product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 22px -4px rgba(2, 132, 199, 0.12), 0 6px 8px -4px rgba(0, 0, 0, 0.04);
  }
  .product-card:hover .product-image-container img {
    transform: scale(1.06);
  }
}

.product-image-container {
  overflow: hidden;
  position: relative;
}
.product-image-container img {
  transition: transform 0.4s ease;
}

/* Custom Range Slider for Hose Configurator */
input[type="range"] {
  accent-color: #0284c7;
  max-width: 100%;
}

/* Modal Transitions */
.modal-overlay {
  transition: opacity 0.2s ease-out;
}
.modal-dialog {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}
.modal-dialog.scale-95 {
  transform: scale(0.95);
  opacity: 0;
}

/* Mobile Friendly Image Sizing */
img {
  max-width: 100%;
  height: auto;
}

/* Print Stylesheet for RFQ Specification Sheet */
@media print {
  nav, footer, .floating-actions, .mobile-bottom-bar, #configurator-controls, .no-print {
    display: none !important;
  }
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .print-only {
    display: block !important;
  }
}
