/* ==========================================================================
   S-ONE GROUP 2026 - Premium Architectural Experience (Light & Clean White Theme)
   Colors: S-One Red (#C8202B), Pure White (#ffffff), Architectural Slate (#f8fafc)
   ========================================================================== */

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

:root {
  --primary-red: #C8202B;
  --primary-red-light: #D93A44;
  --primary-red-dark: #A71923;
  --primary-red-glow: rgba(200, 32, 43, 0.25);
  --primary-red-subtle: rgba(200, 32, 43, 0.08);

  --accent-gold: #b38228;
  --accent-silver: #64748b;
  --accent-blue: #0284c7;

  --bg-main: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;

  --border-subtle: #e2e8f0;
  --border-hover: #cbd5e1;
  --border-red: rgba(200, 32, 43, 0.35);

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;

  --glass-bg: rgba(255, 255, 255, 0.95);
  --glass-blur: blur(20px);
  --glass-border: 1px solid #e2e8f0;

  --radius-sm: 0;
  --radius-md: 0;
  --radius-lg: 0;
  --radius-full: 0;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 20px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 16px 36px -4px rgba(15, 23, 42, 0.1), 0 4px 12px -2px rgba(15, 23, 42, 0.05);
  --shadow-red: 0 8px 24px rgba(145, 2, 4, 0.18);

  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light theme overrides */
.light-mode-card {
  background: #ffffff;
  color: #0f172a;
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-main);
  color: var(--text-main);
  overflow-x: hidden;
}

body {
  font-family: 'IBM Plex Sans Thai', sans-serif;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(145, 2, 4, 0.03) 0%, transparent 45%),
    radial-gradient(circle at 90% 85%, rgba(226, 232, 240, 0.65) 0%, transparent 50%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-red);
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
}

/* Container */
.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

/* Top bar */
.top-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.825rem;
  padding: 0.45rem 0;
  position: relative;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.top-contacts {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.top-contacts a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
}
.top-contacts a:hover {
  color: var(--primary-red);
}
.top-contacts i {
  color: var(--primary-red-light);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.social-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.social-links a {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.8rem;
  transition: var(--transition-fast);
}
.social-links a:hover {
  background: var(--primary-red);
  color: #fff;
  border-color: var(--primary-red);
  transform: translateY(-2px);
}

.top-lazada-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, #0f146d 0%, #001282 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  color: #fff;
  font-size: 0.775rem;
  transition: var(--transition-fast);
}
.top-shop-icon {
  width: 34px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border: 1px solid rgba(255,255,255,.28);
  transition: var(--transition-fast);
}
.top-shop-icon:hover { transform: translateY(-1px); filter: brightness(1.12); }
.top-shopee-btn { background: #ee4d2d; }
.top-shopee-btn svg { width: 19px; height: 19px; fill: currentColor; }
.top-lazada-btn { background: #0f146d; padding: 0; width: 34px; height: 30px; justify-content: center; font-size: 1rem; }
.top-lazada-btn:hover { box-shadow: 0 0 15px rgba(0, 50, 200, 0.5); }
.top-lazada-btn:hover {
  box-shadow: 0 0 15px rgba(0, 50, 200, 0.5);
  transform: translateY(-1px);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  border-radius: var(--radius-full);
  padding: 2px;
  border: 1px solid var(--border-subtle);
}
.lang-switch a {
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.lang-switch a.active {
  background: var(--primary-red);
  color: #fff;
}

/* Main Navbar */
.main-nav {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border-bottom: var(--glass-border);
  z-index: 99;
  transition: var(--transition-smooth);
}
.main-nav.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.brand-logo img {
  height: 44px;
  width: auto;
  object-fit: contain;
}
.brand-badge {
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--primary-red);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}
.nav-link {
  font-size: 0.925rem;
  font-weight: 600;
  color: #334155;
  position: relative;
  padding: 0.5rem 0;
  transition: var(--transition-fast);
}
.nav-link:hover, .nav-link.active {
  color: var(--primary-red);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--primary-red);
  transition: var(--transition-fast);
  border-radius: 2px;
}
.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* Nav Item Dropdown */
.nav-item-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}
.nav-item-dropdown .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}
.nav-item-dropdown .dropdown-chevron {
  font-size: 0.7rem;
  transition: transform var(--transition-fast);
  color: #64748b;
}
.nav-item-dropdown:hover .dropdown-chevron {
  transform: rotate(180deg);
  color: var(--primary-red);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: #ffffff;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-top: 3px solid var(--primary-red);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
  min-width: 290px;
  padding: 0.6rem;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
/* Invisible hover bridge */
.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 0;
  width: 100%;
  height: 14px;
}
.nav-item-dropdown:hover .dropdown-menu,
.nav-item-dropdown:focus-within .dropdown-menu {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.dropdown-item {
  display: flex !important;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  text-decoration: none;
  transition: var(--transition-fast);
  background: transparent;
  border: 1px solid transparent;
}
.dropdown-item:hover,
.dropdown-item.active {
  background: #fef2f2;
  border-color: rgba(145, 2, 4, 0.2);
  color: var(--primary-red);
  transform: translateX(3px);
}
.dropdown-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #f8fafc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: var(--primary-red);
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
  transition: var(--transition-fast);
}
.dropdown-item:hover .dropdown-item-icon,
.dropdown-item.active .dropdown-item-icon {
  background: var(--primary-red);
  color: #fff;
  border-color: var(--primary-red);
  box-shadow: 0 2px 10px rgba(145, 2, 4, 0.4);
}
.dropdown-item-content {
  display: flex;
  flex-direction: column;
}
.dropdown-item-title {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  color: #0f172a;
}
.dropdown-item:hover .dropdown-item-title {
  color: var(--primary-red);
}
.dropdown-item-desc {
  font-size: 0.725rem;
  color: #64748b;
  line-height: 1.25;
  margin-top: 2px;
}
.dropdown-item:hover .dropdown-item-desc {
  color: #475569;
}

