
/* ====== START: admin.css ====== */

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --secondary: #10b981;
    --accent: #facc15;
    --background: #1f2937;
    --surface: #111827;
    --text: #e5e7eb;
    --text-light: #9ca3af;
    --border: #374151;
}


body {
    background-color: var(--background);
    color: var(--text);
}

.admin-container {
    background: var(--surface);
}

.admin-nav ul li a {
    color: var(--text);
}

.admin-nav ul li a:hover {
    background: var(--primary);
    color: #32353b;
}

.admin-table th {
    background: var(--primary);
    color: #2b2a31;
}

.admin-table td {
    color: var(--text-light);
}


header.admin-header {
    background: var(--primary-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}

.admin-header a.admin-logo {
    color: var(--white);
    font-size: 1.5rem;
    text-decoration: none;
}

nav.admin-nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

nav.admin-nav ul li a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
}

nav.admin-nav ul li a:hover {
    color: var(--accent);
}

.admin-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px;
    background: #1E1E1E;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.admin-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 10px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.admin-table th, .admin-table td {
    border: 1px solid var(--gray);
    padding: 10px;
    text-align: left;
}

.admin-table th {
    background: var(--primary);
    color: var(--white);
}

.admin-table tr:nth-child(even) {
    background: #2A2A2A;
}

.admin-btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    margin-right: 5px;
}

.admin-btn-primary { background: var(--primary); color: var(--white); }
.admin-btn-secondary { background: var(--secondary); color: var(--white); }
.admin-btn-danger { background: #dc2626; color: var(--white); }

.admin-form .form-group {
    margin-bottom: 15px;
}

.admin-form label {
    display: block;
    margin-bottom: 5px;
}

.admin-form input, .admin-form textarea, .admin-form select {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--gray);
    border-radius: 4px;
    background: #2E2E2E;
    color: var(--white);
}
.admin-header {
    background: #1f2937; /* สีเข้มถนอมสายตา */
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-logo {
    color: #44454a;
    font-size: 1.5rem;
    text-decoration: none;
    font-weight: bold;
}

.admin-nav ul {
    list-style: none;
    display: flex;
    gap: 15px;
    margin: 0;
    padding: 0;
}

.admin-nav ul li {
    position: relative;
}

.admin-nav ul li a {
    color: #1e1d20;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background 0.3s, color 0.3s;
}

.admin-nav ul li a:hover {
    background: #374151; /* สี hover */
    color: #facc15; /* accent เหลือง */
}

.admin-nav ul li a.active {
    background: #3b82f6; /* สีเมนู active */
    color: #363441;
    font-weight: bold;
}
.category-header {
    margin-top: 40px;
    background: #374151; /* เทาเข้ม (dark mode) */
    padding: 10px;
    color: #ffffff;
    border-radius: 4px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-bottom: 20px;
}

.admin-table th {
    background: #4b5563; /* หัวตารางสีเทา */
    color: #ffffff;
    padding: 8px;
}

.admin-table td {
    padding: 8px;
    border: 1px solid #6b7280;
}

.admin-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
}

.admin-btn-primary {
    background: #10b981; /* เขียว */
    color: #ffffff;
}

.admin-btn-primary:hover {
    background: #059669;
}

.no-image {
    color: #9ca3af; /* เทาอ่อน */
}
.detail-list {
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
}

.detail-item {
    margin-bottom: 20px;
    padding: 15px;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    border-radius: 6px;
}



/* ====== END: admin.css ====== */


/* ====== START: chat.css ====== */
/* Floating Chat Button */
.ai-chat-float-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #007bff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transition: all 0.3s ease;
}

.ai-chat-float-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.ai-chat-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

/* Chat Popup */
.ai-chat-popup {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    max-height: 500px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    z-index: 1001;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.ai-chat-header {
    padding: 15px 20px;
    background-color: #007bff;
    color: white;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-chat-close-btn {
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.2s;
}

.ai-chat-close-btn:hover {
    transform: scale(1.2);
}

.ai-chat-body {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Chat Form */
.ai-chat-form {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #fff;
    border-top: 1px solid #ddd;
    height: 70px;
}

.ai-chat-form textarea {
    flex-grow: 1;
    width: 100%;
    padding: 12px 18px;
    border-radius: 25px;
    border: 1px solid #ccc;
    resize: none;
    font-size: 16px;
    max-height: 120px;
    overflow-y: hidden; /* ✅ ซ่อน scrollbar แนวตั้ง */
    box-sizing: border-box;
}

.ai-chat-upload-btn,
.ai-chat-send-btn {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #007bff;
    padding: 6px;
}

.ai-chat-send-icon {
    width: 32px;
    height: 32px;
}



.ai-chat-form textarea:focus {
    border-color: #007bff;
}

.ai-image-upload-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    margin: 0 1px;
    background-color: #c0dbf603;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    color: #2d0af5;
    transition: all 0.2s;
}

.ai-image-upload-button:hover {
    background-color: #dee2e6;
}

.ai-image-input {
    display: none;
}

.ai-send-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 36px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.ai-send-btn:hover {
    background-color: #e9ecef;
}

.ai-send-icon {
    width: 24px;
    height: 24px;
}

/* Lightbox */
.ai-chat-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1002;
}

.ai-chat-lightbox-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

/* Message Styles (you can add these classes to your message elements) */
.ai-message {

    background: #f0f0f0;
    border: 1px solid #fff;      /* ✅ เพิ่มเส้นขอบสีขาว */
    border-radius: 10px;
    padding: 10px 15px;
    margin: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1); /* เพิ่มเงานิดหน่อยได้ */
    color: #000;
    border-bottom-left-radius: 8px;
}


