/* ==========================================================================
   ARTROKINETIC (ATK) - SWISS BIO-CLINIC PRESET
   Clean Vanilla CSS3 Architecture
   ========================================================================== */

:root {
  --color-primary: #0f766e;
  --color-primary-hover: #115e59;
  --color-primary-light: #f0fdfa;
  --color-primary-glow: rgba(15, 118, 110, 0.15);
  
  --color-accent: #0d9488;
  --color-accent-light: #ccfbf1;
  --color-hydro: #0284c7;
  --color-hydro-light: #e0f2fe;

  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-subtle: #f1f5f9;
  
  --color-text: #0f172a;
  --color-text-muted: #475569;
  --color-text-light: #64748b;
  
  --color-border: #e2e8f0;
  --color-border-hover: #cbd5e1;
  
  --color-gold: #c58f44;
  --color-gold-light: #fef3c7;
  --color-danger: #dc2626;
  --color-danger-light: #fee2e2;
  --color-success: #16a34a;
  --color-success-light: #dcfce7;

  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(15, 118, 110, 0.08), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 28px rgba(15, 118, 110, 0.12), 0 4px 12px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 40px rgba(15, 23, 42, 0.14);

  --transition-fast: 0.18s ease;
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --header-height: 72px;
}

/* Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

button, input, select, textarea {
  font-family: inherit;
  font-size: 1rem;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.container-narrow {
  max-width: 860px;
}

.section {
  padding: 4.5rem 0;
}

.section-subtle {
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.section-teal {
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
  color: #ffffff;
}

.section-teal a {
  color: #ccfbf1;
}

.section-teal a:hover {
  color: #ffffff;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  align-items: center;
}

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

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

/* Header & Navigation (Strict Mobile Requirement) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
  transition: box-shadow var(--transition-fast);
}

.site-header.scrolled {
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--color-text);
  white-space: nowrap;
}

.logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 900;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-sub {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-primary);
  font-weight: 700;
}

/* Desktop Nav */
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--color-text-muted);
  position: relative;
  padding: 0.5rem 0;
  transition: color var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--color-primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-primary);
  border-radius: 2px;
}

/* Header Actions: Language Switcher, Cart Button, Menu Toggle */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Language Toggle Button */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  background-color: var(--color-surface-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 0.25rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-text);
  gap: 0.35rem;
  min-height: 38px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lang-toggle:hover {
  background-color: var(--color-border);
}

.lang-opt {
  opacity: 0.45;
  transition: opacity var(--transition-fast);
}

.lang-opt.active {
  opacity: 1;
  color: var(--color-primary);
}

.lang-divider {
  color: var(--color-border-hover);
}

/* Header Cart Trigger */
.cart-trigger-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  border: 1px solid var(--color-accent-light);
  transition: all var(--transition-fast);
}

.cart-trigger-btn:hover {
  background-color: var(--color-primary);
  color: #ffffff;
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: var(--color-danger);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  min-width: 19px;
  height: 19px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid #ffffff;
}

/* Mobile Hamburger Toggle */
.mobile-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  gap: 5px;
  border-radius: var(--radius-sm);
  background-color: var(--color-surface-subtle);
  border: 1px solid var(--color-border);
}

.mobile-nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--color-text);
  transition: all var(--transition-fast);
  border-radius: 2px;
}

/* Mobile Drawer Overlay */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  max-width: 85vw;
  height: 100vh;
  background-color: var(--color-surface);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
  transition: transform var(--transition-normal);
  padding: 1.5rem;
}

.mobile-drawer.active {
  transform: translateX(-320px);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 1.5rem;
}

.drawer-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background-color: var(--color-surface-subtle);
  font-size: 1.25rem;
  color: var(--color-text-muted);
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
  overflow-y: auto;
}

.drawer-link {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text);
  padding: 0.75rem 0.5rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-link:hover, .drawer-link.active {
  background-color: var(--color-primary-light);
  color: var(--color-primary);
}

.drawer-footer {
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* Cart Drawer */
.cart-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  max-width: 90vw;
  height: 100vh;
  background-color: var(--color-surface);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
  transition: transform var(--transition-normal);
  padding: 1.5rem;
}

.cart-drawer.active {
  transform: translateX(-420px);
}

