/* =========================
 * Global Styles
 * ========================= */
@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@400;500;700&display=swap');

:root {
    --primary-color: #E5E7EB;
    --secondary-color: #0d2c40;
    --text-dark: #333333;
    --background-light: #f8f9fa;
    --font-family: "Kanit", sans-serif;
}

body {
    font-family: 'Kanit', sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: #ffffff;
}

html,
body {
    font-family: 'Kanit', sans-serif;
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Kanit', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

#footer {
    flex-shrink: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
}

/* =========================
 * Section Titles
 * ========================= */
.section-title {
    color: black;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.text-primary {
    color: var(--primary-color) !important;
}

/* =========================
 * Buttons
 * ========================= */
.btn-primary {
    background-color: #396eff;
    border-color: #396eff;
    font-weight: 300;
    border-radius: 10px;
    width: auto;
    height: 35px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.btn-primary:hover {
    background-color: #0044ff00;
    border-color: #396eff;
}

/* =========================
 * Navigation Bar
 * ========================= */
.navbar {
    border-bottom: none;
}

.nav-link {
    font-weight: 500;
    margin-right: 0px;
    color: #bebebe !important;
    transition: color 0.3s;
}

.nav-link.active,
.nav-link:hover {
    color: #ffffff !important;
    text-decoration: underline !important;
    text-decoration-thickness: 3px;
    text-underline-offset: 6px;
}

.navbar .nav-link {
    padding: 0.2rem 0.5rem !important;
}

/* กัน sticky-top ของ bootstrap ชน */
#navbar.sticky-top {
    position: static !important;
}

/* #navbar เป็นที่ “กันพื้นที่” ไม่ให้เนื้อหากระโดน navbar ทับ */
#navbar {
    height: var(--nav-space, 80px);
}

/* ===== Navbar fixed ตลอด (ไม่มี jump) ===== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;

    /* คุมด้วยตัวแปรจาก JS */
    --bg-a: 0.5;
    /* ความทึบพื้นหลัง */
    --sh-a: 0.3;
    /* ความเข้มเงา */
    --ty: 0px;
    /* เลื่อนขึ้นลง */
    --py: 14px;
    /* padding บนล่าง */

    transform: translate3d(0, var(--ty), 0);
    padding: var(--py) 0;
    background: rgba(0, 10, 50, var(--bg-a));
    box-shadow: 0 10px 25px rgba(0, 0, 0, var(--sh-a));
    transition: background-color .25s ease, box-shadow .25s ease, padding .25s ease, transform .25s ease;
    will-change: transform, padding, background-color;
}

/* โลโก้ซ้าย เมนูขวา */
.main-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.main-nav .logo {
    flex: 0 0 auto;
}

.main-nav .nav {
    margin-left: auto;
    display: flex;
    align-items: center;
}

/* optional: ถ้าเมนูคุณมี margin -10px อยู่ ให้ลดผลกระทบ */
.main-nav .nav li {
    margin: 0 !important;
}

/* =========================
 * 3.1 Dropdown Menu in Navbar
 * ========08/12/68======== */
/* ========== Header แบบ Mexant ========== */
.header-area {
    position: sticky;
    top: 0;
    z-index: 999;
    background-color: #0F172A;
}

.header-area .main-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 0;
}

.header-area .logo img {
    height: 40px;
}

/* เมนูหลัก */
.header-area .main-nav .nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

/* ใช้ร่วมกับ .nav-link เดิมของคุณ */
.header-area .main-nav .nav a.nav-link {
    text-decoration: none;
    font-weight: 500;
}

/* ปุ่ม "Menu" (mobile) */
.menu-trigger {
    display: none;
    cursor: pointer;
    color: #e5e7eb;
    font-weight: 500;
}

/* ========== Responsive (จอเล็ก) ========== */
@media (max-width: 991px) {
    .header-area .main-nav {
        position: relative;
    }

    .header-area .main-nav .nav {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        flex-direction: column;
        background-color: #0F172A;
        padding: 12px 0;
        display: none;
        z-index: 988;
    }

    .header-area .main-nav .nav.active {
        display: block;
    }

    .header-area .main-nav .nav li {
        margin: 0;
        padding: 6px 0;
        text-align: center;
    }

    .menu-trigger {
        display: block;
        font-size: 1.5rem;
        /* ขนาด icon */
    }
}


/* =========================
 * 4. Hero Section
 *    - Full-width hero with background carousel
 * ========================= */

/* ===== HERO SECTION ===== */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 600px;
    color: #ffffff;
    overflow: hidden;
}

/* รูป background อยู่ชั้นล่างสุด */
.hero-bg-carousel {
    position: absolute;
    inset: 0;
    z-index: 0;
}

/* ทำให้ภาพเต็มพื้นที่ hero */
.hero-bg-carousel .carousel-inner,
.hero-bg-carousel .carousel-item,
.hero-bg-carousel .carousel-item img {
    height: 100%;
}

.hero-bg-carousel .carousel-item img {
    width: 100%;
    object-fit: cover;
    filter: brightness(0.35);
}

/* overlay มืดคลุมรูปด้านหลังแบบ Mexant */
.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
            rgba(15, 23, 42, 0.96) 0%,
            rgba(15, 23, 42, 0.78) 40%,
            rgba(15, 23, 42, 0.35) 100%);
    z-index: 1;
    pointer-events: none;
}

/* กล่องที่วาง hero text ทั้งสามชุด */
.hero-copy-wrapper {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    pointer-events: none;
    /* สำคัญ: ปล่อยให้คลิกทะลุ */
}

/* ตัว hero-content ที่กำลังแสดงเท่านั้นถึงจะคลิกได้ */
.hero-copy-wrapper .hero-content {
    max-width: 720px;
    padding-bottom: 80px;
    display: none;
    pointer-events: auto;
    /* ให้ลิงก์/ปุ่มใน hero คลิกได้ */
}

.hero-copy-wrapper .hero-content.is-active {
    display: block;
}

/* ให้ปุ่มลูกศรลอยขึ้นมาอยู่ชั้นบนสุด */
.hero-control {
    z-index: 5;
    /* สูงกว่า hero-copy-wrapper (2) กับ indicators (4) */
}

.why-item-img {
    border-radius: 10px;
    /* มุมโค้งนิด ๆ ดูนุ่ม */
    overflow: hidden;
    /* ครอปรูปให้อยู่ในกรอบ */
    max-height: 200px;
    /* กันรูปสูงเกิน */

}

.why-item-img img {
    object-fit: cover;
    /* ครอปรูปให้เต็มกรอบ */
    display: block;
}

/* ====== Section หัวข้อ ====== */
.home-products-title {
    font-weight: 700;
    color: #374151;
}

.home-products-underline {
    width: 40px;
    height: 3px;
    background: #0F172A;
    border-radius: 999px;
    margin: 8px auto 0;
}

.home-products-underline-2 {
    width: 200px;
    height: 3px;
    background: #0F172A;
    border-radius: 999px;
    margin: 0px auto 10px;
}

.home-products-underline-3 {
    width: 150px;
    height: 3px;
    background: #0F172A;
    border-radius: 999px;
    margin: 0px auto 10px;
}

/* ========================= Product Model Description ========================= */
/* ใช้กับ model ป๊อปอัพตอนกดดูรายละเอียดสินค้า */
.product-model-desc .rowline {
    margin: 0 0 8px;
    line-height: 1.65;
}

.product-model-desc .rowline:last-child {
    margin-bottom: 0;
}


