/* Global CNC Hardware Custom Styles & CSS3 Animations */
@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;600;700;800;900&family=Inter:wght@300;400;500;600;700&display=swap');

* {
  box-sizing: border-box;
  border-radius: 0 !important;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

/* Standardized Responsive Breakpoints */
/* Mobile: 0 - 480px */
/* Tablet: 481px - 768px */
/* Small Laptop: 769px - 1024px */
/* Desktop: 1025px - 1440px */
/* Large Desktop: 1441px+ */

/* ── SITE BACKGROUND — layered industrial canvas ── */
body {
  margin: 0;
  color: #0b1c2d;
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  position: relative;
  min-height: 100vh;
  background-color: #d8dfe8;
  background-image:
    radial-gradient(ellipse 75% 55% at 12% -8%, rgba(16, 185, 129, 0.18), transparent 58%),
    radial-gradient(ellipse 70% 50% at 98% 102%, rgba(11, 28, 45, 0.14), transparent 52%),
    linear-gradient(155deg, #d4dbe4 0%, #dfe5ec 40%, #e8edf2 70%, #d9e0e8 100%);
  background-size: 100% 100%;
  background-attachment: fixed;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    url('../images/cim-watermark-bg.png'),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 39px,
      rgba(11, 28, 45, 0.06) 39px,
      rgba(11, 28, 45, 0.06) 40px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 39px,
      rgba(11, 28, 45, 0.06) 39px,
      rgba(11, 28, 45, 0.06) 40px
    );
  background-size: 480px 320px, 40px 40px, 40px 40px;
  background-position: center;
  animation: siteBgDrift 48s ease-in-out infinite alternate;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle 520px at 6% 14%, rgba(16, 185, 129, 0.14), transparent 72%),
    radial-gradient(circle 460px at 94% 78%, rgba(20, 184, 166, 0.1), transparent 70%),
    radial-gradient(circle 400px at 50% 100%, rgba(11, 28, 45, 0.08), transparent 68%);
  animation: siteOrbFloat 32s ease-in-out infinite alternate;
}

@keyframes siteBgDrift {
  0% {
    background-position: center, 0 0, 0 0;
  }
  100% {
    background-position: center, 20px 20px, -20px -20px;
  }
}

@keyframes siteOrbFloat {
  0% {
    opacity: 0.8;
    transform: scale(1);
  }
  100% {
    opacity: 1;
    transform: scale(1.05);
  }
}

/* Content sections — tinted surfaces (not flat white) */
main section.bg-white {
  background: linear-gradient(
    148deg,
    #e2e8ef 0%,
    #edf1f5 45%,
    #e6ebf1 100%
  ) !important;
}

main section.bg-paper {
  background: linear-gradient(
    148deg,
    #d8e0e9 0%,
    #e4eaf0 45%,
    #dce4ec 100%
  ) !important;
}

main section.watermark-bg:not(.bg-white):not(.bg-paper):not(.bg-navy) {
  background: linear-gradient(
    148deg,
    #dde4ec 0%,
    #e8edf2 50%,
    #e0e7ee 100%
  ) !important;
}

main.watermark-bg {
  background: linear-gradient(
    148deg,
    #e0e6ed 0%,
    #eaedf1 50%,
    #e2e8ef 100%
  );
}

/* Soft dividers between alternating sections */
main section.bg-white + section.bg-paper,
main section.bg-paper + section.bg-white {
  box-shadow: inset 0 1px 0 rgba(11, 28, 45, 0.08);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Archivo', sans-serif;
  letter-spacing: -0.01em;
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: 'Inter', sans-serif;
  cursor: pointer;
}

input, select, textarea {
  font-family: 'Inter', sans-serif;
}

:focus-visible {
  outline: 2px solid #10b981;
  outline-offset: 2px;
}

::selection {
  background-color: #10b981;
  color: #ffffff;
}

/* Custom Utilities & Glow Shadow */
.shadow-glow {
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.25);
}

.max-w-content {
  max-width: 1400px;
}

/* Premium Hero Layout */
.premium-hero-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
}

/* Train Product Range Animation */
.train-product-range {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  background:
    linear-gradient(135deg, rgba(16,185,129,0.08), transparent),
    rgba(255,255,255,0.04);
  backdrop-filter: blur(25px);
  border: 1px solid rgba(16,185,129,0.35);
  border-radius: 16px;
  overflow: visible;
  box-shadow: 0 20px 40px rgba(0,0,0,0.25), 0 0 25px rgba(16,185,129,0.1);
  height: 250px;
  animation: premiumRangeFadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.train-product-range::-webkit-scrollbar {
  display: none;
}

.train-product-range {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.train-product-range::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.train-product-range__header {
  position: relative;
  z-index: 5;
  padding: 1rem 1.5rem;
  background: rgba(11, 28, 45, 0.5);
  border-bottom: 1px solid rgba(16, 185, 129, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.train-product-range__title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.train-product-range__title-text {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #10b981;
}

.train-product-range__title-accent {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.8);
  animation: titlePulse 2s ease-in-out infinite;
}

.train-product-range__indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.train-product-range__pulse {
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  animation: livePulse 1.5s ease-in-out infinite;
}

.train-product-range__status {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.6);
}

/* Railroad Track */
.train-track {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(to bottom, rgba(139, 69, 19, 0.3), rgba(101, 67, 33, 0.2));
  border-top: 3px solid rgba(139, 69, 19, 0.5);
}

.train-track__rail {
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(to bottom, #8b4513, #654321);
  border-radius: 2px;
}

.train-track__rail--top {
  top: 8px;
}

.train-track__rail--bottom {
  bottom: 8px;
}

.train-track__ties {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 0;
  right: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 20px,
    rgba(101, 67, 33, 0.4) 20px,
    rgba(101, 67, 33, 0.4) 28px
  );
}

/* Train Container */
.train-container {
  position: relative;
  height: 180px;
  display: flex;
  align-items: flex-end;
  padding: 0 50px;
  overflow: visible;
  width: 100%;
  background-image: radial-gradient(rgba(16,185,129,0.08) 1px, transparent 1px);
  background-size: 22px 22px;
}

.train-wrapper {
  display: flex;
  align-items: flex-end;
  width: max-content;
  min-width: max-content;
  animation: trainMove 30s linear infinite;
  animation-delay: 3s;
}

.train-wrapper:hover {
  animation-play-state: paused;
}

/* Train Engine */
.train-engine {
  position: relative;
  width: 130px;
  height: 100px;
  margin-right: 15px;
  flex-shrink: 0;
  z-index: 10;
  filter: drop-shadow(0 15px 18px rgba(0,0,0,0.45));
}

.train-engine__body {
  position: relative;
  width: 100%;
  height: 70px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 8px 8px 4px 4px;
  border: 2px solid rgba(16,185,129,0.4);
  box-shadow: 0 4px 8px rgba(0,0,0,0.3), inset 0 0 16px rgba(16,185,129,0.14);
}

.train-engine__cabin {
  position: absolute;
  top: -20px;
  left: 10px;
  width: 50px;
  height: 40px;
  background: linear-gradient(135deg, #0f3460 0%, #16213e 100%);
  border-radius: 4px 4px 0 0;
  border: 2px solid rgba(16, 185, 129, 0.3);
}

.train-engine__window {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 34px;
  height: 20px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.3), rgba(16, 185, 129, 0.1));
  border-radius: 2px;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.train-engine__chimney {
  position: absolute;
  top: -35px;
  right: 15px;
  width: 15px;
  height: 20px;
  background: linear-gradient(to bottom, #333, #1a1a2e);
  border-radius: 2px 2px 0 0;
  border: 2px solid rgba(16, 185, 129, 0.3);
}

.train-engine__front {
  position: absolute;
  right: -15px;
  top: 20px;
  width: 20px;
  height: 35px;
  background: linear-gradient(135deg, #0f3460 0%, #16213e 100%);
  border-radius: 0 8px 8px 0;
  border: 2px solid rgba(16, 185, 129, 0.3);
}

.train-engine__cowcatcher {
  position: absolute;
  bottom: -15px;
  right: -10px;
  width: 0;
  height: 0;
  border-left: 20px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 15px solid rgba(16, 185, 129, 0.3);
}

.train-engine__wheels {
  position: absolute;
  bottom: -15px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
}

.train-engine__wheel {
  width: 25px;
  height: 25px;
  background: radial-gradient(circle, #333 60%, #1a1a2e 100%);
  border: 3px solid rgba(16, 185, 129, 0.4);
  border-radius: 50%;
  animation: wheelSpin 2s linear infinite;
}

.train-engine__wheel--large {
  width: 30px;
  height: 30px;
}

.train-engine__wheel--small {
  width: 20px;
  height: 20px;
  animation-duration: 1.5s;
}

.train-engine__smoke {
  position: absolute;
  top: -50px;
  right: 20px;
}

.train-engine__smoke-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  animation: smokeRise 3s ease-out infinite;
}

.train-engine__smoke-particle:nth-child(1) {
  animation-delay: 0s;
  left: 0;
}

.train-engine__smoke-particle:nth-child(2) {
  animation-delay: 1s;
  left: 5px;
}

.train-engine__smoke-particle:nth-child(3) {
  animation-delay: 2s;
  left: -5px;
}

/* Train Cars (Products) */
.train-cars {
  display: flex;
  gap: 15px;
  align-items: flex-end;
}

.train-car {
  position: relative;
  width: 104px;
  height: 84px;
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(16,185,129,0.15));
  border: 2px solid rgba(16,185,129,0.34);
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(0,0,0,0.2), inset 0 0 8px rgba(255,255,255,0.05);
}

.train-car:hover {
  transform: translateY(-5px);
  border-color: rgba(16, 185, 129, 0.6);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.train-car__image {
  width: 100%;
  height: 50px;
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(16,185,129,0.2);
}

.train-car__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px 6px 0 0;
  background: rgba(255,255,255,0.96);
  transition: transform 0.8s ease, filter 0.8s ease;
}

.train-car__content {
  padding: 8px;
  text-align: center;
}

.train-car__name {
  font-family: 'Archivo', sans-serif;
  font-weight: 600;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.train-car__wheels {
  position: absolute;
  bottom: -10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
}

.train-car__wheel {
  width: 15px;
  height: 15px;
  background: radial-gradient(circle, #333 60%, #1a1a2e 100%);
  border: 2px solid rgba(16, 185, 129, 0.3);
  border-radius: 50%;
  animation: wheelSpin 2s linear infinite;
}

/* Train Animations */
@keyframes trainMove {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes wheelSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes smokeRise {
  0% {
    opacity: 0.8;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-30px) scale(2);
  }
}

@keyframes premiumRangeFadeIn {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes titlePulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
}

@keyframes livePulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0);
  }
}



/* ── CIM WATERMARK — PARENT SECTIONS ONLY ── */
/*
 * Applied ONLY via the .watermark-bg class added explicitly to
 * parent <section> elements in HTML. Child divs / nested elements
 * are NOT affected. Header, footer, and navbar are completely excluded.
 *
 * Uses the uploaded tiled watermark artwork as the repeating background.
 */

.watermark-bg {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.watermark-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  user-select: none;
  z-index: 0;

  background-image:
    url('../images/cim-watermark-bg.png'),
    linear-gradient(
      125deg,
      rgba(16, 185, 129, 0.1) 0%,
      transparent 38%,
      transparent 62%,
      rgba(11, 28, 45, 0.08) 100%
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 72px,
      rgba(11, 28, 45, 0.035) 72px,
      rgba(11, 28, 45, 0.035) 73px
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 39px,
      rgba(11, 28, 45, 0.055) 39px,
      rgba(11, 28, 45, 0.055) 40px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 39px,
      rgba(11, 28, 45, 0.055) 39px,
      rgba(11, 28, 45, 0.055) 40px
    );
  background-repeat: repeat, no-repeat, repeat, repeat, repeat;
  background-size: 480px 320px, 100% 100%, 100px 100px, 40px 40px, 40px 40px;
  background-position: center;
  animation: siteBgDrift 56s ease-in-out infinite alternate;
}

.watermark-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 55% 45% at -5% -10%, rgba(16, 185, 129, 0.16), transparent 72%),
    radial-gradient(ellipse 50% 40% at 105% 110%, rgba(11, 28, 45, 0.12), transparent 68%);
  animation: siteOrbFloat 36s ease-in-out infinite alternate;
}

