/* =============================================================
   POWERTOOL — Бүтээгдэхүүний хуудасны загвар / Product pages CSS
   Light "products" theme: navy nav + footer bookends, white content,
   per-model selector + datasheet download.
   ============================================================= */
:root {
  /* dark brand tokens (nav, footer, logo backdrops) */
  --bg-navy-950: #010c15;
  --bg-navy-900: #021424;
  --bg-card-dark: #04243d;

  /* light product surfaces */
  --surface: #ffffff;
  --surface-2: #f1f6fa;
  --surface-3: #e7eef4;

  --teal-500: #00a8a8;
  --teal-400: #00c9c9;
  --teal-600: #0a7d7d;
  --teal-glow: rgba(0, 168, 168, 0.12);

  --ink: #0d1b2a;
  --ink-soft: #46586a;
  --ink-faint: #6b7c8c;

  --line: rgba(13, 27, 42, 0.10);
  --line-strong: rgba(13, 27, 42, 0.18);
  --border-dark: rgba(255, 255, 255, 0.08);

  --text-light: #f5f5f7;
  --text-muted-light: #8fa0af;

  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 8px;

  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
  --card-shadow: 0 1px 2px rgba(13,27,42,0.05), 0 6px 18px rgba(13,27,42,0.04);
  --card-shadow-hover: 0 18px 44px rgba(13,27,42,0.14);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--surface);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--teal-500); color: #fff; }