/* ========================= Background Products ========================= */
/* แบนเนอร์ด้านบน */
.product-hero-banner {
    position: relative;
    margin-top: var(--nav-height);
    /* กันไม่ให้ชน navbar sticky */
    width: 100%;
    height: 650px;
    /* สูงของแบนเนอร์ ปรับได้ตามชอบ */

    /* รูปพื้นหลัง */
    background-image: url("images/page-product/bg-product-3.jpeg");
    /* เปลี่ยนเป็น path รูปของคุณ */
    background-size: cover;
    background-position: center center;

    /* ทำให้ “เหมือนรูปไม่ขยับ” เวลาเลื่อน */
    background-attachment: fixed;
    /* ถ้าไม่อยากให้ fixed เอาบรรทัดนี้ออก */

    display: flex;
    align-items: center;
}

/* กล่องข้อความทึบ ๆ บนรูป */
.product-hero-inner {
    max-width: 680px;
    margin-left: 8vw;
    padding: 24px 32px;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 8px;
}

/* ตัวอักษร */
.product-hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.product-hero-sub {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
}

/* ให้ responsive บนจอเล็ก */
@media (max-width: 768px) {
    .product-hero-banner {
        height: 260px;
        background-attachment: scroll;
        /* มือถือบางรุ่นไม่รองรับ fixed */
    }

    .product-hero-inner {
        margin: 0 16px;
        padding: 16px 18px;
    }

    .product-hero-title {
        font-size: 1.6rem;
    }

    .product-hero-sub {
        font-size: 0.9rem;
    }
}


/* ====== ปุ่มหมวดหมู่สินค้า ====== */
/* สำหรับสินค้า POS */
.pos-product {
    background-image: url('images/Page_1/POS.png');
}

.pos-product:hover {
    background-image: url('images/Page_1/POS_Hover.png');
}

/* สำหรับสินค้า Printer */
.printer-product {
    background-image: url('images/Page_2/Printer.png');
}

.printer-product:hover {
    background-image: url('images/Page_2/Printer_Hover.png');
}

/* ====== Flickity layout: 4 สินค้าต่อหน้าจอ Desktop ====== */
.home-products-carousel {
    width: 100%;
}

.home-products-carousel .carousel {
    /* กันการ์ดชิดขอบเกินไป */
    padding: 0 10px;
}


.home-products-carousel .carousel-cell {
    width: 25%;
    /* 4 ชิ้นต่อแถว */
    padding: 0 8px;
    box-sizing: border-box;
}

@media (max-width: 992px) {
    .home-products-carousel .carousel-cell {
        width: 50%;
        /* tablet: 2 ชิ้น */
    }
}

@media (max-width: 576px) {
    .home-products-carousel .carousel-cell {
        width: 100%;
        /* mobile: 1 ชิ้น */
    }
}

/* ====== การ์ดสินค้า ====== */
.home-product-card {
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.home-product-image-wrap {
    position: relative;
    background: #f9fafb;
    width: 100%;
    aspect-ratio: 4 / 3;
    /* หรือ 16 / 9 ก็ได้ */
    overflow: hidden;
}

.home-product-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* รูปจะถูกครอบให้เต็ม ไม่ยืดเบี้ยว */
    display: block;
}

/* Badge มุมบน/ล่าง */
.badge-sale {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #f97316;
    color: #fff;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 0;
}

.badge-clearance {
    position: absolute;
    left: 0;
    bottom: 16px;
    background: #ef4444;
    color: #fff;
    padding: 6px 20px;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 0 999px 999px 0;
}

/* แถบ "สินค้าหมดแล้ว" */
.home-product-overlay {
    position: absolute;
    inset: 50% 0 auto 0;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.85);
    text-align: center;
    padding: 12px 0;
    font-weight: 700;
    color: #374151;
}

/* เนื้อหาด้านล่าง */
.home-product-body {
    padding: 14px 16px 18px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    /* ดันเนื้อหาให้เต็มความสูง */
}

.home-product-category {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 4px;
}

.home-product-name {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.home-product-name a {
    text-decoration: none;
    color: #111827;
}

.home-product-name a:hover {
    color: #005380;
}

/* ราคา */
.home-product-price-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
    min-height: 24px;
    /* ต่อให้ว่าง การ์ดก็ยังสูงเท่ากัน */
}

.home-price-old {
    font-size: 0.85rem;
    color: #9ca3af;
    text-decoration: line-through;
}

.home-price-new {
    font-size: 1rem;
    font-weight: 700;
    color: #10b981;
}

/* ปุ่มการ์ด */
.home-product-btn {
    border: 2px solid #3b8e4f;
    background: transparent;
    color: #3b8e4f;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 6px 18px;
    border-radius: 999px;
    text-transform: uppercase;
}

.home-product-btn:hover {
    background: #3b8e4f;
    color: #ffffff;
}

/* ====== ปุ่มลูกศร Flickity ====== */
.home-products-carousel .flickity-button {
    background: #ffffff;
    color: #111827;
    border-radius: 999px;
    width: 36px;
    height: 36px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.25);
    opacity: 1;
}

.home-products-carousel .flickity-button:hover {
    background: #f3f4f6;
}

.home-products-carousel .flickity-button:disabled {
    opacity: 0.3;
}

@media (max-width: 576px) {
    .home-products-slider {
        margin-top: 24px !important;
        margin-bottom: 24px !important;
        padding-left: 12px;
        padding-right: 12px;
    }

    /* ✅ กันล้นจอจากปุ่ม/เงา/การจัดวาง */
    .home-products-carousel {
        overflow: hidden;
    }

    .home-products-carousel .flickity-prev-next-button.previous {
        left: 8px;
    }

    .home-products-carousel .flickity-prev-next-button.next {
        right: 8px;
    }
}

.home-products-carousel .flickity-button-icon .arrow {
    fill: #111827;
}



/* ===== HERO SECTION (continued) ===== */

/* Hero text ของแต่ละสไลด์ */
.hero-copy-wrapper .hero-content {
    display: none;
    /* ซ่อนเป็นค่าเริ่มต้น */
    max-width: 720px;
    opacity: 0;
}

/* ชุดที่กำลังแสดง */
.hero-copy-wrapper .hero-content.is-active {
    display: block;
}

/* ข้อความ hero */
.hero-section h1,
.hero-section p {
    color: #ffffff;
}

.hero-content h1 {
    line-height: 1.2;
}

.hero-lead {
    max-width: 560px;
    font-size: 0.98rem;
    color: #e5e7eb;
}

/* ===== อนิเมชันเด้งขึ้นแบบ Mexant ===== */
.hero-animate {
    opacity: 0;
    transform: translateY(22px);
}

.hero-animate.hero-animate-play {
    animation: heroFadeUp 0.8s ease-out forwards;
    animation-delay: 0.25s;
}