.nav-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
  color: #fff;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.875rem;
  box-shadow: 0 4px 15px rgba(145, 2, 4, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: var(--transition-fast);
}
.nav-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(145, 2, 4, 0.6);
  border-color: rgba(255, 255, 255, 0.3);
}

.mobile-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--text-main);
  background: none;
  padding: 0.5rem;
}

/* ==========================================================================
   Hero Section & WebGL Canvas
   ========================================================================== */
.hero-section {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding: 5rem 0 4rem;
  overflow: hidden;
}

#webgl-hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 65% 50%, rgba(255, 255, 255, 0.3) 0%, rgba(248, 250, 252, 0.94) 80%);
  z-index: 2;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 780px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  background: #fef2f2;
  border: 1px solid rgba(145, 2, 4, 0.25);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--primary-red);
  margin-bottom: 1.5rem;
}
.hero-badge i {
  color: var(--primary-red);
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
  color: #0f172a;
}
.hero-title span.gradient-text {
  background: linear-gradient(135deg, #0f172a 30%, #910204 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 2.5rem;
  max-width: 660px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
  color: #fff;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 1rem;
  box-shadow: 0 4px 15px rgba(145, 2, 4, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: var(--transition-smooth);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(145, 2, 4, 0.5);
  color: #fff;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: #ffffff;
  color: #1e293b;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid #cbd5e1;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}
.btn-secondary:hover {
  background: #f8fafc;
  border-color: var(--primary-red);
  color: var(--primary-red);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Stats Counter Row */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  padding: 1.5rem 2rem;
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
}
.stat-card {
  text-align: center;
  position: relative;
}
.stat-card:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -0.75rem;
  top: 20%;
  height: 60%;
  width: 1px;
  background: var(--border-subtle);
}
.stat-num {
  font-size: 2.25rem;
  font-weight: 800;
  color: #0f172a;
  font-family: 'IBM Plex Sans Thai', sans-serif;
  line-height: 1.1;
  margin-bottom: 0.25rem;
}
.stat-num span {
  color: var(--primary-red);
}
.stat-label {
  font-size: 0.825rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ==========================================================================
   Section Headers & Components
   ========================================================================== */
.section {
  padding: 6rem 0;
  position: relative;
}
.section.alt-bg {
  background: var(--bg-tertiary);
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 4rem;
}
.section-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--primary-red);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  padding: 0.25rem 0.75rem;
  background: #fef2f2;
  border: 1px solid rgba(145, 2, 4, 0.25);
  border-radius: var(--radius-full);
}
.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  color: #0f172a;
}
.section-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
}