.ai-user-message {
    align-self: flex-end;
    background-color: #007bff;
    color: white;
    border-bottom-right-radius: 2px;
}

.ai-bot-message {
    align-self: flex-start;
    background-color: #09b6e1;
    color: white;
    border-bottom-left-radius: 2px;
}

/* Typing Indicator */
.ai-typing-indicator {
    display: inline-block;
    padding: 10px 15px;
    background-color: #f1f1f1;
    border-radius: 18px;
    margin-bottom: 10px;
    align-self: flex-start;
}

.ai-typing-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #666;
    margin: 0 2px;
    animation: ai-typing-animation 1.4s infinite ease-in-out;
}

.ai-typing-dot:nth-child(1) {
    animation-delay: 0s;
}

.ai-typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.ai-typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes ai-typing-animation {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-5px);
    }
}
.ai-chat-popup {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    max-height: 600px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border: 1px solid #ccc;
    display: none;
    flex-direction: column;
    z-index: 1001;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

@media (max-width: 768px) {
    .ai-chat-popup {
        width: 95%;
        max-height: 90vh;
        left: 50%;
        right: auto;
        bottom: 20px;
        transform: translateX(-50%);
        border-radius: 16px;
    }
}

@media (min-width: 1024px) {
  .ai-chat-popup {
    width: 450px;      /* ✅ เพิ่มขนาดบนจอใหญ่ */
    max-height: 650px;
    bottom: 40px;
    right: 40px;
  }
}


.ai-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #007bff;
    color: white;
    padding: 10px 16px;
    font-weight: bold;
    position: relative;
}

.ai-chat-title {
    font-size: 16px;
}

.ai-chat-contact-btn {
    background: white;
    color: #007bff;
    border: none;
    padding: 5px 12px;
    border-radius: 15px;
    margin-left: auto;
    margin-right: 30px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 400;
}

.ai-chat-close-btn {
    font-size: 20px;
    cursor: pointer;
}
.inline-row {
    display: inline-flex;
    align-items: center;
    gap: 6px; /* ✅ เพิ่มระยะห่างเล็กน้อยระหว่างนิ้วกับโลโก้ */
}


.ai-menu-float-wrapper {
    position: fixed;
    bottom: 40px;    /* ✅ อยู่ล่างสุดของจอ */
    right: 40px;     /* ✅ ไม่ชิดจนเกินไป */
    z-index: 999;
}



/* ปุ่มลอยด้านหน้า */
.ai-menu-float-btn {
    position: relative;
    width: 50px;
    height: 50px;
    background: radial-gradient(circle, #e4ece5, #029313);
    border-radius: 50%;
    border: none;
    color: white;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 2;
}
@media (max-width: 768px) {
    .ai-menu-float-wrapper {
        bottom: 10px;  /* ✅ ล่างสุด */
        right: 10px;   /* ✅ ไม่ชิดจนเกินไป */
    }
}


/* ====== END: chat.css ====== */


/* ====== START: form.css ====== */
 /* Base Styles */
        body {
            font-family: Arial, sans-serif;
            max-width: 1200px;
            margin: 0 auto;
            padding: 2px;
        }

        h4 {
            position: relative;
            display: block;
            /* ✅ ทำให้ยืดเต็มบรรทัด */
            font-family: 'Kanit', sans-serif;
            font-size: .9rem;
            font-weight: bold;
            color: #333;
            padding-bottom: 1px;
            margin-bottom: 2px;
            margin-top: 10px;
        }

        h4::after {
            content: '';
            position: absolute;
            left: 0;
            bottom: 0;
            width: 100%;
            /* ✅ เส้นใต้ยาวเต็มบรรทัด */
            height: 2px;
            background: linear-gradient(to right, rgb(152, 239, 123), rgb(50, 47, 247));
            /* สีส้ม-ชมพู */
            border-radius: 2px;
        }





   .grid-container {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 5px;
    margin-top: 5px;
    font-size: 0.9rem;
}

/* ✅ ล็อคไม่ให้ label ขยายทั้งแถว */
.grid-container label {
    display: block;
    width: 100%;
    background: #f8f8f8;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    text-align: left;
    color: #151414;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr); /* มือถือ 2 คอลัมน์ */
    }

    .grid-container label {
        font-size: 0.85rem;
        padding: 8px;
    }
}