@keyframes heroFadeUp {
    0% {
        opacity: 0;
        transform: translateY(22px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-intro-text {
    line-height: 1.4;
    /* ลอง 1.3–1.5 ปรับได้ตามชอบ */
    margin-bottom: 0;
    /* กันไม่ให้ h3 ทิ้งช่องว่างด้านล่างเพิ่ม */
}

/* ===== ตัวชี้บอกสไลด์ (แท่งยาว) ===== */
/* .carousel-indicators.hero-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    gap: 10px;
    margin: 0;
    z-index: 3;
}

.carousel-indicators.hero-indicators button {
    width: 10em;
    height: 5px;
    border-radius: 999px;
    border: 0;
    background-color: rgba(255, 255, 255, 0.7);
    opacity: 1;
    transition:
        background-color 0.3s ease,
        transform 0.3s ease,
        width 0.3s ease;
}

.carousel-indicators.hero-indicators .active {
    width: 15em;
    height: 8px;
    background-color: #ffffff;
    transform: translateY(-1px);
} */

/* ===== ตัวชี้บอกสไลด์ (แท่งยาว) ===== */
.carousel-indicators.hero-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100vw - 32px);
    gap: 10px;
    margin: 0;
    z-index: 3;
}

.carousel-indicators.hero-indicators button {
    width: clamp(44px, 18vw, 110px);
    height: 6px;
    border-radius: 999px;
    border: 0;
    background-color: rgba(255, 255, 255, 0.7);
    opacity: 1;
    transition:
        background-color 0.3s ease,
        transform 0.3s ease,
        width 0.3s ease;
}

.carousel-indicators.hero-indicators .active {
    width: clamp(64px, 26vw, 160px);
    height: 8px;
    background-color: #ffffff;
    transform: translateY(-1px);
}



.carousel-indicators.hero-indicators button:hover {
    background-color: #949494;
}


/* =========================
 * Service Card Styles
 * ========================= */

/* Service card container */

.service-item {
    position: relative;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    background-color: #ffffff;
    /* White background by default */
    color: var(--text-dark);
    /* Dark text color */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
    /* Soft shadow for depth */
    transition: all 0.5s;
    height: 100%;
}

/* Background image inside service card (hidden initially) */
.service-item .bg-img {
    position: absolute;
    inset: 0;
    /* Top, right, bottom, left = 0 */
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    /* Hidden in default state */
    filter: brightness(0.25);
    /* Darker image when shown for better readability */
    transition: opacity 0.5s ease;
}

/* Text content inside the service card */
.service-item .service-text {
    position: relative;
    z-index: 1;
    /* Above the background image */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 4px !important;
    min-height: 40px;
    /* Keep cards roughly equal height */
    font-size: small;
}

/* Default text color inside the card */
.service-item .service-text h3,
.service-item .service-text p {
    color: #000000;
    transition: color 0.3s ease;
}

/* On hover: reveal background image */
.service-item:hover .bg-img {
    opacity: 1;
    /* Show the background image */
}

/* On hover: switch text color to white for contrast */
.service-item:hover .service-text,
.service-item:hover .service-text h3,
.service-item:hover .service-text p {
    color: #ffffff;
}

/* จำกัดความกว้าง และจัดให้อยู่กลางหน้า */
.services-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.text-p {
    font-size: 14px;
}

/* บีบพื้นที่ให้อ่านง่าย + มี margin ซ้ายขวาเพิ่ม */
.rc-narrow {
    max-width: 960px;
    /* ปรับได้: 880 / 960 / 1024 */
    padding-left: 18px;
    padding-right: 18px;
}

/* จอใหญ่มาก ๆ ยังให้ไม่กว้างเกินไป */
@media (min-width: 1400px) {
    .rc-narrow {
        max-width: 980px;
    }
}

/*======  ======*/
/* ===== Wix-style side image (BG fill + fixed feel) ===== */
.install-media-wrap {
    display: flex;
    justify-content: center;
    width: 100%;
}

.install-media-fixed {
    width: min(490px, 100%);
    height: var(--media-h, 680px);
    border-radius: 18px;
    overflow: hidden;

    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;

    /* เหมือน Wix / hero: รูปเหมือนไม่ขยับ */
    background-attachment: fixed;

    border: 2px solid rgba(0, 0, 0, .12);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .12);
}

/* มือถือหลายเครื่อง (โดยเฉพาะ iOS) fixed ไม่เสถียร → fallback */
@media (max-width: 991.98px) {
    .install-media-fixed {
        height: 360px;
        background-attachment: scroll;
    }
}


/* ================= 3-STEP "Read More" Button ================= */

/* STEP 1: Default state (no hover)
 * Small white square button showing only the "+" icon
 */
.btn-readmore {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    background-color: #ffffff;
    /* Default background = white */
    border-radius: 4px;
    padding: 10px;
    min-width: 40px;
    min-height: 40px;

    border: none;
    /* No border in default state */
    color: #000;
    /* Text color (when visible) */
    font-weight: 500;
    text-decoration: none;

    overflow: hidden;
    white-space: nowrap;
    transition: all 0.3s ease;
}

/* "+" icon styling (blue color) */
.btn-readmore i.fa-plus {
    color: #0d6efd;
    font-size: 1.1rem;
}

/* Hide the "อ่านเพิ่มเติม" text in default state */
.btn-readmore span {
    opacity: 0;
    max-width: 0;
    transform: translateX(-0);
    transition: all 0.3s ease;
}

/* STEP 2: Hover on the service card (parent .service-item)
 * When the card is hovered:
 * → expand the button and reveal the text
 * → keep white background and no border
 */
.service-item:hover .btn-readmore {
    padding-inline: 14px 18px;
    /* Make the button wider */
    background-color: #ffffff;
    /* Still white background */
    border: none;
    /* Still no border */
    color: #000000;
    /* Black text */
}

/* Show the label text when hovering the card */
.service-item:hover .btn-readmore span {
    opacity: 1;
    max-width: 200px;
    transform: translateX(-0);
}

/* Keep "+" icon in blue while hovering the card */
.service-item:hover .btn-readmore i.fa-plus {
    color: #0d6efd;
}

/* STEP 3: Hover directly on the button
 * When the mouse is directly over the button:
 * → transparent background
 * → visible border
 * → white text (for dark background behind)
 */
.btn-readmore:hover,
.service-item:hover .btn-readmore:hover {
    padding-inline: 10px 10px;
    /* Keep the expanded width from step 2 */
    background-color: transparent;
    border: 1px solid currentColor;
    /* Border matches current text color */
    color: #ffffff;
    /* Text and border in white */
}

/* Ensure the label text remains visible while hovering the button
 * (prevents flicker when transitioning between states)
 */
.btn-readmore:hover span,
.service-item:hover .btn-readmore:hover span {
    opacity: 1;
    max-width: 200px;
    transform: translateX(0);
}


/* Match "+" icon color with current text color on hover */
.btn-readmore:hover i.fa-plus,
.service-item:hover .btn-readmore:hover i.fa-plus {
    color: inherit;
}

/* ================= Footer ================= */

/* Main footer container */
/* พื้น footer เต็มจอ */
footer.footer-main,
.site-footer {
    width: 100%;
    background-color: #0F172A;
    color: #f8f9fa;
    margin: 0;
    padding-top: 16px;
    padding-bottom: 16px;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
    margin-top: 20px;
}

/* เนื้อหาข้างในให้อยู่กลางแบบ container */
.site-footer .container {
    font-size: 13px;
    max-width: 1200px;
    margin: 0 auto;
}


/* Footer links (default) */
footer a {
    color: #ccc;
}

/* Footer links on hover */
footer a:hover {
    color: var(--primary-color);
}

/* ================= Feature Image (Right Side) ================= */

/* Wrapper for the stacked images on the right */
.feature-img {
    position: relative;
    min-height: 340px;
}

/* Back image (larger, behind) */
.feature-img .img-1 {
    width: 80%;
    height: 80%;
    border-radius: 8px;
    display: block;
}

/* Front image (smaller, overlapping in the corner) */
.feature-img .img-2 {
    position: absolute;
    right: 0;
    bottom: 0;
    height: 65%;
    width: 65%;
    border-radius: 8px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
}

/* Colored outline frame behind the images (similar to P5 style) */
.feature-img::before {
    content: "";
    position: absolute;
    right: 40px;
    top: 40px;
    width: 70%;
    height: 70%;
    border: 3px solid var(--primary-color);
    /* Use theme primary color */
    z-index: -1;
    /* Place behind images */
}

