
   
        :root {
            --primary-red: #f90a20;
            --dark-bg: #1a1a1a;
            --sidebar-width: 280px;
            --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

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

        body {
            background-color: #f5f5f5;
            overflow-x: hidden;
        }

        /* --- 📱 Mobile Header --- */
       .mobile-header {
        display: none;
        background: linear-gradient(to right, #f72a06, #4e04fa);
        color: white;
        padding: 12px 15px;
        align-items: center;
        justify-content: space-between;
        position: sticky;
        top: 0;
        z-index: 1001;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
        width: 100%;
        box-sizing: border-box;
    }

    .hamburger-btn {
        background: none;
        border: none;
        color: white;
        font-size: 24px;
        cursor: pointer;
        padding: 5px;
    }

    .mobile-logo {
        font-size: 1.4em;
        font-weight: 600;
    }

        /* --- 🖥️ Sidebar Navigation --- */
        .sidebar {
            width: var(--sidebar-width);
            background: linear-gradient(to right, #f2432fff, #f1973eff);
            height: 100vh;
            position: fixed;
            left: 0;
            top: 0;         
            color: #fff;
            z-index: 1100;
            transition: var(--transition);
            overflow-y: auto;
        }

        .sidebar-header {
            padding: 25px 20px;
            background: var(--primary-red);
            font-weight: 600;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .nav-menu {
            list-style: none;
            padding: 10px 0;
        }

        .menu-item {
            display: flex;
            align-items: center;
            padding: 14px 20px;
            color: rgba(255, 255, 255, 0.8);
            text-decoration: none;
            transition: var(--transition);
            border-left: 4px solid transparent;
        }

        .menu-item i {
            margin-right: 15px;
            width: 20px;
            text-align: center;
            font-size: 1.1em;
        }

        .menu-item:hover,
        .menu-item.active {
            background: rgba(255, 255, 255, 0.05);
            color: #fff;
            border-left-color: var(--primary-red);
        }

        .menu-divider {
            padding: 20px 20px 10px;
            font-size: 0.8em;
            color: #666;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        /* --- 📄 Main Content Area --- */
        .main-content-wrapper {
            margin-left: var(--sidebar-width);
            padding: 40px;
            transition: var(--transition);
        }

        .desktop-header {
            display: flex;
            align-items: center;
            margin-bottom: 40px;
        }

        .logo-circle {
            width: 70px;
            height: 70px;
            background: #fff;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            margin-right: 20px;
            overflow: hidden;
        }

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

        .sidebar-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1050;
            backdrop-filter: blur(3px);
        }

        /* --- 📱 Responsive --- */
        @media (max-width: 991px) {
            .mobile-header {
                display: flex;
            }

            .sidebar {
                left: calc(-1 * var(--sidebar-width));
            }

            .sidebar.open {
                left: 0;
            }

            .main-content-wrapper {
                margin-left: 0;
                padding: 5px 5px 5px;
            }

            .desktop-header {
                display: none;
            }

            .sidebar-overlay.open {
                display: block;
            }
        }

/* CSS (ปุ่มลอย) - ฉบับแก้ไข */

.floating-chat-widget {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    /* --- [✅ แก้ไข] ทำให้พื้นที่ว่างๆ ของ widget โปร่งใสต่อการคลิก --- */
    pointer-events: none; 
}

.fab-menu {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
    transform: scale(0);
    transform-origin: bottom right;
    opacity: 0;
    transition: transform 0.2s ease-out, opacity 0.2s ease-out;
    /* --- [✅ แก้ไข] ทำให้เมนูกลับมาคลิกได้ --- */
    pointer-events: auto; 
}

.floating-chat-widget.active .fab-menu {
    transform: scale(1);
    opacity: 1;
}

.fab-menu li {
    margin-bottom: 10px;
}

.fab-menu a {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    text-decoration: none;
    color: white;
    font-size: 16px;
    font-weight: 600;
}

.fab-menu a .text {
    background-color: #0d47a1;
    padding: 8px 16px;
    border-radius: 20px;
    margin-right: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

.fab-menu a .icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s;
    overflow: hidden;
}

.fab-menu a:hover .icon {
    transform: scale(1.1);
}

.icon img {
    width: 100%;
    height: auto;
}

.icon-facebook {
    background-color: #1877F2;
}

.icon-line {
    background-color: #06C755;
}

.icon-phone {
    background-color: #FF9800;
}

.icon-ai {
    background-color: #ffffff;
    padding: 8px;
    box-sizing: border-box;
}

#fab-toggle {
    width: 50px;
    height: 50px;
    background-color: #14a320ff;
    border-radius: 50%;
    border: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
    /* --- [✅ แก้ไข] ทำให้ปุ่มหลักกลับมาคลิกได้ --- */
    pointer-events: auto;
}

#fab-toggle:hover {
    transform: scale(1.05);
    background-color: #1976d2;
}

#fab-toggle .fab-icon {
    font-size: 28px;
    color: white;
    position: absolute;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.icon-open {
    transform: scale(1);
    opacity: 1;
}

.icon-close-main {
    transform: scale(0);
    opacity: 0;
}

.floating-chat-widget.active #fab-toggle .icon-open {
    transform: scale(0);
    opacity: 0;
}

.floating-chat-widget.active #fab-toggle .icon-close-main {
    transform: scale(1);
    opacity: 1;
}
/* คุมโทนเทา-ดำ-แดง */
.tech-footer {
    background-color: #fcfcfc;
    padding: 50px 0 20px 0;
    border-top: 1px solid #eee;
    font-family: 'Kanit', sans-serif;
    text-align: center;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* คุมโทนเทา-ดำ-แดง */
.tech-footer {
    background-color: #fcfcfc;
    padding: 50px 0 20px 0;
    border-top: 1px solid #eee;
    font-family: 'Kanit', sans-serif;
    text-align: center;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* สไตล์ Icon สายไฟฟ้า */
.tech-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.tech-icon-wrapper i {
    font-size: 24px;
    color: #f90a20; /* สีแดงหลัก */
    background: #fff;
    padding: 10px;
    z-index: 2;
}

.wire-line {
    height: 2px;
    background: #e0e0e0;
    width: 80px;
    position: relative;
}

/* เพิ่มจุดกลมๆ เหมือนหัวต่อสายไฟ */
.wire-line::before {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: #ccc;
    border-radius: 50%;
    top: -2px;
}

.wire-line:first-child::before { right: 0; }
.wire-line:last-child::before { left: 0; }

/* ชื่อแบรนด์ */
.footer-brand-minimal h2 {
    font-size: 1.3rem;
    color: #333;
    margin: 0 0 5px 0;
    letter-spacing: 1px;
}

.footer-brand-minimal p {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 30px;
}

/* แถบคุณสมบัติ (Tags) */
.footer-tags {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
}

.footer-tags span {
    font-size: 0.85rem;
    color: #555;
    font-weight: 300;
}

.footer-tags i {
    color: #2ecc71; /* สีเขียวให้ความรู้สึกผ่าน/ปลอดภัย */
    margin-right: 5px;
}

/* ส่วนลิขสิทธิ์ */
.footer-simple-bottom {
    border-top: 1px solid #f0f0f0;
    padding-top: 20px;
    font-size: 0.75rem;
    color: #bbb;
}

/* ปรับแต่งสำหรับมือถือ */
@media (max-width: 600px) {
    .footer-tags {
        flex-direction: column;
        gap: 10px;
    }
    .wire-line {
        width: 40px;
    }
}

    /* ------------------------------------------- */
    /* HERO SECTION */
    /* ------------------------------------------- */
    .service-hero {
        background: linear-gradient(135deg, #007bff 0%, #00c0ff 50%, #007bff 100%);
        color: white;
        padding: 20px 0;
        text-align: center;
        border-bottom-left-radius: 20px;
        border-bottom-right-radius: 20px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    }

    .company-name {
        font-size: 1.5rem;
        font-weight: bold;
        margin-bottom: 0.5rem;
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
    }

    .tagline {
        font-size: 1.1rem;
        opacity: 0.9;
        margin-bottom: 1.5rem;
    }

    /* Contact Buttons */
    .contact-buttons {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        margin-bottom: 25px;
    }

    .btn {
        display: inline-flex;
        align-items: center;
        padding: 10px 20px;
        border: none;
        border-radius: 8px;
        font-size: 1rem;
        font-weight: bold;
        text-decoration: none;
        color: white;
        transition: background-color 0.3s ease, transform 0.2s;
        min-width: 150px;
    }

    .btn i {
        margin-right: 8px;
    }

    .btn-line {
        background-color: #06C755;
    }

    .btn-line:hover {
        background-color: #05a847;
        transform: translateY(-2px);
    }

    .btn-phone {
        background-color: #dc3545;
    }

    .btn-phone:hover {
        background-color: #c82333;
        transform: translateY(-2px);
    }

    /* Address Box */
    .address-detail-box {
        background-color: rgba(255, 255, 255, 0.15);
        border-radius: 10px;
        padding: 15px 20px;
        max-width: 450px;
        margin: 0 auto;
        border: 1px solid rgba(255, 255, 255, 0.3);
        text-align: center;
    }

    .address-detail-box p {
        margin: 0;
    }

    .address-detail-box i {
        margin-right: 5px;
    }

    .address-detail-box .small-note {
        font-size: 0.85rem;
        opacity: 0.7;
        margin-top: 5px;
    }


    /* ------------------------------------------- */
    /* SERVICE GRID (3 ภาพ Desktop / 1 ภาพ Mobile) */
    /* ------------------------------------------- */
    .detail-blockk {
        text-align: center;
        margin: 30px auto 15px;
        color: #007bff;
        font-size: 1.2rem;
    }

    .install-service-grid {
        display: grid;
        /* Default: 1 คอลัมน์สำหรับ Mobile */
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 20px 0;
        max-width: 1200px;
        margin: 0 auto;
    }

    /* Service Card (door-item) */
    .door-item {
        background-color: #ffffff;
        border-radius: 10px;
        overflow: hidden;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        cursor: pointer;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        text-align: center;
        border: 1px solid #e9ecef;
    }

    .door-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
    }

    .door-header {
        background-color: #343a40;
        color: white;
        padding: 15px 10px;
        font-size: 1.1em;
        font-weight: 600;
    }

    .door-image-container {
        height: 200px;
        overflow: hidden;
    }

    .card-main-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
    }

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

    .card-summary-caption {
        padding: 12px 10px;
        background-color: #f8f9fa;
        color: #6c757d;
        font-size: 0.9em;
        border-top: 1px solid #dee2e6;
    }

    /* MEDIA QUERIES (สำหรับ Desktop 3 ภาพ) */
    @media (min-width: 992px) {
        .install-service-grid {
            /* Desktop: 3 คอลัมน์ */
            grid-template-columns: repeat(3, 1fr);
        }
    }

    /* ------------------------------------------- */
    /* LIGHTBOX MODAL CSS (แก้ไข Z-INDEX & POSITION) */
    /* ------------------------------------------- */
    .lightbox-modal {
        display: none;
        position: fixed;
        z-index: 10000;
        /* ค่า Z-Index สูงมาก แก้ปัญหาปุ่มหาย */
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        overflow: auto;
        background-color: rgba(0, 0, 0, 0.8);
        justify-content: center;
        align-items: center;
        padding: 20px;
    }

    .lightbox-content {
        background-color: #fefefe;
        margin: auto;
        padding: 30px;
        border-radius: 10px;
        width: 90%;
        max-width: 900px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
        position: relative;
        /* สำคัญสำหรับปุ่มปิด X */
        animation-name: animatetop;
        animation-duration: 0.4s;
    }

    @keyframes animatetop {
        from {
            top: -300px;
            opacity: 0
        }

        to {
            top: 0;
            opacity: 1
        }
    }

    .lightbox-close {
        color: #aaa;
        font-size: 40px;
        font-weight: bold;
        position: absolute;
        top: 5px;
        right: 15px;
        cursor: pointer;
        z-index: 10001;
        /* สูงกว่า Modal Content */
        padding: 20px;
        /* เพิ่มพื้นที่สำหรับคลิกบนมือถือ */
    }

    .lightbox-close:hover {
        color: #007bff;
    }

    .lightbox-header {
        border-bottom: 2px solid #eee;
        padding-bottom: 15px;
        margin-bottom: 20px;
    }

    #lightbox-title {
        color: #007bff;
        margin: 0;
        font-size: 1.2em;
    }

    .lightbox-price {
        color: #28a745;
        font-size: 1.2em;
        font-weight: bold;
        margin-top: 5px;
    }

    .lightbox-body {
        display: flex;
        gap: 25px;
    }

    .lightbox-image-box {
        flex: 1;
        min-width: 40%;
    }

    #lightbox-image {
        width: 100%;
        height: auto;
        border-radius: 8px;
    }

    .lightbox-details {
        flex: 1;
        text-align: left;
    }

    .lightbox-details h3 {
        color: #343a40;
        font-size: 1.2em;
        margin-top: 0;
        margin-bottom: 10px;
    }

    .feature-list {
        list-style: none;
        padding: 0;
        margin-bottom: 20px;
    }

    .feature-list li {
        padding: 5px 0;
        font-size: 0.95em;
        color: #495057;
    }

    .feature-list i {
        color: #28a745;
        margin-right: 8px;
    }

    /* Mobile specific adjustments for lightbox */
    @media (max-width: 768px) {
        .lightbox-content {
            flex-direction: column;
            padding: 40px 30px 5px 5px;
            /* เพิ่ม Padding ด้านบนเผื่อปุ่ม X */
            width: 95%;
        }

        .lightbox-body {
            flex-direction: column;
        }

        .lightbox-image-box {
            min-width: 100%;
        }
    }