/* =========================================
   1. VARIABLES & RESET (พื้นฐานและตัวแปร)
   ========================================= */
   html {
    scroll-behavior: smooth !important; /* บังคับให้ทุกการเคลื่อนที่ในหน้าเว็บนุ่มนวล */
    scroll-padding-top: 100px; /* กัน Navbar บังข้อมูลเมื่อเลื่อนไปหา ID */
}

/* ปรับความเร็วการ Scroll สำหรับผู้ใช้บางกลุ่ม (ถ้าจำเป็น) */
@media (prefers-reduced-motion: no-preference) {
  :root {
    scroll-behavior: smooth;
  }
}
:root {
  --wizard-red: #cc0000;
  --wizard-black: #000000;
  --text-gray: #555;
  --bg-light: #f9f9f9;
  --transition: 0.3s ease;
}

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

body {
  background-color: var(--bg-light);
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* =========================================
   2. HEADER & NAVIGATION (ส่วนหัวและเมนู)
   ========================================= */
.rainbow-line {
  height: 8px;
  background: linear-gradient(
    to right,
    #e41a1c 12.5%,
    #ff7f00 12.5%,
    #ff7f00 25%,
    #ffff33 25%,
    #ffff33 37.5%,
    #4daf4a 37.5%,
    #4daf4a 50%,
    #377eb8 50%,
    #377eb8 62.5%,
    #0000ff 62.5%,
    #0000ff 75%,
    #984ea3 75%,
    #984ea3 87.5%,
    #a65628 87.5%
  );
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 5%;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  position: sticky;
  top: 0;
  z-index: 1001;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo img {
  height: 55px;
  display: block;
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  gap: 8px;
  align-items: center;
  border-left: 1px solid #eee;
  padding-left: 15px;
}

.lang-btn {
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: var(--transition);
  opacity: 0.4;
  filter: grayscale(30%);
}

.lang-btn.active {
  opacity: 1;
  filter: grayscale(0%);
  transform: scale(1.1);
}

.lang-btn:hover {
  opacity: 0.8;
  transform: scale(1.1);
}

.lang-btn img {
  width: 26px;
  height: 18px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Main Navigation */
.main-nav {
  display: flex;
  gap: 10px;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text-gray);
  font-size: 12px;
  transition: var(--transition);
  min-width: 65px;
  text-align: center;
}

.nav-item i {
  font-size: 16px;
  margin-bottom: 5px;
  color: #666;
  transition: var(--transition);
}

.nav-item:hover,
.nav-item:hover i {
  color: var(--wizard-red);
}

.menu-toggle {
  display: none;
  font-size: 26px;
  cursor: pointer;
  color: var(--wizard-red);
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

    /* เมื่อเป็นหน้าปัจจุบัน */
.nav-item:hover, 
.nav-item.active {
    color: var(--wizard-red) !important;
    border-bottom: 1px solid var(--wizard-red);
    /* font-weight: bold; */
}

/* ถ้าต้องการเน้นสีไอคอนด้วย */
.nav-item:hover i,
.nav-item.active i {
    color: var(--wizard-red);
}

/* =========================================
   3. MAIN CONTENT & LAYOUT (เนื้อหาหลัก)
   ========================================= */
.container {
  max-width: 1100px;
  margin: 30px auto;
  padding: 0 20px;
}

.banner-box {
  width: 100%;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.banner-box img {
  width: 100%;
  display: block;
}

/* ===== Responsive Fade Banner ===== */
.fade-banner {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 5;   /* <<< ปรับสัดส่วนได้ 7 */
    overflow: hidden;
}

/* fallback สำหรับ browser เก่า */
@supports not (aspect-ratio: 1 / 1) {
    .fade-banner {
        height: 45vw;
        max-height: 337px;
    }
}

.fade-banner img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
     /*object-fit: contain;   <<< เห็นภาพเต็ม */
    object-fit: cover;     /* ครอบจอ ไม่บิด */
    opacity: 0;
    /* transition: opacity 1.5s ease-in-out; */
    transform: scale(1.05);
    transition: opacity 1.5s ease-in-out, transform 6s linear;
    
}

.fade-banner img.active {
    /* opacity: 1;
    z-index: 1; */
    opacity: 1;
    transform: scale(1);
}
/* เอาออกจะกรอปจะคอบ img  */
.fade-banner {
    background: #000;
}

.fade-banner img {
    object-fit: contain;
}
/* end */


.content-section {
  background: #fff;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.content-section h2 {
  color: var(--wizard-red);
  font-size: 28px;
  margin-bottom: 15px;
  border-left: 5px solid var(--wizard-red);
  padding-left: 15px;
}

.content-section p {
  color: #333;
  line-height: 1.8;
  font-size: 16px;
}

/* =========================================
   4. SIDE POPUP MENU (เมนูด้านข้าง)
   ========================================= */
.side-popup {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%) translateX(250px);
  display: flex;
  align-items: center;
  z-index: 1000;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.side-popup.open {
  transform: translateY(-50%) translateX(0);
}

.toggle-tab {
  background: #dc2626;
  color: white;
  padding: 18px 12px;
  cursor: pointer;
  border-radius: 10px 0 0 10px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 14px;
  font-weight: 500;
  box-shadow: -3px 0 10px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
}
/* สไตล์สำหรับตัวอักษรตัวแรกให้เด่นขึ้น */
.first-letter {
  font-size: 18px; /* ขนาดใหญ่ขึ้น */
  font-weight: 900; /* ความหนาพิเศษ */
  color: #ffffff; /* สีขาว (หรือเปลี่ยนเป็นเหลือง #ffff00 ถ้าอยากให้ตัดกับพื้นแดง) */
}

/* ปรับระยะห่างตัวอักษรอื่นๆ ให้สมดุล */
.toggle-tab {
  /* ... โค้ดเดิมของคุณ ... */
  background: #dc2626;
  color: white;
  cursor: pointer;

  /* เพิ่ม 2 บรรทัดนี้เพื่อแก้ปัญหาเคอร์เซอร์และการเลือกข้อความ */
  user-select: none; /* ป้องกันไม่ให้คลุมดำหรือเลือกตัวอักษร */
  -webkit-user-select: none; /* สำหรับ Safari/Chrome */
  outline: none; /* เอาเส้นขอบเน้นสีน้ำเงินออกเวลาคลิก */
}

/* เอฟเฟกต์ Hover ตามที่คุณต้องการ */
.toggle-tab:hover {
  background-color: #990000;
  transition: all 0.3s ease;
}
/* แก้ไขโครงสร้างคอนเทนเนอร์ของเมนูด้านข้าง */
.side-menu-content {
  width: 250px;
  background: white;
  border: 1px solid var(--wizard-red); /* เพิ่มเส้นขอบสีแดงให้ชัดเจน */
  border-right: none; /* ซ่อนขอบขวาเพราะติดขอบจอ */
  box-shadow: -5px 5px 25px rgba(0, 0, 0, 0.15); /* เพิ่มเงาให้ดูมีมิติ */
  height: fit-content;
  border-radius: 15px 0 0 15px; /* เพิ่มความโค้งมนที่มุมซ้ายบนและล่าง */
  overflow: hidden; /* เพื่อให้เนื้อหาด้านในไม่ล้นขอบที่โค้ง */
}

/* ปรับแต่งรายการเมนูแต่ละแถว */
.side-item {
  display: flex;
  align-items: center;
  padding: 8px 18px;
  text-decoration: none;
  color: #333;
  border-bottom: 1px solid #eee; /* เส้นแบ่งระหว่างเมนู */
  font-size: 14px;
  transition: all 0.2s ease;
  background: #fff;
}

/* เอฟเฟกต์เมื่อเอาเมาส์ไปวาง */
.side-item:hover {
  background-color: #fff5f5; /* สีพื้นหลังแดงอ่อนๆ */
  color: var(--wizard-red);
  padding-left: 25px; /* ให้ข้อความขยับนิดหน่อยดูมี Interactive */
}

/* ปรับแต่งเส้นขอบไอคอนวงกลม */
.side-item i {
  width: 35px;
  height: 35px;
  border: 1.5px solid var(--wizard-red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  color: var(--wizard-red);
  font-size: 14px;
  background: #fff;
  transition: 0.3s;
}

/* เมื่อ Hover ให้ไอคอนเปลี่ยนสีสลับกัน */
.side-item:hover i {
  background: var(--wizard-red);
  color: #fff;
}

/* ปรับแต่งปุ่ม Back to Top ด้านล่างสุดของเมนู */
.on-top-btn {
  background: var(--wizard-red);
  color: white;
  text-align: center;
  padding: 10px;
  display: block;
  text-decoration: none;
  font-weight: bold;
  text-transform: uppercase;
  cursor: pointer;
  transition: 0.3s;
  
  /* เพิ่ม 3 บรรทัดนี้เพื่อแก้ปัญหาการกระพริบและการเลือกข้อความ */
  user-select: none; 
  outline: none;
  -webkit-tap-highlight-color: transparent; 
}

.on-top-btn:hover {
  background: #333; 
  /* ไม่ต้องใส่ค่าซ้ำ เช่น padding หรือ font-weight เพราะมันดึงมาจากตัวหลักอยู่แล้วครับ */
}

/* เพิ่ม Effect ตอนกดให้นิ่งขึ้น */
.on-top-btn:active {
  opacity: 0.8;
  transform: translateY(-2px); /* ให้ความรู้สึกเหมือนปุ่มถูกกดจริง */
}

/* =========================================
   5. SECTIONS (VIDEO, SERVICE, BRANCH, MAP)
   ========================================= */

/* Video Section */
.video-section {
  background: var(--wizard-black);
  padding: 50px 0;
  margin-top: 40px;
}
.video-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.video-card {
  color: #fff;
}
.video-box {
  width: 100%;
  aspect-ratio: 16/9;
  background: #333;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #444;
}
.video-box i {
  font-size: 30px;
  color: rgba(255, 255, 255, 0.6);
}
.video-card h3 {
  font-size: 15px;
  margin-bottom: 8px;
  font-weight: 500;
}
.video-card p {
  font-size: 12px;
  color: #bbb;
  line-height: 1.5;
  margin-bottom: 8px;
}
.video-card .more {
  color: #ff0000;
  text-decoration: none;
  font-size: 11px;
}

.video-wrapper {
            max-width: 800px;
            /* ปรับขนาดตามต้องการ */
            margin: 20px auto;
            border-radius: 15px;
            /* ความโค้งมนแบบในรูป */
            overflow: hidden;
            /* เพื่อให้วิดีโอโค้งตามกรอบ */
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
            /* เพิ่มเงาให้ดูมีมิติ */
            background-color: #000;
        }

        .styled-video {
            width: 100%;
            display: block;
            /* ใน Chrome/Safari เราสามารถเปลี่ยนสีของ Control Bar บางส่วนได้ */
        }

        /* เทคนิคซ่อนปุ่มที่ไม่ต้องการ (บางเบราว์เซอร์) */
        video::-webkit-media-controls-enclosure {
            border-radius: 0;
        }

        video {
            /* 1. กำหนดขนาดวิดีโอ */
            width: 100%;
            max-width: 700px;
            border-radius: 5px;
            outline: 1px solid #333;
            outline-offset: 2px;
            /* เว้นระยะห่างระหว่างเส้นขอบ */
            margin-bottom: 10px;
        }

/* Service Section */
.service-section {
  background: #fff;
  padding: 60px 0 20px 0;
}
.service-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.service-card {
  border: 1px solid #eee;
  transition: var(--transition);
}
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}
.service-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.service-body {
  padding: 20px;
}
.service-body h4 {
  font-size: 16px;
  margin-bottom: 10px;
  color: #333;
}
.service-body p {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 15px;
  height: 60px;
  overflow: hidden;
}
.link-interest {
  color: var(--wizard-red);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

/* Branch Table Section */
.branch-section {
  padding: 20px 0 20px 0;
  background: #fff;
}
.branch-title {
  text-align: center;
  color: var(--wizard-red);
  font-size: 32px;
  margin-bottom: 40px;
  font-weight: 500;
}
.branch-table-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 20px 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Table Scrollbar Decor */
.branch-table-container::-webkit-scrollbar {
  height: 8px;
}
.branch-table-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}
.branch-table-container::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}
.branch-table-container::-webkit-scrollbar-thumb:hover {
  background: var(--wizard-red);
}

.branch-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 900px;
  background: white;
}
.branch-table th {
  background: var(--wizard-red);
  color: #fff;
  text-align: left;
  padding: 12px 15px;
  border: 1px solid #ddd;
  font-weight: 500;
  white-space: nowrap;
}
.branch-table td {
  border: 1px solid #ddd;
  padding: 10px 15px;
  vertical-align: top;
  line-height: 1.6;
}
.branch-table td a {
  color: var(--wizard-red);
  text-decoration: none;
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
}
.branch-table td a:hover {
  text-decoration: underline;
}
/* แถวหัวข้อสีแดง */
.subheader-row td.bg-red {
    background-color: #cc0000;
    color: #fff;
    font-weight: bold;
}

/* Comparison Section */
.comparison-section {
  padding: 40px 0;
  background-color: #fff;
}
.section-title-icon {
  max-width: 1100px;
  margin: 0 auto 20px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 500;
}
.comparison-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  padding: 0 20px;
}
.compare-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.compare-img-box {
  position: relative;
  display: flex;
}
.compare-img-box img {
  width: 100%;
  height: auto;
  display: block;
}
.service-label {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  background: #cc0000;
  color: white;
  padding: 4px 15px;
  border-radius: 20px;
  font-size: 13px;
  white-space: nowrap;
  z-index: 2;
}
.compare-footer {
  background: #eee;
  text-align: center;
  padding: 5px;
  font-size: 11px;
  color: #333;
}

