/* Styles for เสน่ห์ผ้าทอไทย Landing Page */
@import url('https://fonts.googleapis.com/css2?family=Prompt:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=Sarabun:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --font-heading: 'Prompt', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  --color-primary: #334e68; /* Polite Slate Indigo ครามสุภาพ */
  --color-primary-dark: #243b53;
  --color-gold: #9a6b3e; /* สีน้ำตาลทองสุภาพ สบายตา */
  --color-gold-light: #c89d54;
  --color-terracotta: #a8553a; /* ดินเผาอ่อนสุภาพ */
  --color-cream: #f7f4ee;
  --color-surface: #ffffff;
}

body {
  font-family: var(--font-body);
  background-color: #f7f4ee;
  color: #2d3748;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: var(--font-heading);
}

/* Force readable dark text inside all inputs (especially Chatbot input) regardless of parent text color */
input[type="text"],
input[type="password"],
input[type="search"],
textarea,
#ai-chat-input,
#gemini-api-key-input,
#post-search,
#product-search {
  color: #0f172a !important;
  background-color: #ffffff !important;
  caret-color: #8c6239 !important;
  font-weight: 500;
}

input[type="text"]::placeholder,
input[type="password"]::placeholder,
input[type="search"]::placeholder,
textarea::placeholder,
#ai-chat-input::placeholder,
#gemini-api-key-input::placeholder,
#post-search::placeholder,
#product-search::placeholder {
  color: #64748b !important;
  opacity: 1 !important;
}

/* Glassmorphism */
.glass-nav {
  background: rgba(250, 248, 244, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(214, 206, 194, 0.8);
}

.glass-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(226, 219, 208, 0.8);
}

.glass-dark {
  background: rgba(44, 62, 80, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Thai Fabric Texture Subtle Background (Polite Warm Tone) */
.bg-thai-pattern {
  background-color: #f7f4ee;
  background-image: radial-gradient(#dfd7c8 0.75px, transparent 0.75px), radial-gradient(#dfd7c8 0.75px, #f7f4ee 0.75px);
  background-size: 30px 30px;
  background-position: 0 0, 15px 15px;
}

.bg-pattern-dark {
  background-color: #2b394a;
  background-image: radial-gradient(rgba(214, 188, 150, 0.14) 0.75px, transparent 0.75px);
  background-size: 24px 24px;
}

/* Polite Golden-Teak Gradient Text */
.text-gold-gradient {
  background: linear-gradient(135deg, #8c6239 0%, #b07d4b 50%, #785230 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-thai-gradient {
  background: linear-gradient(135deg, #334e68 0%, #486581 50%, #8c6239 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Shimmer Button Effect */
.btn-shimmer {
  position: relative;
  overflow: hidden;
}

.btn-shimmer::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    60deg,
    rgba(255, 255, 255, 0) 20%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 80%
  );
  transform: rotate(30deg);
  animation: shimmer 3.5s infinite;
}

@keyframes shimmer {
  0% { transform: translate(-100%, -100%) rotate(30deg); }
  30% { transform: translate(100%, 100%) rotate(30deg); }
  100% { transform: translate(100%, 100%) rotate(30deg); }
}

/* Floating Animation */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

.animate-float {
  animation: float 4s ease-in-out infinite;
}

.animate-float-delayed {
  animation: float 4.5s ease-in-out infinite 1.5s;
}

/* Pulse Glow */
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 15px rgba(245, 158, 11, 0.4); }
  50% { box-shadow: 0 0 28px rgba(245, 158, 11, 0.8); }
}

.pulse-glow {
  animation: pulseGlow 2.5s infinite;
}

/* Spin Wheel Canvas & Pointer */
.wheel-container {
  position: relative;
  width: 320px;
  height: 320px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .wheel-container {
    width: 380px;
    height: 380px;
  }
}

.wheel-pointer {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
  border-top: 32px solid #ef4444;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
  z-index: 20;
}

.wheel-canvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
  transition: transform 4s cubic-bezier(0.15, 0.9, 0.2, 1);
}

/* Toast Notification */
.toast-notification {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateY(100px);
  opacity: 0;
}

.toast-notification.show {
  transform: translateY(0);
  opacity: 1;
}

/* Confetti Container */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Hide scrollbar for tabs */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Product Card Hover Zoom */
.product-card {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 30px -8px rgba(180, 83, 9, 0.15), 0 10px 15px -5px rgba(0, 0, 0, 0.05);
  border-color: rgba(245, 158, 11, 0.45);
}

.product-image-wrap {
  overflow: hidden;
}
.product-image-wrap img {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.product-card:hover .product-image-wrap img {
  transform: scale(1.08);
}

/* Google Drive Button Styles */
.btn-drive {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  font-weight: 600;
  border-radius: 0.75rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.btn-drive:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #3b82f6;
  box-shadow: 0 4px 12px -2px rgba(59, 130, 246, 0.25);
  transform: translateY(-1px);
}

.btn-drive-primary {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 50%, #1d4ed8 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.35);
}
.btn-drive-primary:hover {
  background: linear-gradient(135deg, #0369a1 0%, #1d4ed8 50%, #1e40af 100%);
  color: #ffffff;
  box-shadow: 0 6px 20px 0 rgba(37, 99, 235, 0.5);
  transform: translateY(-2px);
}

/* Video Indicator Badge */
.video-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Floating Action Pill */
.floating-drive-pill {
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.35), 0 8px 10px -6px rgba(37, 99, 235, 0.2);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.floating-drive-pill:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 15px 30px -5px rgba(37, 99, 235, 0.5), 0 10px 12px -6px rgba(37, 99, 235, 0.3);
}

/* YouTube Custom Badges & Buttons */
.btn-youtube {
  background: #ff0000;
  color: #ffffff;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(255, 0, 0, 0.35);
}
.btn-youtube:hover {
  background: #cc0000;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 0, 0, 0.5);
}

/* YouTube Video Card */
.yt-card {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.yt-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 25px -5px rgba(220, 38, 38, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

/* AI Chatbot Custom Animations & Polite Tone */
#ai-chat-launcher {
  filter: drop-shadow(0 8px 14px rgba(120, 82, 48, 0.25));
}
#ai-chat-window {
  box-shadow: 0 22px 45px -12px rgba(45, 55, 72, 0.22), 0 10px 20px -8px rgba(0, 0, 0, 0.1);
}

/* Polite & Eye-Friendly Color Overrides (โทนสีสุภาพ สบายตา) */
.bg-slate-950 {
  background-color: #263238 !important;
}
.bg-slate-900 {
  background-color: #2f3e46 !important;
}
.bg-amber-600 {
  background-color: #8c6239 !important;
}
.hover\:bg-amber-700:hover,
.hover\:bg-amber-500:hover {
  background-color: #734f2c !important;
}
.bg-purple-700,
.bg-purple-600,
.bg-indigo-600 {
  background-color: #4a607a !important;
}
.hover\:bg-purple-600:hover,
.hover\:bg-indigo-700:hover {
  background-color: #3b4d63 !important;
}
.bg-rose-600 {
  background-color: #a8553a !important;
}
.text-amber-600,
.text-amber-700 {
  color: #7c5530 !important;
}



