/* Pico X Health - Unified Static HTML Stylesheet
   Version: 1.0
   Matches Tailwind design system from src/index.css
*/

/* ============================================
   CSS Custom Properties (Design Tokens)
   ============================================ */
:root {
  /* Primary: Health Teal */
  --primary: hsl(186, 75%, 45%);
  --primary-hover: hsl(186, 75%, 38%);
  --primary-light: hsl(186, 75%, 95%);
  
  /* Secondary: Nature Green */
  --secondary: hsl(142, 51%, 62%);
  --secondary-light: hsl(142, 51%, 95%);
  
  /* Accent: Coral/Orange */
  --accent: hsl(16, 90%, 62%);
  --accent-hover: hsl(16, 90%, 55%);
  
  /* Text Colors */
  --foreground: hsl(210, 15%, 20%);
  --muted: hsl(210, 12%, 45%);
  --muted-light: hsl(210, 12%, 65%);
  
  /* Backgrounds */
  --background: hsl(0, 0%, 100%);
  --card-bg: hsl(186, 20%, 98%);
  --muted-bg: hsl(186, 20%, 95%);
  
  /* Borders */
  --border: hsl(186, 20%, 90%);
  --border-light: hsl(186, 20%, 94%);
  
  /* Typography */
  --font-display: 'Lora', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
  
  /* Border Radius */
  --radius: 1rem;
  --radius-sm: 0.75rem;
  --radius-lg: 1.5rem;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px 0 hsl(186 40% 45% / 0.08);
  --shadow-md: 0 4px 12px -2px hsl(186 40% 45% / 0.10);
  --shadow-lg: 0 12px 28px -4px hsl(186 40% 45% / 0.12);
  --shadow-xl: 0 20px 40px -8px hsl(186 40% 45% / 0.15);
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Base Styles
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--foreground);
  background-color: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--foreground);
}

h1 {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-lg);
}

h2 {
  font-size: 1.875rem;
  margin-top: var(--spacing-2xl);
  margin-bottom: var(--spacing-md);
}

h3 {
  font-size: 1.5rem;
  margin-top: var(--spacing-xl);
  margin-bottom: var(--spacing-sm);
  color: var(--muted);
}

h4 {
  font-size: 1.25rem;
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-sm);
}

p {
  margin-bottom: var(--spacing-md);
}

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

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

strong {
  font-weight: 600;
}

/* ============================================
   Layout
   ============================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

/* ============================================
   Header & Navigation
   ============================================ */
.site-header {
  background: var(--background);
  border-bottom: 1px solid var(--border);
  padding: var(--spacing-md) 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: var(--spacing-lg);
  list-style: none;
}

.nav-links a {
  color: var(--foreground);
  font-weight: 500;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-links a:hover {
  background: var(--muted-bg);
  text-decoration: none;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: 0.875rem;
  color: var(--muted);
  padding: var(--spacing-md) 0;
}

.breadcrumb a {
  color: var(--muted);
}

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

.breadcrumb span:last-child {
  color: var(--foreground);
  font-weight: 500;
}

/* ============================================
   Cards
   ============================================ */
.card {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: var(--spacing-lg);
  transition: all var(--transition-smooth);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card-header {
  margin-bottom: var(--spacing-md);
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-xs);
}

.card-description {
  color: var(--muted);
  font-size: 0.875rem;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-smooth);
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
  text-decoration: none;
  color: white;
}

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

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

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

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* ============================================
   Badges
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  background: var(--muted-bg);
  color: var(--foreground);
}

.badge-primary {
  background: var(--primary);
  color: white;
}

.badge-secondary {
  background: var(--secondary);
  color: white;
}

.badge-accent {
  background: var(--accent);
  color: white;
}

.badge-outline {
  background: transparent;
  border: 1px solid var(--border);
}

/* ============================================
   Article Styles
   ============================================ */
.article {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--spacing-2xl) var(--spacing-lg);
}

.article-header {
  margin-bottom: var(--spacing-xl);
  text-align: center;
}

.article-header .badge {
  margin-bottom: var(--spacing-md);
}

.article-header h1 {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-md);
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-lg);
  color: var(--muted);
  font-size: 0.875rem;
}

.article-meta time,
.article-meta span {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

/* Featured Image */
.featured-image {
  margin: var(--spacing-xl) 0 var(--spacing-2xl);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--muted-bg);
}

.featured-image img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  transition: transform var(--transition-smooth);
}

.featured-image:hover img {
  transform: scale(1.02);
}

.featured-image figcaption {
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: 0.875rem;
  color: var(--muted);
  text-align: center;
  background: var(--card-bg);
  border-top: 1px solid var(--border-light);
}

/* Article Content (Prose) */
.article-content {
  font-size: 1.125rem;
  line-height: 1.8;
}

.article-content h2 {
  font-size: 1.75rem;
  margin-top: var(--spacing-3xl);
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--primary-light);
}

.article-content h3 {
  font-size: 1.375rem;
  margin-top: var(--spacing-2xl);
  margin-bottom: var(--spacing-md);
  color: var(--foreground);
}

.article-content p {
  margin-bottom: var(--spacing-lg);
}

.article-content ul,
.article-content ol {
  margin: var(--spacing-lg) 0;
  padding-left: var(--spacing-xl);
}

