/* ============================================================
   SAMWHA INDIA — PRODUCT DATASHEET PAGES ("FORGED" theme)
   Shared by all ProductDesc/*.html technical spec pages
   ============================================================ */

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

:root {
  --bg: #07090d;
  --bg-2: #0b0f15;
  --surface: #10151d;
  --surface-2: #161d27;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.15);
  --text: #eef2f7;
  --muted: #92a0b3;
  --fire-1: #ff4d00;
  --fire-2: #ff8a00;
  --fire-3: #ffc24d;
  --fire-grad: linear-gradient(120deg, #ff4d00 0%, #ff8a00 55%, #ffc24d 100%);
  --font-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --radius: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: auto; scroll-padding-top: 90px; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 500px at 85% -5%, rgba(255, 90, 0, 0.07), transparent 60%),
    radial-gradient(700px 500px at -10% 40%, rgba(40, 90, 255, 0.05), transparent 60%);
}

::selection { background: var(--fire-2); color: #0b0500; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--fire-1), var(--fire-2));
  border-radius: 99px;
  border: 2px solid var(--bg);
}

img { max-width: 100%; display: block; }
a { color: var(--fire-2); }

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.7rem clamp(1.2rem, 4vw, 3rem);
  background: rgba(7, 9, 13, 0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.logo img {
  height: 72px;
  width: auto;
  background: transparent;
  border-radius: 0;
  padding: 0;
}

/* Back link (injected by ld-main.js) */
.back-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--line-strong);
  padding: 0.55rem 1.2rem;
  border-radius: 99px;
  transition: color 0.3s, border-color 0.3s;
}

.back-link:hover { color: var(--fire-3); border-color: var(--fire-2); }

/* ---------- Page shell ---------- */
.page {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 120px clamp(1rem, 4vw, 2.5rem) 4rem;
}

/* ---------- Sections ---------- */
.section {
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
  padding: clamp(1.6rem, 4vw, 2.6rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.section h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0 0 1.2rem;
  position: relative;
  padding-bottom: 0.8rem;
}

.section h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 3px;
  background: var(--fire-grad);
  border-radius: 3px;
}

.section h3 {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--fire-2);
  margin: 0 0 0.8rem;
}

#overview {
  background:
    radial-gradient(600px 280px at 100% 0%, rgba(255, 100, 0, 0.12), transparent 70%),
    var(--surface);
  border-color: rgba(255, 140, 40, 0.3);
}

.lead {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 75ch;
  margin: 0 0 1.5rem;
}

.section ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.55rem 1.2rem;
}

.section ul li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.93rem;
  color: var(--text);
}

.section ul li::before {
  content: "◆";
  position: absolute;
  left: 0;
  top: 0.22rem;
  font-size: 0.65rem;
  color: var(--fire-2);
}

/* ---------- Overview layout ---------- */
.overview-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.overview-image img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
}

.img-caption {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-top: 0.7rem;
  text-align: center;
}

/* ---------- Tables (the heart of these pages) ---------- */
.table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  scrollbar-width: thin;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  min-width: 860px;
}

thead th {
  position: sticky;
  top: 0;
  background: linear-gradient(180deg, #1a2230, #131922);
  color: var(--fire-3);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.85rem 0.8rem;
  text-align: left;
  border-bottom: 2px solid rgba(255, 140, 40, 0.45);
  white-space: nowrap;
}

tbody td {
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

tbody td:first-child {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.022); }

tbody tr:hover {
  background: rgba(255, 120, 10, 0.08);
}

tbody tr:hover td:first-child { color: var(--fire-3); }

tbody tr:last-child td { border-bottom: none; }

/* ---------- Unshaped images ---------- */
.unshaped-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
}

.unshaped-images figure {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s;
}

.unshaped-images figure:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 140, 30, 0.45);
}

.unshaped-images img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.unshaped-images figcaption {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.9rem 1rem;
  text-align: center;
}

/* ---------- Back to top ---------- */
#backToTop {
  display: none;
  position: fixed;
  bottom: 26px;
  right: 26px;
  z-index: 1100;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: var(--fire-grad);
  color: #160800;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 14px 34px -10px rgba(255, 110, 0, 0.6);
  transition: transform 0.3s var(--ease);
}

#backToTop:hover { transform: translateY(-4px); }

/* ---------- Footer ---------- */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  text-align: center;
  padding: 1.6rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--fire-grad);
}

.footer p { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .overview-layout { grid-template-columns: 1fr; }
  .back-link { display: none; }
  .page { padding-top: 100px; }
}

/* ---------- Theme toggle button ---------- */
.theme-toggle {
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  transition: border-color 0.3s, color 0.3s;
  padding: 0;
  flex-shrink: 0;
  margin-left: auto;
}
.theme-toggle:hover { border-color: var(--fire-2); color: var(--fire-2); }

/* ---------- Light mode ---------- */
[data-theme="light"] {
  --bg: #f0f4fa;
  --bg-2: #e6eaf2;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.15);
  --text: #0d1117;
  --muted: #4a5568;
}

[data-theme="light"] body { background: var(--bg); color: var(--text); }

[data-theme="light"] .navbar {
  background: rgba(230, 234, 242, 0.95);
  border-bottom-color: var(--line);
}

[data-theme="light"] thead th {
  background: linear-gradient(180deg, #e2e8f0, #d8e0ec);
  color: var(--fire-1);
}

[data-theme="light"] .table-wrapper {
  background: var(--bg-2);
  border-color: var(--line-strong);
}

[data-theme="light"] tbody td { color: var(--muted); }
[data-theme="light"] tbody td:first-child { color: var(--text); }
[data-theme="light"] tbody tr:nth-child(even) { background: rgba(0,0,0,0.025); }
[data-theme="light"] tbody tr:hover { background: rgba(255,120,10,0.06); }
[data-theme="light"] tbody tr:hover td:first-child { color: var(--fire-1); }

[data-theme="light"] .section {
  background: var(--surface);
  border-color: var(--line-strong);
}

[data-theme="light"] #overview {
  background: radial-gradient(600px 280px at 100% 0%, rgba(255,100,0,0.06), transparent 70%), var(--surface);
  border-color: rgba(255,140,40,0.25);
}

[data-theme="light"] .footer {
  background: var(--bg-2);
  border-top-color: var(--line-strong);
}

[data-theme="light"] .back-link {
  color: #4a5568;
  border-color: var(--line-strong);
}

[data-theme="light"] .back-link:hover { color: var(--fire-1); border-color: var(--fire-1); }

[data-theme="light"] #overview { color: var(--text); }
[data-theme="light"] .lead { color: var(--muted); }
[data-theme="light"] .section ul li { color: var(--text); }
[data-theme="light"] .img-caption { color: var(--muted); }
[data-theme="light"] .unshaped-images figcaption { color: var(--muted); }