/* Map Section */
.map-section {
  padding: 40px 0;
  background-color: #fff;
  text-align: center;
}
.map-container {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  padding: 0 15px;
}
.btn-find-branch {
  background-color: #cc0000;
  color: white;
  padding: 8px 25px;
  border-radius: 25px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  margin-bottom: 20px;
  transition: var(--transition);
}
.btn-find-branch:hover {
  background-color: #000;
  color: #fff;
}
.map-wrapper {
  margin-top: 20px;
  border: 1px solid #ddd;
  padding: 10px;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.map-wrapper img {
  width: 100%;
  display: block;
}

/* =========================================
   6. PRODUCT CAROUSEL (ส่วนผลิตภัณฑ์)
   ========================================= */
.product-section {
  padding: 40px 0;
  background-color: #fff;
}
.product-header-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto 20px;
  padding: 0 20px;
}
.product-controls {
  display: flex;
  gap: 10px;
}
.product-control-btn {
   user-select: none;        /* ไม่ให้เลือกข้อความ */
  width: 35px;
  height: 35px;
  border: 1px solid #ddd;
  background: #fff;
  color: #333;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;            /* เอาเส้น focus ออก */
}
.product-control-btn:hover {
  background: var(--wizard-red);
  color: #fff;
  border-color: var(--wizard-red);
}

