:root {
  --color-darkest: #01000C;
  --color-dark: #060127;
  --color-primary: #13064D;
  --color-light: #F7F8FA;
  --color-accent: #2e189a;
  --color-bg: #ffffff;
  --color-bg-soft: #F7F8FA;
  --color-text: #0d0a2e;
  --color-text-muted: #5a5670;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Prompt', 'Kanit', sans-serif;
}

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

html, body {
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

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

a:hover {
  color: var(--color-accent);
}

/* Header */
header {
  background-color: #150853;
  backdrop-filter: blur(12px);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 20px rgba(19, 6, 77, 0.08);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 5%;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-weight: 500;
  font-size: 1.05rem;
  color: #ffffff;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0%;
  height: 2px;
  bottom: -5px;
  left: 0;
  background: #ffffff;
  transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a:hover {
  color: #ffffff;
  opacity: 0.8;
}

.nav-links a.active {
  color: #ffffff;
  font-weight: 600;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.hamburger div {
  width: 25px;
  height: 3px;
  background-color: #ffffff;
  transition: var(--transition);
}

/* General Layout */
main {
  margin-top: 80px;
  min-height: calc(100vh - 80px - 200px);
}

.section {
  padding: 5rem 5%;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  font-weight: 600;
  color: var(--color-text);
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}

/* Cards (used in products, reviews, contact pages) */
.glass-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid rgba(19, 6, 77, 0.08);
  box-shadow: 0 4px 24px rgba(19, 6, 77, 0.08);
  padding: 2rem;
  transition: var(--transition);
}

.glass-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(19, 6, 77, 0.14);
  border-color: rgba(19, 6, 77, 0.15);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: 30px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-size: 1rem;
  font-family: 'Prompt', 'Kanit', sans-serif;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(19, 6, 77, 0.25);
}

.btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(46, 24, 154, 0.4);
  color: #ffffff;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: #ffffff;
}

/* Hero Section */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 90vh;
  padding: 4rem 5% 4rem;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #f0eeff 0%, #ffffff 50%, #e8f0ff 100%);
}

.hero-bg-glow {
  position: absolute;
  top: 50%;
  right: 5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(46, 24, 154, 0.08) 0%, rgba(255,255,255,0) 70%);
  transform: translateY(-50%);
  z-index: 0;
  border-radius: 50%;
}

.hero-content {
  flex: 1;
  max-width: 600px;
  position: relative;
  z-index: 1;
  animation: slideInLeft 1s ease forwards;
}

.hero-content h1 {
  font-size: 3.5rem;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
}

.hero-content p {
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
  color: var(--color-text-muted);
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 1;
  animation: slideInRight 1s ease forwards;
}

.hero-image img {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(19, 6, 77, 0.2));
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
  100% { transform: translateY(0px); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-50px); }
  to { opacity: 1; transform: translateX(0); }
}

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

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2rem;
}

.product-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  margin-bottom: 1.5rem;
  transition: transform 0.5s ease;
}

.product-card:hover .product-img {
  transform: scale(1.08);
}

.product-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.product-price {
  font-size: 1.25rem;
  color: var(--color-accent);
  margin-bottom: 1.5rem;
  font-weight: 700;
}

/* Reviews */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.review-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.reviewer-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.reviewer-img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-primary);
}

.stars {
  color: #f59e0b;
  margin-bottom: 0.5rem;
}

.review-text {
  font-style: italic;
  color: var(--color-text-muted);
}

/* Contact */
.contact-container {
  display: flex;
  gap: 4rem;
  flex-wrap: wrap;
}

.contact-info {
  flex: 1;
  min-width: 300px;
}

.contact-info h3 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--color-primary);
}

.contact-info p {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text-muted);
}

.contact-form {
  flex: 1;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  background: #f9f8ff;
  border: 1.5px solid rgba(19, 6, 77, 0.12);
  border-radius: 10px;
  color: var(--color-text);
  font-size: 1rem;
  font-family: 'Prompt', 'Kanit', sans-serif;
  outline: none;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-accent);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(46, 24, 154, 0.08);
}

/* Footer */
footer {
  background: linear-gradient(135deg, var(--color-darkest), var(--color-primary));
  color: rgba(247,248,250,0.85);
  border-top: none;
  font-size: 0.95rem;
  position: relative;
}
.footer-top {
  padding: 4rem 5%;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  align-items: start;
  gap: 2rem;
  text-align: left;
}
.footer-logo {
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(90deg, #ffffff, #8a9bff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
  display: inline-block;
}
.footer-about p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.7);
}
.social-links {
  display: flex;
  gap: 1rem;
}
.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: var(--transition);
  font-weight: 600;
  font-size: 0.8rem;
}
.social-links a:hover {
  background: var(--color-accent);
  transform: translateY(-3px);
  color: #fff;
}
.footer-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}
.footer-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 40px;
  height: 3px;
  background: var(--color-accent);
  border-radius: 2px;
}
.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.footer-links a {
  color: rgba(255,255,255,0.7);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-links a::before {
  content: '›';
  font-size: 1.2rem;
  color: var(--color-accent);
}
.footer-links a:hover {
  color: #fff;
  transform: translateX(5px);
}
.footer-contact-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow: visible;
}
.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: rgba(255,255,255,0.85);
  width: 100%;
}
.footer-contact-item > div {
  flex: 1;
  min-width: 0;
  word-break: break-word;
  overflow-wrap: break-word;
  color: rgba(255,255,255,0.85);
}
.footer-contact-item svg {
  flex-shrink: 0;
  margin-top: 3px;
}
.footer-contact-item span {
  font-size: 1.2rem;
  color: var(--color-accent);
}
.footer-bottom {
  padding: 1.5rem 5%;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-bottom p {
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
}
.payment-methods {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.payment-methods span {
  background: rgba(255,255,255,0.1);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.8);
}


/* Services Intro Section (Reviews page) */
.services-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.services-intro-text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.services-intro-text .txt-sub {
  color: #00A1E9;
  font-weight: 500;
  font-size: 1.1rem;
  letter-spacing: 1px;
}

.services-intro-text h1 {
  font-size: 3rem;
  color: #ffffff;
  font-weight: 700;
  line-height: 1.2;
}

.services-intro-text h2 {
  font-size: 1.8rem;
  color: #ffffff;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.services-intro-text p {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.8;
}

.services-intro-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 1rem;
}