/* Optional: if the frame is not visible due to parent background,
 * you can set a subtle background here
 */
.col-lg-6 .feature-img {
    background-color: transparent;
}

/* ================= Swiper Styles ================= */

/* Position pagination bullets for horizontal swiper */
.swiper-horizontal>.swiper-pagination-bullets,
.swiper-pagination-bullets.swiper-pagination-horizontal,
.swiper-pagination-custom,
.swiper-pagination-fraction {
    bottom: var(--swiper-pagination-bottom, 8px);
    top: var(--swiper-pagination-top, auto);
    left: 0;
    width: 100%;
}

/* Pagination container */
.swiper-pagination {
    position: absolute;
    text-align: center;
    transition: opacity 0.3s;
    transform: translateZ(0);
    z-index: 10;
}

/* Main Swiper container */
.swiper {
    margin-left: auto;
    margin-right: auto;
    position: relative;
    overflow: hidden;
    overflow: clip;
    list-style: none;
    padding: 0;
    z-index: 1;
    display: block;
}

/* ================= Swiper Slide (overlay layout) ================= */

.swiper-slide {
    position: relative;
}

/* Foreground content row on top of slide background */
.swiper-slide .ch-row {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    color: white;
    padding: 20px;
}

/* Background layer for each slide (full-cover image) */
.swiper-slide .bg-ch {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background-size: cover;
    background-position: center;
}


/* ================= Clients Section (Static Logos) ================= */

/* Wrapper for the entire clients section (title + logos) */
.clients {
    padding: 60px 0;
    /* Vertical spacing top & bottom */
    background: #ffffff;
    text-align: center;
}

/* Section title */
.clients-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 32px;
}

/* Row that holds all client logos in one line */
.clients-row {
    display: flex;
    justify-content: center;
    /* Center horizontally */
    align-items: center;
    /* Center vertically */
    gap: 72px;
    /* Space between logos */
    max-width: 1200px;
    margin: 0 auto;
    /* Center within page/container */
    padding: 0 24px;
    /* Prevent logos from touching edges on small screens */
}

/* Individual logo styling */
.clients-row img {
    height: 72px;
    width: auto;
    display: block;
    filter: grayscale(1);
    opacity: 0.9;
    transition: filter 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

/* On hover: remove grayscale, increase opacity, and move slightly up */
.clients-row img:hover {
    filter: none;
    opacity: 1;
    transform: translateY(-3px);
}


/* ================= Responsive (Mobile / Small Screens) ================= */

@media (max-width: 768px) {

    /* Slightly smaller title on mobile */
    .clients-title {
        font-size: 24px;
        margin-bottom: 24px;
    }

    /* Allow logos to wrap onto multiple lines */
    .clients-row {
        flex-wrap: wrap;
        gap: 32px;
    }

    /* Slightly smaller logos on mobile */
    .clients-row img {
        height: 56px;
    }
}

/* ================= Logo Slider (Trusted Us) ================= */

/* Outer container around the slider block */
.trusted-container {
    margin-top: 1em;
    margin-bottom: 1em;
    overflow: hidden;
    /* Hide overflowing logos while they slide */
}

/* Slider wrapper that moves horizontally */
.trusted-container .slider {
    /* Infinite marquee-like motion */
    white-space: nowrap;
    /* Keep children on one line */
}

/* Group of logos in one loop set */
.trusted-container .slider .logos {
    width: 100%;
    display: inline-block;
    margin-right: -60px;
}

/* Individual logo wrapper (.fab used as a box around each logo) */
.trusted-container .slider .logos .fab {
    width: calc(100% / 6);
    /* 6 logos per row width-wise */
    animation: fade-in 0.5s cubic-bezier(0.455, 0.03, 0.515, 0.955) forwards;
    padding-right: -80px;
}

/* Horizontal sliding animation (marquee effect) */
@keyframes slidein {
    from {
        transform: translate3d(0, 0, 0);
    }

    to {
        transform: translate3d(-100%, 0, 0);
        /* Move full width to the left */
    }
}

/* ปรับปรุง fade-in animation */
@keyframes fade-in {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.element {
    animation: fade-in 0s ease-in-out forwards;
    will-change: opacity, transform;
}

.logo-grid {
    max-width: 780px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    row-gap: 40px;
    column-gap: 40px;
    align-items: center;
    justify-items: center;
}

/* .logo-grid-al {
    max-width: 780px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    row-gap: 40px;
    column-gap: 40px;
    align-items: center;
    justify-items: center;
} */

.logo-img {
    width: 100%;
    max-width: 220px;
    /* ปรับได้ */
    height: 90px;
    /* ทำให้ทุกอันสูงเท่ากัน */
    object-fit: contain;
    display: block;
}

/* Responsive: จอเล็กลงให้เรียงสวย */
@media (max-width: 992px) {
    .logo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .logo-grid {
        grid-template-columns: 1fr;
    }

    /* .logo-grid-al {
        grid-template-columns: 1fr;
    } */

    .logo-img {
        max-width: 260px;
    }
}


/* ================= Smooth Scroll for Anchor Links ================= */

/* Global smooth scrolling for in-page links */
html {
    scroll-behavior: smooth;
    /* Smooth scroll when jumping to #id */
}

/* Add top spacing when scrolled to this section via #link */
.scroll-section {
    scroll-margin-top: 150px;
    /* Adjust based on navbar height */
}

/* ===== Simple fade-in animation using data attributes ===== */

/* Any element that should fade in */
[data-fade] {
    opacity: 0;
    transform: translateY(24px);
    /* Start slightly lower */
    transition: opacity 0.45s ease, transform 0.45s ease;
    will-change: opacity, transform;
}

/* When the group is visible in the viewport, fade its children in */
[data-fade-group].is-visible [data-fade] {
    opacity: 1;
    transform: translateY(0);
}


/* ===== Hero carousel indicators (long pill style) ===== */

/* Position the indicators slightly above the bottom and center them */
.carousel-indicators.hero-indicators {
    position: absolute;
    bottom: 30px;
    /* Adjust distance from bottom */
    left: 50%;
    transform: translateX(-50%);
    gap: 10px;
    /* Spacing between indicators */
    margin: 0;
    z-index: 4;
}

/* Default indicator style */
.carousel-indicators.hero-indicators button {
    z-index: 5;
    width: 10em;
    /* Indicator length */
    height: 5px;
    /* Indicator thickness */
    border-radius: 999px;
    /* Fully rounded pill shape */
    border: 0;
    background-color: rgba(255, 255, 255, 0.701);
    /* Base color */
    opacity: 1;
    /* Prevent Bootstrap from dimming */
    transition:
        background-color 0.3s ease,
        transform 0.3s ease,
        width 0.3s ease;
}

/* Active indicator style */
.carousel-indicators.hero-indicators .active {
    width: 15em;
    /* Make the active pill longer */
    height: 8px;
    /* Slightly thicker */
    background-color: #ffffff;
    /* Highlight color for active state */
    transform: translateY(-1px);
    /* Lift slightly for emphasis */
}

/* Optional: subtle color change on hover */
.carousel-indicators.hero-indicators button:hover {
    background-color: #959595;
}


/* ========== Simple Logo Block (no animation) ========== */

/* Section wrapper */
.logo-block {
    background-color: #f8f9fa;
    /* White background */
    text-align: center;
}

/* Row that holds all logos */
.logo-block-row {
    display: flex;
    justify-content: center;
    /* จัดโลโก้ให้อยู่กลางแนวนอน */
    align-items: center;
    flex-wrap: wrap;
    /* ให้โลโก้ตัดบรรทัดได้ถ้าจอแคบ */
    gap: 24px;
    /* ระยะห่างระหว่างโลโก้ */
    max-width: 1200px;
    margin: 0 auto;
    /* จัดทั้งบล็อกให้อยู่กลาง container */
}

/* Each logo image */
.logo-block-row img {
    height: 70px;
    /* Uniform logo height */
    width: auto;
    display: block;
    filter: grayscale(1);
    /* Slightly muted look */
    opacity: 0.9;
    transition: filter 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

/* Hover effect: bring logo to life */
.logo-block-row img:hover {
    filter: none;
    opacity: 1;
    transform: translateY(-3px);
}

/* Responsive tweaks for mobile */
@media (max-width: 768px) {
    .logo-block-row {
        gap: 32px;
    }

    .logo-block-row img {
        height: 56px;
    }
}

/* ===== Hero text slide-up animation (แบบ Mexant) ===== */
/* วางกล่อง hero text ซ้อนกันสูงเท่า hero-section */
/* ===== ปรับตำแหน่ง hero ให้เหมือนแบบเดิม ===== */

/* กล่องใหญ่ที่ซ้อนทับบนรูป */
.hero-copy-wrapper {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    /* ไม่ต้องจัดกลางแนวตั้งแล้ว */
}

/* ขยับทั้ง block ลงมาจากขอบบนประมาณ 80px */
.hero-copy-wrapper .container {
    margin-top: 80px;
    /* ปรับเลขได้ตามชอบ 60–120px */
}

/* กล่องข้อความแต่ละสไลด์ */
.hero-copy-wrapper .hero-content {
    display: none;
    /* ซ่อนก่อน */
    max-width: 720px;
    /* กว้างเท่าเดิม */
    padding-bottom: 80px;
    /* เผื่อพื้นที่ด้านล่างเหมือนเดิม */
}

/* ตัวที่กำลังแสดงอยู่เท่านั้น */
.hero-copy-wrapper .hero-content.is-active {
    display: block;
}



/* กล่อง inner ที่ใช้เล่นอนิเมชัน */
.hero-inner {
    /* ไม่ต้องมี position/transform พิเศษ */
}

/* อนิเมชันเด้งขึ้น */
.hero-animate {
    opacity: 0;
    transform: translateY(22px);
}

.hero-animate.hero-animate-play {
    animation: heroFadeUp 0.8s ease-out forwards;
    animation-delay: 0.25s;
}

@keyframes heroFadeUp {
    0% {
        opacity: 0;
        transform: translateY(22px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== 4 ทิศทาง: ซ้าย ขวา ขึ้น ลง (สำหรับเวลา scroll เจอ) ===== */

/* ซ่อน + ขยับไว้ก่อน (สถานะเริ่มต้น) */
.scroll-slide-left,
.scroll-slide-right,
.scroll-slide-up,
.scroll-slide-down {
    opacity: 0;
    will-change: opacity, transform;
}

/*================== */
/* เริ่มต้นแต่ละทิศ */
.scroll-slide-left {
    transform: translateX(-30px);
}

/* มาจากซ้าย */
.scroll-slide-right {
    transform: translateX(30px);
}

/* มาจากขวา */
.scroll-slide-up {
    transform: translateY(30px);
}

/* มาจากล่างขึ้นบน */
.scroll-slide-down {
    transform: translateY(-30px);
}

/* มาจากบนลงล่าง */

/* พอได้คลาส is-visible แล้วค่อยเล่นอนิเมชันตามทิศ */
.scroll-slide-left.is-visible {
    animation: slideInLeft 0.8s ease-out forwards;
}

.scroll-slide-right.is-visible {
    animation: slideInRight 0.8s ease-out forwards;
}

.scroll-slide-up.is-visible {
    animation: slideInUp 0.8s ease-out forwards;
}

.scroll-slide-down.is-visible {
    animation: slideInDown 0.8s ease-out forwards;
}

/* ===== keyframes ของแต่ละทิศ ===== */

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================
 * Products Grid
 * ========================= */
#main {
    max-width: 1200px;
    /* บังคับไม่ให้กว้างเกิน */
    margin: 0 auto;
}

/* layout การ์ด: 3 คอลัมน์ */
#products.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    /* ระยะห่างระหว่างการ์ด */
}

/* ปรับให้ responsive */
@media (max-width: 992px) {
    #products.grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 576px) {
    #products.grid {
        grid-template-columns: 1fr;
    }
}

/* เผื่อถ้ายังไม่ได้สไตล์ .card จากที่อื่น */
#products .card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

#products .card img {
    width: 100%;
    display: block;
    object-fit: cover;
}

#products .card-body {
    padding: 16px 18px;
}

#products .card-footer {
    padding: 12px 18px 16px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    border-top: 1px solid #e5e7eb;
}