/* ==========================================================================
   4 Affiliates (Companies in Group)
   ========================================================================== */
.affiliates-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.affiliate-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.affiliate-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-red);
  box-shadow: var(--shadow-md), var(--shadow-red);
}

.affiliate-img-wrap {
  position: relative;
  height: 240px;
  overflow: hidden;
  background: #f1f5f9;
}
.affiliate-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.affiliate-card:hover .affiliate-img {
  transform: scale(1.06);
}
.affiliate-badge-top {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border: 1px solid #e2e8f0;
  color: #0f172a;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.affiliate-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.affiliate-brand {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.affiliate-subname {
  font-size: 0.875rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}
.affiliate-role {
  display: inline-block;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--primary-red-light);
  margin-bottom: 0.75rem;
}
.affiliate-desc {
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.affiliate-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}
.btn-map {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1e293b;
  background: #f8fafc;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  transition: var(--transition-fast);
}
.btn-map:hover {
  background: var(--primary-red);
  color: #fff;
  border-color: var(--primary-red);
}

/* Company Profile Cards (company.php dedicated styles) */
.company-profile-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  box-shadow: var(--shadow-md);
  transition: var(--transition-smooth);
  opacity: 1 !important;
  visibility: visible !important;
}
.company-profile-card:hover {
  border-color: var(--border-red);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08), 0 0 20px rgba(145, 2, 4, 0.15);
  transform: translateY(-4px);
}
.company-img-col {
  position: relative;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 320px;
}
.company-img-col img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.company-profile-card:hover .company-img-col img {
  transform: scale(1.04);
}
.company-info-col {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  background: #ffffff;
}
.company-badge-tag {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary-red-light);
  margin-bottom: 0.35rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.company-card-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.4rem;
  line-height: 1.3;
}
.company-card-sub {
  font-size: 0.95rem;
  color: #64748b;
  margin-bottom: 1.25rem;
  font-weight: 500;
}
.company-card-desc {
  font-size: 0.975rem;
  color: #334155;
  line-height: 1.8;
  margin-bottom: 1.75rem;
}

@media (max-width: 900px) {
  .company-profile-card {
    grid-template-columns: 1fr;
  }
  .company-img-col {
    height: 240px;
    min-height: auto;
  }
  .company-info-col {
    padding: 1.75rem;
  }
  .company-card-title {
    font-size: 1.5rem;
  }
}

/* Executive Vision Grid (visions_sone.php) */
.executive-vision-grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 3.5rem;
  align-items: center;
  margin-bottom: 4.5rem;
}
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
@media (max-width: 1024px) {
  .pillars-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 860px) {
  .executive-vision-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .pillars-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Products & Systems
   ========================================================================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}
.product-card,
.benefit-card,
.feature-card,
.catalog-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}
.product-card:hover,
.benefit-card:hover,
.feature-card:hover,
.catalog-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-red);
  box-shadow: var(--shadow-md), var(--shadow-red);
  background: #ffffff;
}
.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary-red), transparent);
  opacity: 0;
  transition: var(--transition-fast);
}
.product-card:hover::before {
  opacity: 1;
}
.product-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: #fef2f2;
  border: 1px solid rgba(145, 2, 4, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-red);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}
.product-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.75rem;
}
.product-desc {
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}
.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
}
.product-tag {
  font-size: 0.725rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  color: #64748b;
}