/* All direct and indirect children stay fully clickable above the watermark */
.watermark-bg > * {
  position: relative;
  z-index: 1;
}

/* Image protection styles */
.protected-image {
  pointer-events: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
}

/* Canvas-based image container */
.image-protected-container {
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.image-protected-container canvas {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  -webkit-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
}

/* ===== COMPREHENSIVE RESPONSIVE DESIGN ===== */

/* Extra Small Devices (phones, 320px and up) */
@media (min-width: 320px) {
  html {
    font-size: 14px;
  }
  
  .max-w-content {
    padding: 0 0.75rem;
  }
  
  /* Mobile Navigation */
  #mobile-menu {
    padding: 1rem 0.75rem;
  }
  
  #mobile-menu a {
    padding: 0.75rem 0;
    font-size: 0.95rem;
  }
  
  /* Product Cards */
  .aspect-square {
    min-height: 200px;
  }
  
  /* Typography */
  h1 {
    font-size: 1.5rem;
    line-height: 1.3;
  }
  
  h2 {
    font-size: 1.25rem;
    line-height: 1.4;
  }
  
  h3 {
    font-size: 1.1rem;
    line-height: 1.4;
  }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
  html {
    font-size: 15px;
  }
  
  .max-w-content {
    padding: 0 1rem;
  }
  
  /* Product Grid */
  .grid-cols-1 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Service Cards */
  .group.overflow-hidden {
    min-height: 200px;
  }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
  
  .max-w-content {
    padding: 0 1.5rem;
  }
  
  /* Product Grid */
  .grid-cols-1 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Hero Section */
  .w-full.h-\[450px\] {
    height: 350px;
  }
  
  /* Typography */
  h1 {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  /* Navigation */
  nav a {
    padding: 0.5rem 0.75rem;
  }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) {
  html {
    font-size: 16px;
  }
  
  .max-w-content {
    padding: 0 2rem;
  }
  
  /* Product Grid */
  .grid-cols-1 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  /* Hero Section */
  .w-full.h-\[450px\] {
    height: 450px;
  }
  
  /* Typography */
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  html {
    font-size: 16px;
  }
  
  .max-w-content {
    padding: 0 2.5rem;
  }
  
  /* Product Grid */
  .grid-cols-1 {
    grid-template-columns: repeat(4, 1fr);
  }
  
  /* Typography */
  h1 {
    font-size: 2.25rem;
  }
  
  h2 {
    font-size: 2rem;
  }
}

/* ===== MODEL CARD MINIMAL DESIGN ===== */
.fan-model-card {
  border-radius: 0 !important;
  transition: all 0.2s ease;
}

.fan-model-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.fan-model-card img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  padding: 4px;
}

/* ===== PULSE CODER MODEL CARDS ===== */
.pulse-coder-card {
  border-radius: 0 !important;
  transition: all 0.2s ease;
  min-height: 0;
}

.pulse-coder-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #10B981;
}

.pulse-coder-card img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  padding: 4px;
}

.pulse-coder-models-wrapper {
  overflow: hidden;
}

.overflow-wrap-anywhere {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Modal fan image containers */
#modal-fan-zoom-container {
  min-height: 220px;
  max-height: 320px;
  height: 300px;
}

@media (max-width: 640px) {
  #modal-fan-zoom-container {
    height: 200px !important;
    min-height: 180px !important;
    max-height: 220px !important;
    padding: 0.5rem !important;
  }
}

#modal-fan-active-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Thumbnail images in modal */
.fan-thumb-btn img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Grid images in modal */
.fan-quad-zoom-cell img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* ===== MODEL SEARCH FEATURE ===== */
.model-search-container {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #ffffff;
  border: 2px solid #10B981;
  border-radius: 0;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
  overflow: hidden;
}

.model-search__input {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #0B1C2D;
  background: #ffffff;
  padding: 8px 0;
  border: none;
  width: 100%;
}

.model-search__input::placeholder {
  color: #6B7280;
  font-weight: 400;
}

.model-search__input:focus {
  color: #0B1C2D;
  outline: none;
}

.model-search__count {
  color: #0B1C2D;
  font-weight: 600;
  background: #F4F4F4;
  padding: 6px 12px;
  border-radius: 0;
  border: 1px solid #E5E7EB;
  display: inline-block;
  font-size: 13px;
}

.model-search__empty {
  background: #ffffff;
  border: 2px solid #E5E7EB;
  border-radius: 0;
  margin-top: 12px;
}

.model-search-hidden {
  display: none !important;
}

