:root {
  --primary: #2563eb;
  --primary-rgb: 37, 99, 235;
  --primary-dark: #1e40af;
  --secondary: #1e40af;
  --accent: #f59e0b;
  --bg: #ffffff;
  --bg-light: #ffffff;
  --bg-dark: #0f172a;
  --bg-alt: #f8fafc;
  --text: #1e293b;
  --text-light: #64748b;
  --heading-font: 'IBM Plex Sans Thai', system-ui, sans-serif;
  --body-font: 'IBM Plex Sans Thai', system-ui, sans-serif;
  --radius: 12px;
  --radius-sm: 6px;
  --radius-lg: 18px;
  --section-gap: 72px;
  --gradient-from: #2563eb;
  --gradient-to: #1e40af;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--body-font); color: var(--text); background: var(--bg); line-height: 1.7; }
h1, h2, h3, h4, h5, h6 { font-family: var(--heading-font); line-height: 1.2; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Navigation */
.nav { background: white; border-bottom: 1px solid #e5e7eb; position: sticky; top: 0; z-index: 100; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-brand { font-weight: 700; font-size: 1.25rem; color: var(--primary); text-decoration: none; }
.nav-brand:hover { text-decoration: none; }
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a { color: var(--text-light); font-size: 0.875rem; font-weight: 500; transition: color 0.2s; text-decoration: none; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); text-decoration: none; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; transition: 0.3s; }

/* Transparent nav */
.nav-transparent { background: transparent; border-bottom: none; position: fixed; width: 100%; }
.nav-transparent .nav-brand, .nav-transparent .nav-links a { color: white; }
.nav-transparent .nav-toggle span { background: white; }
.nav-transparent.scrolled { background: white; border-bottom: 1px solid #e5e7eb; backdrop-filter: blur(12px); }
.nav-transparent.scrolled .nav-brand, .nav-transparent.scrolled .nav-links a { color: var(--text); }
.nav-transparent.scrolled .nav-links a.active { color: var(--primary); }
.nav-transparent.scrolled .nav-toggle span { background: var(--text); }

/* Solid nav */
.nav-solid { background: var(--primary); border-bottom: none; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.nav-solid .nav-brand { color: white; }
.nav-solid .nav-links a { color: rgba(255,255,255,0.85); }
.nav-solid .nav-links a:hover, .nav-solid .nav-links a.active { color: white; }
.nav-solid .nav-toggle span { background: white; }

/* Buttons */
.btn-primary { display: inline-block; padding: 12px 32px; background: var(--primary); color: white; border: none; border-radius: var(--radius); font-size: 0.875rem; font-weight: 600; cursor: pointer; transition: all 0.3s ease; text-decoration: none; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); text-decoration: none; color: white; }
.btn-ghost { display: inline-block; padding: 12px 32px; background: transparent; color: white; border: 2px solid white; border-radius: var(--radius); font-size: 0.875rem; font-weight: 600; cursor: pointer; transition: all 0.3s ease; text-decoration: none; }
.btn-ghost:hover { background: rgba(255,255,255,0.15); text-decoration: none; color: white; }

/* Sections */
section { padding: var(--section-gap) 0; }
.section-alt { background: var(--bg-alt); }
.section-title { font-size: 2rem; font-weight: 700; text-align: center; margin-bottom: 12px; }
.section-subtitle { text-align: center; color: var(--text-light); margin-bottom: 48px; max-width: 600px; margin-left: auto; margin-right: auto; }

/* Cards */
.card { background: white; border-radius: var(--radius); box-shadow: 0 1px 3px rgba(0,0,0,0.08); padding: 32px; transition: box-shadow 0.3s, transform 0.3s; }
.card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.12); transform: translateY(-4px); }
.card-icon { color: var(--primary); margin-bottom: 16px; }
.card h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: 8px; }
.card p { color: var(--text-light); font-size: 0.875rem; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }

/* Products */
.product-card { background: white; border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.08); transition: box-shadow 0.3s, transform 0.3s; }
.product-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.12); transform: translateY(-4px); }
.product-card-img { width: 100%; height: 220px; object-fit: cover; }
.product-card-body { padding: 24px; }
.product-card-body h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: 8px; }
.product-card-body p { color: var(--text-light); font-size: 0.875rem; margin-bottom: 12px; }
.benefits { list-style: none; margin-top: 12px; }
.benefits li { padding: 4px 0; font-size: 0.875rem; color: var(--text-light); }
.benefits li::before { content: "✓ "; color: var(--primary); font-weight: 700; }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.about-img { border-radius: var(--radius); width: 100%; height: 350px; object-fit: cover; }

/* Stats */
.stats-bar, .stats-horizontal { background: var(--bg-dark); color: white; padding: var(--section-gap) 0; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 24px; text-align: center; }
.stat-number { font-size: 2.25rem; font-weight: 700; color: var(--accent, var(--primary)); }
.stat-label { font-size: 0.875rem; color: rgba(255,255,255,0.7); margin-top: 4px; }