.product-grid {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 10px 5px 25px 5px;
  -webkit-overflow-scrolling: touch;
}
.product-grid::-webkit-scrollbar {
  display: none;
}

.product-card {
  flex: 0 0 calc(25% - 15px);
  min-width: 250px;
  scroll-snap-align: start;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  border: 1px solid #eee;
}

.product-img-box {
  width: 100%;
  aspect-ratio: 1 / 1;
  position: relative;
  overflow: hidden;
  background: #fff;
  padding: 15px;
}
.product-img-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.zoom-overlay {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 45px;
  height: 45px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 5;
}
.zoom-icon-inner {
  width: 30px;
  height: 30px;
  background: #007bff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
}

.product-card:hover .product-img-box img {
  transform: scale(1.1);
}
.product-card:hover .zoom-overlay {
  opacity: 1;
}

.product-info {
  padding: 15px;
  text-align: center;
}
.product-info h4 {
  font-size: 14px;
  margin-bottom: 12px;
  color: #333;
  height: 35px;
  line-height: 1.4;
}
.btn-buy {
  background: var(--wizard-red);
  color: white;
  border: none;
  width: 100%;
  padding: 8px;
  border-radius: 4px;
  font-size: 14px;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: 0.2s;
}
.btn-buy:hover {
  background: #000;
  color: #fff;
}

