﻿/* MAIN LAYOUT */

html, body {
    width: 100%;
    padding: 0;
    margin: 0;
}

body, input[type=text] {
    font-family: Sukhumvit Set;
}


.displaynone {
    display: none;
}


.divpage {
    width: 100%;
    min-height: 800px;
}


.readonly {
    color: #ccc;
    border: 1px solid #ccc;
    pointer-events: none;
}







/* ITEM CARD */

.divlabelproduct {
    border: 1px solid #C5C5C5;
    border-radius: 5px;
    background-color: #F9F9FC;
    display: inline-block;
    position: relative;
    width: 225px;
    margin-top: 15px;
    margin-right: 9px;
}

.divlabelproduct img {
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    width: calc(100% - 10px);
    padding: 5px 5px 30px 5px;
    background-image: linear-gradient(to bottom, #ffffff 0%, #ffffff 100%), linear-gradient(to bottom, #ffffff 0%,#ffffff 100%);
    background-clip: content-box, padding-box;
}

.divlabelproductshadow {
    box-shadow: 2px 4px 6px -1px rgba(0,0,0,0.12);
    -webkit-box-shadow: 2px 4px 6px -1px rgba(0,0,0,0.12);
    -moz-box-shadow: 2px 4px 6px -1px rgba(0,0,0,0.12);
}

.divproductdata {
    padding: 0 5px;
}


.divlabelproductname {
    text-align: left;
    height: 150px;
    padding-top: 10px;
    overflow: hidden;
}


.divitemcodelabel {
    font-size: smaller;
    text-align: left;
}


.divproductprice {
    text-align: left;
    padding-top: 10px;
    overflow: hidden;
}


    .divproductprice > div > span {
        font-size: smaller;
        color: #797979;
    }



.standardprice {
    color: #2d2d2d;
}
    .standardprice + label {
        display: none;
    }


.promoprice {
    color: red;
}
    .promoprice + label {
        font-size: smaller;
        color: #797979;
        text-decoration-line: line-through;
    }



.divlabelproduct .divproductoper {
    text-align: center;
    padding: 10px 5px 5px 5px;
}


.productcartbutton {
    text-align: center;
    color: #f26123;
    border: 1px solid #f26123;
    border-radius: 5px;
    background-repeat: no-repeat;
    background-position: left center;
    background-color: transparent;
    position: relative;
    float: left;
    width: 110px;
    padding: 15px 10px 10px 35px;
    cursor: pointer;
    user-select: none;
}
    .productcartbutton::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 5px;
        width: 30px;
        height: 31px;
        background-image: url('../Images/Buy.png');
        background-repeat: no-repeat;
        background-size: contain;
        background-position: center;
        transform: translateY(-50%);
        transition: filter 0.1s;
    }
    .productcartbutton:hover {
        color: white;
        border-color: #d94e1f;
        background-color: #d94e1f;
    }
        .productcartbutton:hover::before {
            filter: brightness(0) invert(1);
        }


.productviewbutton {
    text-align: center;
    color: #f26123;
    border: 1px solid #f26123;
    border-radius: 5px;
    background-repeat: no-repeat;
    background-position: center center;
    position: relative;
    float: right;
    width: 50px;
    height: 50px;
    cursor: pointer;
}
    .productviewbutton::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 10px;
        width: 30px;
        height: 31px;
        background-image: url('../Images/view.png');
        background-repeat: no-repeat;
        background-size: contain;
        background-position: center;
        transform: translateY(-50%);
        transition: filter 0.3s;
    }
    .productviewbutton:hover {
        color: white;
        border-color: #d94e1f;
        background-color: #d94e1f;
    }
        .productviewbutton:hover::before {
            filter: brightness(0) invert(1);
        }



.divdiscperc {
    text-align: center;
    vertical-align: middle;
    color: white;
    border-radius: 50%;
    background-color: red;
    position: absolute;
    display: none;
    top: 5px;
    left: 5px;
    width: 50px;
    height: 38px;
    padding-top: 12px;
}



.priceslist label:nth-last-child(2) {
    font-size: smaller;
}

.priceslist label:last-child {
    display: none;
}




/*แก้ไข 2026-04-30*/

/* ITEM CARD */