/* Responsive adjustments for mobile */
@media (max-width: 767px) {
  .model-search-container {
    top: 0;
    padding: 12px;
    margin: 0 0 12px 0;
  }

  .model-search__input {
    font-size: 14px;
  }

  .model-search__count {
    font-size: 12px;
    padding: 4px 8px;
  }
}

/* Modal Animation */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-modal-in {
  animation: modalFadeIn 0.2s ease-out;
}

/* Line clamp utility */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== MOBILE SPECIFIC FIXES ===== */

/* Mobile Navigation Enhancement */
@media (max-width: 767px) {
  #mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    transition: right 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
  }
  
  #mobile-menu.open {
    right: 0;
  }
  
  #mobile-menu-btn {
    z-index: 1001;
  }
  
  /* Close button for mobile menu */
  #mobile-menu-close {
    display: block;
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #0B1C2D;
  }
}

/* Tablet Navigation */
@media (min-width: 768px) and (max-width: 1023px) {
  nav a {
    padding: 0.5rem 0.5rem;
    font-size: 0.85rem;
  }
  
  .h-24 {
    height: 5rem;
  }
}

/* ===== PRODUCT DETAILS RESPONSIVENESS ===== */

@media (max-width: 1023px) {
  .grid-cols-1.lg\:grid-cols-3 {
    grid-template-columns: 1fr;
  }
  
  .lg\:col-span-2 {
    grid-column: span 1;
  }
  
  /* Stack product details */
  .product-details-section {
    padding: 1rem;
  }
  
  /* Image gallery */
  .product-gallery {
    grid-template-columns: repeat(3, 1fr);
  }
  
  /* Product grid */
  .grid.grid-cols-1.sm\:grid-cols-2.lg\:grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  /* Product image */
  .aspect-square {
    min-height: 250px;
  }
  
  /* Product details grid */
  .grid-cols-1.md\:grid-cols-2.lg\:grid-cols-3 {
    grid-template-columns: 1fr;
  }
  
  .lg\:col-span-2 {
    grid-column: span 1;
  }
  
  /* Compatible models grid */
  #detail-compatible-models .grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  /* Product details sections */
  .product-details-section {
    padding: 0.75rem;
  }
  
  .product-details-section h2 {
    font-size: 1.1rem;
  }
  
  /* Modal responsiveness */
  #model-modal {
    padding: 0.5rem;
  }
  
  #model-modal .max-w-4xl {
    max-width: 100%;
    margin: 0;
  }
  
  #model-modal .grid {
    grid-template-columns: 1fr;
  }
  
  #model-modal .gap-8 {
    gap: 1rem;
  }
  
  #model-modal .p-8 {
    padding: 1rem;
  }
  
  /* Inquiry form */
  #inquiry-modal .max-w-lg {
    max-width: 100%;
    margin: 0;
  }
  
  #inquiry-modal .px-6 {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  #inquiry-modal .py-8 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }
}

/* ===== OPTIMIZED TOUCH TARGETS ===== */

@media (max-width: 767px) {
  /* Increase touch targets for mobile */
  button, a, input, select, textarea {
    min-height: 44px;
  }
  
  /* Button spacing */
  .flex.gap-3 {
    gap: 0.75rem;
  }
  
  /* Card touch targets */
  .group.border {
    touch-action: manipulation;
  }
}

/* ===== TYPOGRAPHY SCALING ===== */

@media (max-width: 640px) {
  /* Small screens */
  .text-2xl {
    font-size: 1.25rem;
    line-height: 1.4;
  }
  
  .text-3xl {
    font-size: 1.5rem;
    line-height: 1.3;
  }
  
  .text-4xl {
    font-size: 1.75rem;
    line-height: 1.3;
  }
  
  .text-xs {
    font-size: 0.75rem;
    line-height: 1.4;
  }
  
  .text-sm {
    font-size: 0.875rem;
    line-height: 1.5;
  }
  
  .text-base {
    font-size: 0.9375rem;
    line-height: 1.6;
  }
  
  /* Font weights for better readability */
  .font-display {
    font-weight: 700;
  }
  
  /* Line height improvements */
  p, li, dd {
    line-height: 1.6;
  }
  
  /* Heading line heights */
  h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
  }
}

@media (min-width: 641px) and (max-width: 1023px) {
  /* Medium screens */
  .text-2xl {
    font-size: 1.5rem;
    line-height: 1.4;
  }
  
  .text-3xl {
    font-size: 1.875rem;
    line-height: 1.3;
  }
  
  .text-4xl {
    font-size: 2.25rem;
    line-height: 1.3;
  }
  
  .text-sm {
    font-size: 0.9rem;
    line-height: 1.5;
  }
  
  .text-base {
    font-size: 1rem;
    line-height: 1.6;
  }
}

@media (min-width: 1024px) {
  /* Large screens */
  .text-2xl {
    font-size: 1.5rem;
    line-height: 1.4;
  }
  
  .text-3xl {
    font-size: 1.875rem;
    line-height: 1.3;
  }
  
  .text-4xl {
    font-size: 2.25rem;
    line-height: 1.3;
  }
}

/* ===== IMPROVED READABILITY ===== */

body {
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Better contrast for text */
.text-steel {
  color: #4B5563;
}

/* Improved letter spacing for headings */
.font-display {
  letter-spacing: -0.02em;
}

/* Better spacing between paragraphs */
p {
  margin-bottom: 1rem;
}

/* List improvements */
ul, ol {
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

/* ===== ACCESSIBLE TYPOGRAPHY ===== */
/* NOTE: Removed broken rule that forced display:inline-flex on ALL a,button at ≤640px.
   This was breaking paragraph links, footer links, nav items, and card layouts.
   Touch targets are now handled more precisely via responsive.css. */

@media (max-width: 640px) {
  /* Minimum font size for readability */
  body {
    font-size: max(14px, 1rem);
  }
  
  /* Focus states for accessibility */
  a:focus, button:focus, input:focus, textarea:focus {
    outline: 2px solid #10B981;
    outline-offset: 2px;
  }
}

/* ===== IMAGE RESPONSIVENESS ===== */

@media (max-width: 640px) {
  /* Hero image */
  .w-full.h-\[450px\] {
    height: 250px;
  }
  
  /* Service images */
  .h-56 {
    height: 200px;
  }
  
  /* Product images */
  .aspect-square {
    min-height: 180px;
  }
}

@media (min-width: 641px) and (max-width: 1023px) {
  /* Hero image */
  .w-full.h-\[450px\] {
    height: 350px;
  }
  
  /* Service images */
  .h-56 {
    height: 220px;
  }
  
  /* Product details grid on tablet */
  .grid-cols-1.md\:grid-cols-2.lg\:grid-cols-3 {
    grid-template-columns: 1fr;
  }
  
  .lg\:col-span-2 {
    grid-column: span 1;
  }
}

/* ===== SPACING OPTIMIZATION ===== */

@media (max-width: 640px) {
  /* Reduce padding on mobile */
  .p-6 {
    padding: 1rem;
  }
  
  .p-8 {
    padding: 1.25rem;
  }
  
  .py-8 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }
  
  .px-8 {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  
  .gap-8 {
    gap: 1rem;
  }
  
  .gap-6 {
    gap: 1rem;
  }
  
  .gap-12 {
    gap: 1.5rem;
  }
  
  .mb-6 {
    margin-bottom: 1rem;
  }
  
  .mt-20 {
    margin-top: 2rem;
  }
}

@media (min-width: 641px) and (max-width: 1023px) {
  /* Medium spacing */
  .gap-8 {
    gap: 1.5rem;
  }
  
  .gap-12 {
    gap: 2rem;
  }
}

/* ===== MODAL RESPONSIVENESS ===== */

@media (max-width: 640px) {
  /* Full-screen modals on mobile */
  #inquiry-modal .relative {
    max-height: 100vh;
    overflow-y: auto;
  }
  
  #model-modal .relative {
    max-height: 100vh;
    overflow-y: auto;
  }
  
  /* Modal content */
  #inquiry-modal .bg-white {
    border-radius: 0.5rem;
  }
  
  #model-modal .bg-white {
    border-radius: 0.5rem;
  }
  
  /* Model modal specific */
  #model-modal .p-4,
  #model-modal .p-6,
  #model-modal .p-8 {
    padding: 1rem;
  }
  
  #model-modal .gap-8 {
    gap: 1rem;
  }
  
  #model-modal .grid {
    grid-template-columns: 1fr;
  }
  
  #model-modal .px-8 {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  #model-modal .py-5 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }
  
  /* Modal image */
  #model-modal .aspect-square {
    min-height: 200px;
  }
  
  /* Modal buttons */
  #model-modal button {
    min-height: 44px;
  }
}