/* ==========================================================================
   WebGL 3D Material Studio
   ========================================================================== */
.studio-wrapper {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: 2fr 1fr;
  min-height: 580px;
}

.studio-viewport {
  position: relative;
  background: radial-gradient(circle at center, #ffffff 0%, #f1f5f9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 450px;
}
#webgl-studio-canvas {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  cursor: grab;
}
#webgl-studio-canvas:active {
  cursor: grabbing;
}
.studio-overlay-hint {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  pointer-events: none;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.studio-controls {
  padding: 2.25rem 2rem;
  background: #ffffff;
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.control-group h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.control-group h4 i {
  color: var(--primary-red-light);
}

.finish-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}
.finish-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.6rem 0.4rem;
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #475569;
  font-size: 0.75rem;
  font-weight: 500;
  transition: var(--transition-fast);
}
.finish-btn:hover {
  background: #f1f5f9;
  border-color: var(--border-hover);
  color: #0f172a;
}
.finish-btn.active {
  background: #fef2f2;
  border-color: var(--primary-red);
  color: var(--primary-red);
}
.color-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  margin-bottom: 0.35rem;
  border: 1px solid rgba(0, 0, 0, 0.15);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.glass-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}
.glass-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #475569;
  font-size: 0.775rem;
  font-weight: 500;
  transition: var(--transition-fast);
}
.glass-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.glass-btn.active {
  background: #fef2f2;
  border-color: var(--primary-red);
  color: var(--primary-red);
}
.glass-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.studio-specs-box {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.studio-specs-box div {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}
.studio-specs-box div:last-child {
  margin-bottom: 0;
}
.studio-specs-box b {
  color: #0f172a;
}

.studio-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: auto;
}
.btn-studio-action {
  flex: 1;
  padding: 0.6rem;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #1e293b;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
}
.btn-studio-action:hover {
  background: #f8fafc;
  border-color: var(--primary-red);
  color: var(--primary-red);
}

/* ==========================================================================
   BOM Material Estimator Calculator
   ========================================================================== */
.bom-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}
.bom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.4rem;
}
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  color: #0f172a;
  font-size: 0.95rem;
  font-family: inherit;
  transition: var(--transition-fast);
}
.form-control:focus {
  border-color: var(--primary-red);
  box-shadow: 0 0 0 3px rgba(145, 2, 4, 0.12);
  outline: none;
}
select.form-control option {
  background: #ffffff;
  color: #0f172a;
}

.bom-result-box {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.bom-result-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.bom-result-title i {
  color: var(--primary-red-light);
}
.bom-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}
.bom-table th, .bom-table td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}
.bom-table th {
  color: var(--text-dim);
  font-weight: 600;
}
.bom-table td {
  color: var(--text-main);
}
.bom-table td.highlight {
  color: var(--primary-red-light);
  font-weight: 700;
}

#calc-results table {
  width: 100% !important;
  border-collapse: collapse !important;
  border: 1px solid #e2e8f0 !important;
  margin-bottom: 2rem !important;
  background: #ffffff !important;
  border-radius: var(--radius-md) !important;
  overflow: hidden !important;
  box-shadow: var(--shadow-sm) !important;
}
#calc-results table td,
#calc-results table th {
  border: 1px solid #e2e8f0 !important;
  padding: 0.7rem 0.85rem !important;
  font-size: 0.875rem !important;
  vertical-align: middle !important;
}
#calc-results table tr[bgcolor="#ffffff"] td {
  color: #0f172a !important;
  background-color: #ffffff !important;
}
#calc-results table tr:hover td {
  background-color: #f8fafc !important;
}
#calc-results table h4 {
  margin: 0.4rem 0 !important;
  font-size: 1.05rem !important;
  letter-spacing: 0.02em !important;
}

/* ==========================================================================
   Dealer Locator
   ========================================================================== */