/* Stats variants */
.stats-cards .stat-card { background: var(--bg-alt); border-radius: var(--radius); padding: 32px; text-align: center; }
.stats-cards .stat-card .stat-icon { color: var(--primary); margin-bottom: 12px; }
.stats-banner { background: linear-gradient(135deg, var(--gradient-from, var(--primary)), var(--gradient-to, var(--primary-dark))); color: white; padding: 48px 0; }
.stats-banner .stats-grid { display: flex; justify-content: center; align-items: center; gap: 0; }
.stats-banner .stat-item { padding: 0 40px; text-align: center; }
.stats-banner .stat-item + .stat-item { border-left: 1px solid rgba(255,255,255,0.3); }
.stats-banner .stat-number { color: white; }
.stats-banner .stat-label { color: rgba(255,255,255,0.8); }

/* Hero variants */
.hero-split { display: grid; grid-template-columns: 1fr 1fr; min-height: 500px; overflow: hidden; }
.hero-content { display: flex; flex-direction: column; justify-content: center; padding: 64px 48px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; }
.hero-content h1 { font-size: 2.5rem; font-weight: 700; margin-bottom: 16px; line-height: 1.3; color: white; }
.hero-content p { font-size: 1.125rem; opacity: 0.9; margin-bottom: 32px; max-width: 500px; }
.hero-image { background-size: cover; background-position: center; min-height: 400px; }

.hero-centered { position: relative; min-height: 520px; overflow: hidden; display: flex; align-items: center; justify-content: center; text-align: center; }
.hero-centered .hero-bg-image { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero-centered .hero-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(0,0,0,0.6), rgba(0,0,0,0.3)); }
.hero-centered .hero-inner { position: relative; z-index: 2; max-width: 700px; padding: 64px 24px; color: white; }
.hero-centered .hero-inner h1 { font-size: 2.75rem; font-weight: 700; margin-bottom: 16px; text-shadow: 0 2px 8px rgba(0,0,0,0.3); color: white; }
.hero-centered .hero-inner p { font-size: 1.125rem; opacity: 0.95; margin-bottom: 32px; }

.hero-stacked { overflow: hidden; }
.hero-stacked .hero-stacked-img { width: 100%; height: 350px; object-fit: cover; }
.hero-stacked .hero-stacked-body { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; padding: 48px; }
.hero-stacked .hero-stacked-body h1 { font-size: 2.25rem; font-weight: 700; margin-bottom: 12px; color: white; }
.hero-stacked .hero-stacked-body p { font-size: 1.125rem; opacity: 0.9; margin-bottom: 24px; }

.hero-minimal { padding: 100px 0 80px; background: var(--bg-alt); text-align: center; }
.hero-minimal .hero-eyebrow { font-size: 0.875rem; font-weight: 600; color: var(--primary); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 16px; }
.hero-minimal h1 { font-size: 3.25rem; font-weight: 800; margin-bottom: 24px; line-height: 1.15; }
.hero-minimal .hero-divider { width: 60px; height: 3px; background: var(--primary); margin: 0 auto 24px; }
.hero-minimal p { font-size: 1.25rem; color: var(--text-light); max-width: 600px; margin: 0 auto; }

.hero-simple { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; padding: 60px 0; text-align: center; }
.hero-simple h1 { font-size: 2.25rem; font-weight: 700; margin-bottom: 12px; color: white; }
.hero-simple p { font-size: 1.125rem; opacity: 0.9; max-width: 600px; margin: 0 auto; }

/* GIF Header */
.gif-header { width: 100%; overflow: hidden; }
.gif-header a { display: block; width: 100%; }
.gif-header a:hover { text-decoration: none; }
.gif-header img { width: 100%; display: block; }