@media (min-width: 641px) and (max-width: 1023px) {
  /* Tablet modal adjustments */
  #model-modal .max-w-4xl {
    max-width: 95%;
  }
  
  #model-modal .p-8 {
    padding: 1.5rem;
  }
  
  #model-modal .gap-8 {
    gap: 1.5rem;
  }
}

/* ===== FOOTER RESPONSIVENESS ===== */

@media (max-width: 640px) {
  /* Stack footer columns */
  .grid-cols-1.md\:grid-cols-12 {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .md\:col-span-3 {
    grid-column: span 1;
  }
  
  .md\:col-span-4 {
    grid-column: span 1;
  }
  
  .md\:col-span-5 {
    grid-column: span 1;
  }
}

@media (min-width: 641px) and (max-width: 1023px) {
  /* Two-column footer on tablet */
  .grid-cols-1.md\:grid-cols-12 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .md\:col-span-3 {
    grid-column: span 1;
  }
  
  .md\:col-span-4 {
    grid-column: span 1;
  }
  
  .md\:col-span-5 {
    grid-column: span 2;
  }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  
  .animate-slide-up,
  .animate-scale-in {
    animation: none;
  }
}

/* ===== PERFORMANCE OPTIMIZATION ===== */

@media (max-width: 767px) {
  /* Disable background-attachment fixed on mobile for performance */
  body {
    background-attachment: scroll;
  }
  
  body::before {
    background-attachment: scroll;
  }
}

/* ===== SAFE AREA FOR NOTCHED DEVICES ===== */

@supports (padding: max(0px)) {
  .safe-area-bottom {
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }
  
  .safe-area-top {
    padding-top: max(1rem, env(safe-area-inset-top));
  }
}

/* ===== LANDSCAPE MOBILE ===== */

@media (max-height: 500px) and (orientation: landscape) {
  /* Adjust for landscape mobile */
  #mobile-menu {
    max-height: 100vh;
    overflow-y: auto;
  }
  
  .aspect-square {
    min-height: 150px;
  }
  
  .h-24 {
    height: 4rem;
  }
}

/* Responsive — slightly smaller watermark tile on mobile */
@media (max-width: 640px) {
  .watermark-bg::before {
    background-size: 360px 240px;
  }

  .horizontal-product-card {
    width: 140px;
    height: 180px;
  }

  .horizontal-product-card__image {
    height: 110px;
  }

  .horizontal-product-card__name {
    font-size: 0.9rem;
  }

  .horizontal-product-card__category {
    font-size: 0.6rem;
  }

  .horizontal-product-card__content {
    padding: 0.5rem;
  }

  .horizontal-product-card__img {
    padding: 10px;
  }

  .horizontal-product-track {
    gap: 1rem;
  }
}

@media (max-width: 1023px) {
  .premium-hero-layout {
    gap: 2rem;
  }

  .train-product-range {
    height: 200px;
  }

  .train-engine {
    width: 100px;
    height: 80px;
  }

  .train-car {
    width: 80px;
    height: 65px;
  }

  .train-car__image {
    height: 40px;
  }

  .train-car__name {
    font-size: 0.6rem;
  }

  .horizontal-product-card {
    width: 170px;
    height: 210px;
  }

  .horizontal-product-card__image {
    height: 140px;
  }

  .horizontal-product-card__name {
    font-size: 1rem;
  }

  .horizontal-product-card__category {
    font-size: 0.65rem;
  }

  .horizontal-product-track {
    gap: 1.25rem;
  }

  .horizontal-product-card__content {
    padding: 0.65rem;
  }

  .horizontal-product-card__img {
    padding: 14px;
  }
}

@keyframes heroProductScrollHorizontal {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* Smooth Fade and Slide Animations */
.animate-fade-in {
  animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-slide-up {
  animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

/* Transition Helpers */
.transition-all-custom {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile Menu Transitions - Removed conflicting styles */
/* Mobile menu now uses fixed positioning from media query below */

/* Horizontal Product Scroller - Premium Animation */
.horizontal-product-scroller {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  background: transparent;
  overflow: visible;
  animation: scrollerFadeIn 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.horizontal-product-scroller__header {
  position: relative;
  z-index: 10;
  padding: 0;
  background: transparent;
  border-bottom: none;
  display: none;
}

.horizontal-product-scroller__title {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.horizontal-product-scroller__title-text {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #10b981;
  text-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

.horizontal-product-scroller__title-accent {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.9), 0 0 30px rgba(16, 185, 129, 0.5);
  animation: titlePulse 2s ease-in-out infinite;
}

.horizontal-product-scroller__indicator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.horizontal-product-scroller__pulse {
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  animation: livePulse 1.5s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.8);
}

.horizontal-product-scroller__status {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.7);
}

.horizontal-scroller-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 0.5rem 0;
  background: transparent;
}

.horizontal-product-track {
  display: flex;
  gap: 1.5rem;
  padding: 0 1.5rem;
  animation: scrollHorizontal 150s linear infinite;
  width: max-content;
}

.horizontal-product-track:hover {
  animation-play-state: paused;
}

.horizontal-product-card {
  position: relative;
  width: 220px;
  height: 260px;
  flex-shrink: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  box-shadow: none;
}

.horizontal-product-card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: none;
}

.horizontal-product-card__image {
  width: 100%;
  height: 170px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  border-bottom: none;
  position: relative;
}

.horizontal-product-card__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
  transition: transform 0.5s ease;
}

.horizontal-product-card:hover .horizontal-product-card__img {
  transform: scale(1.1);
}

.horizontal-product-card__content {
  padding: 0.75rem;
  text-align: center;
  background: transparent;
}

.horizontal-product-card__name {
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 0.3rem;
}

.horizontal-product-card__category {
  font-size: 0.75rem;
  color: rgba(16, 185, 129, 0.7);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.horizontal-product-card__badge {
  display: none;
}

/* Fade gradients on edges for smooth visual effect - REMOVED FOR CLEAN LOOK */
.horizontal-scroller-container::before,
.horizontal-scroller-container::after {
  display: none;
}

@keyframes scrollHorizontal {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
  .horizontal-product-card {
    width: 110px;
    height: 150px;
  }

  .horizontal-product-card__image {
    height: 85px;
  }

  .horizontal-product-card__name {
    font-size: 0.6rem;
  }

  .horizontal-product-card__category {
    font-size: 0.55rem;
  }

  .horizontal-product-scroller__title-text {
    font-size: 0.75rem;
  }
}

/* Product Details Enhancements */
.product-details-section {
  margin-bottom: 1.5rem;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  overflow: hidden;
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
}

.product-details-section:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  transform: translateY(-1px);
}

.product-details-section h2 {
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #E5E7EB;
  background: linear-gradient(135deg, #0B1C2D 0%, #132438 100%);
  color: white;
  margin: 0;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.product-details-section h2::before {
  content: '';
  width: 4px;
  height: 22px;
  background: #10B981;
  border-radius: 2px;
}

.product-details-section ul,
.product-details-section dl {
  margin: 0;
  padding: 0;
}

.product-details-section li {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1.125rem 1.5rem;
  border-bottom: 1px solid #E5E7EB;
  font-size: 0.9375rem;
  color: #0B1C2D;
  transition: background-color 0.2s ease;
  line-height: 1.6;
}

.product-details-section li:hover {
  background-color: #F8FAFC;
}

.product-details-section li:last-child {
  border-bottom: none;
}

.product-details-section dt {
  color: #6B7280;
  font-size: 0.875rem;
  font-weight: 500;
  flex: 1;
}

.product-details-section dd {
  color: #0B1C2D;
  font-weight: 600;
  font-size: 0.9375rem;
  flex: 1;
  text-align: right;
}

.product-details-section .spec-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.125rem;
  padding: 1.125rem 1.5rem;
  border-bottom: 1px solid #E5E7EB;
  transition: background-color 0.2s ease;
  align-items: center;
}

.product-details-section .spec-row:hover {
  background-color: #F8FAFC;
}

.product-details-section .spec-row:last-child {
  border-bottom: none;
}

/* Product Header Card */
.bg-white.rounded-xl.shadow-lg.border.border-line {
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Availability Section Enhancement */
.product-details-section dl {
  padding: 1.25rem 1.5rem;
}

.product-details-section .spec-row {
  background: #F8FAFC;
  border-radius: 4px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  border: none;
}

.product-details-section .spec-row:last-child {
  margin-bottom: 0;
}

/* Feature List Icons */
.product-details-section li svg {
  flex-shrink: 0;
  color: #10B981;
  width: 1.25rem;
  height: 1.25rem;
}

/* Product Details Container */
#product-details-container {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

/* Grid Spacing */
.grid.gap-6 {
  gap: 1.5rem;
}

.grid.gap-8 {
  gap: 2rem;
}

.grid.gap-12 {
  gap: 3rem;
}

/* Space Between Sections */
.space-y-6 > * + * {
  margin-top: 1.5rem;
}

.space-y-6 > * {
  margin-top: 0;
}

.product-details-section .grid-cols-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #E5E7EB;
  transition: background-color 0.2s ease;
}

.product-details-section .grid-cols-2:hover {
  background-color: #F8FAFC;
}

.product-details-section .grid-cols-2:last-child {
  border-bottom: none;
}

.product-details-section .grid-cols-2 dt {
  text-align: left;
}

.product-details-section .grid-cols-2 dd {
  text-align: right;
}

/* Compatible Models Section */
#detail-compatible-models {
  background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
  border-radius: 8px;
}

#detail-compatible-models .grid {
  gap: 0.75rem;
}

