/* SR CNC EXPERT — Phase 1 styles.
   Brand: Deep Navy #111B2B, Graphite #252B32, Champagne Gold #C5A15B,
   Walnut #704B32, Warm Ivory #F4F1E9, White. Gold = software/founder name only;
   all other text is silver/ivory-white (KHAN-style gold/silver rule). */
@font-face {
  font-family: 'Hind Siliguri'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/assets/fonts/hind-siliguri-400-bengali.woff2') format('woff2');
  unicode-range: U+0980-09FE, U+200C-200D, U+20B9;
}
@font-face {
  font-family: 'Hind Siliguri'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/assets/fonts/hind-siliguri-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F;
}
@font-face {
  font-family: 'Hind Siliguri'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('/assets/fonts/hind-siliguri-500-bengali.woff2') format('woff2');
  unicode-range: U+0980-09FE, U+200C-200D, U+20B9;
}
@font-face {
  font-family: 'Hind Siliguri'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('/assets/fonts/hind-siliguri-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F;
}
@font-face {
  font-family: 'Hind Siliguri'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('/assets/fonts/hind-siliguri-600-bengali.woff2') format('woff2');
  unicode-range: U+0980-09FE, U+200C-200D, U+20B9;
}
@font-face {
  font-family: 'Hind Siliguri'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('/assets/fonts/hind-siliguri-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F;
}
@font-face {
  font-family: 'Hind Siliguri'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('/assets/fonts/hind-siliguri-700-bengali.woff2') format('woff2');
  unicode-range: U+0980-09FE, U+200C-200D, U+20B9;
}
@font-face {
  font-family: 'Hind Siliguri'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('/assets/fonts/hind-siliguri-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F;
}
@font-face {
  font-family: 'Montserrat'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/assets/fonts/montserrat-variable-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/assets/fonts/inter-variable-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F;
}
@font-face {
  font-family: 'Sabbir Ashalota 2'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/assets/fonts/Li%20Sabbir%20Ashalota%202%20Unicode.ttf') format('truetype');
}

:root {
  --navy: #111B2B;
  --graphite: #252B32;
  --gold: #C5A15B;
  --gold-deep: #a8853f;
  --walnut: #704B32;
  --ivory: #F4F1E9;
  --white: #FFFFFF;
  --silver: #D9DEE6;
  --muted: #687386;
  --border: #D9DEE6;
  --success: #27865A;
  --warning: #C58B35;
  --error: #C94C4C;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ivory); color: var(--navy);
  font-family: 'Hind Siliguri', 'Inter', system-ui, sans-serif;
  font-size: 16px; line-height: 1.6;
}
a { color: var(--navy); }
img { max-width: 100%; }

/* Header */
.topbar {
  background: var(--navy); color: var(--white);
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; position: sticky; top: 0; z-index: 20;
  border-bottom: 2px solid var(--gold);
}
.topbar .logo { height: 44px; width: auto; }
.brand-name {
  font-family: 'Montserrat', sans-serif; font-weight: 800; letter-spacing: .06em;
  color: var(--gold); font-size: 20px; line-height: 1.1; text-decoration: none;
}
.brand-sub { font-size: 12px; color: var(--silver); line-height: 1.2; }
.topbar .spacer { flex: 1; }
.lang-toggle {
  background: transparent; color: var(--silver); border: 1px solid var(--gold);
  border-radius: 999px; padding: 6px 14px; font-family: inherit; font-size: 14px;
  cursor: pointer;
}
.lang-toggle:hover { background: var(--gold); color: var(--navy); }
.nav-link { color: var(--silver); text-decoration: none; font-size: 15px; padding: 6px 8px; }
.nav-link:hover { color: var(--gold); }

/* Hero banner (owner-approved final banner) */
.hero { position: relative; background: var(--navy); }
.hero img { display: block; width: 100%; height: auto; }
.hero .hero-caption {
  position: absolute; left: 16px; bottom: 12px; right: 16px;
  color: var(--white); font-size: 14px;
  text-shadow: 0 1px 6px rgba(0,0,0,.7);
}
.hero .hero-caption strong { color: var(--gold); }

/* Layout */
.wrap { max-width: 1080px; margin: 0 auto; padding: 16px; }
h1, h2, h3 { font-family: 'Sabbir Ashalota 2', 'Hind Siliguri', sans-serif; font-weight: 400; line-height: 1.3; }
.page-title { font-size: 30px; margin: 8px 0 4px; }
.page-sub { color: var(--muted); margin: 0 0 16px; }
.section-title { font-size: 24px; margin: 24px 0 10px; }

/* Notices */
.notice {
  border: 1px solid var(--border); border-left: 4px solid var(--warning);
  background: var(--white); padding: 12px 14px; border-radius: 8px; margin: 12px 0;
  font-size: 15px;
}
.notice.info { border-left-color: var(--gold); }
.notice strong { color: var(--navy); }
.badge {
  display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px;
  border-radius: 999px; background: var(--ivory); border: 1px solid var(--border); color: var(--muted);
}
.badge.gold { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.badge.warn { background: #fdf3e3; border-color: var(--warning); color: #7a5410; }

/* Search + filters */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0; }
.search {
  flex: 1; min-width: 200px; padding: 10px 12px; font-family: inherit; font-size: 16px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--white);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--border); background: var(--white); color: var(--navy);
  border-radius: 999px; padding: 8px 14px; font-family: inherit; font-size: 15px; cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--navy); color: var(--gold); border-color: var(--navy); }

/* Design grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card {
  background: var(--white); border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit;
}
.card:hover { border-color: var(--gold); box-shadow: 0 4px 18px rgba(17,27,43,.12); }
.card .thumb { background: var(--ivory); aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: contain; }
.card .body { padding: 12px 14px; }
.card h3 { margin: 0 0 4px; font-size: 19px; }
.card .meta { font-size: 14px; color: var(--muted); }
.card .row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

/* Detail page */
.detail-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 860px) { .detail-grid { grid-template-columns: 1.6fr 1fr; } }
.preview-box { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.preview-box .stage { background: var(--ivory); border-radius: 8px; overflow: hidden; }
.preview-box .stage svg, .preview-box .stage img { display: block; width: 100%; height: auto; }
.view-tabs { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.view-tab {
  border: 1px solid var(--border); background: var(--white); border-radius: 8px;
  padding: 8px 14px; font-family: inherit; font-size: 15px; cursor: pointer;
}
.view-tab[aria-pressed="true"] { background: var(--navy); color: var(--gold); border-color: var(--navy); }
.fake3d { transform: perspective(900px) rotateX(18deg) rotateZ(-8deg); transform-origin: center; filter: drop-shadow(6px 10px 0 rgba(17,27,43,.18)); }
.fake25d svg, .fake25d img { filter: drop-shadow(0 0 0 #C5A15B) drop-shadow(3px 3px 0 rgba(197,161,91,.55)) drop-shadow(6px 6px 0 rgba(197,161,91,.3)); }
.panel { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.panel h2 { margin-top: 0; font-size: 22px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-family: 'Inter', 'Hind Siliguri', sans-serif; }
.btn {
  display: inline-block; background: var(--gold); color: var(--navy); border: none;
  border-radius: 8px; padding: 12px 18px; font-family: inherit; font-size: 16px; font-weight: 700;
  text-decoration: none; cursor: pointer; text-align: center;
}
.btn:hover { background: var(--gold-deep); color: var(--white); }
.btn.ghost { background: var(--white); border: 1px solid var(--navy); color: var(--navy); font-weight: 600; }
.btn.ghost:hover { background: var(--navy); color: var(--gold); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
label.field { display: block; font-size: 14px; color: var(--muted); margin-top: 10px; }
input.field, select.field {
  width: 100%; padding: 10px 12px; font-family: inherit; font-size: 16px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--white); margin-top: 4px;
}

/* Footer */
footer { background: var(--navy); color: var(--silver); margin-top: 40px; padding: 24px 16px; }
footer .wrap { padding: 0; }
footer strong { color: var(--gold); }
footer a { color: var(--silver); }
footer .cols { display: grid; gap: 16px; }
@media (min-width: 700px) { footer .cols { grid-template-columns: 1fr 1fr; } }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.error-box { background: #fdeeee; border: 1px solid var(--error); color: #7a1f1f; border-radius: 8px; padding: 12px 14px; }
.loading { color: var(--muted); padding: 24px 0; }