.services-intro-images img {
  width: 100%;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.services-img-1 { height: 220px; }
.services-img-2 { height: 220px; }
.services-img-tall {
  height: 100%;
  min-height: 450px;
  grid-row: span 2;
}

@media (max-width: 900px) {
  .services-intro {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .services-intro-text h1 { font-size: 2.2rem; }
  .services-intro-text h2 { font-size: 1.5rem; }
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    right: -100%;
    top: 100%;
    background-color: rgba(21, 8, 83, 0.97);
    height: 100vh;
    flex-direction: column;
    align-items: center;
    width: 70%;
    padding-top: 5rem;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    box-shadow: -5px 0 20px rgba(19,6,77,0.1);
  }

  .nav-links.active {
    right: 0;
  }

  .hamburger {
    display: flex;
  }

  .hamburger.active .bar1 { transform: rotate(-45deg) translate(-5px, 6px); }
  .hamburger.active .bar2 { opacity: 0; }
  .hamburger.active .bar3 { transform: rotate(45deg) translate(-5px, -6px); }

  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 3rem;
    min-height: auto;
    padding-bottom: 4rem;
  }

  .hero-content h1 {
    font-size: 2.3rem;
  }

  .hero-bg-glow {
    top: 20%;
    right: 50%;
    transform: translateX(50%);
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }

  /* จัด Footer เป็น 2 คอลัมน์บนมือถือ */
  .footer-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem 1rem;
  }
  
  /* ให้ About (โลโก้ + รายละเอียด) อยู่บนสุด กินเต็ม 2 คอลัมน์ */
  .footer-top .footer-col:nth-child(1) {
    grid-column: span 2;
    order: 1;
  }

  /* ลิงก์น่าสนใจ กิน 1 คอลัมน์ (อยู่ซ้าย) */
  .footer-top .footer-col:nth-child(2) {
    grid-column: span 1;
    order: 2;
  }

  /* ที่อยู่ ย้ายขึ้นมา กิน 1 คอลัมน์ (อยู่ขวา คู่กับลิงก์น่าสนใจ) */
  .footer-top .footer-col:nth-child(4) {
    grid-column: span 1;
    order: 3;
  }

  /* บริการของเรา ลงไปอยู่ล่างสุด กินเต็ม 2 คอลัมน์ */
  .footer-top .footer-col:nth-child(3) {
    grid-column: span 2;
    order: 4;
  }

  /* ปรับแต่งเนื้อหา ที่อยู่ ให้ขนาดเล็กลงนิดหน่อยเพื่อให้อยู่ใน 1 คอลัมน์ได้โดยไม่ล้น */
  .footer-contact-item {
    flex-direction: row;
    gap: 8px;
    align-items: flex-start;
    width: 100%;
  }
  .footer-contact-item div {
    font-size: 0.8rem !important;
    word-break: normal;
    overflow-wrap: break-word;
    line-height: 1.4 !important;
    flex: 1;
  }
  .footer-contact-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 3px;
  }

  /* ป้องกัน horizontal overflow ทั้งหน้า */
  main {
    overflow-x: hidden;
    max-width: 100vw;
  }
  .section {
    overflow-x: hidden;
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Floating Action Button (FAB) */
.mobile-fab-wrapper {
    display: flex !important;
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    left: auto !important;
    z-index: 99999 !important;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.mobile-fab-menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mobile-fab-wrapper.active .mobile-fab-menu {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.mobile-fab-item {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: transform 0.2s;
}

.mobile-fab-item:hover {
    transform: scale(1.1);
}

.mobile-fab-phone {
    background-color: #1428a0;
}

.mobile-fab-line {
    background-color: #00b900;
}

.mobile-fab-toggle {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background-color: #5572e9;
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.mobile-fab-wrapper.active .mobile-fab-toggle {
    background-color: #3b5fe5;
    transform: rotate(90deg);
}

.mobile-fab-icon-close {
    display: none;
}

.mobile-fab-wrapper.active .mobile-fab-icon-main {
    display: none;
}

.mobile-fab-wrapper.active .mobile-fab-icon-close {
    display: block;
}

@media (max-width: 768px) {
    .mobile-fab-wrapper {
        display: flex !important;
        bottom: 20px !important;
        right: 20px !important;
    }
    .mobile-fab-toggle {
        width: 55px;
        height: 55px;
    }
    .mobile-fab-item {
        width: 45px;
        height: 45px;
    }
}