#detail-compatible-models .bg-paper {
  background: white;
  border: 1px solid #E5E7EB;
  transition: all 0.3s ease;
}

#detail-compatible-models .bg-paper:hover {
  border-color: #10B981;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
  transform: translateY(-2px);
}

#detail-compatible-models .bg-paper svg {
  transition: all 0.3s ease;
}

#detail-compatible-models .bg-paper:hover svg {
  transform: scale(1.1);
  color: #059669;
}

/* Responsive adjustments for compatible models */
@media (max-width: 640px) {
  #detail-compatible-models .grid {
    grid-template-columns: 1fr;
  }
  
  #detail-compatible-models .bg-paper {
    padding: 0.75rem;
  }
  
  #detail-compatible-models .bg-paper span {
    font-size: 0.85rem;
  }
}

@media (max-width: 768px) {
  #detail-compatible-models .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Image Gallery Styles */
.product-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-top: 1rem;
}

.product-gallery-item {
  aspect-ratio: 1;
  border: 2px solid #E5E7EB;
  overflow: hidden;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 8px;
}

.product-gallery-item:hover {
  border-color: #10B981;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.product-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.5rem;
  transition: transform 0.3s ease;
}

.product-gallery-item:hover img {
  transform: scale(1.1);
}

/* Feature and Application Icons */
.feature-icon,
.application-icon {
  width: 1rem;
  height: 1rem;
  color: #10B981;
  flex-shrink: 0;
  margin-top: 0.125rem;
  transition: transform 0.3s ease, color 0.3s ease;
}

.product-details-section li:hover .feature-icon,
.product-details-section li:hover .application-icon {
  transform: scale(1.2);
  color: #059669;
}

/* Product Gallery styling */
.product-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-top: 1rem;
}

.product-gallery-item {
  aspect-ratio: 1;
  border: 1px solid #E5E7EB;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
  max-height: 100px;
}

.product-gallery-item:hover {
  border-color: #10B981;
  transform: scale(1.05);
}

.product-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.5rem;
  max-height: 100px;
}

/* Responsive adjustments for product details */
@media (max-width: 640px) {
  .product-details-section .spec-row,
  .product-details-section .grid-cols-2 {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .product-details-section .grid-cols-2 dt,
  .product-details-section .grid-cols-2 dd {
    text-align: left;
  }
  
  .product-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-details-section h2 {
    font-size: 1rem;
    padding: 0.75rem 1rem;
  }

  .product-details-section li,
  .product-details-section .spec-row,
  .product-details-section .grid-cols-2 {
    padding: 0.75rem 1rem;
  }

  /* NOTE: Removed broken generic .grid override — was forcing 1fr on ALL grids */
  /* Stack layout on mobile — now only applies to product-details containers */
  #product-details-container .grid:not(.grid-cols-2):not(.grid-cols-3):not(.grid-cols-4) {
    grid-template-columns: 1fr;
  }
}

/* NOTE: Removed @media(min-width:768px) .grid { grid-template-columns: 1fr } — was breaking all grids */
/* NOTE: Removed @media(min-width:1024px) .grid { repeat(2,1fr) } — was breaking all grids */

@media (max-width: 768px) {
  /* Image gallery responsive */
  .product-gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1024px) {
  .sticky {
    position: static;
  }
}

/* Inquiry Modal Styles */
#inquiry-modal {
  z-index: 1000;
}

#inquiry-modal .animate-scale-in {
  animation: scaleIn 0.3s ease-out forwards;
}

#inquiry-modal input,
#inquiry-modal textarea {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
}

#inquiry-modal input:focus,
#inquiry-modal textarea:focus {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

#inquiry-modal button[type="submit"] {
  position: relative;
  overflow: hidden;
}

#inquiry-modal button[type="submit"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

#inquiry-modal button[type="submit"]:hover::before {
  left: 100%;
}

/* Modal responsive adjustments */
@media (max-width: 640px) {
  #inquiry-modal .relative {
    padding: 1rem;
  }
  
  #inquiry-modal .max-w-lg {
    max-width: 100%;
  }
  
  #inquiry-modal .px-6 {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  #inquiry-modal .py-5 {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
}

/* Ensure full width utilization on all screens */
#product-details-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* NOTE: Removed generic .grid { gap: 2rem } — was overriding all Tailwind gap utilities */
/* Gap values are now set per-component using Tailwind classes */
#product-details-container .grid {
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  #product-details-container .grid {
    gap: 2rem;
  }
}

/* Force proper grid column behavior */
@media (min-width: 1024px) {
  .lg\:col-span-5 {
    grid-column: span 5 / span 5;
  }
  .lg\:col-span-7 {
    grid-column: span 7 / span 7;
  }

  .lg\:grid-cols-12 {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
}

/* Ensure sticky positioning works */
@media (min-width: 1024px) {
  .sticky {
    position: sticky;
  }
  .top-32 {
    top: 8rem;
  }
}

/* Enhanced Animations */
@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.animate-slide-left {
  animation: slideInFromLeft 0.6s ease-out forwards;
}

.animate-slide-right {
  animation: slideInFromRight 0.6s ease-out forwards;
}

.animate-scale-in {
  animation: scaleIn 0.5s ease-out forwards;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

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

/* Enhanced hover effects */
.product-details-section li {
  cursor: default;
}

.product-details-section .grid-cols-2 {
  cursor: default;
}

/* Fix product image sizing and visibility */
.aspect-square {
  max-height: 500px !important;
  width: 100% !important;
  object-fit: contain !important;
}

#product-image {
  max-width: 100% !important;
  max-height: 500px !important;
  object-fit: contain !important;
  padding: 1.5rem !important;
  display: block !important;
}

/* Ensure image container doesn't overflow */
.image-protected-container {
  max-height: 500px !important;
  overflow: hidden !important;
}

/* Fix homepage product card images */
.homepage-product-card .aspect-square {
  max-height: 250px !important;
}

.homepage-product-card img {
  max-height: 250px !important;
  object-fit: contain !important;
}

/* Fix modal images */
#modal-model-image {
  max-height: 300px !important;
  object-fit: contain !important;
}

/* Ensure all images with object-fit work properly */
img {
  max-width: 100%;
  height: auto;
}

img.object-contain {
  object-fit: contain !important;
}

img.object-cover {
  object-fit: cover !important;
}

/* Staggered animation delays */
.animate-stagger-1 { animation-delay: 0.1s; }
.animate-stagger-2 { animation-delay: 0.2s; }
.animate-stagger-3 { animation-delay: 0.3s; }
.animate-stagger-4 { animation-delay: 0.4s; }
.animate-stagger-5 { animation-delay: 0.5s; }

/* Image Zoom Modal Styles */
#image-zoom-modal {
  z-index: 9999 !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
}

#image-zoom-modal.hidden {
  display: none !important;
}

#image-zoom-modal:not(.hidden) {
  display: flex !important;
}

#image-zoom-modal .animate-modal-in {
  animation: modalSlideIn 0.3s ease-out;
}

#image-zoom-modal > div {
  max-width: 90vw;
  max-height: 90vh;
  margin: auto;
}

#zoom-image {
  transition: transform 0.15s ease;
  max-width: 100%;
  max-height: 65vh;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  cursor: grab;
}

#zoom-image.grabbing {
  cursor: grabbing !important;
  transition: none !important;
}

/* Zoom controls styling */
#zoom-level {
  font-variant-numeric: tabular-nums;
}