/* =========================
 * Products POPS (Custom)
 * ========================= */

.shop-layout {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 24px;
}

@media (max-width: 960px) {
    .shop-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: 2;
    }
}

/* Sidebar */
.sidebar {
    background: #ffffff;
    border-radius: var(--radius);
    padding: 20px 18px 22px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 20px;
    align-self: flex-start;
}

.sidebar-title {
    font-weight: 700;
    font-size: 1.05rem;
    margin: 0 0 6px;
}

.divider {
    width: 40px;
    height: 3px;
    border-radius: 999px;
    background: var(--primary);
    margin-bottom: 16px;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.95rem;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--dark);
    transition: 0.15s;
    background: transparent;
}

.category-list a:hover {
    background: rgba(59, 142, 79, 0.08);
    color: var(--primary);
}

.category-list a.active {
    background: #e9f5ef;
    color: var(--primary);
    font-weight: 600;
}

.category-pill-count {
    font-size: 0.75rem;
    color: var(--muted);
}

/* Products area */

.products-area {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.products-header-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.products-count {
    font-size: 0.9rem;
    color: var(--muted);
    margin: 2px 0 0;
}

#products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-top: 8px;
}

/* Product card */

.product-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #f97316;
    color: #ffffff;
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 999px;
    font-weight: 600;
    z-index: 2;
}

.product-image-wrapper {
    position: relative;
    padding: 16px;
    padding-bottom: 0;
    overflow: hidden;

    /* ทำให้ช่องรูปสูงเท่ากันทุกใบ */
    height: 200px;
    /* ปรับได้ เช่น 180 / 220 */
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image {
    /* บังคับให้รูป fit ตามกรอบเดียวกัน */
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* เห็นรูปครบ ไม่ครอป */
    border-radius: 10px;
    display: block;
    transition: transform 0.25s ease;
}

.product-card:hover .product-image {
    transform: translateY(-4px) scale(1.02);
}


.product-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin: 0 0 4px;
}

.product-name {
    font-size: 0.98rem;
    font-weight: 600;
    margin: 0 0 8px;
}

.product-name a {
    text-decoration: none;
    color: var(--dark);
}

.product-name a:hover {
    color: var(--primary);
}

.product-actions {
    margin-top: auto;
    display: flex;
    justify-content: flex-start;
    gap: 8px;
}

.btn-outline {
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid var(--primary);
    background: transparent;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-outline:hover {
    background: rgba(59, 142, 79, 0.06);
}

/* Pagination */

.products-pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 24px;
    font-size: 0.9rem;
}

.page-number {
    min-width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid #000000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--dark);
}

.page-number.current {
    background: var(--primary);
    border-color: var(--primary);
    color: #000000;
}

.page-number:hover {
    border-color: #ff0000;
    color: #ff0000;

}

