/*
 * Site-wide visual design (header, footer, homepage sections).
 * Converted from a Claude Design Canvas mockup into static CSS/HTML — see
 * docs/design-integration.md for provenance and what was adapted vs. kept.
 */

@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@400;500;600;700&family=Noto+Sans+Thai:wght@300;400;500;600;700&display=swap');

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Noto Sans Thai', sans-serif;
  color: #111827;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
h1, h2, h3, h4 { font-family: 'Prompt', sans-serif; line-height: 1.25; margin: 0; letter-spacing: -0.01em; }
a { color: #F20D18; text-decoration: none; }

/* ---- hover states (from the design's per-element hover styles) ---- */
.scp0:hover { background: #061A4A; }
.scp1:hover { background: rgba(255,255,255,.15); border-color: #fff; }
.scp2:hover { opacity: .82; }
.scp3:hover { color: #FFD8D8; }
.scp4:hover { background: #F5F7FB; }
.scp5:hover { color: #F20D18; }
.scp6:hover { transform: translateY(-2px); }
.scp7:hover { background: #fff; }
.scp8:hover { border-color: #C9D8F7; transform: translateY(-2px); box-shadow: 0 14px 30px rgba(6,26,74,.1); }
.scp9:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(242,13,24,.34); }
.scpa:hover { background: #F5F7FB; color: #F20D18; }
.scpb:hover { box-shadow: 0 22px 44px rgba(6,26,74,.12); transform: translateY(-4px); }
.scpc:hover { border-color: #F20D18; transform: translateY(-3px); }
.scpd:hover { box-shadow: 0 22px 44px rgba(6,26,74,.12); transform: translateY(-4px); border-color: #fff; }
.scpe:hover { background: #EAF0FF; border-color: #C9D8F7; transform: translateY(-3px); }
.scpf:hover { box-shadow: 0 22px 44px rgba(6,26,74,.14); transform: translateY(-4px); }
.scpg:hover { color: #fff; }
.scph:hover { background: #F20D18; }

/* ---- header login button ---- */
.btn-login {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Prompt', sans-serif; font-weight: 600; font-size: 14.5px;
  color: #061A4A; background: #fff; padding: 10px 20px; border-radius: 999px;
  text-decoration: none; transition: color .2s, transform .2s;
  box-shadow: 0 4px 14px rgba(0,0,0,.16); white-space: nowrap;
}
.btn-login:hover { color: #F20D18; transform: translateY(-1px); }
.btn-login.-mobile { justify-content: center; margin-top: 10px; }

/* ---- header / mega menu (desktop: hover; mobile: JS toggles .is-open) ---- */
.mega-trigger { position: relative; height: 100%; display: flex; align-items: center; }
.mega-panel {
  display: none;
  position: absolute; top: 100%; left: 0; width: 660px;
  background: #fff; border: 1px solid #E6EBF5; border-radius: 0 0 18px 18px;
  box-shadow: 0 24px 60px rgba(6,26,74,.16); padding: 22px;
  grid-template-columns: 1fr 1fr; gap: 8px 26px; z-index: 70;
}
.mega-trigger:hover .mega-panel,
.mega-trigger.is-open .mega-panel { display: grid; }
.mega-group { padding: 12px; border-radius: 12px; }
.mega-group:hover { background: #F5F7FB; }
.mega-group-title { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.mega-item { display: block; font-size: 13.5px; color: #64748B; padding: 3px 0 3px 39px; }
.mega-item:hover { color: #F20D18; }

/* ---- Engineering ToolBox dropdown (2-column, matches product mega menu) ---- */
.tools-panel { width: 600px; left: auto; right: 0; grid-template-columns: 1fr 1fr; gap: 2px 14px; padding: 18px; }
.tools-link { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; }
.tools-link:hover { background: #F5F7FB; }
.tools-link.-soon { opacity: .55; pointer-events: none; }
.tools-link-ico {
  width: 40px; height: 40px; border-radius: 10px; flex: 0 0 auto;
  background: #EAF0FF; color: #061A4A; display: flex; align-items: center; justify-content: center;
  transition: background .18s;
}
.tools-link:hover .tools-link-ico { background: #DCE6FB; }
.tools-link-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tools-link-body b { font-family: 'Prompt', sans-serif; font-weight: 600; font-size: 14.5px; color: #061A4A; }
.tools-link-body small { font-size: 12.5px; color: #64748B; }
.tools-all {
  grid-column: 1 / -1; display: flex; align-items: center; justify-content: flex-end; gap: 5px;
  margin-top: 8px; padding: 12px 12px 2px; border-top: 1px solid #EEF1F7;
  font-family: 'Prompt', sans-serif; font-weight: 600; font-size: 13px; color: #061A4A; transition: color .18s;
}
.tools-all:hover { color: #2650b0; }

.mobile-toggle { display: none; }
.mobile-menu { display: none; }
/* !important needed: these elements carry an inline display:flex for their
   default (desktop) state, which otherwise beats a plain media-query rule. */
@media (max-width: 979px) {
  .desktop-nav, .header-actions { display: none !important; }
  .mobile-toggle { display: flex !important; }
  .mobile-menu.is-open { display: block; }
}
.mobile-menu {
  background: #061A4A; padding: 8px 20px 16px;
}
.mobile-menu a {
  display: block; padding: 10px 0; color: #fff; font-family: Prompt; font-weight: 500;
  font-size: 15px; border-bottom: 1px solid rgba(255,255,255,.08);
}

/* ---- hero carousel ---- */
.hero-track { display: flex; height: 100%; transition: transform .6s cubic-bezier(.4,0,.2,1); }
.hero-slide { flex: 0 0 100%; min-height: 360px; position: relative; display: flex; align-items: center; padding: 44px 50px; overflow: hidden; color: #fff; }
.hero-grid-bg { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.07) 1px,transparent 1px), linear-gradient(90deg,rgba(255,255,255,.07) 1px,transparent 1px); background-size: 40px 40px; opacity: .6; }
.hero-dot { width: 9px; height: 9px; border-radius: 99px; border: none; padding: 0; cursor: pointer; transition: .3s; background: rgba(255,255,255,.55); }
.hero-dot.is-active { width: 24px; background: #F20D18; }

/* ---- category strip ---- */
#catStrip { scrollbar-width: none; }
#catStrip::-webkit-scrollbar { display: none; }

/* ---- utility ---- */
.container { max-width: 1290px; margin: 0 auto; padding: 0 20px; }