/* Image hover effects in 4-view gallery */
.fan-modal-image-panel .aspect-square {
  overflow: hidden;
  cursor: pointer;
}

.fan-modal-image-panel .aspect-square img {
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fan-modal-image-panel .aspect-square:hover img {
  transform: scale(1.08);
}

/* Impressive button effect */
.request-quote-btn {
  position: relative;
  overflow: hidden;
}

.request-quote-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.request-quote-btn:hover::before {
  left: 100%;
}

/* Price highlight effect */
.price-highlight {
  position: relative;
  display: inline-block;
}

.price-highlight::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #10B981;
  transition: width 0.3s ease;
}

.price-highlight:hover::after {
  width: 100%;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  body::before,
  body::after,
  .watermark-bg::before,
  .watermark-bg::after {
    animation: none !important;
  }
  .watermark-bg::before {
    animation: none !important;
  }
  .horizontal-product-track {
    animation: none !important;
  }
}

/* Model Details Modal Styles */
#model-modal {
  z-index: 1001;
  overflow: visible;
}

#model-modal > div {
  overflow: visible;
}

#model-modal .animate-modal-in {
  animation: modalSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#model-modal input,
#model-modal textarea {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
}

#model-modal input:focus,
#model-modal textarea:focus {
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

/* Custom scrollbar for modal */
#model-modal .overflow-y-auto {
  scrollbar-width: thin;
  scrollbar-color: #10B981 #E5E7EB;
}

#model-modal .overflow-y-auto::-webkit-scrollbar {
  width: 8px;
}

#model-modal .overflow-y-auto::-webkit-scrollbar-track {
  background: #E5E7EB;
  border-radius: 4px;
}

#model-modal .overflow-y-auto::-webkit-scrollbar-thumb {
  background: #10B981;
  border-radius: 4px;
}

#model-modal .overflow-y-auto::-webkit-scrollbar-thumb:hover {
  background: #059669;
}

/* Clean modal animation */
@keyframes modalSlideIn {
  0% {
    opacity: 0;
    transform: scale(0.97) translateY(15px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Modal backdrop animation */
#model-modal > div:first-child {
  animation: backdropFadeIn 0.3s ease-out forwards;
}

@keyframes backdropFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Model card clickable styling */
#detail-compatible-models .bg-paper {
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

#detail-compatible-models .bg-paper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

#detail-compatible-models .bg-paper:hover::after {
  opacity: 1;
}

#detail-compatible-models .bg-paper::before {
  content: 'View Details';
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%) translateX(15px);
  font-size: 0.6rem;
  font-weight: 600;
  color: #10B981;
  opacity: 0;
  transition: all 0.2s ease;
  white-space: nowrap;
}

#detail-compatible-models .bg-paper:hover::before {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

#detail-compatible-models .bg-paper:hover span {
  padding-right: 2.5rem;
}

/* Modal responsive adjustments */
@media (max-width: 1024px) {
  #model-modal .grid {
    grid-template-columns: 1fr;
  }
  
  #model-modal .max-w-4xl {
    max-width: 100%;
  }
  
  #model-modal .p-8 {
    padding: 1.5rem;
  }
  
  #model-modal .gap-8 {
    gap: 1.5rem;
  }
  
  #model-modal .max-h-\[90vh\] {
    max-height: 95vh;
  }
}

@media (max-width: 640px) {
  #model-modal .relative {
    padding: 1rem;
  }
  
  #model-modal .p-8 {
    padding: 1rem;
  }
  
  #model-modal .px-8 {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  #model-modal .py-5 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }
  
  #model-modal .mb-6 {
    margin-bottom: 1rem;
  }
  
  #model-modal .space-y-3 > * + * {
    margin-top: 0.5rem;
  }
  
  #model-modal .space-y-6 > * + * {
    margin-top: 1rem;
  }
  
  #model-modal .text-xl {
    font-size: 1.125rem;
  }
  
  #model-modal .text-lg {
    font-size: 0.875rem;
  }
  
  #model-modal .text-sm {
    font-size: 0.75rem;
  }
  
  #model-modal .text-base {
    font-size: 0.875rem;
  }
  
  #model-modal .aspect-square {
    aspect-ratio: 1;
  }
  
  #model-modal .max-h-\[90vh\] {
    max-height: 98vh;
  }
}

/* Modal button effects */
#model-modal button {
  position: relative;
  overflow: hidden;
}

#model-modal button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.4s ease;
}

#model-modal button:hover::before {
  left: 100%;
}

/* Success state animation */
@keyframes successPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.model-enquiry-success {
  animation: successPulse 0.3s ease-in-out;
}

/* ==========================================================================
   Categorized Fan Model Display (Drive Cooling Fan cnc-014)
   Industrial theme: Sharp 0-radius edges, white background, clean borders,
   navy headings, emerald/signal accents.
   ========================================================================== */
.fan-size-categorized-wrapper {
  width: 100%;
}

.fan-size-group {
  box-shadow: 0 1px 3px rgba(11, 28, 45, 0.04);
  transition: border-color 0.2s ease;
}

.fan-size-group:hover {
  border-color: #CBD5E1;
}

.fan-size-group-header {
  letter-spacing: 0.02em;
}

.fan-model-card {
  position: relative;
  background-color: #FFFFFF;
  border: 1px solid #E5E7EB;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.fan-model-card:hover {
  border-color: #10B981;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.12);
  transform: translateY(-2px);
  background-color: #FAFAFA;
}

.fan-model-card .bg-signal\/10 {
  background-color: rgba(16, 185, 129, 0.08);
}

@media (max-width: 640px) {
  .fan-size-group-header {
    padding: 0.75rem 0.875rem;
  }
  .fan-model-card {
    padding: 0.75rem;
  }
}

/* Fan Tech Specs Table & Insights */
.fan-size-group table {
  border-collapse: collapse;
}

.fan-size-group table td {
  border-color: #E5E7EB;
}

.fan-size-group table tr:hover td {
  background-color: #F8FAFC;
}

/* =========================================================
   FAN MODAL — Image Panel & Spec Rows
   ========================================================= */

.fan-modal-image-panel {
  min-height: 340px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.75rem;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Allow the zoom result panel to escape the image-protected-container inside the fan panel */
.fan-modal-image-panel .image-protected-container {
  overflow: visible !important;
  position: relative;
}

/* Spin the fan SVG on hover */
#modal-image-container:hover .fan-modal-image-panel > div:first-child svg {
  animation: fan-spin 1.4s ease-in-out;
}

@keyframes fan-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Fan spec rows inside the modal */
.fan-spec-row {
  transition: background 0.15s ease;
}

.fan-spec-row:hover {
  background-color: rgba(16, 185, 129, 0.05);
}

/* =========================================================
   FAN MODAL — 4-View Gallery & Interactive Magnifier Zoom
   ========================================================= */

.fan-modal-gallery-container {
  width: 100%;
  overflow: visible;
  position: relative;
}

.fan-mode-tab {
  cursor: pointer;
  border-radius: 4px;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.fan-mode-tab.active {
  background-color: #0B1C2D !important;
  color: #FFFFFF !important;
  box-shadow: 0 1px 3px rgba(11, 28, 45, 0.15);
}

.fan-mode-tab.active svg {
  color: #10B981 !important;
}

.fan-thumb-btn {
  border-radius: 6px;
  cursor: pointer;
  outline: none;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.fan-thumb-btn.active {
  border-color: #10B981 !important;
  background-color: rgba(16, 185, 129, 0.08) !important;
  box-shadow: 0 0 0 1.5px #10B981;
}

.fan-quad-zoom-cell {
  position: relative;
  border-radius: 6px;
  cursor: pointer;
  overflow: visible;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.fan-quad-zoom-cell:hover {
  border-color: #10B981 !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

#modal-fan-zoom-container {
  cursor: pointer;
}

#modal-fan-zoom-container .product-zoom-lens {
  z-index: 30;
}



/* =============================================
   PRODUCT IMAGE ZOOMER (Amazon Magnifier Style)
   ============================================= */

/* Zoom Container */
.product-zoom-container {
  position: relative;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

/* Semi-Transparent Square Lens Overlay */
.product-zoom-lens {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  box-sizing: border-box;
  border-radius: 0 !important;
  background-color: rgba(16, 185, 129, 0.22); /* Signal green accent, 22% opacity */
  border: 1.5px solid #10B981;
  background-image: radial-gradient(circle, rgba(16, 185, 129, 0.35) 1px, transparent 1px);
  background-size: 6px 6px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.18s;
  z-index: 25;
  will-change: transform;
}

.product-zoom-lens.is-active {
  opacity: 1;
  visibility: visible;
}

/* Zoom Preview Panel */
.product-zoom-preview {
  position: fixed;
  background-color: #ffffff;
  background-repeat: no-repeat;
  border: 1px solid #CBD5E1;
  border-radius: 0 !important;
  box-shadow: 0 16px 40px -8px rgba(11, 28, 45, 0.22), 0 0 0 1px rgba(11, 28, 45, 0.06);
  pointer-events: none;
  overflow: hidden;
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.96);
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.2s;
  will-change: transform, opacity;
}

.product-zoom-preview.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

/* Preview Header Indicator */
.product-zoom-preview-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: #0B1C2D;
  color: #10B981;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(16, 185, 129, 0.3);
  z-index: 2;
  pointer-events: none;
  text-transform: uppercase;
}

.product-zoom-preview-header .zoom-badge-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #10B981;
}