.products-pagination .page-number.disabled {
    opacity: 0.4;
    pointer-events: none;
    /* คลิกไม่ได้ */
}

/* Model */

#overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
    /* สำคัญ */
}

#overlay.open {
    opacity: 1;
    pointer-events: auto;
}

#model {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px) scale(0.98);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1001;
    /* สูงกว่า overlay และ footer */
}


#model.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.product-model-content {
    max-width: 720px;
    width: 100%;
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.25);
    padding: 20px 24px 22px;
    position: relative;
}

.product-model-close {
    position: absolute;
    top: 12px;
    right: 12px;

    width: 35px;
    height: 35px;

    border: 0;
    border-radius: 12px;

    background: rgba(15, 23, 42, 0);
    color: #0f172a;

    display: grid;
    place-items: center;

    cursor: pointer;
    font-size: 22px;
    line-height: 1;

    transition: background .15s ease, transform .15s ease, color .15s ease;
}

.product-model-close:hover {
    background: rgba(15, 23, 42, 0.122);
    transform: scale(1.04);
}


.product-model-img {
    max-height: 260px;
    width: 100%;
    object-fit: contain;
    border-radius: 14px;
}

.product-model-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.product-model-desc {
    font-size: 0.95rem;
    color: var(--muted);
    margin-bottom: 10px;
}

.products-page main {
    padding-top: 20px;
    padding-bottom: 80px;
}

/* โซนรายละเอียด */


.product-btn-details {
    width: 200px;
    height: 50px;
    padding: 10px;
    margin: 10px auto 0;
    display: block;

    border-radius: 8px;
    /* มุมโค้ง */
    border: 2px solid #0d6dfd00;
    /* สี + ความหนา border */
    background-color: #00a6ff;
    /* สีพื้นหลัง */
    color: #ffffff;
    /* สีตัวอักษร */
    font-weight: 600;
    cursor: pointer;
}

.product-btn-details:hover {
    background-color: #005380;
    ;
    color: #ffffff;
}

.product-model .details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-model .details h2 {
    font-size: 1.4rem;
    margin: 0;
}

.product-model .details p {
    margin: 0;
    color: #4b5563;
    font-size: 0.95rem;
}

.product-model .details .price {
    font-size: 1.3rem;
    font-weight: 600;
    color: #0f766e;
}

.product-model .dlg-actions {
    margin-top: auto;
    display: flex;
    gap: 10px;
}

/* ปุ่มปิด */
.product-model .close-btn {
    position: absolute;
    top: 10px;
    right: 12px;
    border: none;
    background: transparent;
    font-size: 1.3rem;
    cursor: pointer;
    color: #6b7280;
}

/* Responsive */
@media (max-width: 768px) {
    .product-model .dialog {
        grid-template-columns: minmax(0, 1fr);
        max-width: 95%;
    }

    .product-model img#dlg-img {
        max-height: 240px;
    }
}


/* =========================
 * Service Page Styles
 * ========================= */

/* desk service css */

/* 1. สไตล์เริ่มต้น (เพิ่มเงาเริ่มต้น shadow-sm ให้ชัดเจนขึ้น) */


/* 3. จัดการสีข้อความเมื่อ Hover */




/* กล่องรูป placeholder */
.service-detail-image-card .service-detail-placeholder {
    background: #e5e7eb;
    border-radius: 0.75rem 0.75rem 0 0;
    min-height: 220px;
}

@supports (aspect-ratio: 16 / 9) {
    .service-detail-image-card .service-detail-placeholder {
        min-height: auto;
        aspect-ratio: 16 / 9;
    }
}

/* การ์ดไอคอน / benefit */
.service-detail-icon-card {
    border-radius: 2.5rem;
}

/* ขั้นตอนการทำงาน */
.process-step {
    display: flex;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 999px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    background: #0ea5e9;
    color: #0f172a;
}


/* Product Management Page Styles pm */
/* HERO PM */
.pm-hero-card {
    border-radius: 1rem;
}

.pm-hero-placeholder {
    background: #e5e7eb;
    border-radius: 1rem 1rem 0 0;
    min-height: 220px;
}

@supports (aspect-ratio: 16 / 9) {
    .pm-hero-placeholder {
        min-height: auto;
        aspect-ratio: 16 / 9;
    }
}

/* การ์ด benefit ของ PM */
.pm-benefit-card {
    border-radius: 1rem;
}

/* <!-- ตัวอย่างสไตล์พื้นฐาน --> */

.product-slider {
    background: #00000000;
    border-radius: 8px;
    padding: 20px 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0);
    margin: 1em;
}

.carousel {
    width: 100%;
}

.carousel-cell {
    width: 260px;
    /* กว้างต่อชิ้น */
    margin-right: 16px;
}


/* badge มุมซ้ายบน */
.badge-container {
    position: absolute;
    left: 8px;
    top: 8px;
    z-index: 2;
}

.badge {
    background: #ef4444;
    color: #fff;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 999px;
}

/* รูปสินค้า */
.box-image {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f9fafb;
}

.box-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.product-card:hover .box-image img {
    transform: scale(1.05);
}

/* ปุ่ม/ไอคอนลอยมุมขวาบน เวลา hover */
.image-tools {
    position: absolute;
    right: 8px;
    top: 8px;
    display: flex;
    gap: 6px;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.product-card:hover .image-tools {
    opacity: 1;
    transform: translateY(0);
}

.image-tools button {
    border: none;
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    cursor: pointer;
}

/* ข้อความด้านล่าง */
.box-text {
    padding: 12px 12px 14px;
}

.product-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px;
    color: #111827;
}

.product-title a {
    color: inherit;
    text-decoration: none;
}

.product-title a:hover {
    text-decoration: underline;
}

.price {
    font-size: 13px;
    color: #16a34a;
    font-weight: 600;
}

.col-lg-4.col-md-6:hover .service-icon {
    filter: invert(100%);
}

.service-icon {
    width: 64px;
    height: auto;
    filter: invert(0);
    /* ไอคอนเป็นสีเดิม (ดำ) */
    transition: filter 0.3s ease;
    /* ลื่น ๆ หน่อยตอนเปลี่ยนสี */
}

/* เวลา hover ทั้งกล่อง service-item → เปลี่ยน icon เป็นสีขาว */
.service-item:hover .service-icon {
    filter: invert(100%);
}


/* ================= Service All ================= */
/* desk service */
/* Layout ส่วน benefits แบบรูปซ้ายข้อความขวา */
.sd-benefits-layout {
    font-size: 0.95rem;
    line-height: 1.8;
}

/* กล่องรูปให้ลอยด้านซ้าย */
.sd-benefits-figure {
    float: left;
    max-width: 420px;
    /* ปรับความกว้างรูปได้ตามต้องการ */
    margin: 0 24px 16px 0;
    /* เว้นขวา + ล่างนิดหน่อย */
}

.sd-benefits-figure img {
    width: 100%;
    height: auto;
    display: block;
}

/* ข้อความหลัก */
.sd-benefits-text {
    /* ไม่ต้องทำอะไรเป็นพิเศษ ปล่อยให้ไหลรอบ float */
}

/* บนจอเล็ก: ยกเลิก float ให้รูปอยู่เต็มบรรทัดบนสุด */
@media (max-width: 768px) {
    .sd-benefits-figure {
        float: none;
        max-width: 100%;
        margin: 0 0 16px 0;
    }
}


.sd-paragraph {
    text-indent: 2em;
    /* ย่อหัวบรรทัด 2 ตัวอักษร */
    margin-bottom: 0.75rem;
    /* เว้นระยะระหว่างย่อหน้า */
}

