/* =========================
   DoctorNoo Shared CSS
   ใช้ร่วมกันทั้ง index.php และ products/index.php
   ========================= */

/* ---------- Base ---------- */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Sarabun', sans-serif;
  background-color: #F5EEE3;
  overflow-x: hidden;
}

h1, h2, h3, h4, .font-heading {
  font-family: 'Prompt', sans-serif;
}

footer a {
  text-decoration: none;
}

/* ---------- Shared text / color helpers ----------
   Brand palette: Purple #C4B0E0 (primary), Cream #F5EEE3 (background),
   Teal #A8D4D9 (secondary/accent), Yellow #F4C430 (CTA/highlight).
   Class names kept as-is (coral-*/teal-text) since page.php and templates
   reference them by name — only the colors they resolve to changed. */
.gradient-text {
  background: linear-gradient(to right, #C4B0E0, #A8D4D9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.coral-bg {
  background-color: #F4C430;
}

.coral-text {
  color: #F4C430;
}

.teal-text {
  color: #5B3E96;
}

/* ---------- Language buttons ----------
   Pastel purple (#C4B0E0) reads at ~2:1 contrast as a solid fill with white
   text — fails WCAG AA. Active state uses the deeper "ink" purple (#5B3E96,
   ~8:1 on white/cream) instead; pastel purple stays for the idle border only. */
.lang-btn {
  border: 1px solid rgba(196, 176, 224, 0.35);
  cursor: pointer;
  transition: all 0.3s ease;
}

.lang-btn.active {
  background: #5B3E96;
  color: #fff;
  border-color: #5B3E96;
}

/* ---------- Social brand colors ---------- */
.brand-tiktok {
  background: #111827;
  color: #fff;
}

.brand-youtube {
  background: #FF0000;
  color: #fff;
}

.brand-facebook {
  background: #1877F2;
  color: #fff;
}

.brand-instagram {
  background: linear-gradient(135deg, #F58529, #DD2A7B, #8134AF, #515BD4);
  color: #fff;
}

/* ---------- Multi-language display blocks (products page) ---------- */
.lang {
  display: none;
}

html[data-lang="th"] .lang-th,
html[data-lang="en"] .lang-en,
html[data-lang="zh"] .lang-zh {
  display: inline;
}

/* ---------- Visual helpers used in products page ---------- */
.glass {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.noise::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.14) 0.7px, transparent 0.7px);
  background-size: 16px 16px;
  opacity: 0.28;
  pointer-events: none;
}

.section-safe {
  position: relative;
  z-index: 1;
  isolation: isolate;
}

/* ---------- Slider ---------- */
.slider-viewport {
  overflow: hidden;
  width: 100%;
}

.slider-track {
  display: flex;
  gap: 16px;
  transition: transform 0.6s ease;
  will-change: transform;
}

.slide-card {
  flex: 0 0 100%;
  min-width: 0;
}

@media (min-width: 768px) {
  .slide-card {
    flex: 0 0 calc(50% - 8px);
  }
}

@media (min-width: 1280px) {
  .slide-card {
    flex: 0 0 calc(33.333333% - 10.67px);
  }
}