/* Mobile & Touch Responsive Fallback */
@media (max-width: 767px) {
  .product-zoom-lens {
    border-width: 1px;
    background-color: rgba(16, 185, 129, 0.28);
  }
}


/* ============================================================
   CIM IMAGE GALLERY — 2×2 QUADRANT GRID
   CSS quadrant splitting: each cell clips & shows one quarter
   of the combined 2×2 product image.
   ============================================================ */

.cim-quad-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
  background: #E5E7EB;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid #E5E7EB;
}

.cim-quad-cell {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  cursor: pointer;
  transition: outline 0.15s ease;
  outline: 2px solid transparent;
  outline-offset: -2px;
}

.cim-quad-cell:hover {
  outline-color: #10B981;
  z-index: 2;
}

/* The clip container — exactly half the grid cell width & height */
.cim-quad-clip {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* The image inside: rendered at 200% size, then offset per quadrant */
.cim-quad-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 200%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  display: block;
  transition: transform 0.3s ease;
}

.cim-quad-cell:hover .cim-quad-img {
  transform: translate(var(--tx, 0%), var(--ty, 0%)) scale(1.04) !important;
}

/* View label ribbon at bottom of each cell */
.cim-quad-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(11,28,45,0.92) 0%, rgba(11,28,45,0.6) 60%, transparent 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 16px 8px 7px 8px;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  pointer-events: none;
}

.cim-quad-label__icon {
  width: 11px;
  height: 11px;
  color: #10B981;
  flex-shrink: 0;
}

/* CIM watermark overlay */
.cim-quad-watermark {
  position: absolute;
  bottom: 26px;
  right: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.38);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

/* Zoom-in hint icon (top-right) */
.cim-quad-zoom-hint {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  background: rgba(11,28,45,0.65);
  color: #10B981;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.cim-quad-cell:hover .cim-quad-zoom-hint {
  opacity: 1;
}

/* Error state */
.cim-quad-cell--error .cim-quad-clip,
.cim-quad-cell--error .cim-quad-watermark,
.cim-quad-cell--error .cim-quad-zoom-hint {
  display: none;
}

.cim-quad-error-msg {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 100%;
  color: #9CA3AF;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cim-quad-cell--error .cim-quad-error-msg {
  display: flex;
}

/* ── Gallery section header in modal ── */
.cim-gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #F4F4F4;
  border-bottom: 1px solid #E5E7EB;
  border-top: 1px solid #E5E7EB;
}

.cim-gallery-header__title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'Archivo', sans-serif;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #0B1C2D;
}

.cim-gallery-header__badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #059669;
  background: rgba(16,185,129,0.12);
  border: 1px solid rgba(16,185,129,0.3);
  padding: 2px 7px;
}

/* ============================================================
   CIM FULLSCREEN LIGHTBOX
   ============================================================ */

.cim-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99990;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
  pointer-events: none;
}

.cim-lightbox--open {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.cim-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 10, 20, 0.94);
  backdrop-filter: blur(6px);
  cursor: default;
}

.cim-lightbox__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: min(92vw, 680px);
  max-height: 95vh;
  overflow: hidden;
}

/* Header bar */
.cim-lightbox__header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #0B1C2D;
  border-bottom: 2px solid #10B981;
  flex-shrink: 0;
}

.cim-lightbox__label-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cim-lightbox__view-icon {
  width: 14px;
  height: 14px;
  color: #10B981;
  flex-shrink: 0;
}

.cim-lightbox__label {
  font-family: 'Archivo', sans-serif;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #ffffff;
}

.cim-lightbox__counter {
  font-family: ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.08em;
}

.cim-lightbox__close {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

.cim-lightbox__close:hover {
  background: rgba(239,68,68,0.25);
  color: #ffffff;
  border-color: rgba(239,68,68,0.5);
}

/* Image area */
.cim-lightbox__img-area {
  position: relative;
  width: 100%;
  background: #ffffff;
  overflow: hidden;
  flex-shrink: 0;
}

/* The img-wrap clips to show the current quadrant */
.cim-lightbox__img-wrap {
  position: relative;
  width: 100%;
  padding-top: 100%;      /* 1:1 aspect ratio */
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease;
  transform-origin: center center;
}

.cim-lightbox__img {
  position: absolute;
  top: 0;
  left: 0;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  display: block;
  transition: transform 0.3s ease;
}

/* Watermark inside lightbox */
.cim-lightbox__watermark {
  position: absolute;
  bottom: 10px;
  right: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.3);
  pointer-events: none;
  user-select: none;
  z-index: 5;
}

/* CIM logo badge (top-right of lightbox image area) */
.cim-lightbox__logo-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(11,28,45,0.78);
  border: 1px solid rgba(16,185,129,0.4);
  color: #10B981;
  font-family: 'Archivo', sans-serif;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 9px;
  z-index: 5;
  pointer-events: none;
}

/* Navigation controls */
.cim-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  width: 36px;
  height: 36px;
  background: rgba(11,28,45,0.8);
  border: 1px solid rgba(16,185,129,0.35);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.cim-lightbox__nav:hover {
  background: #10B981;
  border-color: #10B981;
}

.cim-lightbox__nav--prev {
  left: 8px;
}

.cim-lightbox__nav--next {
  right: 8px;
}

/* Footer: dot indicators + zoom hint */
.cim-lightbox__footer {
  width: 100%;
  background: #0B1C2D;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 9px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.cim-lightbox__dots {
  display: flex;
  gap: 7px;
  align-items: center;
}

.cim-lightbox__dot {
  width: 6px;
  height: 6px;
  background: rgba(255,255,255,0.25);
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.cim-lightbox__dot--active {
  background: #10B981;
  transform: scale(1.3);
}

.cim-lightbox__zoom-hint {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
}

/* ── Prevent body scroll when lightbox is open ── */
body.cim-lb-open {
  overflow: hidden;
}


/* ============================================================
   QUICK VIEW PANEL (Products Catalog)
   ============================================================ */

.cim-quick-view-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(5, 10, 20, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.cim-quick-view-overlay--open {
  opacity: 1;
  visibility: visible;
}

.cim-quick-view-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 460px;
  background: #ffffff;
  border-left: 3px solid #10B981;
  z-index: 9001;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.cim-quick-view-panel--open {
  transform: translateX(0);
}

/* QV Header */
.cim-qv-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #0B1C2D;
  border-bottom: 2px solid #10B981;
  flex-shrink: 0;
}

.cim-qv-header__title {
  font-family: 'Archivo', sans-serif;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #ffffff;
}

.cim-qv-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  transition: background 0.15s;
}

.cim-qv-close:hover {
  background: rgba(239,68,68,0.3);
  color: #ffffff;
}

/* QV Body */
.cim-qv-body {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #E5E7EB transparent;
}

.cim-qv-image-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 280px;
  background: #ffffff;
  border-bottom: 1px solid #E5E7EB;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.cim-qv-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
  transition: transform 0.35s ease;
}

.cim-qv-image-wrap:hover img {
  transform: scale(1.06);
}

.cim-qv-cat-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #0B1C2D;
  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
}

.cim-qv-content {
  padding: 18px 16px 16px;
}

.cim-qv-name {
  font-family: 'Archivo', sans-serif;
  font-size: 17px;
  font-weight: 800;
  color: #0B1C2D;
  line-height: 1.25;
  margin-bottom: 6px;
}

.cim-qv-desc {
  font-size: 12.5px;
  color: #6B7280;
  line-height: 1.6;
  margin-bottom: 14px;
}

.cim-qv-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #F3F4F6;
}