.cart-drawer-items {
  flex: 1;
  overflow-y: auto;
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-drawer-item {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 0.8rem;
  background-color: var(--color-surface-subtle);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.cart-drawer-thumb {
  width: 60px;
  height: 60px;
  background-color: #ffffff;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.cart-drawer-details {
  flex: 1;
}

.cart-drawer-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
}

.cart-drawer-sub {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.cart-drawer-qty {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.cart-qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.cart-drawer-footer {
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

/* Buttons & Badges */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  text-align: center;
  min-height: 48px;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(15, 118, 110, 0.25);
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(15, 118, 110, 0.35);
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}

.btn-secondary:hover {
  background-color: var(--color-primary-light);
  color: var(--color-primary-hover);
}

.btn-accent {
  background-color: var(--color-gold);
  color: #ffffff;
}

.btn-accent:hover {
  background-color: #b45309;
  color: #ffffff;
}

.btn-lg {
  padding: 1.1rem 2.2rem;
  font-size: 1.08rem;
  border-radius: var(--radius-lg);
}

.btn-full {
  width: 100%;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-teal {
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  border: 1px solid var(--color-accent-light);
}

.badge-gold {
  background-color: var(--color-gold-light);
  color: #b45309;
  border: 1px solid #fde68a;
}

.badge-danger {
  background-color: var(--color-danger-light);
  color: var(--color-danger);
}

/* Typography Headings */
h1, h2, h3, h4 {
  color: var(--color-text);
  line-height: 1.25;
  font-weight: 800;
}

.h1 {
  font-size: 2.75rem;
  letter-spacing: -0.03em;
}

.h2 {
  font-size: 2.1rem;
  letter-spacing: -0.02em;
}

.h3 {
  font-size: 1.45rem;
}

.lead {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

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

/* Hero Section */
.hero {
  padding: 4.5rem 0 3.5rem;
  background: radial-gradient(circle at 80% 20%, #f0fdfa 0%, #f8fafc 70%);
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hero-stats-row {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
}

.hero-stat-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  flex: 1;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-top: 0.35rem;
}

/* Cards & Components */
.card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-primary-border {
  border-color: var(--color-accent-light);
  border-top: 4px solid var(--color-primary);
}

/* Article / Editorial Style */
.article-body {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #334155;
}

.article-body p {
  margin-bottom: 1.4rem;
}

.article-body h2 {
  margin: 2.2rem 0 1rem;
  font-size: 1.7rem;
}

.article-body h3 {
  margin: 1.8rem 0 0.8rem;
  font-size: 1.3rem;
}

.article-quote {
  border-left: 4px solid var(--color-primary);
  padding: 1rem 1.5rem;
  background-color: var(--color-primary-light);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 1.75rem 0;
  font-style: italic;
  font-size: 1.15rem;
  color: #0f172a;
}

/* Interactive Tabs (WOMAC & Hydration) */
.tab-nav {
  display: flex;
  gap: 0.5rem;
  background-color: var(--color-surface-subtle);
  padding: 0.4rem;
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
  overflow-x: auto;
}

.tab-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.tab-btn.active {
  background-color: var(--color-surface);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

/* Range Slider Styling */
.range-slider {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: #cbd5e1;
  outline: none;
  -webkit-appearance: none;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Lightbox Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(5px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 1.5rem;
  box-shadow: var(--shadow-xl);
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background-color: var(--color-surface-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--color-text);
  z-index: 10;
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  right: 1.25rem;
  max-width: 720px;
  margin: 0 auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-xl);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  transition: transform var(--transition-normal), opacity var(--transition-normal);
}

.cookie-banner.hidden {
  transform: translateY(150%);
  opacity: 0;
  pointer-events: none;
}

.cookie-actions {
  display: flex;
  gap: 0.75rem;
  white-space: nowrap;
}

/* Footer */
.site-footer {
  background-color: #0e1e2d;
  color: #94a3b8;
  padding: 4rem 0 2rem;
  margin-top: auto;
  border-top: 1px solid #1e293b;
  font-size: 0.92rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-title {
  color: #ffffff;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 1.2rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  color: #cbd5e1;
}

.footer-links a:hover {
  color: #2dd4bf;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: #64748b;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .desktop-nav {
    display: none;
  }
  .mobile-nav-toggle {
    display: flex;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .h1 {
    font-size: 2.2rem;
  }
  .h2 {
    font-size: 1.75rem;
  }
}

/* Strict Mobile Rule: <480px must be ONE compact row without wrap */
@media (max-width: 480px) {
  .site-header {
    height: 60px;
  }
  .header-inner {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.4rem;
  }
  .logo {
    font-size: 1.05rem;
    gap: 0.35rem;
    flex-shrink: 1;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .logo-sub {
    display: none;
  }
  .header-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
  }
  .lang-toggle {
    padding: 0.2rem 0.45rem;
    font-size: 0.72rem;
    min-height: 34px;
    gap: 0.2rem;
  }
  .cart-trigger-btn {
    width: 36px;
    height: 36px;
  }
  .mobile-nav-toggle {
    width: 36px;
    height: 36px;
  }
  .grid-3, .grid-4, .footer-grid {
    grid-template-columns: 1fr;
  }
  .hero-stats-row {
    flex-direction: column;
    gap: 0.75rem;
  }
  .cookie-banner {
    flex-direction: column;
    text-align: center;
  }
  .cookie-actions {
    width: 100%;
    flex-direction: column;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