.form-section-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 10px;
}

.form-section-item {
  flex: 1 1 48%;
  min-width: 260px;
}

.form-title {
  margin: 0 0 8px;
  font-size: 1rem;
  color: #333;
  font-weight: bold;
  font-family: 'Kanit', sans-serif;
}

.form-input-box {
  width: 100%;
}

.form-label {
  display: block;
  font-size: 0.95rem;
  color: #444;
}

.form-select,
.form-input {
  width: 100%;
  padding: 6px 10px;
  font-size: 0.95rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
  margin-top: 4px;
}

/* ✅ Responsive: มือถือแสดง 1 แถว */
@media (max-width: 768px) {
  .form-section-item {
    flex: 1 1 100%;
  }
}







.door-item {
  flex: 1 1 48%;
}

.select-width,
.input-remote {
  width: 100%;
  padding: 8px 12px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
  margin-top: 6px;
}

/* 🔹 สำหรับมือถือ: h4 ซ้อนกันแนวตั้ง */
@media (max-width: 768px) {
  .h4-row h4,
  .door-item {
    flex: 1 1 100%;
  }
}





        .grid-con {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            /* 2 คอลัมน์ในคอม */
            gap: 5px;
            margin-top: 5px;
            font-family: 'Kanit', sans-serif;
            font-size: 0.85rem;
        }

        .door-item {
            background: #fff;
            border: 1px solid #ccc;
            border-radius: 5px;
            padding: 1px;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
        }

        .door-item label {
            display: block;
            margin-bottom: 5px;
             margin-top: 5px;
             margin-left: 5px;
            font-weight: 300;
            color: #333;
        }

     .input-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 0; /* ลบระยะล่างออก */
  padding-left: 5px;
}

input.wide,
input.long {
  width: 145px;
  padding: 4px 10px;
  font-size: .8rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
}

.warning {
  color: red;
  font-size: 0.85rem;
  margin-top: 4px;
  text-align: center; /* ✅ หรือ left ก็ได้ */
}


        /* มือถือ: เปลี่ยนเป็น 1 คอลัมน์ */
        @media (max-width: 768px) {
            .grid-con {
                grid-template-columns: 1fr;
            }
        }

        .label-remote {
            margin-left: 5px;
            /* ✅ ห่างจากซ้าย 5px */
        }

        .input-remote {
            width: 30px;
            /* ✅ ความกว้าง 40px */
            height: 15px;
            margin-right: 8px;
            font-size: 0.9rem;
        }

        .select-label {
            margin-left: 5px;
            /* ✅ ห่างจากขอบซ้าย */
        }

        .select-width {
            margin-right: 8px;
            /* ✅ เว้นระยะจากข้อความ */
            height: 20px;
            font-size: .85rem;
        }



