@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400&family=Kaushan+Script&display=swap');
:root{
    font-size: 1rem;
    --with-content: 100%;
    --color-1: #0c6af5;
    --submit-background: #4eaace;
    --color-bgsuccess: #caffca;
    --color-bgerror: #fcd1d1;
    --color-colorsuccess: #014601;
    --color-colorerror: #5f0101;
    --metalic: linear-gradient(
        45deg,
        #999 5%,
        #fff 10%,
        #ccc 30%,
        #ddd 50%,
        #ccc 70%,
        #fff 80%,
        #999 95%
    );
    --forest: linear-gradient(
        45deg,
        #233622 5%,
        #008000 10%,
        #1fad1f 30%,
        #3cb371 50%,
        #1fad1f 70%,
        #008000 80%,
        #233622 95%
    );
}
*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    border: 0;
    text-decoration: none;
    font-family: 'Kanit', sans-serif;
}
body{
    background: #fff;
    font-size: 1em;
    /* position: relative; */
}


ul, ol{
    padding-left: 30px;
}
blockquote{
    padding-left: 10px;
    border-left: 6px solid #ccc;
    margin-left: 10px;
}
hr{
    border-top: 1px solid #000; 
}


header {
    width: 100%;
    position: fixed;
    top: 0;
    background: var(--forest);
    padding: 10px 0;
    box-shadow: 0 0 10px 1px rgba(0,0,0,.8);
    z-index: 11;
}

.mg-bot-5{
    margin-bottom: 5px;
}
.mg-bot-10{
    margin-bottom: 10px;
}
.mg-bot-15{
    margin-bottom: 15px;
}
.mg-bot-20{
    margin-bottom: 20px;
}
.mg-top-5{
    margin-top: 5px;
}
.mg-top-10{
    margin-top: 10px;
}
.mg-top-15{
    margin-top: 15px;
}
.mg-top-20{
    margin-top: 20px;
}


.btn-basic-sm{
    background: var(--submit-background);
    font-size: 13px;
    padding: 2px 15px;
    border-radius: 8px;
    color: #000;
    cursor: pointer;
}
.btn-basic-mi{
    background: var(--submit-background);
    font-size: 16px;
    padding: 2px 15px;
    border-radius: 8px;
    color: #000;
    cursor: pointer;
}
.btn-basic-lg{
    background: var(--submit-background);
    font-size: 19px;
    padding: 2px 15px;
    border-radius: 8px;
    color: #000;
    cursor: pointer;
}



.butr-nav{
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;        
    color: #000;
    padding: 0px 10px;
    position: relative;
}


.butr-nav .logo{
    /* background: red; */
    display: flex;
    align-items: center;
}
.butr-nav .logo a{
    /* background: blue; */
    padding: 0;
}
.butr-nav .logo a img{
    width: 40px;  
    margin-right: 10px;  
}
.butr-nav .logo .logo-title{
    font-size: 2em;
    color: #ebe9e9;
}


.butr-nav #nav-check{
    display: none;
}
.butr-nav .nav-toggle{
    cursor: pointer;
    border: 1px solid #ebe9e9;
    border-radius: 8px;
    padding: 2px 5px 0px;
    display: none;
}
.butr-nav .nav-toggle i{
    font-size: 1.7em;
    color: #ebe9e9;
    /* background: red; */
}

 
.butr-nav .menu{
    background: transparent;
    font-size: 1em;
    display: flex;
    align-items: center;
}
.butr-nav .menu ul{
    display: flex;
}
.butr-nav .menu ul li{
    list-style: none;
    margin-left: 0px;
    position: relative;
}
.butr-nav .menu ul li a{
    color: #ebe9e9;
    background: transparent;
    padding: 1px 10px;
    margin-left: 5px;
    border-radius: 6px;
    border: 1px solid #006611;
    font-size: 1em;
}
.butr-nav .menu ul li a:hover{
    color: #000;
    background: #b9b6b6;
}
.butr-nav .menu ul li a.active {
    color: #000;
    background: #b9b6b6;
}

.butr-nav .menu ul .cate-sub{
    color: #fff;
    background: #7e7e7e;
    position: absolute;
    top: 20px;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border: 1px solid #5f0101;
    padding: 10px;
    width: 100%;
}
.butr-nav .menu ul .cate-sub li{
    padding: 4px;
}
.butr-nav .menu ul .cate-sub lia {
    display: inline-block;
}



