/* KOSMO+ Modern Redesign - AppMarket Style */

/* ==========================================
   THEME VARIABLES - Modern Color System
   ========================================== */

:root {
  /* Light Theme - Modern Clean Aesthetic */
  --background: #FFFFFF;
  --surface: #F8F9FA;
  --surface-elevated: #FFFFFF;
  --foreground: #0A0E27;
  --foreground-secondary: #4F5665;
  --foreground-tertiary: #AFB5C0;
  
  /* Primary Brand Colors - Vibrant Blue */
  --primary: #5956E9;
  --primary-hover: #4845D2;
  --primary-light: #E8E7FC;
  --primary-gradient-start: #6C63FF;
  --primary-gradient-end: #5956E9;
  
  /* Accent Colors */
  --accent: #FF6B9D;
  --accent-light: #FFE5EF;
  --success: #06D6A0;
  --success-light: #D4F8F0;
  --warning: #FFB800;
  --warning-light: #FFF7E0;
  --error: #FF4757;
  --error-light: #FFE8EB;
  
  /* Borders & Shadows */
  --border: #E5E9F2;
  --border-dark: #D0D7E2;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.12);

  /* Gradients */
  --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-primary: linear-gradient(135deg, var(--primary-gradient-start) 0%, var(--primary-gradient-end) 100%);
  --gradient-accent: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-mesh: radial-gradient(at 40% 20%, #6C63FF 0px, transparent 50%),
                   radial-gradient(at 80% 0%, #FF6B9D 0px, transparent 50%),
                   radial-gradient(at 0% 50%, #06D6A0 0px, transparent 50%);
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Spacing */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
}

.dark {
  /* Dark Theme - Modern Dark Aesthetic */
  --background: #0A0E27;
  --surface: #13172E;
  --surface-elevated: #1C2139;
  --foreground: #F8F9FA;
  --foreground-secondary: #B5BACA;
  --foreground-tertiary: #6B7280;
  
  /* Primary Brand Colors - Enhanced for Dark Mode */
  --primary: #7C73FF;
  --primary-hover: #9990FF;
  --primary-light: #1E1B3A;
  
  /* Borders & Shadows */
  --border: #1F2541;
  --border-dark: #2A3150;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

/* ==========================================
   BASE STYLES
   ========================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-y: auto;
  width: 100%;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--foreground);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  overflow-y: auto;
  transition: background-color 0.3s ease, color 0.3s ease;
  width: 100%;
  max-width: 100vw;
  position: relative;
}

/* Prevent horizontal scroll on all elements */
*,
*::before,
*::after {
  box-sizing: border-box;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

::selection {
  background-color: var(--primary-light);
  color: var(--primary);
}

/* ==========================================
   TYPOGRAPHY SYSTEM
   ========================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--foreground);
  margin-bottom: 0.5em;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
}

/* Desktop line break for hero title */
.desktop-break {
  display: inline;
}

@media (max-width: 768px) {
  .desktop-break {
    display: none;
  }
}

h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
  font-size: 1.5rem;
}

h5 {
  font-size: 1.25rem;
}

h6 {
  font-size: 1.125rem;
}

p {
  margin-bottom: 1em;
  color: var(--foreground-secondary);
  line-height: 1.7;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

a:hover {
  color: var(--primary-hover);
}

button, input, select, textarea {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* ==========================================
   HEADER - Modern Floating Design
   ========================================== */

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

.dark header {
  background: rgba(10, 14, 39, 0.8);
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@media (max-width: 768px) {
  .header-container {
    padding: 0.75rem 1rem;
  }
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.logo:hover {
  opacity: 0.8;
}

@media (max-width: 768px) {
  .logo {
    font-size: 1.25rem;
  }
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-menu a {
  color: var(--foreground-secondary);
  font-weight: 500;
  font-size: 0.9375rem;
  position: relative;
  padding: 0.5rem 0;
  transition: color 0.2s ease;
}

.nav-menu a:hover {
  color: var(--foreground);
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width 0.3s ease;
}

.nav-menu a:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

@media (max-width: 768px) {
  .nav-actions {
    gap: 0.5rem;
  }
}

.header-contact-btn {
  display: none;
}

@media (min-width: 1024px) {
  .header-contact-btn {
    display: inline-flex;
  }
}

/* Hide text on mobile, show only icon */
@media (max-width: 768px) {
  .header-contact-btn span {
    display: none;
  }
  
  .header-contact-btn {
    padding: 0.625rem;
    min-width: auto;
  }
}

/* ==========================================
   BUTTONS - Modern Design System
   ========================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  max-width: 100%;
}

@media (max-width: 768px) {
  .btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    gap: 0.375rem;
  }
  
  .btn svg,
  .btn i {
    width: 18px;
    height: 18px;
  }
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.btn:hover::before {
  transform: translateX(100%);
}

.btn-primary {
  background: var(--gradient-primary);
  color: white !important;
  box-shadow: 0 4px 12px rgba(89, 86, 233, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(89, 86, 233, 0.4);
  color: white !important;
}

.btn-primary * {
  color: white !important;
}

.btn-secondary {
  background: var(--surface);
  color: var(--foreground);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  background: var(--surface-elevated);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1.125rem 2.5rem;
  font-size: 1.0625rem;
}

@media (max-width: 768px) {
  .btn-lg {
    padding: 1rem 1.5rem;
    font-size: 1rem;
  }
}

.icon-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--foreground);
}

@media (max-width: 768px) {
  .icon-btn {
    width: 36px;
    height: 36px;
  }
  
  .icon-btn svg {
    width: 18px;
    height: 18px;
  }
}

.icon-btn:hover {
  background: var(--surface-elevated);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.dark .icon-btn {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--foreground);
}

.dark .icon-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

/* ==========================================
   HERO SECTION - Dramatic Modern Design
   ========================================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 8rem 2rem 4rem;
  background: var(--background);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-mesh);
  opacity: 0.05;
  z-index: 0;
}

.dark .hero::before {
  opacity: 0.08;
}

.hero-video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
  z-index: 0;
}

.hero-overlay-light {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.7), rgba(255,255,255,0.85));
  z-index: 1;
  transition: opacity 0.1s linear;
  will-change: opacity;
}

.hero-overlay-dark {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10,14,39,0.6), rgba(10,14,39,0.6));
  z-index: 1;
  display: none;
  transition: opacity 0.1s linear;
  will-change: opacity;
}

.dark .hero-overlay-light {
  display: none;
}

.dark .hero-overlay-dark {
  display: block;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 1200px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 2rem;
  /* Parallax fade-out element - JS controls opacity */
  transition: opacity 0.1s linear;
  will-change: opacity;
}

.hero h1 {
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--foreground) 0%, var(--foreground-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  /* Parallax fade-out element - JS controls opacity */
  transition: opacity 0.1s linear;
  will-change: opacity;
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  color: var(--foreground-secondary);
  max-width: 700px;
  margin: 0 auto 3rem;
  line-height: 1.7;
  /* Parallax fade-out element - JS controls opacity */
  transition: opacity 0.1s linear;
  will-change: opacity;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  /* Parallax fade-out element - JS controls opacity */
  transition: opacity 0.1s linear;
  will-change: opacity;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 8rem;
  padding-top: 4rem;
  border-top: 1px solid var(--border);
  animation: fadeInUp 0.6s ease-out 0.4s both;
  position: relative;
  z-index: 100;
  width: 100%;
  max-width: 100%;
  /* Stats remain static during scroll - no parallax */
  transform: translateY(0) !important;
}

@media (max-width: 768px) {
  .hero-stats {
    display: none;
  }
}

.hero-stat {
  text-align: center;
}

.hero-stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.hero-stat-label {
  color: var(--foreground-secondary);
  font-size: 0.9375rem;
}

/* ==========================================
   SECTIONS - Modern Card-Based Layout
   ========================================== */

section {
  padding: 6rem 2rem;
  position: relative;
}

@media (max-width: 1024px) {
  section {
    padding: 4rem 0.5rem;
  }
}

@media (max-width: 768px) {
  section {
    padding: 4rem 1rem;
  }
}

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 4rem;
}

.section-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.section-title {
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--foreground-secondary);
  line-height: 1.7;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 768px) {
  .container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* ==========================================
   CARDS - Modern Glassmorphism Style
   ========================================== */

.card {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.card:hover::before {
  transform: scaleX(1);
}

.card-icon {
  width: 64px;
  height: 64px;
  background: var(--primary-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--primary);
  font-size: 1.75rem;
}

.card-title {
  font-size: 1.375rem;
  margin-bottom: 1rem;
}

.card-description {
  color: var(--foreground-secondary);
  line-height: 1.7;
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: 2rem;
  width: 100%;
  max-width: 100%;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .grid {
    gap: 1.5rem;
  }
  
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

.grid-4 {
  /* Use auto-fill so a single item doesn't stretch to full row width */
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

@media (max-width: 640px) {
  .grid-2,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ==========================================
   PRODUCT CATALOG - Modern Grid
   ========================================== */

.product-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

/* Catalog grid: prevent single card stretching full width */
#products-grid {
  justify-content: center;
  justify-items: center;
}

/* Constrain card width in catalog (but keep responsive on mobile) */
#products-grid .product-card {
  width: 100%;
  max-width: 360px;
}

#products-grid.grid-4 {
  grid-template-columns: repeat(auto-fill, minmax(250px, 360px));
}

@media (max-width: 640px) {
  #products-grid .product-card {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .product-filters {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.5rem !important;
    justify-items: center;
    flex-wrap: nowrap !important;
  }
  
  .product-filters .filter-btn {
    padding: 0.5rem 0.625rem !important;
    font-size: 0.7rem !important;
    width: 100%;
    text-align: center;
  }
}

.filter-btn {
  padding: 0.75rem 1.5rem;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--foreground-secondary);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  background: var(--surface-elevated);
  border-color: var(--primary);
  color: var(--primary);
}

.filter-btn-active {
  background: var(--gradient-primary);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(89, 86, 233, 0.3);
}

.product-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary);
}

.product-image {
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--surface);
  position: relative;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.product-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.375rem 0.75rem;
  background: rgba(255, 255, 255, 0.95);
  color: var(--primary);
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.dark .product-badge {
  background: rgba(10, 14, 39, 0.95);
}

.product-info {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-title {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
  color: var(--foreground);
}

.product-specs {
  color: var(--foreground-secondary);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  flex: 1;
}

.product-specs p {
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
}

.product-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
}

/* ==========================================
   FAQ SECTION - Modern Accordion
   ========================================== */

.faq-list {
  max-width: 900px;
  margin: 0 auto;
}

.faq-item {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.faq-item.open {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.faq-question {
  width: 100%;
  padding: 1.5rem 2rem;
  background: transparent;
  border: none;
  color: var(--foreground);
  font-size: 1.125rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: color 0.2s ease;
}

.faq-question:hover {
  color: var(--primary);
}

.faq-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--foreground-secondary);
}

.faq-item.open .faq-icon {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0 2rem;
}

.faq-item.open .faq-answer {
  max-height: 800px;
  padding: 0 2rem 1.5rem;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), padding 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-answer p {
  color: var(--foreground-secondary);
  line-height: 1.7;
}

/* ==========================================
   FORMS - Modern Input Design
   ========================================== */

.contact-form-box {
  background: var(--surface-elevated);
  padding: 2.5rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
}

@media (max-width: 768px) {
  .contact-form-box {
    padding: 1.5rem;
  }
  
  /* Fix gap between delivery/payment cards on mobile */
  .grid.grid-2 > .card {
    margin-bottom: 1.5rem;
  }
  
  .grid.grid-2 > .card:last-child {
    margin-bottom: 0;
  }
  
  /* Fix gap between contact buttons and map on mobile */
  #contacts .grid.grid-2 > div:last-child {
    margin-top: 2rem;
  }
}

.form-group {
  margin-bottom: 1.25rem;
}

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

@media (max-width: 768px) {
  .grid.grid-2 {
    gap: 0;
  }
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--foreground);
  font-size: 0.9375rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.875rem 1.25rem;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
  font-size: 0.9375rem;
  font-family: var(--font-sans);
  transition: all 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.form-checkbox input {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ==========================================
   FOOTER - Modern Minimalist
   ========================================== */

footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 4rem 2rem 2rem;
}

.footer-content {
  max-width: 1280px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
  color: var(--foreground);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--foreground-secondary);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  color: var(--foreground-secondary);
  font-size: 0.9375rem;
  margin: 0;
}

/* ==========================================
   MODAL - Modern Overlay Design
   ========================================== */

.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow-y: auto;
  overflow-x: hidden;
}

.modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease-out;
}

