/* ============================================================
   fitness.ee v3 — Evolved Classic
   Blue palette preserved, modernized layout & typography
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

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

:root {
  --nav-bg: #1a3a5c;
  --nav-hover: #244d75;
  --accent: #1e5f9e;
  --accent-light: #2a7bc8;
  --bg-page: #f5f7fa;
  --bg-white: #ffffff;
  --bg-subtle: #f0f4f8;
  --bg-card-hover: #edf2f7;
  --text-primary: #1a202c;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --border: #e2e8f0;
  --border-light: #edf2f7;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --max-width: 1200px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent-light); }

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

/* --- Demo Banner --- */
.demo-banner {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #1a202c;
  text-align: center;
  padding: 10px 20px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* --- Navigation --- */
.site-nav {
  background: var(--nav-bg);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.site-nav .nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 0 24px;
  height: 56px;
}
.site-nav .logo {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  margin-right: 36px;
  white-space: nowrap;
}
.site-nav .logo span { color: #64b5f6; }
.nav-links { display: flex; gap: 4px; list-style: none; }
.nav-links a {
  color: rgba(255,255,255,0.85);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: background .15s, color .15s;
}
.nav-links a:hover,
.nav-links a.active {
  background: var(--nav-hover);
  color: #fff;
}

/* Mobile nav toggle */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: #fff; margin: 5px 0;
  transition: .2s;
}

/* --- Hero --- */
.hero {
  background: linear-gradient(135deg, #1a3a5c 0%, #1e5f9e 60%, #2a7bc8 100%);
  color: #fff;
  padding: 64px 24px;
  text-align: center;
}
.hero-inner {
  max-width: 680px;
  margin: 0 auto;
}
.hero h1 {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.hero h1 span { color: #64b5f6; }
.hero .hero-since {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  margin-bottom: 20px;
}
.hero .hero-tagline {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 28px;
  line-height: 1.5;
}
.hero .hero-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}
.hero .hero-stats .stat {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
  display: flex;
  align-items: center;
  gap: 6px;
}
.hero .hero-stats .stat strong {
  color: #fff;
  font-weight: 700;
}

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 24px;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: start;
}

/* --- Section Titles --- */
.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

/* --- Article Cards --- */
.article-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: column;
}
.article-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.article-card .card-img {
  height: 180px;
  background: linear-gradient(135deg, var(--bg-subtle), var(--border));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 2rem;
}
.article-card .card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.article-card .card-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.article-card .card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.35;
}
.article-card .card-title a { color: inherit; }
.article-card .card-title a:hover { color: var(--accent); }
.article-card .card-excerpt {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  flex: 1;
}
.article-card .card-tags {
  margin-top: 14px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--bg-subtle);
  color: var(--accent);
}

.articles-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* --- Sidebar --- */
.sidebar { display: flex; flex-direction: column; gap: 24px; }

.sidebar-widget {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.sidebar-widget h3 {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}
.forum-list { list-style: none; }
.forum-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.85rem;
}
.forum-list li:last-child { border-bottom: none; }
.forum-list li a { color: var(--text-primary); font-weight: 500; }
.forum-list li a:hover { color: var(--accent); }
.forum-list li .forum-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* --- Mini Product Widget (sidebar) --- */
.mini-product {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  align-items: center;
}
.mini-product:last-child { border-bottom: none; }
.mini-product img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  flex-shrink: 0;
}
.mini-product .mp-info { flex: 1; min-width: 0; }
.mini-product .mp-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mini-product .mp-price {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: 2px;
}

/* --- Inline Product Recommendation (article) --- */
.inline-rec {
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 28px 0;
  display: flex;
  gap: 20px;
  align-items: center;
  border-left: 4px solid var(--accent);
  transition: box-shadow .2s;
}
.inline-rec:hover { box-shadow: var(--shadow-sm); }
.inline-rec .rec-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
}
.inline-rec img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: var(--bg-white);
  flex-shrink: 0;
  padding: 4px;
}
.inline-rec .rec-body { flex: 1; min-width: 0; }
.inline-rec .rec-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-bottom: 4px;
}
.inline-rec .rec-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.inline-rec .rec-price {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 6px;
}
.inline-rec .rec-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 8px;
}
.inline-rec .rec-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
}
.inline-rec .rec-link:hover { color: var(--accent-light); }