h1, h2, h3, h4, h5, h6 {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 800; letter-spacing: -.03em; line-height: 1.15; color: var(--ink);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.mono { font-family: 'JetBrains Mono', SFMono-Regular, Consolas, Menlo, monospace; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; position: relative; }

/* Language switch */
html[lang="en"] .lang-mn { display: none !important; }
html[lang="mn"] .lang-en { display: none !important; }

/* ---------- NAV (navy) ---------- */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 32px;
  background: rgba(2, 12, 22, 0.88);
  backdrop-filter: blur(22px) saturate(1.4);
  border-bottom: 1px solid var(--border-dark);
}
.brand { display: flex; align-items: center; gap: 12px; }
.logo-img { height: 30px; width: auto; }
.navlinks { display: flex; gap: 6px; align-items: center; }
.navlinks a {
  font-size: 13.5px; font-weight: 600; color: rgba(255,255,255,0.78);
  padding: 8px 16px; border-radius: var(--r-sm); transition: var(--transition-fast);
}
.navlinks a:hover, .navlinks a.active { color: #fff; background: rgba(255,255,255,0.10); }
.nav-cta { background: var(--teal-500); color: #04121d !important; }
.nav-cta:hover { background: var(--teal-400); }
.lang-switch { display: flex; align-items: center; gap: 4px; margin-left: 8px; padding-left: 12px; border-left: 1px solid var(--border-dark); }
.lang-btn { background: none; border: none; cursor: pointer; font-family: inherit; font-size: 12.5px; font-weight: 700; color: rgba(255,255,255,0.55); padding: 5px 9px; border-radius: 6px; transition: var(--transition-fast); }
.lang-btn:hover { color: #fff; }
.lang-btn.active { color: #04121d; background: var(--teal-400); }
.lang-switch .divider { color: rgba(255,255,255,0.2); font-size: 11px; }
.burger { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.burger span { width: 24px; height: 2px; background: #fff; transition: var(--transition-fast); }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 14px; padding: 13px 24px;
  border-radius: var(--r-sm); transition: var(--transition); cursor: pointer; border: none;
}
.btn-primary { background: var(--teal-500); color: #04121d; }
.btn-primary:hover { background: var(--teal-400); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0,168,168,0.30); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.btn-ghost:hover { border-color: var(--teal-500); color: var(--teal-600); }
.dl-ico { font-size: 16px; line-height: 1; }

/* ---------- PAGE HERO (light) ---------- */
.page-hero {
  padding: 150px 0 56px;
  background: radial-gradient(1100px 460px at 82% -20%, var(--teal-glow), transparent 60%), var(--surface);
  border-bottom: 1px solid var(--line);
}
.page-hero .eyebrow { font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: .25em; color: var(--teal-600); text-transform: uppercase; margin-bottom: 16px; }
.page-hero h1 { font-size: clamp(34px, 6vw, 60px); margin-bottom: 18px; }
.page-hero p { color: var(--ink-soft); max-width: 640px; font-size: 17px; }

/* ---------- CATEGORY SECTION (white) ---------- */
.cat-section { padding: 60px 0; background: var(--surface); }
.cat-section:nth-child(even) { background: var(--surface-2); }
.cat-head { margin-bottom: 34px; }
.cat-head .brand-tag { font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: .2em; color: var(--teal-600); margin-bottom: 8px; }
.cat-head h2 { font-size: clamp(26px, 4vw, 40px); }
.cat-head p { color: var(--ink-soft); max-width: 560px; margin-top: 8px; }

/* ---------- PRODUCT GRID + CARD (light) ---------- */
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.prod-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden; transition: var(--transition); cursor: pointer; height: 100%;
  box-shadow: var(--card-shadow);
}
.prod-card:hover { transform: translateY(-6px); border-color: var(--teal-500); box-shadow: var(--card-shadow-hover); }
.prod-card .thumb {
  position: relative; aspect-ratio: 4/3; background: #fff;
  display: flex; align-items: center; justify-content: center; padding: 22px;
  border-bottom: 1px solid var(--line);
}
.prod-card .thumb img { max-height: 100%; width: auto; object-fit: contain; transition: var(--transition); }
.prod-card:hover .thumb img { transform: scale(1.05); }
.prod-card .brand-chip {
  position: absolute; top: 12px; left: 12px; font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 700; letter-spacing: .12em; color: #fff;
  background: rgba(2,20,36,0.82); padding: 4px 9px; border-radius: 5px;
}
.prod-card .body { padding: 20px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.prod-card .ptype { font-size: 12px; color: var(--teal-600); font-weight: 700; margin-bottom: 6px; }
.prod-card h3 { font-size: 21px; margin-bottom: 8px; }
.prod-card .ptag { font-size: 13.5px; color: var(--ink-soft); margin-bottom: 14px; flex: 1; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.badge { font-size: 11px; font-weight: 600; color: var(--ink-soft); background: var(--surface-2); border: 1px solid var(--line); padding: 3px 9px; border-radius: 20px; }
.prod-card .more { font-size: 13px; font-weight: 700; color: var(--teal-600); display: inline-flex; align-items: center; gap: 6px; }
.prod-card .more .arr { transition: var(--transition-fast); }
.prod-card:hover .more .arr { transform: translateX(4px); }

/* ---------- DETAIL PAGE (light) ---------- */
.detail-hero { padding: 128px 0 52px; border-bottom: 1px solid var(--line);
  background: radial-gradient(1000px 440px at 86% -20%, var(--teal-glow), transparent 60%), var(--surface); }
.detail-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }
.detail-media { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 34px; display: flex; align-items: center; justify-content: center; aspect-ratio: 4/3; box-shadow: var(--card-shadow); }
.detail-media img { max-height: 100%; width: auto; object-fit: contain; }
.detail-info .brand-tag { font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: .2em; color: var(--teal-600); margin-bottom: 10px; }
.detail-info .ptype { color: var(--teal-600); font-weight: 700; margin-bottom: 6px; }
.detail-info h1 { font-size: clamp(32px, 5vw, 50px); margin-bottom: 14px; }
.detail-info .lead { color: var(--ink-soft); font-size: 16px; margin-bottom: 20px; }
.detail-info .badges { margin-bottom: 18px; }
.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }

/* ---------- MODEL SELECTOR ---------- */
.model-select { margin: 4px 0 20px; }
.ms-label { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--teal-600); margin-bottom: 9px; }
.model-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.model-tab {
  font-family: inherit; font-weight: 700; font-size: 13.5px;
  padding: 9px 17px; border-radius: 10px; cursor: pointer;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong);
  transition: var(--transition-fast);
}
.model-tab:hover { border-color: var(--teal-500); color: var(--teal-600); }
.model-tab.active { background: var(--bg-navy-900); color: #fff; border-color: var(--bg-navy-900); }

/* ---------- HIGHLIGHTS ---------- */
.detail-section { padding: 54px 0; background: var(--surface); }
.detail-section h2 { font-size: 26px; margin-bottom: 24px; }
.highlights { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.hl-item { display: flex; gap: 12px; align-items: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px; }
.hl-item .dot { flex: none; width: 22px; height: 22px; border-radius: 6px; background: var(--teal-glow); color: var(--teal-600); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; margin-top: 1px; }
.hl-item span { font-size: 14px; color: var(--ink-soft); }

/* ---------- SPECS (light) ---------- */
.specs { padding: 54px 0 34px; background: var(--surface-2); border-top: 1px solid var(--line); }
.specs h2 { font-size: 26px; margin-bottom: 26px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px; }
.spec-code { font-size: 14px; font-weight: 600; color: var(--teal-600); }
.spec-group { margin-bottom: 26px; }
.spec-group h3 { font-size: 13px; color: var(--teal-600); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px; font-family: 'JetBrains Mono', monospace; font-weight: 700; }
.spec-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.spec-table th, .spec-table td { text-align: left; padding: 12px 16px; font-size: 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table tr:last-child td { border-bottom: none; }
.spec-table td.k { color: var(--ink-soft); font-weight: 600; width: 42%; }
.spec-table td.v { color: var(--ink); font-weight: 500; }
.spec-table tbody tr:hover { background: var(--surface-2); }

/* ---------- CTA / MISC ---------- */
.detail-cta { padding: 58px 0 78px; text-align: center; background: var(--surface); }
.detail-cta h2 { font-size: clamp(24px, 4vw, 36px); margin-bottom: 14px; }
.detail-cta p { color: var(--ink-soft); margin-bottom: 24px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 14px; font-weight: 600; margin-bottom: 20px; }
.back-link:hover { color: var(--teal-600); }

.not-found { padding: 200px 0 160px; text-align: center; }
.not-found h1 { font-size: 40px; margin-bottom: 14px; }
.not-found p { color: var(--ink-soft); margin-bottom: 26px; }

/* ---------- FOOTER (navy) ---------- */
footer { background: var(--bg-navy-950); border-top: 1px solid var(--border-dark); padding: 46px 0 34px; }
.foot-grid { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot-grid .logo-img { height: 28px; }
footer .copy { color: var(--text-muted-light); font-size: 13px; }
footer .foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
footer .foot-links a { color: var(--text-muted-light); font-size: 13px; font-weight: 600; }
footer .foot-links a:hover { color: var(--teal-400); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 860px) {
  .detail-grid { grid-template-columns: 1fr; gap: 28px; }
  .navlinks {
    position: fixed; top: 0; right: 0; height: 100vh; width: min(80vw, 320px);
    flex-direction: column; align-items: flex-start; justify-content: center;
    background: var(--bg-navy-900); padding: 40px 30px; gap: 8px;
    transform: translateX(100%); transition: var(--transition); border-left: 1px solid var(--border-dark);
  }
  .navlinks.open { transform: none; }
  .navlinks a { font-size: 16px; padding: 12px 16px; width: 100%; }
  .lang-switch { margin-left: 0; padding-left: 0; border-left: none; margin-top: 10px; }
  .burger { display: flex; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 20px; }
  .page-hero { padding: 120px 0 44px; }
  .spec-table th, .spec-table td { padding: 10px 12px; font-size: 13px; }
  .detail-actions .btn { flex: 1; justify-content: center; }
}