.butr-nav .menu .search-bar{
    background: transparent;
    margin-left: 10px;    
}
.butr-nav .menu .search-bar form {
    background: #fff;
    border-radius: 16px;
    /* border: 2px solid #808080; */
    border: 2px solid #029c1c;
    padding: 2px 2px 2px 2px;
}
.butr-nav .menu .search-bar form input[type='text']{
    font-size: 1em;
    padding: 0px 6px 0px 10px;
    width: 100px;
    height: 18px;
    outline: none;
    border-radius: 16px 0 0 16px;
}
.butr-nav .menu .search-bar form .submit{
    font-size: 1em;
    padding: 0px 0px 0px 0px;
    background: #fff;
    color: #808080;
    width: 30px;
    border: 0;
    height: 18px;
    margin-left: -4px;
    cursor: pointer;
    border-left: 0 transparent;
    border-radius: 16px;
}

#nav-pro-cate{
    visibility: hidden;
    border: 1px solid #000;
    border-radius: 8px;
    padding: 2px 10px;
    background: #d75c20;
    color: #fff;
}


.butr-container{
    max-width: 100%;  
    margin-top: 52px;
    padding-top: 15px;
    font-size: 1em;
    min-height: 85vh;    
}


.butr-container .banner{
    width: 100%;
    max-height: 500px;
    overflow: hidden;    
}
.butr-container .banner img{
    width: 100%;
    /* object-fit: contain; */
}
.butr-container .butr-content{
    max-width: 1200px;
    margin: 0 auto;    
    padding: 20px 10px 40px;
    background: #fff;
    /* min-height: 50vh; */
}
.butr-container .butr-content h1{
    font-size: 2em;   
}

.butr-container .butr-content form .search{
    border: 1px solid aquamarine;
}
.butr-container .butr-content form .search:focus{
    border: 1px solid transparent;
}


/* เป็น class ที่มีไว้แสดงผลจากฟิลด์ link_tbl  */
.tbl-data{
    border: 1px solid blue;
    width: 100%;
}


.html-product-cate{
    padding: 10px 0;
    width: 100%;
}
.html-product-cate .box-cate1{
    width: 100%;
}
.html-product-cate .box-cate1 h2{
    background: #ebe9e9;
    padding: 4px 15px;
    border-radius: 8px;
    font-size: 1.3em;
    margin-bottom: 10px;
}
.html-product-cate .box-cate1 .box-cate2{
    width: 100%;/*จำเป็น*/
    display: flex;/*จำเป็น*/
    /*justify-content: space-between; ไม่ต้องใส่ เพราะจะทำแถวล่างสุดถ้ามีไม่ครบจำนวน มันจะกระจายเต็มแถว */
    flex-wrap: wrap;/*จำเป็น*/
    /* gap: 30px; ห้ามใส่ gap */
}
.html-product-cate .box-cate1 .box-cate2 .box-cate2-list{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: calc(16.666% - 20px);
    border: 1px solid #949494;
    border-radius: 20px;
    overflow: hidden;
    margin: 0 10px 40px 10px; /*จำเป็น  40px คือให้แต่ละแถวห่างกัน 40px*/
}
.html-product-cate .box-cate1 .box-cate2 .box-cate2-list .cate2-detail{
    width: 100%;
}
.html-product-cate .box-cate1 .box-cate2 .box-cate2-list .cate2-detail img{
    width: 100%;
    background: #fff;
}
.html-product-cate .box-cate1 .box-cate2 .box-cate2-list .cate2-detail h3{
    font-size: 1em;
    padding: 0 10px;
}
.html-product-cate .box-cate1 .box-cate2 .box-cate2-list .cate2-detail p{
    margin-bottom: 15px;
    font-size: .8em;
    padding: 0 10px;
}
.html-product-cate .box-cate1 .box-cate2 .box-cate2-list .cate2-detail .btn{
    color: rgba(13, 110, 253,1);
    font-size: 1em;
    font-weight: bold;
}
.html-product-cate .box-cate1 .box-cate2 .box-cate2-list .cate2-foot{
    width: 100%;
    padding: 10px;
}
.html-product-cate .box-cate1 .box-cate2 .box-cate2-list .cate2-foot .totalpro{
    color: red;
    font-size: 1.1em;
    font-weight: bold;
}
.html-product-cate .box-cate1 .box-cate2 .box-cate2-list .cate2-foot .btn{
    background: rgba(13, 110, 253,1);
    color: #fff;
    width: 100%;
    display: block;
    text-align: center;
    border-radius: 12px;
}



