/* ALLA POWER - PREMIUM PRODUCTS CATALOG STYLESHEET */
:root {
  --bg-dark: #0f172a;       /* Dark slate for premium header */
  --bg-slate: #f8fafc;      /* Light paper background */
  --bg-white: #ffffff;
  
  --text-main: #334155;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  
  --primary: #0284c7;       /* Sky Blue */
  --primary-hover: #0369a1;
  --primary-light: #e0f2fe;
  
  --secondary: #4f46e5;     /* Indigo */
  --accent-red: #dc2626;     /* Red */
  --accent-teal: #0d9488;    /* Teal */
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-premium: 0 20px 25px -5px rgba(2, 132, 199, 0.1), 0 10px 10px -5px rgba(2, 132, 199, 0.04);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Sarabun', 'Inter', 'Prompt', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-slate);
  color: var(--text-main);
  line-height: 1.6;
  font-size: 0.95rem;
}

/* Premium Header Bar with Neon Gradient Border */
.doc-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--primary);
  z-index: 100;
  padding: 0.85rem 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}
.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}
.brand-logo .logo-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  color: white;
  font-size: 1.1rem;
}
.brand-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: white;
  letter-spacing: 0.05em;
}
.brand-subtitle {
  font-size: 8px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-top: -2px;
}

/* Lang Switcher */
.lang-switcher {
  display: flex;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.2rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  gap: 2px;
}
.lang-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.35rem 0.75rem;
  border-radius: 0.35rem;
  color: var(--text-muted);
  transition: all 0.2s ease;
}
.lang-btn:hover {
  color: white;
}
.lang-btn.active {
  background-color: var(--primary);
  color: var(--bg-dark);
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background-color: rgba(255, 255, 255, 0.05);
  padding: 0.45rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}
.back-btn:hover {
  background-color: var(--primary);
  color: var(--bg-dark);
  border-color: var(--primary);
}

/* Premium Layout Containment */
.doc-container {
  max-width: 1200px;
  margin: 7rem auto 4rem;
  padding: 0 1.5rem;
}

.doc-paper {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 1.25rem;
  box-shadow: var(--shadow-premium);
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}
@media (min-width: 768px) {
  .doc-paper {
    padding: 4.5rem;
  }
}

/* Metadata bar */
.doc-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Titles */
h1.doc-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 2.25rem;
  color: var(--text-dark);
  line-height: 1.25;
  background: linear-gradient(135deg, var(--text-dark), var(--primary-hover));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
p.doc-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: -1.5rem;
}

/* Section block */
.doc-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
h2.section-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 0.5rem;
}
h2.section-title i {
  color: var(--primary);
}

.doc-text {
  font-size: 0.95rem;
  color: var(--text-main);
  text-align: justify;
  line-height: 1.7;
}

/* Premium Highlight boxes */
.highlight-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 768px) {
  .highlight-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.highlight-card {
  background-color: var(--primary-light);
  border-left: 5px solid var(--primary);
  border-radius: 0.5rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: var(--shadow-sm);
}
.highlight-card.red {
  background-color: #fef2f2;
  border-left-color: var(--accent-red);
}
.highlight-card.teal {
  background-color: #f0fdf4;
  border-left-color: var(--accent-teal);
}
.highlight-card-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.highlight-card-desc {
  font-size: 0.8rem;
  color: var(--text-main);
  line-height: 1.5;
}

/* Premium Table layout */
.specs-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-sm);
  margin-top: 1rem;
}
.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}
.specs-table th {
  background-color: #f8fafc;
  color: var(--text-dark);
  font-weight: 700;
  padding: 1rem;
  border-bottom: 2px solid var(--border-color);
  font-family: 'Outfit', sans-serif;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}
.specs-table td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid var(--border-color);
}
.specs-table tr:last-child td {
  border-bottom: none;
}
.specs-table tr:nth-child(even) {
  background-color: #fdfdfd;
}
.specs-table tr:hover {
  background-color: #f1f5f9;
}
.specs-table td.font-semibold {
  font-weight: 700;
  color: var(--text-dark);
  width: 35%;
}

/* Model Matrix Cards Grid */
.models-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 1rem;
}
@media (min-width: 768px) {
  .models-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.model-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.model-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}
.model-tag {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  color: var(--primary);
  font-size: 1.25rem;
}
.model-spec-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 0.35rem;
}
.model-spec-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* Multi Image Gallery Layout */
.gallery-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1rem;
}
@media (min-width: 768px) {
  .gallery-layout {
    grid-template-columns: 1fr 1fr;
  }
}
.gallery-card {
  background-color: #f1f5f9;
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}
.gallery-card img {
  max-width: 100%;
  max-height: 250px;
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease;
}
.gallery-card img:hover {
  transform: scale(1.02);
}
.gallery-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
}

/* Custom visual sensors grid */
.sensor-matrix {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 1rem;
}
@media (min-width: 768px) {
  .sensor-matrix {
    grid-template-columns: repeat(3, 1fr);
  }
}
.sensor-card {
  background-color: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 0.75rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: all 0.2s ease;
}
.sensor-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.sensor-card.red {
  background-color: #fef2f2;
  border-color: #fecaca;
}
.sensor-card.amber {
  background-color: #fffbeb;
  border-color: #fed7aa;
}
.sensor-label {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.sensor-text {
  font-size: 0.8rem;
  color: var(--text-main);
  line-height: 1.5;
}

/* Dynamic display states */
[lang-content] { display: none; }
body[data-lang="th"] [lang-content="th"] { display: block; }
body[data-lang="en"] [lang-content="en"] { display: block; }
body[data-lang="zh"] [lang-content="zh"] { display: block; }

span[lang-content] { display: none; }
body[data-lang="th"] span[lang-content="th"] { display: inline; }
body[data-lang="en"] span[lang-content="en"] { display: inline; }
body[data-lang="zh"] span[lang-content="zh"] { display: inline; }

body[data-lang="th"] .lang-grid { display: grid; }
body[data-lang="en"] .lang-grid { display: grid; }
body[data-lang="zh"] .lang-grid { display: grid; }