.modal-content {
  position: relative;
  z-index: 10;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2rem;
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-xl);
}

@media (max-width: 768px) {
  .modal-content {
    max-height: 95vh;
    border-radius: var(--radius-lg);
    padding: 0;
    margin: 1rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .modal-close {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  }
  
  .dark .modal-close {
    background: rgba(10, 14, 39, 0.95);
  }
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--error-light);
  border-color: var(--error);
  color: var(--error);
  transform: rotate(90deg);
}

/* Product Modal Grid */
.modal-product-grid {
  display: grid;
  /* minmax(0, 1fr) prevents grid items from forcing the column to grow (Swiper can be very wide) */
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.modal-product-grid > * {
  min-width: 0;
}

.modal-product-image {
  min-width: 0;
}

.modal-product-image .modal-swiper {
  width: 100%;
  max-width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  /* Give Swiper a stable height to prevent layout growth on image load */
  height: clamp(340px, 70vh, 560px);
}

.modal-product-image .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Hard guard: Swiper sometimes calculates an incorrect huge slide width in modals.
   We always show 1 slide per view, so force slides to match container width. */
#modal-swiper .swiper-slide {
  width: 100% !important;
  max-width: 100%;
}

#modal-swiper .swiper-slide img {
  max-width: 100%;
}