.dealer-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
}
.dealer-tab-btn {
  padding: 0.5rem 1.25rem;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: #475569;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
}
.dealer-tab-btn:hover {
  background: #f8fafc;
  color: #0f172a;
}
.dealer-tab-btn.active {
  background: var(--primary-red);
  color: #fff;
  border-color: var(--primary-red);
  box-shadow: 0 4px 15px rgba(145, 2, 4, 0.35);
}

.dealers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.dealer-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}
.dealer-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}
.dealer-province-tag {
  align-self: flex-start;
  font-size: 0.725rem;
  font-weight: 700;
  color: var(--primary-red);
  background: #fef2f2;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}
.dealer-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
}
.dealer-addr {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
  flex-grow: 1;
}
.dealer-contacts {
  font-size: 0.825rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
  margin-bottom: 1rem;
}
.dealer-contacts div {
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.dealer-contacts i {
  color: var(--primary-red-light);
  width: 14px;
}

/* ==========================================================================
   History Timeline (30 Years)
   ========================================================================== */
.timeline-wrap {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
}
.timeline-wrap::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: linear-gradient(180deg, var(--primary-red), rgba(145, 2, 4, 0.2) 90%, transparent);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 1.5rem 2.5rem;
}
.timeline-item.left {
  left: 0;
  text-align: right;
}
.timeline-item.right {
  left: 50%;
  text-align: left;
}
.timeline-dot {
  position: absolute;
  top: 2rem;
  width: 16px;
  height: 16px;
  background: var(--primary-red);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(145, 2, 4, 0.4);
  z-index: 2;
}
.timeline-item.left .timeline-dot {
  right: -8px;
}
.timeline-item.right .timeline-dot {
  left: -8px;
}
.timeline-content {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
}
.timeline-item:hover .timeline-content {
  border-color: var(--border-red);
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}
.timeline-year {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-red);
  font-family: 'IBM Plex Sans Thai', sans-serif;
  margin-bottom: 0.35rem;
}
.timeline-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   Media & Videos
   ========================================================================== */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}
.video-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}
.video-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}
.video-thumb-wrap {
  position: relative;
  height: 200px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.video-card:hover .video-thumb {
  transform: scale(1.06);
}
.play-btn-overlay {
  position: absolute;
  width: 52px;
  height: 52px;
  background: rgba(145, 2, 4, 0.85);
  border: 2px solid #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  padding-left: 3px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  transition: var(--transition-fast);
}
.video-card:hover .play-btn-overlay {
  background: var(--primary-red);
  transform: scale(1.15);
}
.video-card-body {
  padding: 1.5rem;
}
.video-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}
.video-card-meta {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ==========================================================================
   Contact & Branches
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}
.branches-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.branch-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  gap: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
}
.branch-card:hover {
  border-color: var(--border-hover);
  background: #ffffff;
  box-shadow: var(--shadow-md);
}
.branch-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: #fef2f2;
  border: 1px solid rgba(145, 2, 4, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-red);
  font-size: 1.25rem;
  flex-shrink: 0;
}
.branch-info h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.25rem;
}
.branch-info p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ==========================================================================
   Footer & Floating Actions
   ========================================================================== */
.site-footer {
  background: #ffffff;
  border-top: 3px solid var(--primary-red);
  padding: 5rem 0 2rem;
  position: relative;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.03);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}
.footer-about img {
  height: 44px;
  margin-bottom: 1.25rem;
}
.footer-about p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}
.footer-heading {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.5rem;
}
.footer-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 2px;
  background: var(--primary-red);
}
.footer-links {
  list-style: none;
}
.footer-links li {
  margin-bottom: 0.6rem;
}
.footer-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
}
.footer-links a:hover {
  color: var(--primary-red);
  padding-left: 4px;
}
.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 1rem;
}

