/* Extra small devices (phones, 600px and down) */
@media only screen and (max-width: 600px) {
    .display-products {
        display: flex;
        flex-direction: column;
    }

    .display-products .content-area {
        width: 100%;
    }


    .woocommerce ul.products li.product a img {
        height: 150px;
        object-fit: cover;
        width: 100%;
        border-radius: 20px !important;
    }

}

/* Small devices (portrait tablets and large phones, 600px and up) */
@media only screen and (min-width: 600px) {
    .display-products {
        display: flex;
        flex-direction: column;
    }

    .display-products .content-area {
        width: 100%;
    }


    .woocommerce ul.products li.product a img {
        height: 150px;
        object-fit: cover;
        width: 100%;
        border-radius: 20px !important;
    }
}

/* Medium devices (landscape tablets, 768px and up) */
@media only screen and (min-width: 768px) {
    .display-products {
        display: flex;
        flex-direction: column;
    }


    .display-products .content-area {
        width: 100%;
    }


    .woocommerce ul.products li.product a img {
        height: 400px;
        object-fit: cover;
        width: 100%;
        border-radius: 20px !important;
    }

}

/* Large devices (laptops/desktops, 992px and up) */
@media only screen and (min-width: 992px) {
    .display-products {
        display: flex;
        justify-content: space-evenly;
        flex-direction: row;
    }


    .display-products .content-area {
        width: 75%;
    }

    .woocommerce ul.products li.product a img {
        height: 250px;
        object-fit: cover;
        width: 100%;
        border-radius: 20px !important;
    }
    .close-sidebar-btn {
        display: none;
    }
}

/* Extra large devices (large laptops and desktops, 1200px and up) */
@media only screen and (min-width: 1200px) {
    .display-products {
        display: flex;
        justify-content: space-evenly;
        flex-direction: row;
    }



    .display-products .content-area {
        width: 75%;
    }

    .woocommerce ul.products li.product a img {
        height: 250px;
        object-fit: cover;
        width: 100%;
        border-radius: 20px !important;
    }

    .close-sidebar-btn {
        display: none;
    }

}

/* เลือกทุกคอนเทนเนอร์ที่มีหมวดหมู่ */
.menu-product-en-container,
.menu-product-th-container {
    /* เพิ่ม CSS ที่เหมือนกัน */
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu-product-en-container ul li,
.menu-product-th-container ul li {
    border-bottom: 1px solid #eee;
    padding: 10px 15px;
    position: relative;
    transition: background-color 0.3s ease;
}


/* จัดการ CSS สำหรับ ul ที่อยู่ใน Sidebar */
.shop-sidebar .menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.shop-sidebar .menu li {
    border-bottom: 1px solid #eee;
    padding: 10px 15px;
    position: relative;
    transition: background-color 0.3s ease;
}

.shop-sidebar .menu li a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease;
}



/* ภาษาอังกฤษ */
.menu-product-en-container ul li {
    color: #0073aa;
}

/* ภาษาไทย */
.menu-product-th-container ul li {
    color: #d9534f;
    /* ตัวอย่าง: ใช้สีแดง */
}


.woocommerce ul.products li.product .button {
    display: none;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    text-align: center;
    color: #284267;
}



/* Sidebar สำหรับมือถือ */
.shop-sidebar {
    display: none;
    /* ซ่อน Sidebar เริ่มต้น */
    position: fixed;
    /* Sidebar แบบ Overlay */
    top: 0;
    left: 0;
    height: 100%;
    /* ความสูงเต็มจอ */
    width: 80%;
    /* กว้าง 80% ของหน้าจอ */
    background-color: #ffffff;
    /* สีพื้นหลัง */
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    /* เงา */
    z-index: 1000;
    /* วาง Sidebar ด้านหน้า */
    overflow-y: auto;
    /* เพิ่ม Scroll เมื่อเนื้อหายาว */
    padding: 20px 15px;
    /* ระยะขอบด้านใน */
    transform: translateX(-100%);
    /* ซ่อน Sidebar ทางซ้าย */
    transition: transform 0.3s ease-in-out;
    /* เพิ่มเอฟเฟกต์เลื่อน */
    z-index: 9999;
}

/* เมื่อ Sidebar เปิด */
.shop-sidebar.open {
    display: block;
    transform: translateX(0);
    /* แสดง Sidebar */
}
/* ปุ่ม Filter (มือถือและ Tablet) */
.toggle-sidebar-btn {
    display: block; /* แสดงปุ่ม Filter */
    background-color: #0073aa;
    color: #ffffff;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    margin-bottom: 15px;
    z-index: 1001;
    position: relative;
    text-align: center;
}

/* ซ่อนปุ่ม Filter สำหรับ Notebook/Laptop ขึ้นไป (992px) */
@media (min-width: 992px) {
    .toggle-sidebar-btn {
        display: none;
    }
}

/* Sidebar ซ่อนในมือถือและ Tablet */
.shop-sidebar {
    display: none; /* ซ่อน Sidebar เริ่มต้น */
    position: fixed; /* Overlay สำหรับ Sidebar */
    top: 0;
    left: 0;
    height: 100%;
    width: 80%; /* ความกว้าง Sidebar */
    background-color: #ffffff;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
    transform: translateX(-100%); /* ซ่อน Sidebar ด้านซ้าย */
    transition: transform 0.3s ease-in-out;
    z-index: 9999;
}

/* เมื่อ Sidebar เปิด */
.shop-sidebar.open {
    display: block;
    transform: translateX(0);
}

/* Sidebar แสดงตลอดเวลาสำหรับ Notebook/Laptop ขึ้นไป */
@media (min-width: 992px) {
    .shop-sidebar {
        display: block;
        position: static;
        width: 25%; /* กว้าง 25% */
        transform: translateX(0);
        box-shadow: none;
    }


}

/* ปุ่มปิด Sidebar (×) */
.close-sidebar-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #333333;
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
    z-index: 1001;
}