.modal-product-image .modal-swiper.is-single .swiper-button-next,
.modal-product-image .modal-swiper.is-single .swiper-button-prev,
.modal-product-image .modal-swiper.is-single .swiper-pagination {
  display: none;
}

.modal-product-info h3 {
  margin-bottom: 1rem;
  font-size: 1.75rem;
}

.modal-product-info p {
  color: var(--foreground-secondary);
  margin-bottom: 2rem;
}

.modal-product-info h4 {
  margin-bottom: 1rem;
}

.modal-product-info #modal-specs {
  background: var(--surface);
  padding: 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 2rem;
}

.modal-product-btn {
  width: 100%;
}

/* Mobile optimization for product modal */
@media (max-width: 768px) {
  .modal-product-grid {
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 0;
  }
  
  .modal-product-image {
    order: -1;
    margin: 0;
    width: 100%;
  }
  
  .modal-product-image .modal-swiper {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    margin: 0;
    width: 100%;
    height: clamp(240px, 55vh, 420px);
  }

  .modal-product-image .swiper-slide img {
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: center;
    display: block;
  }
  
  .modal-product-info {
    padding: 30px 1.5rem 1.5rem;
  }
  
  .modal-product-info h3 {
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 0.75rem;
  }
  
  .modal-product-info p {
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
  }
  
  .modal-product-info h4 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
  }
  
  .modal-product-info #modal-specs {
    padding: 1rem;
    margin-bottom: 1.5rem;
  }
}

