:root {
  --primary: #0b3d6e;
  --primary-dark: #07294d;
  --accent: #e8a33d;
  --text: #26313c;
  --muted: #5f6b76;
  --bg: #ffffff;
  --bg-alt: #f2f6fa;
  --border: #dfe6ee;
  --radius: 8px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Segoe UI", "Noto Sans Thai", "Noto Sans", system-ui, -apple-system, sans-serif;
  color: var(--text);
  line-height: 1.65;
  background: var(--bg);
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; padding-bottom: 10px; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo img { height: 56px; width: auto; }
.logo-text { font-weight: 700; color: var(--primary); font-size: 1.05rem; }
.lang-switch a {
  display: inline-block;
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
}
.lang-switch a:hover { background: var(--primary); color: #fff; text-decoration: none; }
.site-nav { background: var(--primary); }
.nav-inner { display: flex; align-items: center; }
.nav-links { display: flex; flex-wrap: wrap; }
.nav-link {
  color: #dce8f4;
  padding: 13px 15px;
  display: inline-block;
  font-size: 0.95rem;
  border-bottom: 3px solid transparent;
}
.nav-link:hover { color: #fff; text-decoration: none; background: rgba(255,255,255,0.08); }
.nav-link.active { color: #fff; border-bottom-color: var(--accent); }
.nav-toggle { display: none; background: none; border: 0; color: #fff; font-size: 1.4rem; cursor: pointer; padding: 8px; }
.nav-item { position: relative; }
.caret { font-size: 0.72rem; margin-left: 3px; opacity: 0.85; }
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 300px;
  background: #fff;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 14px 30px rgba(7,41,77,0.22);
  display: none;
  z-index: 60;
  padding: 8px 0;
}
.has-dropdown:hover .dropdown,
.has-dropdown.open .dropdown { display: block; }
.dropdown-link {
  display: block;
  padding: 11px 18px;
  color: var(--primary);
  font-size: 0.92rem;
  border-left: 3px solid transparent;
}
.dropdown-link:hover { background: var(--bg-alt); border-left-color: var(--accent); color: var(--primary-dark); text-decoration: none; }

/* Hero */
.hero { position: relative; color: #fff; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 1s ease; }
.hero-bg.active { opacity: 0.55; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(7,41,77,0.92) 0%, rgba(7,41,77,0.55) 60%, rgba(7,41,77,0.25) 100%); }
.hero-content { position: relative; z-index: 1; padding: 78px 20px; max-width: 780px; margin: 0 auto; }
.hero h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); line-height: 1.3; margin-bottom: 16px; text-shadow: 0 2px 10px rgba(7,41,77,0.5); }
.hero p { font-size: 1.18rem; color: #e8f0f9; margin-bottom: 26px; text-shadow: 0 1px 6px rgba(7,41,77,0.6); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--accent); color: #1c2a37; }
.btn-primary:hover { background: #f0b255; text-decoration: none; }
.btn-outline { border-color: #fff; color: #fff; }
.btn-outline:hover { background: #fff; color: var(--primary-dark); text-decoration: none; }
.btn-light { background: #fff; color: var(--primary-dark); }
.btn-light:hover { background: var(--accent); color: #1c2a37; text-decoration: none; }

/* Stats */
.stats { background: var(--primary-dark); color: #fff; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 20px 0; text-align: center; }
.stat strong { font-size: 1.15rem; display: block; }

/* Sections */
.section { padding: 52px 0; }
.section-alt { background: var(--bg-alt); }
.section-title { font-size: 1.7rem; color: var(--primary-dark); margin-bottom: 28px; text-align: center; }
.section-sub { text-align: center; color: var(--muted); margin: -14px 0 26px; }

/* Category cards */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cat-grid-featured { grid-template-columns: repeat(3, 1fr); }
.cat-grid-aux { grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: block;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(11,61,110,0.14); text-decoration: none; }
.cat-card img { height: 180px; width: 100%; object-fit: cover; }
.cat-card h3 { padding: 14px 16px 4px; color: var(--primary); font-size: 1.05rem; }
.cat-card p { padding: 0 16px 16px; color: var(--muted); font-size: 0.92rem; }
.cat-card { position: relative; }
.cat-card-featured { border: 2px solid var(--primary); box-shadow: 0 6px 18px rgba(11,61,110,0.12); }
.cat-card-featured img { height: 220px; }
.cat-card-featured h3 { font-size: 1.18rem; color: var(--primary-dark); }
.cat-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  background: var(--primary);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}
.cat-grid-aux .cat-card img { height: 150px; }
.cat-grid-aux .cat-card h3 { font-size: 0.98rem; }

/* Product cards */
.prod-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.prod-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: block;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.prod-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(11,61,110,0.14); text-decoration: none; }
.prod-card img { height: 200px; width: 100%; object-fit: cover; }
.prod-card h3 { padding: 14px 16px 4px; color: var(--primary); font-size: 1rem; min-height: 48px; }
.prod-card p { padding: 0 16px 16px; color: var(--muted); font-size: 0.9rem; }

/* Why us */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.why-card { background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 20px; }
.why-card h3 { color: var(--primary); font-size: 1.05rem; margin-bottom: 8px; }
.why-card p { color: var(--muted); font-size: 0.92rem; }

/* FAQ */
.faq-list { max-width: 860px; margin: 0 auto; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; background: #fff; }
.faq-item summary { cursor: pointer; padding: 16px 18px; font-weight: 700; color: var(--primary); list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "▸ "; color: var(--accent); }
.faq-item[open] summary::before { content: "▾ "; }
.faq-item p { padding: 0 18px 16px; color: var(--muted); }

/* CTA band */
.cta-band { background: linear-gradient(100deg, var(--primary), var(--primary-dark)); color: #fff; }
.cta-inner { padding: 46px 20px; text-align: center; }
.cta-inner h3 { font-size: 1.5rem; margin-bottom: 6px; }
.cta-inner p { color: #dce8f4; margin-bottom: 18px; }

/* Inner pages */
.page-head { background: linear-gradient(100deg, var(--primary), var(--primary-dark)); color: #fff; padding: 44px 0; }
.page-head h1 { font-size: 1.9rem; margin-bottom: 8px; }
.page-head p { color: #dce8f4; max-width: 800px; }
.content-block { margin-bottom: 26px; max-width: 860px; }
.content-block h2 { color: var(--primary-dark); margin-bottom: 8px; font-size: 1.3rem; }
.content-block p { color: var(--muted); }
.steps-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 20px; }
.step { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.step h3 { color: var(--primary); margin-bottom: 6px; font-size: 1.02rem; }
.step p { color: var(--muted); font-size: 0.94rem; }

/* Breadcrumbs */
.breadcrumbs { padding: 18px 20px 0; font-size: 0.9rem; color: var(--muted); }
.breadcrumbs a { color: var(--primary); }
.breadcrumbs span { margin: 0 8px; color: #9aa7b3; }
.page-head .breadcrumbs { color: rgba(255,255,255,0.72); }
.page-head .breadcrumbs a { color: #ffffff; }
.page-head .breadcrumbs a:hover { color: var(--accent); }
.page-head .breadcrumbs span { color: rgba(255,255,255,0.5); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.contact-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.contact-card h3 { color: var(--primary); margin-bottom: 12px; }
.qr-lg { margin-top: 10px; }

/* Product detail */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; align-items: start; }
.product-gallery .gallery-main { border-radius: var(--radius); border: 1px solid var(--border); width: 100%; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.gallery-thumbs img { width: 82px; height: 62px; object-fit: cover; border-radius: 8px; border: 2px solid var(--border); cursor: pointer; transition: border-color 0.15s ease, opacity 0.15s ease; opacity: 0.75; }
.gallery-thumbs img:hover, .gallery-thumbs img.active { border-color: var(--primary); opacity: 1; }
.product-info h1 { color: var(--primary-dark); font-size: 1.55rem; margin-bottom: 10px; }
.product-info .lead { color: var(--primary); font-weight: 700; margin-bottom: 10px; }
.product-info p { color: var(--muted); margin-bottom: 12px; }
.highlights { margin: 14px 0 20px 18px; color: var(--text); }
.highlights li { margin-bottom: 5px; }
.product-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.feature-list { margin: 0 auto; max-width: 880px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 26px; }
.feature-list li { position: relative; padding-left: 22px; color: var(--text); line-height: 1.55; }
.feature-list li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.app-text { max-width: 880px; margin: 0 auto; color: var(--muted); text-align: center; line-height: 1.7; }
.spec-table { width: 100%; border-collapse: collapse; background: #fff; }
.spec-table th, .spec-table td { border: 1px solid var(--border); padding: 12px 16px; text-align: left; }
.spec-table th { background: var(--bg-alt); color: var(--primary); width: 40%; }
.cat-hero { border-radius: var(--radius); margin-bottom: 26px; height: 260px; width: 100%; object-fit: cover; }

/* News */
.news-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.news-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: block; }
.news-card:hover { box-shadow: 0 10px 24px rgba(11,61,110,0.14); text-decoration: none; }
.news-card img { height: 200px; width: 100%; object-fit: cover; }
.news-body { padding: 18px; }
.news-body time { color: var(--accent); font-size: 0.85rem; font-weight: 700; }
.news-body h3 { color: var(--primary); font-size: 1.08rem; margin: 6px 0; }
.news-body p { color: var(--muted); font-size: 0.94rem; }
.article { max-width: 860px; }
.article h1 { color: var(--primary-dark); font-size: 1.7rem; margin: 14px 0 6px; }
.article time { color: var(--accent); font-weight: 700; display: block; margin-bottom: 16px; }
.article img { border-radius: var(--radius); margin-bottom: 18px; }
.article p { color: var(--muted); margin-bottom: 14px; }
.article-cta { margin-top: 20px; }

/* Videos & PDF */
.video-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.video-card { position: relative; display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.video-card img { height: 220px; width: 100%; object-fit: cover; }
.video-card h3 { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(transparent, rgba(7,41,77,0.92)); color: #fff; padding: 38px 16px 14px; font-size: 1rem; }
.play { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 54px; height: 54px; border-radius: 50%; background: rgba(255,255,255,0.9); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.video-embed { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: 0 8px 22px rgba(11,61,110,0.12); }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-grid-embed { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.video-block h3 { color: var(--primary); font-size: 1.05rem; margin-bottom: 12px; text-align: center; }
.pdf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.pdf-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; background: #fff; display: block; }
.pdf-card:hover { box-shadow: 0 8px 20px rgba(11,61,110,0.12); text-decoration: none; }
.pdf-card h3 { color: var(--primary); }
.pdf-card span { color: var(--accent); font-weight: 700; }
.pdf-hero { border-radius: var(--radius); max-height: 320px; width: 100%; object-fit: cover; }
.note { color: var(--muted); font-size: 0.88rem; margin-top: 20px; }

/* Footer */
.site-footer { background: #0a1b2c; color: #b8c6d4; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1.2fr 1.2fr 1fr; gap: 28px; padding: 44px 20px 24px; }
.site-footer h4 { color: #fff; margin-bottom: 12px; }
.site-footer a { color: #8fb7dd; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 6px; }
.qr { border-radius: 6px; margin-top: 10px; }
.footer-bottom { border-top: 1px solid #1d3347; padding: 16px 20px; font-size: 0.85rem; color: #71879b; }

/* Responsive */
@media (max-width: 960px) {
  .cat-grid, .prod-grid, .why-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .nav-toggle { display: block; }
  .nav-links { display: none; width: 100%; flex-direction: column; }
  .nav-links.open { display: flex; }
  .nav-link { border-bottom: 0; border-left: 3px solid transparent; }
  .nav-link.active { border-left-color: var(--accent); }
  .nav-item.has-dropdown { width: 100%; }
  .has-dropdown > .nav-link { border-left: 3px solid transparent; }
  .dropdown { position: static; box-shadow: none; border-radius: 0; min-width: 0; }
  .dropdown-link { padding-left: 30px; font-size: 0.9rem; }
  .nav-inner { flex-wrap: wrap; }
.cat-grid, .prod-grid, .why-grid, .steps-list, .news-grid, .video-grid, .video-grid-embed, .contact-grid, .product-detail, .stats-grid, .pdf-grid, .feature-list { grid-template-columns: 1fr; }
  .hero-content { padding: 52px 20px; }
  .logo-text { display: none; }
}