.price-table {
    width: 50%;
    margin-left: auto;
    margin-right: 0;
    margin-top: 30px;  /* ✅ เพิ่มส่วนนี้ */
    border-collapse: collapse;
    font-family: 'Kanit', sans-serif;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
}


        .price-table td {
            padding: 10px 12px;
            border-bottom: 1px solid #eee;
            font-size: .9rem;
        }

        .price-table .label {
            background-color: #f8f8f8;
            font-weight: 500;
            color: #444;
            width: 60%;
        }

        .price-table .value {
            text-align: right;
            color: #333;
            font-weight: bold;
        }

        .price-table .total .label,
        .price-table .total .value {
            background-color: #2c3e50;
            color: #fff;
        }

        @media (max-width: 768px) {
            .price-table {
                width: 100%;
            }
        }





        /* ✅ ส่วนปุ่มชิดขวา */
        .submit-wrapper {
            width: 100%;
            /* ✅ เต็มความกว้างของพื้นที่ */
            display: flex;
            justify-content: flex-end;
            /* ✅ ดันปุ่มไปชิดขวา */
            margin-top: 20px;
        }


        .btn-submit {
            padding: 10px 20px;
            background: linear-gradient(to right, #ff5722, #e91e63);
            color: #fff;
            border: none;
            font-size: .85rem;
            font-weight: bold;
            border-radius: 8px;
            cursor: pointer;
            transition: background 0.3s ease;
        }

        .btn-submit:hover {
            background: linear-gradient(to right, #e91e63, #ff5722);
        }
/* ====== END: form.css ====== */


/* ====== START: menu.css ====== */

        /* ----- HEADER ----- */
     


header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: linear-gradient(to right, #ff5722, #7b1fa2);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 6px;
  height: 60px; /* ✅ กำหนดความสูง */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

        .logo {
            font-size: 16px;
            font-weight: bold;
            color: white;
            text-decoration: none;
            font-weight: 200;
        }

        /* ----- HAMBURGER ----- */
        .hamburger {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            width: 36px;
            height: 36px;
            background: transparent;
            border: none;
            cursor: pointer;
            z-index: 1001;
        }

        .hamburger-line {
            width: 26px;
            height: 3px;
            background-color: white;
            margin: 4px 0;
            border-radius: 2px;
            transition: all 0.3s ease-in-out;
        }

        .hamburger.active .hamburger-line:nth-child(1) {
            transform: rotate(45deg) translate(5px, 5px);
        }

        .hamburger.active .hamburger-line:nth-child(2) {
            opacity: 0;
        }

        .hamburger.active .hamburger-line:nth-child(3) {
            transform: rotate(-45deg) translate(5px, -5px);
        }

        /* ----- NAV (Mobile) ----- */
        nav {
            position: fixed;
            top: 0;
            right: -100%;
            width: 260px;
            height: 100vh;
            background: linear-gradient(to right, #ff5722, #7b1fa2);
            color: white;
            padding: 20px;
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            transition: right 0.3s ease-in-out;
            z-index: 999;
        }

        nav.show {
            right: 0;
        }

        nav ul {
            list-style: none;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        nav a {
            color: white;
            text-decoration: none;
            font-size: 16px;
            padding: 2px 2px;
            border-radius: 4px;
            font-weight: 200;
        }

        nav a:hover {
            background: rgba(255, 255, 255, 0.2);
        }
nav img[src*="log.png"] {
  width: 45px;
  height: 45px;
  object-fit: contain;
  vertical-align: middle;
  margin-left: 8px;
  border-radius: 6px;
  box-shadow: 0 0px 0px rgba(0,0,0,0.2);
  transition: transform 0.2s ease;
}
/* ปรับ submenu ใน Desktop ให้ระยะห่างพอดี */
.submenu {
  padding: 0;
  margin: 0;
  gap: 0;
}

.submenu li {
  margin: 0;
  padding: 0;
}

.submenu a {
  padding: 6px 6px;       /* 🔽 ลดจาก 10px+ ได้ */
  font-size: 16px;         /* 🔽 ปรับขนาดตัวอักษรให้พอดี */
  line-height: 1.4;        /* 🔽 ลดความสูงบรรทัด */
  white-space: nowrap;     /* ป้องกันการขึ้นบรรทัดใหม่ */
  display: block;
}

.submenu a:hover {
  background: #a4e9d7;
  color: #e74c3c;
}



        /* ----- Dropdown (Mobile) ----- */
        .dropdown .submenu {
            display: none;
            flex-direction: column;
            padding-left: 16px;
        }

        .dropdown.open .submenu {
            display: flex;
        }

        /* ----- DESKTOP MEDIA ----- */
        @media (min-width: 768px) {
            header {
                flex-wrap: nowrap;
            }

            nav {
                display: block;
                position: static;
                width: auto;
                height: auto;
                background: transparent;
                padding: 0;
                transition: none;
                 font-size: 16px; /* ✅ ปรับขนาดตามต้องการ เช่น 14px, 16px, 18px */
            }

            nav ul {
                flex-direction: row;
                align-items: center;
                gap: 20px;
            }

            .hamburger {
                display: none;
            }

            .dropdown {
                position: relative;
            }

            .dropdown .submenu {
                position: absolute;
                top: 100%;
                left: 0;
                background: white;
                color: #333;
                border-radius: 4px;
                box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
                display: none;
                min-width: 180px;
                z-index: 100;
                flex-direction: column;
            }

            .dropdown:hover .submenu {
                display: flex;
            }

            .submenu a {
                color: #333;
                padding: 10px 16px;
                display: block;
                 font-size: 16px; /* ✅ ปรับขนาดตามต้องการ เช่น 14px, 16px, 18px */
            }

            .submenu a:hover {
                background: #eee;
                color: #e74c3c;
            }
        }
/* ====== END: menu.css ====== */


/* ====== START: slide.css ====== */
.carousel-container {
  text-align: center;
  max-width: 100%;
  margin: auto;
  padding-bottom: 1px 0;
   padding-bottom: 30px 0;
}

.main-image-container {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-bottom: 20px;
}

.main-image-wrapper {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding-top: 0px;
}

.main-product-box {
  display: none;
  flex-direction: column;

  align-items: center;
  background: #fff;
  border-radius: 10px;
  padding: 0px;
  margin-top: 0px;
  margin-bottom: 20px;


}

.main-product-box.active {
  display: flex;
}

.brand-header {
    width: 100%;
    background:  rgb(51, 169, 232);
    color: white;
    padding: 8px 0;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.1);
}

.main-image {
  width: 100%;
  object-fit: contain;
  border: 0px solid #e74c3c;
  border-radius: 8px;
  background: white;
  padding: 5px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}


.model-name {
  font-size: 1rem;
  color: #222;
  margin-top: 10px;
}

.price {
  font-size: 1rem;
  color: #10b981;
  font-weight: bold;
  margin-top: 5px;
}

.nav-arrow {
  position: absolute;
  bottom: 10px;            /* ✅ จากเดิม top: 50% ให้ลบออก */
  transform: translateY(0); /* ✅ ยกเลิกการเลื่อนกลางแนว Y */
  background-color: rgba(255, 255, 255, 0.8); /* เพิ่มพื้นหลังโปร่งแสง */
  border: none;
  border-radius: 50%;
  font-size: 20px;
  padding: 8px 12px;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}



.nav-arrow.prev {
  left: 10px;
}

.nav-arrow.next {
  right: 10px;
}


/* ✅ Thumbnail ส่วนล่าง (คงไว้ตามเดิม) */
.thumbnail-container {
  width: 100%;
  padding: 1px 0;
  background: #ffffff;
  margin: 0 auto;
}

.thumbnail-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  gap: 5px;
  width: 100%;
  padding-bottom: 10px;
  padding-top: 1px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.thumbnail-row::-webkit-scrollbar {
  display: none;
}

.thumbnail {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.thumbnail:hover {
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.thumbnail.active {
  border: 1px solid #007bff;
  transform: scale(1.1);
  box-shadow: 0 6px 18px rgba(0, 123, 255, 0.5);
  border-radius: 6px;
  transition: all 0.3s ease;
}
@media (max-width: 768px) {
  .thumbnail-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
.thumbnail-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* 🟢 6 คอลัมน์เท่ากัน */
    gap: 2px;
    width: 100%;
    padding: 2px 0;
}

.thumbnail {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #ccc;
    transition: all 0.3s ease;
}




  .thumbnail.active {
    border: 2px solid #007bff;
    transform: scale(1.05);
  }

  .thumbnail-row::-webkit-scrollbar {
    display: none;
  }
}


/* ====== END: slide.css ====== */


/* ====== START: slide_special.css ====== */
/* slide_special.css - ใช้ปรับเฉพาะสินค้าที่เลือก */

.image-box {
    border: 2px dashed #00bcd4;
    background: #e0f7fa;
    box-shadow: 0 4px 12px rgba(0, 188, 212, 0.2);
}

.image-caption {
    color: #006064;
    font-weight: bold;
    font-size: 16px;
    text-shadow: 1px 1px #ccc;
}

/* ====== END: slide_special.css ====== */


/* ====== START: style.css ====== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  padding-left: 5;
  
}

html, body {
  width: 100%;              /* เต็มจอเสมอ */
  font-family: 'Kanit', sans-serif;
  background: #f4f4f4;
  padding-top: 30px; /* หากเมนูเป็น fixed ให้เผื่อช่องว่างไว้ */
}

.container {
  width: 100%;
  max-width: 1200px;        /* ✅ กำหนดความกว้างของ content */
  margin: 0 auto;           /* ✅ จัดกึ่งกลาง */
  padding-top: 10px;
}


a {
  color: inherit;
  text-decoration: none;
}

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

ul {
  list-style: none;
  padding: 0;
}

h1, h2, h3 {
  font-weight: bold;
    color: #282626;
}

/* ====== Main Content ====== */

.hero {
    text-align: center;
    padding: 80px 20px;
}

.hero h1 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #333;
}

.hero p {
    font-size: 1.2rem;
    color: #666;
    max-width: 700px;
    margin: 0 auto 30px;
}

/* ====== Footer ====== */
footer {
    background: #333;
    color: #fff;
    padding: 20px 0;
    text-align: center;
    margin-top: 50px;
}

footer p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
}


/* ====== Product List ====== */
.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
}

.product-item {
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 5px;
}

.product-item img {
    max-width: 80%;
    height: auto;
}

/* สไตล์แอดมิน */
table {
    width: 100%;
    border-collapse: collapse;
}

table, th, td {
    border: 1px solid #ddd;
}

th, td {
    padding: 10px;
    text-align: left;
}
/* Image Gallery Styles */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin: 3px 2px;
}

