/* ==========================================================================
   SYNOVIAFLEX (SYF) - DESIGN SYSTEM: SWISS BIOCLINIC PRESET
   Author: Dr.ssa Francesca Lombardi & Scientific Team
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
  /* Brand Clinical Palette - Swiss Bioclinic */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f0fdfa;
  --bg-alt: #f1f5f9;
  
  --primary: #0f766e;        /* Deep pine teal */
  --primary-hover: #115e59;
  --primary-dark: #042f2e;
  --primary-light: #14b8a6;
  --primary-mist: rgba(15, 118, 110, 0.08);

  --secondary: #0284c7;      /* Clinical surgical blue */
  --secondary-light: #38bdf8;
  --secondary-mist: rgba(2, 132, 199, 0.08);

  --accent-gold: #d97706;    /* Academic seal gold */
  --accent-gold-light: #fef3c7;
  --accent-amber: #b45309;

  --text-primary: #0f172a;   /* Slate 900 */
  --text-secondary: #334155; /* Slate 700 */
  --text-muted: #64748b;     /* Slate 500 */
  --text-light: #94a3b8;     /* Slate 400 */

  --border-light: #e2e8f0;
  --border-medium: #cbd5e1;
  --border-focus: #0f766e;

  --success: #16a34a;
  --success-bg: #f0fdf4;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --warning: #d97706;
  --warning-bg: #fffbeb;

  /* Typography */
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Radii */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 14px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 28px rgba(15, 23, 42, 0.12);
  --shadow-teal: 0 8px 24px rgba(15, 118, 110, 0.18);
  --shadow-modal: 0 24px 60px rgba(15, 23, 42, 0.28);

  /* Layout */
  --max-width: 1200px;
  --header-height: 72px;
  --topbar-height: 36px;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

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

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

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

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

/* ==========================================================================
   TOP CLINICAL BANNER
   ========================================================================== */
.top-notice-bar {
  background: #0f172a;
  color: #e2e8f0;
  font-size: 0.8125rem;
  padding: 6px 16px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 101;
}

.top-notice-bar .badge-live {
  background: var(--primary);
  color: #fff;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.top-notice-bar .pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2dd4bf;
  animation: pulse 1.5s infinite;
}

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

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
  z-index: 100;
  transition: box-shadow var(--transition-fast);
}

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

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-link img {
  height: 44px;
  width: auto;
}

/* Desktop Nav Menu */
.nav-menu-desktop {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-link {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 8px 4px;
  position: relative;
  transition: color var(--transition-fast);
}

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

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

/* Header Actions: Language Switch + Cart + Hamburger */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Language Toggle Button */
.lang-switcher {
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  padding: 3px;
  font-size: 0.8125rem;
  font-weight: 700;
}

.lang-btn {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 4px;
}

.lang-btn.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* Cart Trigger */
.cart-trigger {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--bg-tertiary);
  color: var(--primary);
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: var(--radius-pill);
  transition: all var(--transition-fast);
  touch-action: manipulation;
}

.cart-trigger:hover {
  background: var(--primary);
  color: #ffffff;
  transform: translateY(-1px);
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
}

/* Hamburger Toggle Button */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  gap: 5px;
  padding: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  touch-action: manipulation;
}

.hamburger-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

/* Mobile Header (<480px) 1-LINE STRICT REQUIREMENT */
@media (max-width: 991px) {
  .nav-menu-desktop {
    display: none;
  }
  .hamburger-btn {
    display: flex;
  }
}

@media (max-width: 480px) {
  .site-header {
    height: 60px;
  }
  .header-container {
    height: 60px;
    padding: 0 12px;
    gap: 8px;
    flex-wrap: nowrap;
  }
  .logo-link img {
    height: 32px;
  }
  .header-actions {
    gap: 6px;
  }
  .lang-btn {
    padding: 3px 6px;
    font-size: 0.75rem;
  }
  .cart-trigger, .hamburger-btn {
    width: 38px;
    height: 38px;
  }
}