/* --- Article Page --- */
.breadcrumb {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }

.article-header { margin-bottom: 32px; }
.article-header h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.article-header .article-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.article-header .article-meta .article-tag {
  display: inline-block;
  background: var(--bg-subtle);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 20px;
  margin-left: 4px;
}

.article-content { font-size: 1rem; line-height: 1.75; color: var(--text-primary); }
.article-content p { margin-bottom: 20px; }
.article-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 36px 0 16px;
  color: var(--text-primary);
}
.article-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 28px 0 12px;
  color: var(--text-primary);
}
.article-content ul, .article-content ol {
  margin: 0 0 20px 24px;
}
.article-content li { margin-bottom: 8px; }
.article-content blockquote {
  border-left: 4px solid var(--accent);
  padding: 12px 20px;
  margin: 24px 0;
  background: var(--bg-subtle);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
  font-style: italic;
}

/* Bottom related products */
.related-products {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 2px solid var(--border);
}
.related-products h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
}
.related-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* Article tags at bottom */
.article-tags {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* --- Shop Page --- */
.shop-header {
  text-align: center;
  margin-bottom: 32px;
}
.shop-header h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.shop-header p {
  color: var(--text-secondary);
  font-size: 1rem;
}

.category-pills {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.pill {
  display: inline-block;
  padding: 8px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 30px;
  border: 2px solid var(--border);
  color: var(--text-secondary);
  background: var(--bg-white);
  cursor: pointer;
  transition: all .15s;
}
.pill:hover, .pill.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* --- Product Cards (Shop) --- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.product-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.product-card .pc-image {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-subtle);
  padding: 16px;
}
.product-card .pc-image img {
  max-height: 100%;
  object-fit: contain;
}
.product-card .pc-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-card .pc-brand {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.product-card .pc-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 8px;
  min-height: 2.4em;
}
.product-card .pc-servings {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.product-card .pc-bottom {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.product-card .pc-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent);
}
.btn-cart {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .15s;
}
.btn-cart:hover { background: var(--accent-light); }

.shop-cta {
  text-align: center;
  padding: 32px;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
}
.shop-cta a {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
}

/* --- Footer --- */
.site-footer {
  background: var(--nav-bg);
  color: rgba(255,255,255,0.7);
  padding: 40px 24px;
  margin-top: 48px;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: start;
  flex-wrap: wrap;
  gap: 32px;
}
.footer-brand .fb-logo {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}
.footer-brand .fb-logo span { color: #64b5f6; }
.footer-brand p { font-size: 0.82rem; }
.footer-links h4 {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 6px; }
.footer-links a {
  color: rgba(255,255,255,0.65);
  font-size: 0.82rem;
}
.footer-links a:hover { color: #fff; }
.footer-bottom {
  max-width: var(--max-width);
  margin: 24px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 0.78rem;
  text-align: center;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .two-col { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: repeat(3, 1fr); }
  .related-products-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    padding: 12px 24px 20px;
    box-shadow: var(--shadow-lg);
  }
  .nav-toggle { display: block; margin-left: auto; }

  .hero h1 { font-size: 1.8rem; }
  .hero { padding: 40px 20px; }

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

  .inline-rec { flex-direction: column; text-align: center; }
  .inline-rec img { width: 100px; height: 100px; }

  .article-header h1 { font-size: 1.5rem; }

  .related-products-grid { grid-template-columns: 1fr; }

  .footer-inner { flex-direction: column; }
}

@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr; }
  .hero .hero-stats { flex-direction: column; gap: 8px; }
}