.image-box {
    background: white;
    padding: 0px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.image-box:hover {
    transform: translateY(-15px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
}

.image-box:hover .gallery-image {
    transform: scale(1.15);
}

.image-container {
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    border-radius: 6px;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #ddd;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-box:hover .gallery-image {
    transform: scale(1.05);
}

.image-caption {
    font-size: 14px;
    color: #2f35f3; /* เขียว secondary */
  
    margin-top: 10px;
    font-weight: 300;
    text-align: center;
}

.image-price {
    font-size: 14px;
    color: #10B981; /* เขียว secondary */
    font-weight: 500;
    margin-top: 5px;
    text-align: center;
}

.image-description {
    width: 100%;
    background:  rgb(24, 115, 129);
    color: white;
    padding: 8px 0;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.1);
}

@media (max-width: 600px) {
    .image-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin: 0; /* Remove margin to make images flush with screen edges */
        padding-top: 50px;
        padding-left: 2px;
        padding-right: 2px;
    }
    
    /* Hide the first image in mobile view */
    .image-box:first-child {
        display: none;
    }
   
}

.detail-block {
    background: #f0f0f0;
    padding: 1px;
    margin: 5px 0;
    border-left: 2px solid #4f46e5;
    border-right: 2px solid #4f46e5;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.detail-blockk {
    background: #ef631c;
    padding: 5px;
    margin: 5px 0;
    border-bottom: 5px solid #ab0919;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  text-align: center;       /* จัดกลางแนวนอน */
  font-weight: bold;        /* ตัวหนา (สามารถไม่ใส่ก็ได้ เพราะ h1-h6 เป็น bold อยู่แล้ว) */
  font-size: .9em;           /* ปรับขนาดตามต้องการ */
  margin: 2px 0;           /* เพิ่มระยะห่างด้านบนและล่าง */
  color: white; /* ✅ เพิ่มบรรทัดนี้ */
  font-weight: 150;
}
.detail-section {
    background: #f9f9f9;
    padding: 50px;
    margin: 20px 0;
    border-left: 5px solid #4f46e5;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}



/* ===== Form Elements ===== */
.form-control {
  border-radius: var(--border-radius);
  border: 1px solid #ced4da;
  padding: 0.5rem 0.75rem;
  transition: var(--transition);
  box-shadow: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-check-input {
  width: 1.2em;
  height: 1.2em;
  margin-top: 0.1em;
}

.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.form-check-label {
  margin-left: 0.3em;
}

/* ===== Motor Selection Section ===== */
.motor-selection {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

/* ===== Door Dimensions Section ===== */
.door-dimensions {
  background: white;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: 1.5rem;
}

.door-dimensions .row {
  margin: 0 -0.5rem;
}

.door-dimensions .col-md-4 {
  padding: 0 0.5rem;
}

/* ===== Door Type Selection ===== */
.door-type-selection {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.door-type-options {
  padding: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.door-type-card {
  border: 1px solid #e9ecef;
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}

.door-type-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.door-type-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.door-type-card .card-body {
  padding: 1rem;
  text-align: center;
}

/* ===== Additional Components ===== */
.additional-components {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.accessory-grid {
  padding: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.accessory-card {
  border: 1px solid #e9ecef;
  border-radius: var(--border-radius);
  padding: 1rem;
  text-align: center;
  transition: var(--transition);
}

.accessory-card:hover {
  border-color: var(--primary);
}

.accessory-card img {
  width: 100%;
  height: 100px;
  object-fit: contain;
  margin-bottom: 0.5rem;
}

/* ===== Submit Section ===== */
.submit-section {
  margin-bottom: 1.5rem;
}

.btn-expand {
  width: 100%;
  background-color: var(--info);
  color: var(--dark);
  border: none;
  padding: 0.75rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-expand:hover {
  background-color: var(--info-hover);
  color: white;
}

.btn-expand::before {
  content: "+";
  margin-right: 0.5rem;
  font-size: 1.2em;
}

.btn-primary {
  width: 100%;
  padding: 0.75rem;
  font-weight: 600;
  border-radius: var(--border-radius);
}

/* ===== Additional Options ===== */
#additionalOptions {
  background: white;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: 1.5rem;
}

/* ===== Product Info ===== */
.product-info {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 1.5rem;
}

.product-info ul {
  padding-left: 1.5rem;
}

.product-info li {
  margin-bottom: 0.5rem;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
  .door-type-options {
    grid-template-columns: 1fr;
  }
  
  .accessory-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .submit-section .row > div {
    margin-bottom: 0.5rem;
  }
}



.card {
  width: 260px;
  padding: 15px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  text-align: center;
  margin: 10px auto;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card img {
  border-radius: 6px;
  margin-bottom: 10px;
  object-fit: contain;
}

.card span {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  color: #444;
}

.card .form-check-inline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.form-check-input {
  accent-color: #007bff; /* ปรับสี radio button */
}
@media (max-width: 480px) {
  .card {
    width: 90%;
  }

  .card img {
    width: 100%;
    height: auto;
  }
}
/* ขนาดแถวรูปภาพ คอม6 มือถือ 2*/
.image-grid {
  display: grid;
  gap: 0px;
  padding: 0px;
  grid-template-columns: repeat(3, 1fr); /* ✅ ปรับให้เป็น 3 คอลัมน์สำหรับมือถือ */
  background: transparent; /* ✅ ไม่มีพื้นหลัง */
}

.image-grid a img {
  width: 100%;
  height: auto;
  border-radius: 0;         /* ✅ ลบมุมโค้ง (ถ้าไม่ต้องการ) */
  box-shadow: none;         /* ✅ ลบเงาสีขาวใต้ภาพ */
  transition: transform 0.3s;
}

.image-grid a:hover img {
  transform: scale(1.05);   /* ✅ ยังคงเอฟเฟกต์ขยายไว้ */
}

@media (min-width: 992px) {
  .image-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}




/*แต่งข้อความ  */
.custom-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.custom-list li {
  margin-bottom: 5px;
  padding: 8px 8px;
  background: #f9f9f9;
  border-left: 2px solid #05aa29;
  border-radius: 8px;
  font-size: .85em;
  line-height: 1.2;
  color: #333;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.custom-list a {
  color: #007bff;
  font-weight: bold;
  text-decoration: none;
}

.custom-list a:hover {
  text-decoration: underline;
}








   /* Product Grid */
        .product-grid {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 5px;
            padding: 5px;
            max-width: 1800px;
            margin: 0 auto;
        }

        @media (max-width: 1440px) {
            .product-grid {
                grid-template-columns: repeat(4, 1fr);
            }
        }

        @media (max-width: 768px) {
            .product-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 5px;
                padding: 1px;
            }
        }

        .product-card {
            background: white;
            border-radius: 10px;
            overflow: hidden;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
            transition: transform 0.3s ease;
            cursor: pointer;
            position: relative;
        }

        .product-card:hover {
            transform: translateY(-5px);
        }

        .product-card img {
            width: 100%;
            height: 200px;
            object-fit: contain;
            display: block;
            padding: 0px;
            background: #f9f9f9;
        }

        .product-brand {
            position: absolute;
            top: 10px;
            left: 10px;
            background: rgba(0, 0, 0, 0.7);
            color: white;
            padding: 5px 10px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: bold;
        }

        .product-info {
            padding: 15px;
        }

        .product-model {
            font-size: 14px;
            color: #555;
            margin-bottom: 5px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .product-price {
            font-size: 16px;
            font-weight: bold;
            color: #e74c3c;
        }

        /* Lightbox */
       /* Lightbox Styles */
/* Lightbox Base */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100dvh; /* ✅ แก้ตรงนี้ */
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  overflow-y: auto;
  padding: 5px;
  align-items: center;     /* ✅ กึ่งกลางแนวตั้ง */
  justify-content: center; /* ✅ กึ่งกลางแนวนอน */
}


.lightbox.show {
    display: flex;
    pointer-events: auto;
}

/* Container */
.lightbox-container {
  width: 100%;
  max-width: 800px;
  max-height: 100%; /* ✅ เพิ่มบรรทัดนี้ */
  background: white;
  border-radius: 12px;
  overflow: auto;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.3s ease-out;
}


/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header */
.lightbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #2c3e50;
    color: white;
}

.lightbox-title {
    font-size: 20px;
    font-weight: bold;
    flex: 1;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.3s;
}

.close-btn:hover {
    transform: rotate(90deg);
}

/* Content Layout */
.lightbox-content {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

@media (max-width: 768px) {
  .lightbox-container {
    width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .lightbox-content {
    flex-direction: column !important;
  }

  .lightbox-image {
    padding: 0 !important;
    min-height: auto !important;
  }

  .lightbox-details {
    padding: 10px !important;
  }
}


/* Image */
.lightbox-image {
    flex: 1;
    padding: 20px;
    background: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 50vh;
    overflow: hidden;
}

.lightbox-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Details */
.lightbox-details {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.lightbox-description {
    margin-bottom: 15px;
    color: #555;
    line-height: 1.7;
}

.lightbox-price {
    font-size: 22px;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 20px;
}

/* Features */
.lightbox-features {
    margin-bottom: 20px;
}

.lightbox-features h3 {
    margin-bottom: 10px;
    color: #2c3e50;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.feature-list {
    list-style-type: none;
    padding: 0;
}

.feature-list li {
    padding: 6px 0 6px 25px;
    position: relative;
}

.feature-list li::before {
    content: "✓";
    color: #27ae60;
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Actions */
.lightbox-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.action-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.primary-btn {
    background: #3498db;
    color: white;
    flex: 2;
}

.primary-btn:hover {
    background: #2980b9;
}

.secondary-btn {
    background: #ecf0f1;
    color: #34495e;
    flex: 1;
}

.secondary-btn:hover {
    background: #bdc3c7;
}



 /* Grid การ์ด */
        .door-grid {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 7px;
        }
   .door-grid3 {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 3px;
        }
         .door-grid6 {
            display: grid;
            grid-template-columns: repeat(6, 1fr);
            gap: 6px;
        }

  /* Responsive Design */
        @media (max-width: 1440px) {
            .door-grid {
                grid-template-columns: repeat(4, 1fr);
            }

            .door-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 15px;
            }
            .door-grid3 {
                grid-template-columns: repeat(1, 1fr);
               
            }
             .door-grid6 {
                grid-template-columns: repeat(1, 1fr);
               
            }
            .gallery-title {
                font-size: 2rem;
            }

            .door-header {
                font-size: 1rem;
                padding: 12px;
            }

            .door-caption {
                font-size: 0.8rem;
                padding: 10px;
            }
        }




        /* การ์ด */
        .door-item {
            background: white;
            border-radius: 10px;
            overflow: hidden;
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            cursor: pointer;
        }

        .door-item:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
        }

        .door-header {
            padding: 2px;
              padding-top: 4px;
              padding-bottom: 4px;
            font-size: .85rem;
            font-weight: 300;
            text-align: center;
            color: white;
            background-color: #3498db;
        }

  .door-image-container {
    height: 180px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9f9f9;
}

.door-image {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain; /* ✅ เห็นภาพเต็ม ไม่ถูกครอบตัด */
    transition: transform 0.5s ease;
}

        .door-item:hover .door-image {
            transform: scale(1.05);
        }

        .door-caption {
            padding: 2px 2px;
            font-size: 0.85rem;
            color: #555;
            text-align: center;
            background-color: #f5f5f5;
            border-top: 1px solid #eee;
            line-height: 1.4;
           
        }

        /* Lightbox */
        .door-lightbox {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.9);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            padding: 20px;
        }
.door-lightbox.show {
    display: flex;
    pointer-events: auto;
}
        .door-lightbox-content {
            background: white;
            max-width: 800px;
            width: 100%;
            border-radius: 10px;
            overflow: hidden;
            max-height: 90vh;
            overflow-y: auto;
            animation: fadeIn 0.3s ease-in-out;
        }

        .door-lightbox-image {
            width: 100%;
            max-height: 400px;
            object-fit: contain;
            display: block;
            background: #f5f5f5;
            padding: 20px;
        }

        .door-lightbox-text {
            padding: 30px;
        }

        .door-lightbox-title {
            font-size: 1.8rem;
            margin-bottom: 15px;
            color: #2c3e50;
        }

        .door-lightbox-description {
            font-size: 1.1rem;
            color: #555;
            line-height: 1.8;
            margin-bottom: 20px;
        }

        .door-features {
            margin: 20px 0;
            padding-left: 20px;
        }

        .door-features li {
            margin-bottom: 10px;
            list-style-type: disc;
        }

        .close-lightbox-btn {
            position: absolute;
            top: 20px;
            right: 20px;
            font-size: 2rem;
            color: white;
            cursor: pointer;
            background: rgba(0, 0, 0, 0.5);
            width: 50px;
            height: 50px;
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(20px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }


        /* CSS seo */
.motor-price-list {
  font-family: 'Sarabun', Arial, sans-serif;
  max-width: 900px;
  margin: 30px auto;
  padding: 25px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.motor-price-list h1 {
  color: #2a4365;
  font-size: 28px;
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 2px solid #4299e1;
}

.motor-item {
  background: #f7fafc;
  margin-bottom: 20px;
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid #3182ce;
  transition: all 0.3s ease;
}

.motor-item:hover {
  transform: translateX(5px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.motor-title {
  color: #2b6cb0;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
}

.motor-price {
  display: inline-block;
  background: #e53e3e;
  color: white;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 16px;
  margin-left: 15px;
  font-weight: 500;
}

.motor-desc {
  color: #4a5568;
  line-height: 1.6;
  margin-top: 10px;
}

.seo-section {
  background: #ebf8ff;
  padding: 20px;
  margin-top: 40px;
  border-radius: 8px;
}

.seo-section h2 {
  color: #2c5282;
  font-size: 20px;
  margin-top: 0;
  margin-bottom: 15px;
}

.seo-meta {
  background: white;
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 15px;
}

.seo-meta p {
  margin: 5px 0;
  color: #4a5568;
}
      
/* Tab Navigation Styles */
    .tab-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 30px;
        padding: 0;
        list-style: none;
        justify-content: center;
    }

    .tab-item {
        padding: 10px 20px;
        background: #ddd;
        border-radius: 6px;
        cursor: pointer;
        color: #333;
    }

    .tab-item.active {
        background: #4CAF50;
        color: white;
    }

    .tab-panel {
        display: none;
        visibility: hidden;
        margin-top: 20px;
    }

    .tab-panel.active {
        display: block;
        visibility: visible;
    }

.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* ค่าเริ่มต้น: 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  margin: 20px auto 0; /* ✅ ขยับลงจากบน 20px */
  max-width: 960px;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  
}

/* ✅ ปรับเป็น 1:1 สำหรับหน้าจอเล็กกว่า 768px */
@media (max-width: 768px) {
  .video-wrapper {
    padding-bottom: 100%; /* 1:1 */
  }
}

     
/* ====== END: style.css ====== */