.html-product{
    border: 0;
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    gap: 20px;
}
.html-product .box-product-list{
    border: 1px solid #888888;
    width: 23%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 10px 1px rgba(0,0,0,.3);
}
.html-product .box-product-list .img{
    width: 100%;
    /* height: 100%; */
}
.html-product .box-product-list .img img{
    width: 100%;
    height: 100%;
    object-fit: cover; /* รักษารูปภาพในสัดส่วนที่ถูกต้อง */
    display: block; /* ป้องกันรูปภาพจากการถูกสังเกตได้ด้วยส่วนว่างด้านล่าง */
}
.html-product .box-product-list .description{
    width: 100%;
    padding: 5px 10px 20px 10px;
}
.html-product .box-product-list .description h4{
    font-size: 1.2em;
}
.html-product .box-product-list .description .code{
    color: #1b1b1b;
}
.html-product .box-product-list .description p{
    margin-bottom: 7px;
}

span.price{
    color: #0000ff;
    font-weight: bold;
}


/* product card css*/
.html-product .box-product-info{
    display: flex;
    width: 100%;
    /* border: 1px solid #000; */
}
.html-product .box-product-info .img{
    width: 35%;
}
.html-product .box-product-info .img img{
    width: 100%;
    border: 1px solid #c0c0c0;
    border-radius: 10px;
}
/*product-img-add*/
.html-product .box-product-info .img-add-bar{
    width: 100%;
    /* background: #eee; */
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    flex-direction: row;
}
.html-product .box-product-info .img-add-bar a{
    width: 23%;
}
.html-product .box-product-info .img-add-bar a img{
    width: 100%;
}

.html-product .box-product-info .description{
    width: 65%;
    padding: 0 15px 15px 20px;
}
.html-product .box-product-info .description h4{
    font-size: 1.3em;
    margin-bottom: 10px;
}
.html-product .box-product-info .description .detail{
    margin-bottom: 10px;
}

.html-alert{
    border: 1px solid #000;
    padding: 15px 25px;
    border-radius: 10px;
    margin-bottom: 15px;
}
.alert-success{
    background: var(--color-bgsuccess);
    color: var(--color-colorsuccess);
}
.alert-error{
    background: var(--color-bgerror);
    color: var(--color-colorerror);
}



.html-page{
    /* background: #deacf5; */
    display: flex;
    margin: 10px 0;
}
.html-page .pagelink{
    margin-right: 2px;
    border: 1px solid #b6b6b6;
    padding: 0 6px;   
    border-radius: 6px; 
}
.html-page .list{
    padding: 0 10px;
    display: flex;
}
.html-page .list a{
    border: 1px solid #b6b6b6;
    padding: 0 6px;
    margin-right: 8px;
    font-weight: bold;
    color: #0000ff;
    border-radius: 6px;
}
.html-page .list a:hover{
    background: #ccc;
}

.side{
    border: 1px solid #999999;
    border-radius: 10px;
    padding: 0 10px 10px 10px;
    font-size: 1em;
}
.side li{
    background: transparent;
}
.side a{
    color: #0000ff;
    font-size: .9em;
}    
.side a:hover{
    color: #000000;
}  
.side a.active{
    color: #000000;
    background: #ccc;
    display: inline-block;
    width: 100%;
}  





#content{
    width: 100%; display: flex; justify-content: space-between;
    /* position: relative; */
}
#content #side{
    width: 22%;
}
#content #main{
    width: 75%;
}



.butr-footer{
    background: #313131;
    color: #fff;
    width: 100%;
    display: flex;
    justify-content: center;
}
.butr-footer .butr-wrap{
    width: 1200px;
    padding: 20px 10px;
}


