/* ============================================================
   fitness.ee v4 — Tool-Centric Demo
   ============================================================ */

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

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

:root {
  --blue: #1e5f9e;
  --blue-dark: #164a7a;
  --blue-light: #e8f0f8;
  --blue-bg: #f0f5fa;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --green: #059669;
  --green-light: #ecfdf5;
  --orange: #d97706;
  --orange-light: #fffbeb;
  --radius: 10px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.1);
  --max-w: 1120px;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--gray-800);
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ---- Demo banner ---- */
.demo-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  color: #fff;
  text-align: center;
  padding: 10px 16px;
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .02em;
}
.demo-banner span { opacity: .7; }

/* ---- Navbar ---- */
.navbar {
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.navbar-logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: -.02em;
}
.navbar-logo span { color: var(--gray-400); font-weight: 500; font-size: .75rem; margin-left: 6px; }
.navbar-links { display: flex; gap: 28px; list-style: none; }
.navbar-links a {
  color: var(--gray-600);
  font-size: .9rem;
  font-weight: 500;
  padding: 4px 0;
  transition: color .15s;
}
.navbar-links a:hover,
.navbar-links a.active { color: var(--blue); text-decoration: none; }
.navbar-links a.active { border-bottom: 2px solid var(--blue); }

/* ---- Hero ---- */
.hero {
  background: linear-gradient(160deg, var(--blue-bg) 0%, #fff 60%);
  padding: 72px 0 56px;
  text-align: center;
}
.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -.03em;
  line-height: 1.15;
}
.hero h1 em {
  font-style: normal;
  color: var(--blue);
}
.hero .subtitle {
  margin-top: 16px;
  font-size: 1.15rem;
  color: var(--gray-500);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.hero .badge {
  display: inline-block;
  margin-top: 24px;
  background: var(--blue-light);
  color: var(--blue);
  font-size: .8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
}

/* ---- Section ---- */
.section { padding: 64px 0; }
.section-alt { background: var(--gray-50); }
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}
.section-desc {
  color: var(--gray-500);
  margin-bottom: 32px;
  font-size: .95rem;
}

/* ---- Tool Cards ---- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.tool-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: box-shadow .2s, transform .15s;
}
.tool-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.tool-card .icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: var(--blue-light);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}
.tool-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}
.tool-card p {
  font-size: .88rem;
  color: var(--gray-500);
  margin-bottom: 16px;
}
.tool-card .btn-tool {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  padding: 8px 20px;
  border-radius: 6px;
  font-size: .85rem;
  font-weight: 600;
  transition: background .15s;
}
.tool-card .btn-tool:hover { background: var(--blue-dark); text-decoration: none; }

/* ---- Article Cards ---- */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.article-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .2s;
}
.article-card:hover { box-shadow: var(--shadow-md); }
.article-card .thumb {
  height: 160px;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  font-size: .85rem;
}
.article-card .body { padding: 16px; }
.article-card .cat {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--blue);
  margin-bottom: 6px;
}
.article-card h3 { font-size: .95rem; font-weight: 600; color: var(--gray-800); line-height: 1.35; }
.article-card .meta { font-size: .78rem; color: var(--gray-400); margin-top: 8px; }

/* ---- Product Cards ---- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.products-grid--shop {
  grid-template-columns: repeat(3, 1fr);
}
.product-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .2s, transform .15s;
}
.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.product-card .img-wrap {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--gray-50);
}
.product-card .img-wrap img {
  max-height: 148px;
  object-fit: contain;
}
.product-card .body { padding: 14px 16px 18px; }
.product-card .brand {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--gray-400);
  margin-bottom: 4px;
}
.product-card h3 {
  font-size: .88rem;
  font-weight: 600;
  color: var(--gray-800);
  line-height: 1.35;
  margin-bottom: 4px;
}
.product-card .servings {
  font-size: .75rem;
  color: var(--gray-400);
  margin-bottom: 10px;
}
.product-card .price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.product-card .price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-900);
}
.product-card .btn-cart {
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.product-card .btn-cart:hover { background: var(--blue-dark); }

/* product recommendation cards (inline, smaller) */
.rec-products {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 16px;
}
.rec-card {
  display: flex;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 14px;
  align-items: center;
  transition: box-shadow .2s;
}
.rec-card:hover { box-shadow: var(--shadow-md); }
.rec-card img { width: 72px; height: 72px; object-fit: contain; flex-shrink: 0; }
.rec-card .info { flex: 1; min-width: 0; }
.rec-card .info h4 { font-size: .82rem; font-weight: 600; color: var(--gray-800); line-height: 1.3; margin-bottom: 4px; }
.rec-card .info .price { font-size: .9rem; font-weight: 700; color: var(--blue); }
.rec-card .info .servings { font-size: .72rem; color: var(--gray-400); }

