/* ==============================================================
   LFC Supply&Service - Main Stylesheet (Final Version)
   ============================================================== */

/* --- 1. Global Reset & Scrollbar Fix --- */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Kanit', sans-serif; 
}

html, body { 
    width: 100%; 
    overflow-x: hidden; /* 📌 ลบ scrollbar แนวนอนเด็ดขาด */
    background-color: #ffffff;
}

/* --- 2. จัดระเบียบตัวครอบหลัก (Centering Content) --- */
.header-container, 
.content-section, 
.footer-container {
    max-width: 1200px; /* 📌 ล็อคความกว้างไม่ให้แผ่จนเกินไป */
    margin: 0 auto !important; /* 📌 ดันกล่องเนื้อหามาไว้กึ่งกลางหน้าจอเสมอ */
    padding: 0 20px; 
    box-sizing: border-box;
}

/* --- 3. Sticky Header (เมนูอยู่กับที่แน่นอน) --- */
.main-header {
    background-color: #003366 !important;
    position: fixed; /* 📌 ตรึงเมนูไว้ด้านบนเสมอ */
    top: 0;
    width: 100%;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    padding: 10px 0;
}

.header-container {
    display: flex !important;
    justify-content: space-between !important; /* 📌 โลโก้อยู่ซ้าย เมนูอยู่ขวา */
    align-items: center !important;
}

.logo-box { display: flex; align-items: center; text-decoration: none; color: white; gap: 10px; }
.logo-box img { height: 45px; background: white; border-radius: 4px; padding: 2px; }
.brand-name { font-size: 1.4rem; font-weight: 600; white-space: nowrap; color: white; }

/* --- 4. Menu Desktop --- */
#nav-menu { list-style: none; display: flex; gap: 15px; }
#nav-menu li a { color: white; text-decoration: none; font-size: 0.95rem; transition: 0.3s; }
#nav-menu li a:hover { color: #66b3ff; }

/* --- 5. Mobile Toggle (ปุ่มสามขีด) --- */
.mobile-toggle, .menu-toggle { 
    display: none; 
    background: none; 
    border: none; 
    color: white; 
    font-size: 1.8rem; 
    cursor: pointer; 
}

/* --- 6. Floating Buttons (ปุ่มลอยติดต่อเรา) --- */
.floating-wrapper {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
    z-index: 999999 !important; /* 📌 ใส่เลขสูงๆ เพื่อให้ไม่โดนอะไรทับ */
}

.float-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white !important;
    font-size: 28px;
    text-decoration: none !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    transition: 0.3s;
    animation: bounce-floating 3s infinite ease-in-out;
}

/* สีตามแบรนด์ */
.fb-color   { background-color: #1877F2 !important; }
.line-color { background-color: #00C300 !important; animation-delay: 0.2s; }
.tel-color  { background-color: #FF3B30 !important; animation-delay: 0.4s; }

@keyframes bounce-floating {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* --- 7. Content & Components --- */
/* --- แก้ไขจุดไข่ปลา (Bullet) ในหน้าเนื้อหาให้ชิดข้อความ --- */
.content-section ul {
    list-style-position: inside !important; /* 📌 ดึงจุดไข่ปลาเข้ามาแนบชิดกับข้อความ */
    padding: 0 !important;
    margin: 20px auto !important;
}

.content-section ul li {
    margin-bottom: 12px !important; /* เพิ่มระยะห่างระหว่างบรรทัดให้อ่านง่าย */
    color: #333333; /* ปรับสีตัวหนังสือให้อ่านสบายตาขึ้น */
}

/* ปุ่ม "ดูสินค้าทั้งหมด" (สไตล์ image_3df246.png) */
.view-all-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 15px;
    background-color: #ffffff !important;
    color: #003366 !important;
    padding: 15px 40px !important;
    border-radius: 100px !important;
    text-decoration: none !important;
    font-weight: bold;
    border: 1px solid #f0f0f0 !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
    transition: 0.3s;
}

.view-all-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15) !important;
}

/* --- 8. ปรับแต่งสำหรับมือถือ (Mobile Responsive) --- */
@media (max-width: 1100px) {
    .header-container {
        display: flex !important;
        justify-content: space-between !important;
        padding: 0 15px !important;
    }

    .mobile-toggle, .menu-toggle {
        display: block !important;
        font-size: 2.8rem !important; /* 📌 ใหญ่ขึ้นตามต้องการ */
        margin-left: auto !important;
    }

    #nav-menu {
        display: none; 
        flex-direction: column !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        width: 100% !important;
        background-color: #ffffff !important;
        box-shadow: 0 10px 20px rgba(0,0,0,0.15) !important;
        padding: 10px 0 !important;
        z-index: 9999 !important;
    }

    #nav-menu.active {
        display: flex !important;
    }

    #nav-menu li a {
        color: #003366 !important;
        padding: 15px !important;
        display: block !important;
        text-align: center !important;
        border-bottom: 1px solid #f0f0f0 !important;
        font-size: 1.1rem !important;
    }

    .float-circle {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
}