.article-content li {
  margin-bottom: var(--spacing-sm);
}

.article-content blockquote {
  border-left: 4px solid var(--primary);
  padding-left: var(--spacing-lg);
  margin: var(--spacing-xl) 0;
  font-style: italic;
  color: var(--muted);
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: var(--spacing-xl) 0;
}

.article-content a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

/* ============================================
   Product Page Styles
   ============================================ */
.product-detail {
  padding: var(--spacing-2xl) 0;
}

.product-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-2xl);
  margin-bottom: var(--spacing-3xl);
}

.product-image {
  position: relative;
}

.product-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.product-info {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.product-info .brand-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.product-info h1 {
  font-size: 2rem;
  margin-bottom: var(--spacing-sm);
}

.product-info .badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.product-info .price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.product-section {
  margin-bottom: var(--spacing-2xl);
}

.product-section h2 {
  margin-bottom: var(--spacing-lg);
}

.features-list {
  list-style: none;
  padding: 0;
}

.features-list li {
  position: relative;
  padding-left: var(--spacing-xl);
  margin-bottom: var(--spacing-sm);
}

.features-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--secondary);
  font-weight: 700;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-md);
}

.spec-item {
  background: var(--card-bg);
  padding: var(--spacing-md);
  border-radius: var(--radius-sm);
}

.spec-item .label {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: var(--spacing-xs);
}

.spec-item .value {
  font-size: 1.125rem;
  font-weight: 600;
}

/* ============================================
   CTA Box
   ============================================ */
.cta-box {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-light) 100%);
  border: 1px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  text-align: center;
  margin: var(--spacing-2xl) 0;
}

.cta-box h3 {
  color: var(--foreground);
  margin-bottom: var(--spacing-sm);
}

.cta-box p {
  color: var(--muted);
  margin-bottom: var(--spacing-lg);
}

.cta-box .btn-group {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================
   Related Content Grid
   ============================================ */
.related-section {
  margin-top: var(--spacing-3xl);
  padding-top: var(--spacing-2xl);
  border-top: 1px solid var(--border);
}

.related-section h2 {
  margin-bottom: var(--spacing-xl);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-lg);
}

.related-card {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition-smooth);
}

.related-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.related-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.related-card-content {
  padding: var(--spacing-md);
}

.related-card-content h4 {
  font-size: 1rem;
  margin-bottom: var(--spacing-xs);
}

.related-card-content p {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 0;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background: var(--foreground);
  color: white;
  padding: var(--spacing-3xl) 0 var(--spacing-xl);
  margin-top: var(--spacing-3xl);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-2xl);
  margin-bottom: var(--spacing-2xl);
}

.footer-section h4 {
  color: white;
  margin-bottom: var(--spacing-md);
  font-size: 1rem;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section li {
  margin-bottom: var(--spacing-sm);
}

.footer-section a {
  color: hsl(210, 12%, 75%);
  font-size: 0.875rem;
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  padding-top: var(--spacing-xl);
  border-top: 1px solid hsl(210, 15%, 30%);
  text-align: center;
  color: hsl(210, 12%, 65%);
  font-size: 0.875rem;
}

/* ============================================
   Blog Index Grid
   ============================================ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--spacing-xl);
}

.blog-card {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition-smooth);
}

.blog-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.blog-card-image {
  height: 200px;
  overflow: hidden;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-smooth);
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.05);
}

.blog-card-content {
  padding: var(--spacing-lg);
}

.blog-card-content .badge {
  margin-bottom: var(--spacing-sm);
}

.blog-card-content h3 {
  font-size: 1.125rem;
  margin-bottom: var(--spacing-sm);
  color: var(--foreground);
}

.blog-card-content p {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: var(--spacing-md);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-meta {
  display: flex;
  gap: var(--spacing-md);
  font-size: 0.75rem;
  color: var(--muted-light);
}

/* ============================================
   Product Grid
   ============================================ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-xl);
}

.product-card {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition-smooth);
}

.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.product-card-image {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
  padding: var(--spacing-md);
}

.product-card-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-card-content {
  padding: var(--spacing-lg);
}

.product-card-content .brand {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--spacing-xs);
}

.product-card-content h3 {
  font-size: 1rem;
  margin-bottom: var(--spacing-sm);
  color: var(--foreground);
}

.product-card-content .price {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary);
}

/* ============================================
   Utilities
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-md { margin-top: var(--spacing-md); }
.mb-md { margin-bottom: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }
.mb-xl { margin-bottom: var(--spacing-xl); }

.hidden { display: none; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.25rem;
  }
  
  .container,
  .container-narrow {
    padding: 0 var(--spacing-md);
  }
  
  .product-hero {
    grid-template-columns: 1fr;
  }
  
  .nav-links {
    display: none;
  }
  
  .article-header h1 {
    font-size: 1.75rem;
  }
  
  .article-meta {
    flex-direction: column;
    gap: var(--spacing-sm);
  }
  
  .cta-box .btn-group {
    flex-direction: column;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .blog-grid,
  .product-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
  .site-header,
  .site-footer,
  .cta-box,
  .related-section {
    display: none;
  }
  
  body {
    font-size: 12pt;
    color: black;
    background: white;
  }
  
  a {
    color: black;
    text-decoration: underline;
  }
}