.sd-cap-images {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sd-cap-img {
    width: 100%;
    height: auto;
    display: block;
}

#products {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

@media (max-width: 992px) {
    #products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 576px) {
    #products {
        grid-template-columns: 1fr;
    }
}


/* ========== Navbar in mobile ========== */
/* ===== Desktop ===== */
.site-header .menu-trigger {
    display: none;
}

/* เมนู desktop เรียงขวา */
.site-header .main-nav .nav {
    display: flex;
    align-items: center;
}

/* =========================
 * Career Hero Styles
 * ========================= */

.career-hero {
    position: relative;
    min-height: 30vh;
    /* ปรับเป็น 40vh ได้ */
    overflow: hidden;
}

.career-hero-bg {
    position: absolute;
    inset: 0;
    background: url("images/career/bg-career.jpg") center/cover no-repeat;
    filter: blur(2px);
    transform: scale(1.08);
    z-index: 0;
}

.career-hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    z-index: 1;
}

/* กล่องข้อความ: ชิดซ้าย + กลางแนวตั้ง */
.career-hero-content {
    position: relative;
    z-index: 2;

    min-height: 30vh;
    /* ให้สูงเท่า hero เพื่อจัดกลางแนวตั้ง */
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* กลางแนวตั้ง */
    align-items: flex-start;
    /* ชิดซ้าย */

    padding: 60px 18px;
    text-align: left;
}

.career-title {
    color: #fff;
    font-weight: 700;
    font-size: 40px;
    margin: 0 0 10px;
}

.career-sub {
    color: rgba(255, 255, 255, .92);
    margin: 0;
    max-width: 900px;
    /* กันบรรทัดยาวเกิน */
    line-height: 1.7;
}

/* ===== Careers Grid ===== */
.career-grid .career-card {
    border: 0;
    border-radius: 0;
    background: transparent;
}

.career-grid .career-poster {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    /* สี่เหลี่ยมจัตุรัส */
    background: #f3f4f6;
    /* เทาอ่อน */
    overflow: hidden;
    display: block;
    /* หรือไม่ใส่ก็ได้ */
    border-radius: 5px;
}

.career-grid .career-poster .poster-logo {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 46px;
    height: auto;
    opacity: .9;
}

/* เนื้อหาด้านล่างรูป */
.career-grid .career-body {
    padding: 14px 0 0;
    min-height: 140px;
    /* ปรับเลขได้ เพื่อให้สูงเท่ากันเวลาข้อความยาวไม่เท่ากัน */
}

.career-grid .career-role {
    font-weight: 800;
    font-size: 18px;
    margin: 0 0 6px;
}

.career-grid .career-desc {
    margin: 0 0 12px;
    color: #4b5563;
    line-height: 1.6;
    font-size: 14px;
}

.career-grid .career-actions .btn {
    border-radius: 10px;
}

/* ให้ img เท่ากับกรอบนี้ 100% */
.career-grid .career-poster img,
.career-grid .career-poster .poster-img {
    position: absolute;
    inset: 0;
    /* top:0; right:0; bottom:0; left:0; */
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* เต็มกรอบ ไม่บิด */
    display: block;
    transform: translateZ(0);
}

/* กันกรณีเป็น <a> แล้วมีขีดเส้นใต้/สีลิงก์ */
.career-grid a.career-poster {
    text-decoration: none;
    color: inherit;
}

/* ให้ hover ลื่นขึ้น */
.career-grid .career-poster {
    transition: transform .25s ease, box-shadow .25s ease;
    will-change: transform;
}

/* hover เฉพาะตอนชี้ที่โปสเตอร์ */
.career-grid .career-poster:hover {
    transform: translate3d(0, -4px, 0);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.375);
    cursor: pointer;
}

.career-grid-wrap {
    max-width: 1000px;
    /* ปรับได้ เช่น 1100/1000 */
    margin: 0 auto;
}

/* Reset ค่า Box Model ให้คำนวณขนาดรวมขอบและ padding เสมอ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* =========================
   FIX: Mobile menu for .site-header (กันล้นจอ/กันช่องว่างขวา)
   ========================= */
@media (max-width: 991px) {

    /* ซ่อนเมนูแนวนอนบนมือถือ (แก้ต้นเหตุล้นจอ) */
    .site-header .main-nav .nav {
        display: none;
        /* ปิดก่อน */

        /* ✅ ให้แผงเมนูอยู่กลางจอ */
        left: 50%;
        right: auto;
        transform: translateX(-50%);

        width: 100vw;
        max-width: 100vw;
        top: var(--nav-space, 72px);

        flex-direction: column;
        align-items: center;
        text-align: center;

        margin: 0;
        padding: 12px 0;
        background: rgba(15, 23, 42, 0.98);
        z-index: 2100;
    }


    /* เปิดเมนูเมื่อกด hamburger */
    .site-header .main-nav .nav.active {
        display: flex;
    }

    .site-header .main-nav .nav li {
        width: 100%;
        text-align: center;
        padding: 6px 0;
    }

    /* ปุ่ม hamburger ให้แสดง */
    .site-header .menu-trigger {
        display: block;
        font-size: 1.5rem;
    }
}

/* กัน overflow จาก header/fixed element แบบชัวร์ ๆ */
.site-header,
.site-header * {
    max-width: 100%;
}

/* ========================= MAP ========================= */
/* ===== Background ===== */
.map-background {
    position: absolute;
    inset: 0;
    background: url("images/map/background-map.jpg") center/cover no-repeat;
    filter: blur(2px);
    transform: scale(1.08);
    z-index: 0;
}

/* ชั้นเบลอ + overlay มืด */
.map-background::before {
    content: "";
    position: absolute;
    inset: 0;
    background: inherit;
    /* ใช้ภาพเดียวกับด้านหลัง */
    filter: blur(2px);
    /* ปรับความเบลอ 4-10px */
    transform: scale(1.08);
    /* กันขอบเบลอเห็นขอบ */
    z-index: 0;
    opacity: .95;
}

.map-background::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.345);
    /* overlay ช่วยให้ตัวอักษรชัด */
    z-index: 1;
}

/* ให้ข้อความอยู่เหนือทุกอย่าง */
.map-background>* {
    position: relative;
    z-index: 2;
}

/* ทำให้หัวข้อบนภาพชัดขึ้น */
.map-background .map-card-header {
    margin-bottom: 0;
    /* กันดันลง (ถ้าต้องการ) */
    padding: 5% 20%;
    /* เว้นขอบให้ดูเป็นแถบ */
}

.map-background .map-card-title {
    font-size: 40px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

/* ===== Service Center Cards ===== */
/* ===== Service Center Cards (match template) ===== */
.service-center-section {
    background: #fff;
}

/* (1) ส่วนที่คลุมการ์ด: จำกัดความกว้างให้เหมือนต้นแบบ */
.service-center-section .container {
    max-width: 1200px;
    /* ปรับได้ 1100-1280 ตามที่ชอบ */
}

/* ช่วยจัดการ์ดให้อยู่กลาง */
#serviceCenterGrid {
    justify-content: center;
}

#serviceCenterGrid>div {
    display: flex;
}

/* ให้ sc-card สูงเต็มคอลัมน์แบบสวย */

/* หัวข้อให้ใหญ่เหมือนต้นแบบ */
.sc-heading {
    font-weight: bold;
    letter-spacing: .08em;
    color: #000000;
    margin: 0;
}

.sc-underline {
    width: 110px;
    height: 4px;
    background: rgba(0, 0, 0, .35);
    border-radius: 999px;
    margin-top: 12px;
}