.cim-qv-price {
  font-family: 'Archivo', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #10B981;
}

.cim-qv-sku {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  color: #9CA3AF;
  background: #F4F4F4;
  padding: 3px 8px;
  border: 1px solid #E5E7EB;
}

/* QV Footer CTAs */
.cim-qv-footer {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #E5E7EB;
  background: #F9FAFB;
  flex-shrink: 0;
}

.cim-qv-cta-primary {
  flex: 1;
  padding: 11px 12px;
  background: #0B1C2D;
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}

.cim-qv-cta-primary:hover {
  background: #10B981;
  color: #ffffff;
}

.cim-qv-cta-secondary {
  padding: 11px 14px;
  background: transparent;
  color: #0B1C2D;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid #D1D5DB;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.cim-qv-cta-secondary:hover {
  border-color: #10B981;
  color: #10B981;
}

/* Product card: Quick View hover button */
.cim-quick-view-btn {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(11,28,45,0.92);
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 9px 0;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  border: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.15s;
  z-index: 10;
}

.cim-quick-view-btn:hover {
  background: #10B981;
}

/* Show Quick View button on parent hover */
.group:hover .cim-quick-view-btn,
a:hover .cim-quick-view-btn {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   RESPONSIVE ADJUSTMENTS FOR NEW COMPONENTS
   ============================================================ */

@media (max-width: 640px) {
  .cim-quad-grid {
    aspect-ratio: auto;
  }

  .cim-quad-cell {
    min-height: 120px;
  }

  .cim-quad-label {
    font-size: 9px;
    padding: 12px 6px 5px 6px;
  }

  .cim-lightbox__panel {
    max-width: 100vw;
    max-height: 100dvh;
  }

  .cim-quick-view-panel {
    max-width: 100vw;
    border-left-width: 2px;
  }

  .cim-tab-btn {
    padding: 8px 10px;
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  .cim-qv-footer {
    flex-direction: column;
  }

  .cim-qv-cta-secondary {
    width: 100%;
    justify-content: center;
  }
}

/* ============================================
   STANDARDIZED RESPONSIVE BREAKPOINTS
   ============================================ */

/* Mobile First (Default) - 0 to 480px */
@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  .max-w-content {
    padding: 0 1rem;
  }

  /* Mobile Navigation - Fixed Drawer */
  #mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    transition: right 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
  }

  #mobile-menu.open {
    right: 0;
  }

  #mobile-menu-btn {
    z-index: 1001;
  }

  #mobile-menu-close {
    display: block;
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #0B1C2D;
  }

  /* Hero Section */
  .hero-section {
    padding: 3rem 1rem;
  }

  .hero-title {
    font-size: 1.75rem;
    line-height: 1.2;
  }

  /* Product Cards */
  .product-card {
    width: 100%;
  }

  /* Buttons */
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
  }

  /* NOTE: Removed generic .grid-cols-3 and .grid-cols-4 overrides
     which broke 4-column galleries, angle selectors, and specs on mobile */

  /* Typography */
  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }
}

/* Tablet - 481px to 768px */
@media (min-width: 481px) and (max-width: 768px) {
  html {
    font-size: 15px;
  }

  .max-w-content {
    padding: 0 1.5rem;
  }

  /* NOTE: Removed generic .grid-cols-3 and .grid-cols-4 overrides */

  /* Hero Section */
  .hero-title {
    font-size: 2.25rem;
  }

  /* Product Cards */
  .product-card {
    width: calc(50% - 0.75rem);
  }

  /* Navigation */
  #mobile-menu {
    width: 70%;
    max-width: 350px;
  }
}

/* Small Laptop - 769px to 1024px */
@media (min-width: 769px) and (max-width: 1024px) {
  html {
    font-size: 15px;
  }

  .max-w-content {
    padding: 0 2rem;
  }

  /* NOTE: Removed generic .grid-cols-4 override */

  /* Hero Section */
  .hero-title {
    font-size: 2.5rem;
  }

  /* Navigation - Hide mobile menu on tablet */
  #mobile-menu {
    display: none;
  }
}

/* Desktop - 1025px to 1440px */
@media (min-width: 1025px) and (max-width: 1440px) {
  html {
    font-size: 16px;
  }

  .max-w-content {
    padding: 0 2.5rem;
  }

  /* Hero Section */
  .hero-title {
    font-size: 3rem;
  }
}

/* Large Desktop - 1441px+ */
@media (min-width: 1441px) {
  html {
    font-size: 16px;
  }

  .max-w-content {
    padding: 0 3rem;
  }

  /* Hero Section */
  .hero-title {
    font-size: 3.5rem;
  }
}

/* Landscape Mobile Optimization */
@media (max-height: 500px) and (orientation: landscape) {
  #mobile-menu {
    max-height: 100vh;
    overflow-y: auto;
  }

  .hero-section {
    padding: 2rem 1rem;
  }

  .hero-title {
    font-size: 1.5rem;
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  .hover\:scale-105:hover {
    transform: none;
  }

  .nav-indicator {
    display: none !important;
  }
}

/* Global Search Bar Styles */
.global-search-input {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.global-search-input::placeholder {
  color: #6B7280;
  font-weight: 400;
}

.global-search-input:focus {
  background: white;
  border-color: #10B981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
  outline: none;
  transform: translateY(-1px);
}

.global-search-input:hover {
  border-color: #D1D5DB;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

#global-clear-search {
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  padding: 2px;
  margin-right: 2px;
}

#global-clear-search:hover {
  color: #10B981;
  background: rgba(16, 185, 129, 0.1);
  transform: scale(1.1);
}

#global-clear-search:active {
  transform: scale(0.95);
}

/* Search icon animation in global search */
.global-search-input:focus ~ .absolute svg {
  color: #10B981;
  transform: scale(1.1);
  transition: all 0.3s ease;
}

/* Search focus enhancement */
.search-focused .global-search-input {
  border-color: #10B981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

/* Premium Search Bar Styles */
#search-input {
  background: linear-gradient(135deg, rgba(19, 36, 56, 0.9) 0%, rgba(11, 28, 45, 0.95) 100%);
  border: 2px solid rgba(255, 255, 255, 0.15);
  color: white;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

#search-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
}

#search-input:focus {
  background: linear-gradient(135deg, rgba(19, 36, 56, 1) 0%, rgba(11, 28, 45, 1) 100%);
  border-color: #10B981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2), 0 8px 16px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  outline: none;
  transform: translateY(-1px);
}

#search-input:hover {
  border-color: rgba(16, 185, 129, 0.5);
  background: linear-gradient(135deg, rgba(19, 36, 56, 0.95) 0%, rgba(11, 28, 45, 0.98) 100%);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

#clear-search-btn {
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  padding: 4px;
  margin-right: 4px;
}

#clear-search-btn:hover {
  color: #10B981;
  background: rgba(16, 185, 129, 0.15);
  transform: scale(1.1);
}

#clear-search-btn:active {
  transform: scale(0.95);
}

/* Search icon animation */
#search-input:focus ~ .absolute svg {
  color: #10B981;
  transform: scale(1.1);
  transition: all 0.3s ease;
}

/* Filter panel enhanced styling */
#filter-panel {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: box-shadow 0.3s ease, border-color 0.3s ease, border-width 0.3s ease;
  backdrop-filter: blur(10px);
  background: linear-gradient(135deg, #0B1C2D 0%, #132438 100%);
}

#filter-panel.scrolled {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  border-bottom-color: #10B981;
  border-bottom-width: 3px;
  backdrop-filter: blur(15px);
}

/* Brand buttons enhanced styling */
.brand-btn {
  transition: all 0.2s ease;
  border-radius: 6px;
}

.brand-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.brand-btn.active {
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Category buttons enhanced styling */
.category-btn {
  transition: all 0.2s ease;
  border-radius: 6px;
}

.category-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.category-btn.active {
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Responsive adjustments for filter panel */
@media (max-width: 480px) {
  #filter-panel .p-3 {
    padding: 0.75rem 1rem;
  }
  
  #filter-panel .p-4 {
    padding: 0.75rem 1rem;
  }
  
  #filter-panel .flex-col {
    gap: 0.75rem;
  }
  
  #filter-panel input[type="text"] {
    font-size: 0.8125rem;
    padding: 0.625rem 0.75rem 0.625rem 2.5rem;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  #filter-panel .p-3 {
    padding: 0.75rem 1.5rem;
  }
  
  #filter-panel .p-4 {
    padding: 0.75rem 1.5rem;
  }
}