/* Floating Action Bar */
.floating-bar {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 999;
}
.float-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  font-size: 1.25rem;
  transition: var(--transition-fast);
  position: relative;
}
.float-btn:hover {
  transform: scale(1.1);
}
.float-lazada {
  background: #0f146d;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.float-shopee { background: #ee4d2d; }
.float-shopee svg { width: 24px; height: 24px; fill: currentColor; }
.float-line {
  background: #06c755;
}
.float-top {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  color: #0f172a;
  backdrop-filter: blur(10px);
}
.float-top:hover {
  background: var(--primary-red);
  color: #fff;
}

/* Mobile Drawer */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: #ffffff;
  backdrop-filter: blur(25px);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  padding: 2rem;
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
}
.mobile-nav-drawer.open {
  transform: translateX(0);
}
.mobile-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}
.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.mobile-nav-links a {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
}
.mobile-nav-links a:hover {
  color: var(--primary-red);
}

/* Mobile Submenu */
.mobile-has-submenu {
  display: flex;
  flex-direction: column;
}
.mobile-submenu-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
  text-align: left;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}
.mobile-submenu-trigger:hover,
.mobile-submenu-trigger.active {
  color: var(--primary-red);
}
.mobile-submenu-trigger .mobile-chevron {
  font-size: 0.9rem;
  transition: transform 0.3s ease;
  color: var(--primary-red-light);
}
.mobile-has-submenu.open .mobile-submenu-trigger .mobile-chevron {
  transform: rotate(180deg);
}
.mobile-submenu {
  list-style: none;
  padding: 0.5rem 0 0.5rem 1rem;
  border-left: 2px solid var(--primary-red);
  background: #f8fafc;
  border-radius: var(--radius-sm);
  margin-top: 0.5rem;
}
.mobile-has-submenu.open .mobile-submenu {
  display: flex;
}
.mobile-submenu a {
  font-size: 1rem !important;
  font-weight: 500 !important;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-fast);
}
.mobile-submenu a i {
  font-size: 0.85rem;
  color: var(--primary-red-light);
}
.mobile-submenu a:hover,
.mobile-submenu a.active {
  color: var(--primary-red) !important;
  transform: translateX(4px);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 2.75rem;
  }
  .affiliates-grid,
  .products-grid,
  .dealers-grid,
  .videos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .studio-wrapper {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .top-bar {
    display: none;
  }
  .nav-links, .nav-cta-btn {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }
  .hero-title {
    font-size: 2.2rem;
  }
  .stats-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat-card:nth-child(2)::after {
    display: none;
  }
  .affiliates-grid,
  .products-grid,
  .dealers-grid,
  .videos-grid,
  .bom-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .timeline-wrap::before {
    left: 20px;
  }
  .timeline-item {
    width: 100%;
    left: 0 !important;
    text-align: left !important;
    padding-left: 50px;
    padding-right: 0;
  }
  .timeline-dot {
    left: 12px !important;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Video Slider / Carousel (S-ONE Alu Vlog & Alu Trick)
   ========================================================================== */
.video-slider-track::-webkit-scrollbar {
  display: none;
}
.video-slide-item {
  flex: 0 0 calc(33.333% - 1rem);
  min-width: 290px;
  max-width: 380px;
  scroll-snap-align: start;
}
.slider-nav-btn:hover {
  background: var(--primary-red) !important;
  color: #ffffff !important;
  border-color: var(--primary-red) !important;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(145, 2, 4, 0.25) !important;
}
@media (max-width: 991px) {
  .video-slide-item {
    flex: 0 0 calc(50% - 0.75rem);
    min-width: 270px;
  }
}
@media (max-width: 640px) {
  .video-slide-item {
    flex: 0 0 85%;
    min-width: 260px;
  }
}

/* Keep the complete site geometry square, including legacy inline styles. */
*, *::before, *::after { border-radius: 0 !important; }

/* Update the older homepage's hard-coded red accents to the selected brand red. */
[style*="#910204" i] { color: var(--primary-red) !important; border-color: var(--primary-red) !important; }
[style*="rgba(145,2,4" i] { color: var(--primary-red) !important; background-color: var(--primary-red-subtle) !important; border-color: var(--border-red) !important; }