/* =========================================
   7. FOOTER & PARTNERS (ส่วนท้ายเว็บไซต์)
   ========================================= */
.partner-section {
  background: #fff;
  padding: 20px 0;
  border-top: 1px solid #eee;
  text-align: center;
}
.partner-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  padding: 0 20px;
}
.partner-container img {
  height: 40px;
  object-fit: contain;
}

footer.main-footer {
  background: var(--wizard-red);
  color: #fff;
  padding: 40px 0 0px 0;
}
.footer-social-bar {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.social-link {
  text-align: center;
  text-decoration: none;
  color: #fff;
  font-size: 11px;
}
.social-link img {
  width: 35px;
  height: 35px;
  display: block;
  margin: 0 auto 5px;
}

.footer-grid {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 30px;
}
.footer-col h3 {
  font-size: 17px;
  margin-bottom: 15px;
  font-weight: 500;
}
.footer-col p,
.footer-col ul {
  font-size: 13px;
  line-height: 1.8;
  list-style: none;
}
.footer-col a {
  color: #fff;
  text-decoration: none;
}

.fb-card {
  background: #fff;
  color: #333;
  padding: 15px;
  border-radius: 5px;
  max-width: 280px;
}
.copyright {
  background-color: #990000;
  text-align: center;
  font-size: 12px;
  padding: 10px 0;
  color: #ffffff;
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* =========================================
   8. RESPONSIVE & LIGHTBOX (การแสดงผลมือถือ)
   ========================================= */

/* Lightbox */
.custom-lightbox {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.lightbox-content-wrapper {
  position: relative;
  max-width: 80%;
  max-height: 80%;
  text-align: center;
}
.custom-lightbox img {
  max-width: 100%;
  max-height: 80vh;
  border: 3px solid #fff;
  border-radius: 5px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}
#lightboxCaption {
  color: #fff;
  margin-top: 15px;
  font-size: 18px;
  font-weight: 400;
}
.close-lightbox {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
}
.close-lightbox:hover {
  color: var(--wizard-red);
}

/* Media Queries */
@media (max-width: 1024px) {
  .menu-toggle {
    display: flex;
  }
  .main-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    padding: 15px 0;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    border-top: 1px solid #eee;
  }
  .main-nav.active {
    display: flex;
  }
  .nav-item {
    flex-direction: row;
    width: 100%;
    padding: 12px 25px;
    font-size: 16px;
    min-width: auto;
    justify-content: flex-start;
    border-bottom: 1px solid #f9f9f9;
  }
  .nav-item i {
    margin-bottom: 0;
    margin-right: 15px;
    width: 25px;
  }
  .video-container,
  .service-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .comparison-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .product-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 15px;
    padding-bottom: 20px;
  }
  .product-card {
    flex: 0 0 80%;
    min-width: 80%;
    scroll-snap-align: center;
  }
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .fb-card {
    margin: 0 auto;
  }
}