/* ==========================================================================
   MOBILE MENU DRAWER
   ========================================================================== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

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

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 85%;
  max-width: 360px;
  height: 100%;
  background: #ffffff;
  z-index: 201;
  transform: translateX(100%);
  transition: transform var(--transition-normal);
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
}

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

.drawer-header {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
}

.drawer-close-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
}

.drawer-body {
  padding: 24px 20px;
  flex: 1;
  overflow-y: auto;
}

.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  transition: all var(--transition-fast);
}

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

.drawer-footer {
  padding: 20px;
  border-top: 1px solid var(--border-light);
  background: var(--bg-secondary);
}

/* ==========================================================================
   CART SLIDE-OUT DRAWER
   ========================================================================== */
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 90%;
  max-width: 420px;
  height: 100%;
  background: #ffffff;
  z-index: 210;
  transform: translateX(100%);
  transition: transform var(--transition-normal);
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 30px rgba(0, 0, 0, 0.2);
}

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

.cart-drawer-header {
  padding: 20px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-drawer-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-drawer-body {
  padding: 20px;
  flex: 1;
  overflow-y: auto;
}

.cart-item-card {
  display: flex;
  gap: 14px;
  padding: 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}

.cart-item-thumb {
  width: 64px;
  height: 64px;
  background: #fff;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border: 1px solid var(--border-light);
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.cart-item-pack {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 8px;
}

.cart-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.qty-controls {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
}

.qty-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--text-primary);
}

.qty-val {
  font-size: 0.875rem;
  font-weight: 700;
  min-width: 24px;
  text-align: center;
}

.cart-item-price {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
}

.cart-drawer-footer {
  padding: 20px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
}

.cart-summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.cart-summary-line.total {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  padding-top: 8px;
  border-top: 1px solid var(--border-medium);
  margin-top: 8px;
  margin-bottom: 16px;
}

/* ==========================================================================
   BUTTONS & CTAs
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  text-align: center;
  min-height: 48px;
  touch-action: manipulation;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-teal);
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.28);
}

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

.btn-secondary:hover {
  background: #0369a1;
  color: #ffffff;
  transform: translateY(-2px);
}

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

.btn-outline:hover {
  background: var(--bg-tertiary);
  color: var(--primary-dark);
}

.btn-gold {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.3);
}

.btn-gold:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-block {
  width: 100%;
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.1rem;
  border-radius: var(--radius-lg);
}

/* ==========================================================================
   SECTIONS & LAYOUT CONTAINERS
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 72px 0;
}

.section-bg {
  background-color: var(--bg-secondary);
}

.section-tertiary {
  background-color: var(--bg-tertiary);
}

.section-dark {
  background-color: #0f172a;
  color: #ffffff;
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 48px;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-tertiary);
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 14px;
  border: 1px solid rgba(15, 118, 110, 0.15);
}

.section-dark .section-tag {
  background: rgba(15, 118, 110, 0.3);
  color: #5eead4;
  border-color: rgba(94, 234, 212, 0.3);
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.section-dark .section-title {
  color: #ffffff;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.section-dark .section-subtitle {
  color: #94a3b8;
}

/* ==========================================================================
   COOKIE CONSENT BANNER
   ========================================================================== */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: 520px;
  background: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-modal);
  z-index: 150;
  display: none;
  animation: slideUp 0.3s ease;
}

.cookie-banner.active {
  display: block;
}

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

.cookie-banner-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cookie-banner-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
}

.cookie-banner-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cookie-banner-actions .btn {
  flex: 1;
  min-height: 40px;
  padding: 8px 16px;
  font-size: 0.875rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: #09121d;
  color: #94a3b8;
  padding: 64px 0 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-top: 14px;
  color: #cbd5e1;
}

.footer-col-title {
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

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

.footer-links a {
  font-size: 0.875rem;
  color: #94a3b8;
  transition: color var(--transition-fast);
}

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

.footer-disclaimer-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 0.8rem;
  line-height: 1.6;
  color: #64748b;
  margin-bottom: 32px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8125rem;
  flex-wrap: wrap;
  gap: 16px;
}

@media (max-width: 991px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 48px 0;
  }
  .section-title {
    font-size: 1.75rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}