/* ==========================================
   MOBILE MENU - Modern Sidebar
   ========================================== */

.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background: var(--surface-elevated);
  border-left: 1px solid var(--border);
  z-index: 10000;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: none;
  animation: fadeIn 0.2s ease-out;
}

.mobile-menu-overlay.active {
  display: block;
}

.mobile-menu-header {
  padding: 2rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-menu-nav {
  padding: 2rem;
}

.mobile-menu-nav a {
  display: block;
  padding: 1rem 0;
  color: var(--foreground);
  font-weight: 600;
  font-size: 1.125rem;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s ease;
}

.mobile-menu-nav a:last-child {
  border-bottom: none;
}

.mobile-menu-nav a:hover {
  color: var(--primary);
}

/* ==========================================
   ANIMATIONS
   ========================================== */

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

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

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

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

/* ==========================================
   SCROLLBAR STYLING
   ========================================== */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--border-dark);
  border-radius: var(--radius-full);
}

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

/* ==========================================
   UTILITY CLASSES
   ========================================== */

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.hidden {
  display: none !important;
}

.loading {
  opacity: 0.6;
  pointer-events: none;
  cursor: not-allowed;
}

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

@media (max-width: 1024px) {
  .nav-menu {
    display: none;
}

  section {
    padding: 4rem 0.5rem;
}
}