.productcardcontainer {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.productcardcategoriesname {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.productcard {
    border: 1px solid #C5C5C5;
    border-radius: 5px;
    background-color: #F9F9FC;
    position: relative;
    width: 100%;
    min-width: 0;
    height: 580px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}


    .productcard .preorder {
        font-size: 14px;
        font-weight: bold;
        color: white;
        text-align: center;
        background: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%);
        display: none;
        box-sizing: border-box;
        width: 300%;
        padding: 8px 0;
        padding-left: 35%;
        position: absolute;
        top: 40px;
        transform: translateX(-50%) rotate(-45deg);
        z-index: 10;
    }
        .productcard .preorder.active {
            display: block;
        }


    .productcard .productimg {
        border-top-left-radius: 5px;
        border-top-right-radius: 5px;
        background-color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 250px;
        overflow: hidden;
    }

        .productcard .productimg img {
            height: 90%;
        }


    .productcard .productdata {
        flex: 1;
        padding: 10px;
        display: flex;
        flex-direction: column;
    }

    .productcard .itemname {
        /* text-indent: 10px; */
        height: 80px;
        text-align: left;
    }

    .productcard .item {
        font-size: smaller;
        text-align: left;
    }

    .productcard .itemprice {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        line-height: 1.1;
        padding: 0 10px;
    }

    .productcard .price {
        font-size: smaller;
        text-decoration-line: line-through;
        text-align: right;
        white-space: nowrap;
        display: none;
    }
        .productcard .price::after {
            content: " ฿";
        }

        .productcard .price + label {
            font-size: 30px;
            font-weight: bold;
            text-align: center;
            white-space: nowrap;
            display: block;
        }
            .productcard .price + label::after {
                content: " ฿";
            }

    .productcard .uomprice {
        text-align: right;
        font-size: smaller;
    }

    .productcard .creditprice::before {
        content: " ราคาก่อน VAT / ";
    }

    .productcard .cashprice::before {
        content: " ราคารวม VAT / ";
    }


    .productcard .productoper {
        padding: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
    }

    .productcard .productcartbutton {
        text-align: center;
        color: #f26123;
        border: 1px solid #f26123;
        border-radius: 5px;
        background-repeat: no-repeat;
        background-position: left center;
        background-color: transparent;
        box-sizing: border-box;
        width: 100%;
        padding: 15px 10px 10px 35px;
        cursor: pointer;
        user-select: none;
    }
        .productcard .productcartbutton::before {
            content: "";
            position: absolute;
            top: 50%;
            left: 5px;
            width: 30px;
            background-image: url('../Images/Buy.png');
            background-repeat: no-repeat;
            background-size: contain;
            background-position: center;
            transform: translateY(-50%);
            transition: filter 0.1s;
        }
        .productcard .productcartbutton:hover {
            color: white;
            border-color: #d94e1f;
            background-color: #d94e1f;
        }
            .productcard .productcartbutton:hover::before {
                filter: brightness(0) invert(1);
            }



    .productcard .prmprice {
        color: white;
        border-radius: 8px;
        background: linear-gradient(to bottom, #f03e3e, #d61a1a);
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        box-sizing: border-box;
        width: 100%;
        padding: 8px;
    }
        .productcard .prmprice .price {
            display: block;
        }


    .productcard .spcprice {
        display: none;
    }
        .productcard .spcprice.active {
            font-size: 14px;
            font-weight: bold;
            color: white;
            border-top-right-radius: 25px;
            border-bottom-right-radius: 25px;
            background: linear-gradient(to right, #ff4d4d, #ff8c00);
            padding: 15px 30px 15px 15px;
            width: fit-content;
            margin-left: -21px;
            display: block;
            text-transform: uppercase;
        }

            .productcard .spcprice.active + .price {
                display: block;
            }
                .productcard .spcprice.active + .price + label {
                    color: red;
                }

/*####################*/



/* TABLE */

.divtable {
    display: table;
    width: 100%;
}

    .divtable > div {
        display: table-row;
    }

        .divtable > div > div {
            display: table-cell;
        }


.divleftright {
    width: 100%;
}

    .divleftright > div {
        display: flex;
        gap: 20px;
        align-items: flex-start;
    }




/* PAGINATION */

.ulpages {
    display: inline-flex;
    margin: 0;
    padding: 0;
    list-style-type: none;
}

    .ulpages li {
        text-align: center;
        border: 1px solid #f26123;
        display: inline-block;
        width: 35px;
        padding: 5px 0;
    }

        .ulpages li:first-child {
            border-top-left-radius: 5px;
            border-bottom-left-radius: 5px;
        }

        .ulpages li:last-child {
            border-top-right-radius: 5px;
            border-bottom-right-radius: 5px;
        }

        .ulpages li:not(:last-child) {
            border-right-style: none;
        }


        .ulpages li.changepage {
            cursor: pointer;
        }

            .ulpages li.changepage:hover:not(.selected) {
                background-color: #E3E3E3;
            }

            .ulpages li.changepage:active {
                background-color: #f26123;
            }


        .ulpages li.selectpages {
            cursor: pointer;
        }

            .ulpages li.selectpages:hover {
                background-color: #E3E3E3;
            }

            .ulpages li.selectpages:active {
                background-color: #f26123;
            }


        .ulpages li.selected {
            color: white;
            background-color: #f26123;
        }




/* ANIMATION */
.fade {
    animation-name: fade;
    animation-duration: 1.5s;
}

@keyframes fade {
    from {
        opacity: .4
    }

    to {
        opacity: 1
    }
}




/* POPUP */

 .divpopupcoup {
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.4);
    width: 100%;
    height: 100%;
    position: fixed;
    left: 0px;
    top: 0px;   /* ซ่อนออกนอกจอ */
    z-index: 3;
} 

 .divpopup {
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.4);
    width: 100%;
    height: 100%;
    position: fixed;
    left: 0px;
    top: 0px;   /* ซ่อนออกนอกจอ */
    z-index: 3;
} 
 .divpopupmember {
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.4);
    width: 100%;
    height: 100%;
    position: fixed;
    left: 0px;
    top: 100%;   /* ซ่อนออกนอกจอ */
    z-index: 3;
}

.divpopupoper {
    margin-top: 20px;
    text-align: center;
     user-select: none;
}


    .divpopupoper > span {
        font-size: 16px;
        color: #333;
        border: 1px solid #ccc;
        border-radius: 5px;
        background-color: #f0f0f0;
        background-repeat: no-repeat;
        background-position: left center;
        box-sizing: border-box;
        display: inline-block;
        width: 100px;
        padding: 10px 16px 10px 40px;
        cursor: pointer;
        transition: all 0.3s ease;
    }
        .divpopupoper > span:hover {
            color: #000;
            background-color: #e0e0e0;
            box-shadow: 0 2px 5px rgba(0,0,0,0.2);
            transform: scale(1.03);
        }
        .divpopupoper > span:active {
            background-color: #d0d0d0;
            transform: scale(0.98);
            box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
        }

.SearchButton{
     cursor: pointer;
}