/* Footer */
.footer { background: var(--bg-dark); color: #94a3b8; padding: 48px 0 24px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; margin-bottom: 32px; }
.footer h4 { color: white; font-size: 0.875rem; font-weight: 600; margin-bottom: 16px; }
.footer p, .footer a { font-size: 0.8125rem; color: #94a3b8; }
.footer a:hover { color: white; }
.footer-bottom { border-top: 1px solid #334155; padding-top: 24px; text-align: center; font-size: 0.75rem; }

.footer-simple { background: var(--bg-dark); color: #94a3b8; padding: 24px 0; }
.footer-simple-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-simple a { color: #94a3b8; font-size: 0.8125rem; margin: 0 12px; }
.footer-simple a:hover { color: white; }

.footer-centered { background: var(--bg-dark); color: #94a3b8; padding: 48px 0 24px; text-align: center; }
.footer-centered h4 { color: white; font-size: 1.125rem; margin-bottom: 12px; }
.footer-centered p { font-size: 0.875rem; max-width: 400px; margin: 0 auto 24px; }
.footer-centered .footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 24px; flex-wrap: wrap; }
.footer-centered .footer-links a { color: #94a3b8; font-size: 0.8125rem; }
.footer-centered .footer-links a:hover { color: white; }

/* Carousel */
.carousel-container { position: relative; overflow: hidden; }
.carousel-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; gap: 24px; padding: 8px 0; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track .product-card { scroll-snap-align: start; flex: 0 0 calc(33.333% - 16px); min-width: 280px; }
.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: white; border: none; cursor: pointer; font-size: 1.25rem; display: flex; align-items: center; justify-content: center; z-index: 5; box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.carousel-btn.prev { left: 8px; }
.carousel-btn.next { right: 8px; }
.carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 20px; }
.carousel-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--text-light); opacity: 0.3; border: none; cursor: pointer; }
.carousel-dot.active { opacity: 1; background: var(--primary); }

/* Masonry */
.masonry-grid { columns: 3; column-gap: 24px; }
.masonry-item { break-inside: avoid; margin-bottom: 24px; }

/* Alternating */
.alternating-row { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; margin-bottom: 48px; }
.alternating-row.reverse { direction: rtl; }
.alternating-row.reverse > * { direction: ltr; }
.alternating-img { width: 100%; height: 300px; object-fit: cover; border-radius: var(--radius); }

/* Timeline */
.timeline { position: relative; padding-left: 40px; }
.timeline::before { content: ''; position: absolute; left: 15px; top: 0; bottom: 0; width: 2px; background: var(--primary); opacity: 0.3; }
.timeline-item { position: relative; margin-bottom: 32px; }
.timeline-item::before { content: ''; position: absolute; left: -33px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--primary); border: 3px solid var(--bg); }
.timeline-year { font-weight: 700; color: var(--primary); font-size: 1.125rem; margin-bottom: 4px; }
.timeline-text { color: var(--text-light); font-size: 0.9375rem; }

/* Contact variants */
.contact-split { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.contact-map { border-radius: var(--radius); overflow: hidden; min-height: 400px; }
.contact-cards-stack { display: flex; flex-direction: column; gap: 16px; }
.contact-card { background: var(--bg-alt); border-radius: var(--radius); padding: 20px; display: flex; align-items: center; gap: 14px; }
.contact-card-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-card-label { font-size: 0.75rem; color: var(--text-light); margin-bottom: 2px; }
.contact-card-value { font-weight: 500; color: var(--text); }
.contact-full-map { border-radius: var(--radius); overflow: hidden; height: 350px; margin-bottom: 32px; }
.contact-cards-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.contact-cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.contact-big-card { background: var(--bg-alt); border-radius: var(--radius); padding: 32px; text-align: center; }
.contact-big-card .contact-big-icon { width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }

/* Privacy */
.privacy-content h3 { font-size: 1.125rem; font-weight: 600; color: var(--text); margin: 24px 0 12px; }
.privacy-content h3:first-child { margin-top: 0; }
.privacy-content p { margin-bottom: 12px; }
.privacy-content ul { margin: 8px 0 16px 24px; }
.privacy-content li { margin-bottom: 6px; }

/* Animations */
.animate-on-scroll { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }

/* Responsive */
@media (max-width: 768px) {
  .hero-split { grid-template-columns: 1fr; }
  .hero-content { padding: 40px 24px; }
  .hero-content h1 { font-size: 1.75rem; }
  .hero-image { min-height: 250px; }
  .hero-centered { min-height: 400px; }
  .hero-centered .hero-inner h1 { font-size: 1.75rem; }
  .hero-stacked .hero-stacked-img { height: 250px; }
  .hero-stacked .hero-stacked-body { padding: 32px 24px; }
  .hero-stacked .hero-stacked-body h1 { font-size: 1.75rem; }
  .hero-minimal { padding: 60px 0 48px; }
  .hero-minimal h1 { font-size: 2rem; }
  .hero-simple { padding: 40px 0; }
  .hero-simple h1 { font-size: 1.75rem; }
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; background: white; flex-direction: column; padding: 16px 24px; gap: 12px; border-bottom: 1px solid #e5e7eb; box-shadow: 0 4px 12px rgba(0,0,0,0.1); z-index: 99; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .nav-transparent .nav-links { background: white; }
  .nav-transparent .nav-links a { color: var(--text); }
  .nav-solid .nav-links { background: var(--primary); }
  section { padding: calc(var(--section-gap) * 0.6) 0; }
  .section-title { font-size: 1.5rem; }
  .about-grid { grid-template-columns: 1fr; }
  .about-img { height: 250px; }
  .product-card-img { height: 180px; }
  .card-grid { grid-template-columns: 1fr; }
  .alternating-row { grid-template-columns: 1fr; }
  .alternating-row.reverse { direction: ltr; }
  .alternating-img { height: 220px; }
  .masonry-grid { columns: 1; }
  .contact-split { grid-template-columns: 1fr; }
  .contact-map { min-height: 250px; }
  .carousel-track .product-card { flex: 0 0 calc(100% - 16px); }
  .stats-banner .stats-grid { flex-wrap: wrap; }
  .stats-banner .stat-item { padding: 16px 24px; }
  .stats-banner .stat-item + .stat-item { border-left: none; border-top: 1px solid rgba(255,255,255,0.3); }
  .footer-simple-inner { flex-direction: column; text-align: center; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .carousel-track .product-card { flex: 0 0 calc(50% - 12px); }
  .masonry-grid { columns: 2; }
}