/* css/style.css */
:root {
  /* 🎨 ปรับสี/ฟอนต์/ขนาดตามแบรนด์คุณได้ง่ายๆ ตรงนี้ */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary: #64748b;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --text-dark: #0f172a;
  --text-muted: #475569;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --container: 1100px;
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 🔄 Reset & Base */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  color: var(--text-dark);
  line-height: 1.6;
  background: var(--bg-white);
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section { padding: 4rem 0; }
.bg-light { background: var(--bg-light); }

h1, h2, h3 { line-height: 1.2; margin-bottom: 1rem; }
h1 { font-size: clamp(1.8rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); text-align: center; margin-bottom: 2rem; }
p { margin-bottom: 1rem; color: var(--text-muted); }

/* 🎯 Hero Section */
.hero {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  padding: 6rem 0 4rem;
  text-align: center;
}
.hero h1 { margin-bottom: 1.5rem; }
.subtitle { font-size: 1.1rem; max-width: 600px; margin: 0 auto 2rem; }
.cta-group { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* 🔘 Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.5rem; border-radius: 50px; text-decoration: none;
  font-weight: 600; transition: all 0.2s ease; cursor: pointer;
  border: 2px solid transparent;
}
.btn:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }
.btn-primary { background: var(--primary); color: white; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }

/* 🎥 Video & Gallery */
.video-wrapper {
  max-width: 800px; margin: 0 auto; aspect-ratio: 16/9;
  background: #000; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
video { width: 100%; height: 100%; object-fit: cover; }

.gallery {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem; margin-top: 2rem;
}
.gallery img {
  width: 100%; height: auto; border-radius: var(--radius);
  box-shadow: var(--shadow); transition: transform 0.2s ease;
}
.gallery img:hover { transform: translateY(-4px); }

/* 💳 Payment Section */
.steps { max-width: 600px; margin: 0 auto 2rem; padding-left: 1.5rem; }
.steps li { margin-bottom: 0.75rem; }

.payment-box {
  text-align: center; background: var(--bg-white); padding: 2rem;
  border-radius: var(--radius); box-shadow: var(--shadow); max-width: 400px; margin: 0 auto;
}
.qr-img { max-width: 250px; width: 100%; margin-bottom: 1rem; border: 1px solid var(--border); border-radius: 8px; }
.price { font-size: 1.2rem; color: var(--text-dark); margin: 0; }

/* ❓ FAQ Accordion */
.faq-list { max-width: 800px; margin: 0 auto; }
details {
  background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 1rem; padding: 1rem; cursor: pointer; transition: background 0.2s;
}
details:hover { background: #f1f5f9; }
details summary {
  font-weight: 600; color: var(--text-dark); list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
details summary::after { content: "+"; font-size: 1.2rem; transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 0.75rem 0 0; }

/* 📎 Footer */
.footer {
  background: #0f172a; color: #cbd5e1; padding: 3rem 0; text-align: center; font-size: 0.9rem;
}
.footer a { color: #60a5fa; text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer p { margin: 0.25rem 0; color: #94a3b8; }

/* 📱 Responsive Adjustments */
@media (max-width: 768px) {
  .section { padding: 3rem 0; }
  .hero { padding: 4rem 0 3rem; }
  .gallery { grid-template-columns: 1fr; }
  .payment-box { max-width: 100%; }
}

.payment-wrapper {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; margin-top: 2rem;
}
.slip-form {
  background: var(--bg-white); padding: 2rem; border-radius: var(--radius); box-shadow: var(--shadow);
}
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.5rem; color: var(--text-dark); }
.form-group input[type="email"],
.form-group input[type="file"] {
  width: 100%; padding: 0.75rem; border: 1px solid var(--border); border-radius: 8px; font-size: 1rem;
  background: #f8fafc; transition: border-color 0.2s;
}
.form-group input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }
.form-note { font-size: 0.85rem; margin-top: 0.5rem; color: var(--text-muted); }
.form-status { margin-top: 1rem; font-weight: 500; min-height: 1.5rem; }
.form-status.success { color: #16a34a; }
.form-status.error { color: #dc2626; }

@media (max-width: 768px) { .payment-wrapper { grid-template-columns: 1fr; } }

.payment-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
  margin-top: 2rem;
}

.slip-form {
  background: var(--bg-white);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="file"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: #f8fafc;
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 1rem;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .payment-wrapper {
    grid-template-columns: 1fr;
  }
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* อัตราส่วน 16:9 */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #000;
}

.video-wrapper iframe,
.video-wrapper video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
}

/* Video Grid 3x3 */
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.video-item {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.video-item iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  display: block;
}

.video-title {
  padding: 0.75rem 1rem;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
  background: #f8fafc;
  text-align: center;
  border-top: 2px solid var(--border);
}

/* Responsive */
@media (max-width: 1024px) {
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .video-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* App Selection Grid */
.app-selection {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin: 2rem 0 3rem;
}

.app-card {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
}

.app-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.15);
  transform: translateY(-5px);
}

.app-card.selected {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.app-card.coming-soon {
  opacity: 0.7;
  pointer-events: none;
  filter: grayscale(0.8);
}

.app-qr {
  background: #f8fafc;
  padding: 1.5rem;
  text-align: center;
  border-bottom: 2px solid #e2e8f0;
}

.qr-code {
  max-width: 200px;
  width: 100%;
  border: 2px solid white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.qr-placeholder {
  font-size: 4rem;
  margin: 1rem 0;
}

.qr-note {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0.5rem 0 0;
}

.app-info {
  padding: 1.5rem;
}

.app-info h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: #0f172a;
}

.app-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.app-features li {
  padding: 0.4rem 0;
  color: #475569;
  font-size: 0.9rem;
  border-bottom: 1px solid #f1f5f9;
}

.app-features li:last-child {
  border-bottom: none;
}

.app-price {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #f0f9ff;
  border-radius: 8px;
}

.price-label {
  color: #64748b;
  font-size: 0.9rem;
}

.price-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: #2563eb;
}

.price-note {
  color: #94a3b8;
  font-size: 0.85rem;
}

.select-btn {
  display: block;
  width: 100%;
  padding: 0.85rem;
  background: #3b82f6;
  color: white;
  text-align: center;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  border: 2px solid transparent;
}

.select-btn:hover {
  background: #2563eb;
}

.select-btn input[type="radio"] {
  margin-right: 0.5rem;
}

.select-btn.disabled {
  background: #cbd5e1;
  cursor: not-allowed;
}

/* Payment Form Wrapper */
.payment-form-wrapper {
  max-width: 700px;
  margin: 3rem auto 0;
  background: white;
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-hint {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

.selected-app-summary {
  background: #f0f9ff;
  border: 2px solid #3b82f6;
  border-radius: 8px;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
}

.selected-app-summary p {
  margin: 0.25rem 0;
  color: #1e40af;
}

.btn-large {
  padding: 1.2rem;
  font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 768px) {
  .app-selection {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .payment-form-wrapper {
    padding: 1.5rem;
  }
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease;
}

.modal.show {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-content {
  background: white;
  border-radius: 20px;
  padding: 2.5rem;
  max-width: 500px;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s ease;
  text-align: center;
}

.modal-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.modal-content h2 {
  color: #0f172a;
  margin-bottom: 0.5rem;
  font-size: 1.8rem;
}

.modal-subtitle {
  color: #64748b;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.modal-info {
  background: #f0f9ff;
  border-left: 4px solid #3b82f6;
  padding: 1rem;
  border-radius: 8px;
  margin: 1.5rem 0;
  text-align: left;
}

.modal-info p {
  margin: 0.5rem 0;
  color: #1e40af;
  font-size: 0.95rem;
}

.modal-steps {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  padding: 1rem;
  border-radius: 8px;
  margin: 1.5rem 0;
  text-align: left;
}

.modal-steps h3 {
  color: #92400e;
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.modal-steps ol {
  margin: 0;
  padding-left: 1.25rem;
  color: #78350f;
}

.modal-steps li {
  margin: 0.5rem 0;
  font-size: 0.9rem;
}

.modal-note {
  font-size: 0.85rem;
  color: #64748b;
  margin: 1.5rem 0;
  line-height: 1.6;
}

.close-modal {
  position: absolute;
  right: 1.5rem;
  top: 1rem;
  font-size: 2rem;
  font-weight: bold;
  color: #94a3b8;
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1;
}

.close-modal:hover {
  color: #ef4444;
}

.close-modal-btn {
  margin-top: 1rem;
  padding: 0.85rem 2rem;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 640px) {
  .modal-content {
    padding: 1.5rem;
    margin: 1rem;
  }
  
  .modal-icon {
    font-size: 3rem;
  }
}