@media (max-width: 600px) {
  .header-left {
    gap: 10px;
  }
  .lang-switcher {
    padding-left: 10px;
    gap: 5px;
  }
  .lang-btn img {
    width: 22px;
    height: 15px;
  }
  .logo img {
    height: 40px;
  }
  .video-container,
  .service-container {
    grid-template-columns: 1fr;
  }
}
.product-slider-wrapper {
    overflow: hidden;
    position: relative;
}

.product-track {
    display: flex;
    gap: 20px;
    transition: transform 0.4s ease;
}

.product-slider-wrapper {
    overflow: hidden;
    cursor: grab;
}

.product-slider-wrapper:active {
    cursor: grabbing;
}

.product-track {
    display: flex;
    user-select: none;
    will-change: transform;
}


.product-card {
    flex: 0 0 calc(25% - 15px); /* 4 รูป */
}
@media (max-width: 1024px) {
    .product-card {
        flex: 0 0 calc(33.333% - 15px); /* 3 รูป */
    }
}

@media (max-width: 768px) {
    .product-card {
        flex: 0 0 calc(50% - 15px); /* 2 รูป */
    }
}

@media (max-width: 480px) {
    .product-card {
        flex: 0 0 100%; /* 1 รูป */
    }
}
/* แถบแจ้งเตือนคุกกี้สไตล์ Wizard */
.cookie-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 800px;
    background-color: rgba(0, 0, 0, 0.9); /* สีดำโปร่งแสง */
    color: #ffffff;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: none; /* เริ่มต้นซ่อนไว้ก่อน */
    border-bottom: 3px solid #ed1c24; /* ขลิบเส้นสีแดงตามสีแบรนด์ */
}

.cookie-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

#cookie-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}

.cookie-link {
    color: #ed1c24;
    text-decoration: underline;
    font-weight: bold;
}

.cookie-btn {
    background-color: #ed1c24;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    white-space: nowrap;
    transition: background 0.3s;
}

.cookie-btn:hover {
    background-color: #c41212;
}

/* จัดกลุ่มปุ่มให้เรียงตัวกัน */
.cookie-buttons {
    display: flex;
    gap: 10px; /* ระยะห่างระหว่างปุ่ม */
    margin-left: 15px;
}

/* ปุ่มหลัก (ยอมรับ) - สีแดง Wizard */
.cookie-btn {
    background-color: #ed1c24;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    white-space: nowrap;
    transition: 0.3s;
}

/* ปุ่มรอง (ปฏิเสธ) - สีเทา */
.cookie-btn.btn-secondary {
    background-color: #666666;
}

.cookie-btn:hover {
    opacity: 0.8;
}

/* ปรับแต่งสำหรับมือถือ ให้ปุ่มเรียงลงมาถ้าจอกบแคบ */
@media (max-width: 600px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    .cookie-buttons {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
        justify-content: center;
    }
}