@media (max-width: 768px) {
  .hero {
    padding: 6rem 1.5rem 3rem;
  }
  
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  .hero-cta {
    flex-direction: column;
    width: 100%;
  }
  
  .hero-cta .btn {
    width: 100%;
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-bottom > div {
    flex-direction: column !important;
    gap: 0.5rem !important;
  }
  
  .footer-bottom a {
    font-size: 0.8rem !important;
  }
}

@media (max-width: 480px) {
  .hero-stats {
    grid-template-columns: 1fr;
  }
  /*
  .modal-content {
    padding: 1.5rem;
  }
    */
}

/* ==========================================
   PRELOADER
   ========================================== */

#preloader {
  position: fixed;
  inset: 0;
  background: var(--background);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.preloader-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ==========================================
   TABLE SWIPE INDICATOR
   ========================================== */

.swipe-indicator {
  display: none;
}

@media (max-width: 768px) {
  .table-container {
    position: relative;
  }
  
  .swipe-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(89, 86, 233, 0.4);
    animation: swipeHint 2s ease-in-out infinite;
  }
  
  .swipe-indicator svg:last-child {
    animation: swipeArrow 1.5s ease-in-out infinite;
  }
  
  /* Hide indicator after first scroll */
  .table-container.scrolled .swipe-indicator {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
}

@keyframes swipeHint {
  0%, 100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(-8px);
  }
}

@keyframes swipeArrow {
  0%, 100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(4px);
  }
}

/* ==========================================
   LEGAL PAGES STYLES
   ========================================== */

.legal-page {
  padding: 4rem 2rem;
  min-height: calc(100vh - 200px);
}

.legal-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--border);
}

.legal-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
  color: var(--foreground);
}

.legal-date {
  color: var(--foreground-secondary);
  font-size: 0.9375rem;
  font-style: italic;
}

.legal-content {
  line-height: 1.8;
}

.legal-section {
  margin-bottom: 3rem;
}

.legal-section h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  color: var(--foreground);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.legal-section p {
  margin-bottom: 1rem;
  color: var(--foreground-secondary);
}

.legal-section ul {
  margin: 1rem 0 1rem 2rem;
  color: var(--foreground-secondary);
}

.legal-section li {
  margin-bottom: 0.75rem;
  line-height: 1.7;
}

.legal-section a {
  color: var(--primary);
  text-decoration: underline;
  transition: color 0.2s ease;
}

.legal-section a:hover {
  color: var(--primary-hover);
}

.legal-section strong {
  color: var(--foreground);
  font-weight: 600;
}

.legal-navigation {
  display: flex;
  gap: 1rem;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border);
  flex-wrap: wrap;
}

.legal-navigation .btn {
  flex: 1;
  min-width: 200px;
}

@media (max-width: 768px) {
  .legal-page {
    padding: 3rem 1rem;
  }
  
  .legal-header h1 {
    font-size: 1.75rem;
  }
  
  .legal-section h2 {
    font-size: 1.5rem;
  }
  
  .legal-section ul {
    margin-left: 1.25rem;
  }
  
  .legal-navigation {
    flex-direction: column;
  }
  
  .legal-navigation .btn {
    width: 100%;
  }
}

/* ==========================================
   PRINT STYLES
   ========================================== */

@media print {
  header,
  footer,
  .mobile-menu,
  .modal,
  #preloader,
  .legal-navigation {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .legal-page {
    padding: 0;
  }
}