/* ---- View-all link ---- */
.view-all {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--blue);
  margin-top: 24px;
}
.view-all:hover { text-decoration: underline; }

/* ---- Kaloriarvuti ---- */
.calc-wrap {
  max-width: 640px;
  margin: 0 auto;
}
.calc-form {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 28px;
}
.calc-form label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
  margin-top: 16px;
}
.calc-form label:first-child { margin-top: 0; }
.calc-form select,
.calc-form input[type="number"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-size: .9rem;
  font-family: inherit;
  color: var(--gray-800);
  background: #fff;
  appearance: auto;
}
.calc-form select:focus,
.calc-form input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(30,95,158,.12);
}
.input-suffix {
  display: flex;
  align-items: center;
  gap: 8px;
}
.input-suffix span {
  font-size: .9rem;
  color: var(--gray-500);
  font-weight: 500;
}
.btn-calc {
  display: block;
  width: 100%;
  margin-top: 20px;
  padding: 12px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: .95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: .02em;
  transition: background .15s;
}
.btn-calc:hover { background: var(--blue-dark); }

/* Results */
.calc-results {
  margin-top: 24px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px 28px;
}
.calc-results h3 {
  font-size: .95rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 16px;
}
.results-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  text-align: center;
}
.result-item .value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--gray-900);
}
.result-item .label {
  font-size: .75rem;
  color: var(--gray-500);
  margin-top: 2px;
}
.result-item.highlight .value { color: var(--blue); }

/* Recommendation callout */
.rec-callout {
  margin-top: 28px;
  background: var(--blue-bg);
  border: 1px solid #c5d9ed;
  border-radius: var(--radius);
  padding: 20px 24px;
}
.rec-callout h3 {
  font-size: .95rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 10px;
}
.rec-callout .advice {
  font-size: .88rem;
  color: var(--gray-600);
  line-height: 1.55;
  margin-bottom: 4px;
}

/* Daily intake table */
.daily-table {
  margin-top: 32px;
}
.daily-table h3 {
  font-size: .95rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 12px;
}
.daily-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}
.daily-table th,
.daily-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
}
.daily-table th {
  font-weight: 600;
  color: var(--gray-500);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: var(--gray-50);
}
.daily-table td { color: var(--gray-700); }
.daily-table td:nth-child(2) { font-weight: 700; color: var(--gray-900); }
.daily-table td:nth-child(3) { color: var(--gray-400); }

/* ---- Shop filters ---- */
.shop-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.shop-filters button {
  padding: 8px 18px;
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  background: #fff;
  font-size: .85rem;
  font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}
.shop-filters button:hover { border-color: var(--blue); color: var(--blue); }
.shop-filters button.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

/* ---- Footer ---- */
.footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: 48px 0 32px;
  font-size: .85rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}
.footer h4 {
  color: #fff;
  font-size: .82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 14px;
}
.footer a { color: var(--gray-400); font-size: .85rem; }
.footer a:hover { color: #fff; text-decoration: none; }
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer .about-text { line-height: 1.6; max-width: 300px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-bottom .powered { color: var(--gray-500); font-size: .78rem; }
.footer-bottom .powered a { color: var(--blue); }

/* ---- Page header (inner pages) ---- */
.page-header {
  background: var(--blue-bg);
  padding: 48px 0 40px;
}
.page-header h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -.02em;
}
.page-header p {
  color: var(--gray-500);
  margin-top: 8px;
  max-width: 520px;
  font-size: .95rem;
}

.shop-note {
  margin-top: 32px;
  text-align: center;
  font-size: .85rem;
  color: var(--gray-400);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .tools-grid,
  .articles-grid { grid-template-columns: 1fr; }
  .products-grid,
  .products-grid--shop { grid-template-columns: repeat(2, 1fr); }
  .rec-products { grid-template-columns: 1fr; }
  .results-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .hero h1 { font-size: 1.8rem; }
  .navbar-links { gap: 16px; }
}
@media (max-width: 480px) {
  .products-grid,
  .products-grid--shop { grid-template-columns: 1fr; }
  .results-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
}