#container{
    position: relative;
}
#side-procate{
    position: absolute;
    top: 30px;
    left: 10px;
    background: #4b4a4a;
    width: 220px;
    opacity: 0;
    z-index: 9;
    padding: 10px;
    border-radius: 13px;
}



@media screen and (max-width: 1180px) {
    .butr-nav .logo .logo-title{
        font-size: 1.8em; 
    }
}
@media screen and (max-width: 1155px) {
    .butr-nav .logo .logo-title{
        font-size: 1.6em; 
    }
}
@media screen and (max-width: 1130px) {
    body{
        position: relative;
    }

    .butr-nav .logo .logo-title{
        font-size: 1.5em; 
    }
    .butr-nav .nav-toggle{
        display: flex;
    }


    .butr-nav .menu{
        flex-direction: column;
        position: absolute;
        left: 0;
        top: 58px;
        width: 100%;        
        background: #063e91;
        padding-top: 0px;
        padding-bottom: 20px;
        opacity: 0;
        visibility: hidden;
        transition: .5s;
    }
    .butr-nav #nav-check:checked ~ .menu{
        opacity: 1;
        visibility: visible;
    }

    .butr-nav .menu ul{
        display: flex;
        flex-direction: column;
        margin-bottom: 15px;
        width: 100%;
        background: #000;
    }
    .butr-nav .menu ul li{
        border-bottom: 1px solid #858484;        
        padding: 0;
        width: 100%;
        margin: 0;
        text-align: center;
    }
    .butr-nav .menu ul li a{
        background: transparent;
        border-radius: unset;
        border: 0;
        padding: 10px;
        color: #e4e4e4;
        display: block;
    }
    .butr-nav .menu .search-bar{
        width: 100%;
        text-align: center;
    }    
    .butr-nav .menu .search-bar form input[type='text']{
        width: 70%;
    }

    /* ปรากฏเมนูหมวดหมู่สินค้า */
    #nav-pro-cate{
        visibility: visible;
    }
    .butr-container{
        position: relative;
    }

    .butr-container #side{
        position: absolute;
        left: 0px;
        top: -360px;
        background: #000000;
        z-index: 9;
        visibility: hidden;
    }
    #content #main{
        width: 100%;
    }


    #side-procate{
        opacity: 1;
        left: -222px;
        transition: left 0.3s ease; 
    }
    #side-procate.active {
        left: 10px;
    }
    #side-procate a{
        color: #fff;
    } 
}
@media screen and (max-width: 1000px) {
    .html-product-cate .box-cate1 .box-cate2 .box-cate2-list{
        width: calc(20% - 20px);
    }
}
@media screen and (max-width: 875px) {
    .butr-container{
        margin-top: 52px;
    }

    .html-product-cate .box-cate1 .box-cate2 .box-cate2-list{
        width: calc(25% - 20px);
    }

    .html-product .box-product-list{
        width: calc(25% - 20px);
    }  

    .butr-nav .logo .logo-title{
        font-size: 1.5em; 
    }
}
@media screen and (max-width: 730px) {
    .html-product-cate .box-cate1 .box-cate2 .box-cate2-list{
        width: calc(33.333% - 20px);
    }
    
    .html-product .box-product-list{
        width: calc(33.333% - 20px);
    }  
}
@media screen and (max-width: 620px) {
    .html-product-cate .box-cate1 .box-cate2 .box-cate2-list{
        width: calc(50% - 20px);
    }

    .html-product .box-product-list{
        width: calc(50% - 20px);
    }    

    .html-product .box-product-info{
        display: flex;
        flex-direction: column;
    }
    .html-product .box-product-info .img{
        width: 100%;
    }
    .html-product .box-product-info .description{
        width: 100%;
        margin-top: 10px;
    }

}
@media screen and (max-width: 490px) {
    .butr-nav .logo .logo-title{
        font-size: 1.3em; 
    }

    .html-product-cate .box-cate1 .box-cate2 .box-cate2-list{
        width: 100%;
    }

    .html-product .box-product-list{
        width: 100%;
    }
}
@media screen and (max-width: 400px) {
    .butr-nav .logo{
        position: relative;
    }    
    .butr-nav .logo .logo-title{
        position: absolute;
        left: -300px;
        /* visibility: hidden; */
        /* opacity: 0; */
    }

    .butr-container{
        min-height: 100vh;
    }    
}