/* (2) ขนาดการ์ด (ตัวการ์ด) */
.sc-card {
    background: #fff;
    border-radius: 18px;
    padding: 24px 20px 20px;
    /* ลด padding ให้ใกล้ต้นแบบ */
    box-shadow: 0 10px 16px rgba(2, 6, 23, 0.12);
    text-align: center;

    width: 100%;
    max-width: 380px;
    /* <<< ความกว้างการ์ดให้เหมือนต้นแบบ */
    min-height: 360px;
    /* <<< ความสูงใกล้ต้นแบบ (อย่าใช้ 500) */
}

/* ไอคอน */
.sc-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 10px;
    display: grid;
    place-items: center;
}

.sc-icon i {
    font-size: 36px;
    color: #111827;
}

/* (3) ฟอนต์แต่ละส่วน */
.sc-title {
    font-weight: 900;
    font-size: 1.20rem;
    margin: 8px 0 10px;
}

.sc-address {
    color: #4b5563;
    font-size: 1.1rem;
    line-height: 1.6;
    min-height: 72px;
}

.sc-cover {
    font-weight: 800;
    font-size: 1.1rem;
    color: #111827;
    margin: 6px 0 8px;
}

/* แทนของเดิมทั้งหมดใน .sc-provinces */
.sc-provinces {
    margin: 0;
    text-align: left;
    color: #374151;
    font-size: 1rem;
    line-height: 1.55;

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 28px;

    list-style-position: inside;
    /* ให้เลขอยู่ในบรรทัดเดียวกัน */
    padding-left: 0;
    /* ไม่ต้องดันซ้ายเพิ่ม */
}

.sc-provinces li {
    margin: 0;
    /* กันช่องว่างแปลกๆ */
}

@media (max-width: 991.98px) {
    .sc-card {
        max-width: 420px;
        min-height: auto;
    }

    .sc-provinces {
        grid-template-columns: 1fr;
    }
}

/* ========================= MAP END ========================= */

/* ========================= Warranty (serial number) ========================= */
/* ===== Warranty Check UI (HP-like) ===== */
.warranty-wrap {
    width: 100%;
    max-width: 660px;
    margin: 24px auto 60px;
    padding: 0 16px;
    background: #fff;
    box-sizing: border-box;
}


.w-tabs {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 10px;
    margin-bottom: 28px;
    gap: 10px;
}

.w-tab {
    border: 0;
    background: transparent;
    font-weight: 700;
    padding: 10px 0;
    color: #111827;
    position: relative;
}

.w-tab.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -11px;
    height: 3px;
    background: #0070d2;
    border-radius: 999px;
}

.w-or {
    color: #6b7280;
    font-weight: 700;
    padding-bottom: 8px;
}

.w-panel {
    padding-top: 4px;
}

.w-label {
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.w-input {
    border-radius: 10px !important;
    padding: 12px 14px !important;
}

.w-qmark {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    color: #6b7280;
    font-size: 13px;
    line-height: 1;
}

.w-link {
    color: #0070d2;
    font-weight: 600;
    text-decoration: none;
}

.w-link:hover {
    text-decoration: underline;
}

.w-hint {
    color: #6b7280;
    font-size: 14px;
}

.w-submit {
    background: #d1d5db !important;
    border: 1px solid #cbd5e1 !important;
    color: #111827 !important;
    font-weight: 800 !important;
    padding: 12px 22px !important;
    border-radius: 10px !important;
    min-width: 260px;
    margin-top: -50px;
}

.w-submit:hover {
    background: #cbd5e1 !important;
}

.w-alert {
    border-radius: 12px;
}

/* ===== Details Page ===== */
.w-details-head {
    margin-bottom: 18px;
}

.w-back {
    display: inline-block;
    margin-bottom: 10px;
    color: #0070d2;
    text-decoration: none;
    font-weight: 700;
}

.w-back:hover {
    text-decoration: underline;
}

.w-title {
    font-size: 28px;
    font-weight: 900;
    margin: 0;
}

.w-sub {
    color: #6b7280;
    margin-top: 4px;
    font-weight: 600;
}

.w-card {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 18px;
    background: #fff;
}

.w-card-title {
    font-weight: 900;
    font-size: 16px;
    color: #111827;
}

.w-field {
    border: 1px solid #eef2f7;
    border-radius: 14px;
    padding: 12px 14px;
    background: #fafafa;
    height: 100%;
}

.w-field-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 800;
    letter-spacing: .02em;
}

.w-field-value {
    margin-top: 4px;
    font-size: 15px;
    font-weight: 800;
    color: #111827;
    word-break: break-word;
}

.w-badge {
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 900;
}

.w-badge-active {
    background: rgba(16, 185, 129, .12);
    color: #047857;
}

.w-badge-expired {
    background: rgba(239, 68, 68, .12);
    color: #b91c1c;
}


/* ===== Floating Warranty Button (FAB) ===== */
.fab-warranty {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 9999;

    display: flex;
    align-items: center;
    gap: 10px;

    padding: 12px 14px;
    border-radius: 999px;

    background: #00537a;
    color: #fff;
    text-decoration: none;

    box-shadow: 0 14px 28px rgba(2, 6, 23, 0.22);
    font-weight: 800;

    transition: transform .2s ease, box-shadow .2s ease;
}

.fab-warranty i {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .18);
    font-size: 18px;
}

.fab-warranty:hover {
    background: #0097dd;
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
    color: #000000;
}

/* มือถือให้เหลือวงกลมอย่างเดียว */
@media (max-width: 576px) {
    .fab-warranty {
        padding: 10px;
        gap: 0;
    }

    .fab-warranty span {
        display: none;
    }

    .fab-warranty i {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
}

/* ===== Warranty Check: ล็อกความสูงไม่ให้กระโดดตอนสลับแท็บ ===== */
.warranty-wrap .w-panel {
    min-height: 520px;
    /* ปรับได้: ถ้ายังเต้นเพิ่มเป็น 540/560 */
}

.warranty-wrap .w-form {
    min-height: 460px;
    /* ทำให้ปุ่มอยู่ตำแหน่งเดิม */
    display: flex;
    flex-direction: column;
    margin-bottom: -150px;
}

.warranty-wrap .w-form .text-center {
    margin-top: auto;
    /* ดันปุ่มไปล่างสุดตลอด */
}

/* ล็อก textarea ไม่ให้สูง/ต่ำตาม rows และไม่ให้ลากขยาย */
.warranty-wrap #serials {
    height: 180px;
    /* ปรับได้ตามที่ต้องการ */
    resize: none;
    /* กันผู้ใช้ลากให้สูงขึ้น */
}

.warranty-wrap #multiResults {
    max-height: 260px;
    /* ปรับได้ */
    overflow: auto;
}

/* ========================= Warranty End ========================= */

/* ===== FORCE: Mobile menu centered (put at very bottom) ===== */
@media (max-width: 991.98px){
  .site-header .main-nav .nav{
    position: fixed !important;
    top: calc(var(--nav-space, 80px) + 10px) !important;

    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;

    width: min(92vw, 360px) !important;
    max-width: 92vw !important;

    display: none !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;

    margin: 0 !important;
    padding: 14px 0 !important;

    border-radius: 18px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: 0 16px 40px rgba(0,0,0,.25);
    z-index: 99999 !important;
  }

  .site-header .main-nav .nav.active{
    display: flex !important;
  }

  .site-header .main-nav .nav li{
    width: 100%;
    padding: 6px 0;
  }

  .site-header .menu-trigger{
    display: inline-flex !important;
  }
}
