﻿@import url(https://fonts.googleapis.com/css?family=Roboto:400,300,400italic,500,700,100);

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: #011152 url("../img/bg.png");
    background-repeat: no repeat;
    height: 100%;
    margin: 0;
}

span {
    /*multi-lines ขึ้นบรรทัดใหม่*/
    white-space: pre-line;
}

.container-fluid {
    min-height: 80vh;
}

.container-form {
    color: #ffffff;
    margin: 1rem auto;
    border-radius: 0.375rem;
    max-width: 1200px;
    min-width: 360px;
}

.bg-navy {
    background-color: #011152;
}

.bg-gray {
    background-color: #CCC;
    border-radius: 0.375rem;
}

.container-form h1, h2, h3, h4, h5, h6 {
    color: #FE980F;
}

.container-form h1 {
    text-align: center;
    max-width: fit-content;
    margin: 1rem auto;
}

.form-required {
    color: red;
}

.justify-items-center {
    justify-items: center;
}

.label-barcode {
    white-space: nowrap; /* ไม่ขึ้นบรรทัดใหม่ */
    overflow: hidden; /* ซ่อนส่วนที่ล้น */
    text-overflow: ellipsis; /* ใส่ ... ที่ท้ายข้อความ */
}

/*******************************************************************header******************************************************************************/
.header {
    width: 100%;
    height: auto;
    background: #01071e;
}

.navbar {
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 1rem auto;
    background: #01071e;
}

.navbar-nav .dropdown-menu {
    position: absolute;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

    .logo h1 {
        color: #FE980F;
        font-size: calc(16px + 0.4vw);
    }

.logo-text {
    font-weight: bold;
    background-image: linear-gradient( to right, #FE980F 0, #cb9b51 22%, #f6e27a 45%, #f6f2c0 50%, #f6e27a 55%, #cb9b51 78%, #FE980F 100% );
    color: transparent;
    -webkit-background-clip: text;
}

.navbar-dark .navbar-nav .nav-link {
    font-size: calc(10px + 0.4vw);
    padding: 10px 10px;
    color: #FFFFFF;
}

    .navbar-dark .navbar-nav .nav-link:hover {
        color: #FE980F;
    }

    .navbar-dark .navbar-nav .nav-link.active, .navbar-dark .navbar-nav .show > .nav-link {
        color: #FE980F;
    }

.navbar-dark .nav-item > .nav-link.active {
    color: white;
    background-color: red;
}

.navbar i {
    color: #FFF;
}

.navbar .btn {
    border: 1px solid #FE980F;
    margin: 1px;
}

    .navbar .btn:hover {
        background: #FE980F;
    }

.offcanvas {
    background-color: #01071e;
}

.icon {
    margin: 0 5px;
    padding: 5px 12px;
    font-size: 1.8rem;
}

.dropdown-menu li {
    position: relative;
}

.dropdown-menu .dropdown-submenu {
    display: none;
    position: absolute;
    left: 100%;
    top: -7px;
}

.dropdown-menu > li:hover > .dropdown-submenu {
    display: block;
}

/* Display Dropdowns on Click */
.submenu.active > ul {
    display: block;
}

@media only screen and (max-width: 991px) {
    .logo h1 {
        display: none;
    }

    .dropdown-menu {
        max-height: 60vh;
        overflow-y: auto;
    }

        .dropdown-menu .dropdown-submenu {
            display: none;
            position: sticky;
            background-color: #BBB;
            left: 100%;
            top: -7px;
        }

    .navbar-dark .navbar-nav .nav-link {
        font-size: 1rem;
    }
}
/********************************************************************footer*****************************************************************************/
footer {
    color: white;
    background: #282f86;
    text-align: center;
    bottom: 0;
    min-height: 30px;
}

/*************************************************************required************************************************************************************/
.form-required {
    color: red;
}

/*************************************************************modalPopup************************************************************************************/
.popupControl {
    background-color: #AAD4FF;
    position: absolute;
    visibility: hidden;
    border-style: solid;
    border-color: Black;
    border-width: 2px;
}

.modalBackground {
    background-color: Gray;
    filter: alpha(opacity=70);
    opacity: 0.7;
}

.modalPopup {
    background-color: #ffffff;
    border-width: 1px;
    border-style: solid;
    border-color: Gray;
    position: fixed;
    Margin-left: auto;
    Margin-right: auto;
}

.modal-body label {
    word-break: break-all;
    white-space: pre-wrap;
}

.modalPopupCenter {
    position: absolute;
    left: 50%-110px;
    top: 50%-110px;
    justify-content: center;
}

.modal-title {
    font-size: 1.8rem;
    color: #000;
}
/*************************************************************Login Page************************************************************************************/

.login {
    color: #000;
}
/*************************************************************Modal Categories************************************************************************************/
.modal-categories .modal-content {
    background-color: #011152;
    color: white;
    border: solid 2px #FE980F;
}

    .modal-categories .modal-content ul {
        background-color: #011152;
        border: solid 2px #FE980F;
    }

    .modal-categories .modal-content li {
        background-color: #011152;
        color: white;
        --bs-btn-border-color: auto;
    }

    .modal-categories .modal-content div {
        border: none;
    }

    .modal-categories .modal-content h5 {
        color: #FE980F;
    }

    .modal-categories .modal-content button.show {
        color: #FE980F;
    }

    .modal-categories .modal-content button:hover {
        color: #FE980F;
    }

    .modal-categories .modal-content a {
        background-color: #011152;
        color: white;
    }

        .modal-categories .modal-content a:hover {
            color: #FE980F;
        }

.modal-categories .modal-body .btn {
    border: none;
    background-color: #011152;
    color: white;
    text-align: left;
    width: 100%;
}

/*************************************************************Home Page************************************************************************************/
.slide-home {
    max-height: 500px;
}

    .slide-home img {
        max-height: 500px;
    }

.carousel {
    max-width: 800px;
    margin: 0 auto;
}

.grid-cat {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 5px;
    margin: 0 5px;
}

.card-home {
    color: #000;
    padding: 1rem;
}

    .card-home img {
        max-width: 150px;
        width: 100%;
        height: 150px;
    }

    .card-home .card-body {
        display: grid;
        padding: 0;
    }

    .card-home .card-text {
        word-break: break-all;
        white-space: break-spaces;
    }

    .card-home .card-title {
        text-align: center;
        padding-top: 10px;
    }

    .card-home .card-btn {
        text-align: center;
        align-self: end;
    }

    .card-home a {
        text-decoration: none;
        text-align: center;
    }

@media only screen and (max-width: 1000px) {
    .grid-cat {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 5px;
    }
}

@media only screen and (max-width: 576px) {
    .grid-cat {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
    }
}
/*************************************************************Search Page************************************************************************************/
.search-form {
    background-color: #EEE;
    border-radius: 0.375rem;
}

.grid-item {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    column-gap: 0.5rem;
    row-gap: 0.5rem;
}

.custom-radio input {
    margin-right: 5px;
}

.custom-radio label {
    margin-right: 2rem;
}

.img-search {
    max-width: 150px;
    width: auto;
    height: 150px;
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
}

.card-search {
    color: #000;
    display: flex;
    flex-direction: column;
}

    .card-search:hover {
        outline: 3px solid #FE980F;
    }

    .card-search img {
        margin: 5px;
    }

    .card-search a {
        text-align: center;
        color: #FE980F;
    }

    .card-search .card-text {
        word-break: break-all;
    }

    .card-search .card-body .card-end {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
    }

    .card-search .card-body {
        display: grid;
        align-items: center;
        align-content: space-between;
    }

        .card-search .card-body .card-top a {
            display: flex;
            flex-direction: column;
            text-align: center;
        }

        .card-search .card-body p {
            margin: 0;
        }

        .card-search .card-body .description {
            font-size: 14px;
            color: #777;
            white-space: break-spaces;
        }

        .card-search .card-body .spec {
            font-size: 13px;
        }

    .card-search .brand {
        font-size: 16px;
        color: #777;
        align-self: flex-start;
        padding-left: 20px;
        padding-top: 5px;
    }

/* chat gpt css*/
/* 🔹 พื้นที่ชื่อหรือโลโก้แบรนด์ */
.card .brand,
.card .brand-logo {
    top: 10px;
    left: 10px;
    height: 30px;
    margin: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 🔸 แบบข้อความแบรนด์ */
.card .brand {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    padding: 0 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* 🔸 แบบโลโก้แบรนด์ */
.card .brand-logo {
    background-color: #fff;
    object-fit: contain;
}

/* เอฟเฟกต์เมื่อ hover */
.card:hover .img-search {
    transform: scale(1.03);
}
/**/

.spec {
    width: 100%;
}

.price-sell {
    color: #f00;
    font-size: 20px;
}

.price {
    color: #777;
    align-self: center;
}

.price-normal {
    margin: 0;
    color: #777;
    font-size: 13px;
}

.price-normal-dash {
    text-decoration: line-through;
}

.btn-add {
    width: 100%;
    font-size: 1.8rem;
}

.pagination span {
    padding: 0;
}

@media only screen and (max-width: 768px) {
    .grid-item {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        column-gap: 0.4rem;
        row-gap: 0.4rem;
    }
}

@media only screen and (max-width: 576px) {
    .price-right {
        width: 100%;
        max-width: 100px;
    }

    .grid-item {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        column-gap: 0.3rem;
        row-gap: 0.3rem;
    }
}


.brand-logo {
    width: fit-content; /* ปรับขนาดโลโก้ตามต้องการ */
    height: 30px;
}
/*************************************************************Cart Page************************************************************************************/
.cart-form .table {
    margin-top: 10px;
}

.cart-form .input-group-text {
    width: 120px;
    text-align: end;
}

.card-cart {
    flex-direction: row;
    position: relative;
    align-items: center;
}

    .card-cart .btn-outline-danger {
        position: absolute;
        top: 5px;
        right: 5px;
    }

    .card-cart .cart-bottom {
        display: flex;
        justify-content: space-between;
    }

    .card-cart .cart-qty {
        text-align-last: end;
    }

        .card-cart .cart-qty input {
            margin: 0 5px;
            max-width: 100px;
            padding: 0.375rem 0.75rem;
            font-size: 1rem;
            font-weight: 400;
            line-height: 1.5;
            color: #212529;
            background-color: #fff;
            background-clip: padding-box;
            border: 1px solid #ced4da;
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
            border-radius: 0.375rem;
            transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
        }

    .card-cart .btn-outline-secondary {
        align-content: center;
    }

.cart-price .price-sell {
    margin: 0;
}

.total-price {
    font-size: 20px;
    display: flex;
    flex-direction: column;
    align-items: end;
    padding: 5px;
}

.pickup {
    background-color: #ccc;
    font-size: 25px;
}

    .pickup.checkblue {
        background-color: #0d6efd;
        color: #FFF;
    }

    .pickup.checkgreen {
        background-color: #198754;
        color: #FFF;
    }

    .pickup.checkwarning {
        background-color: #ffc107;
        color: #FFF;
    }

@media only screen and (max-width: 576px) {
    .card-cart .cart-bottom {
        flex-direction: column;
    }
}
/*************************************************************Payment Page************************************************************************************/
.payment-form {
    max-width: 800px;
    margin: 30px auto;
    padding: 10px;
}

    .payment-form .input-group-text {
        width: 140px;
    }

        .payment-form .input-group-text.unit {
            width: auto;
        }

.radiox2 input[type=radio] {
    /* Double-sized Checkboxes */
    -ms-transform: scale(2); /* IE */
    -moz-transform: scale(2); /* FF */
    -webkit-transform: scale(2); /* Safari and Chrome */
    -o-transform: scale(2); /* Opera */
    transform: scale(2);
    padding: 10px;
    margin: 10px;
}

.totalPrice {
    font-size: 30px;
    color: red;
    text-align: center;
}

.place-content-end {
    place-content: end;
}


.QR-img {
    max-width: 200px;
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: contain;
}

@media only screen and (max-width: 576px) {
    .totalPrice {
        font-size: 20px;
    }
}
/*************************************************************Part Detail Page************************************************************************************/
.slide-detail {
    max-width: 500px;
    width: 100%;
}

    .slide-detail .carousel-pic {
        position: relative;
        max-width: 300px;
        justify-self: center;
    }

    .slide-detail .carousel-indicators {
        position: initial;
        display: grid;
        grid-template-columns: repeat(auto-fit,minmax(100px,1fr));
        justify-items: center;
    }

    .slide-detail .carousel-control-prev {
    }

        .slide-detail .carousel-control-prev:hover {
            background: #999;
            transition-delay: 0.3s;
        }

    .slide-detail .carousel-control-next {
    }

        .slide-detail .carousel-control-next:hover {
            background: #999;
            transition-delay: 0.3s;
        }

    .slide-detail .carousel-indicators button {
        width: 100px !important;
        height: auto !important;
    }

.grid-detail {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(350px,1fr));
    padding: 5px;
}

.grid-right {
    background-color: #fff;
    border-radius: 0.375rem;
}

    .grid-right a:hover {
        color: #FFF;
    }

    .grid-right .input-group {
        padding: 5px;
    }

        .grid-right .input-group span {
            width: 110px;
            align-items: normal;
        }

        .grid-right .input-group .price {
            padding-left: 1.8em;
        }

.spec-table td {
    padding-left: 5px;
}

.share-pane {
    display: flex;
    align-items: end;
    justify-content: end;
    padding: 0 20px;
    column-gap: 10px;
}
/*************************************************************warranty Page************************************************************************************/
.warrantyTable table img {
    width: 100%;
    max-width: 150px;
}

.warranty-form {
    max-width: 800px;
    margin: 0 auto;
    background-color: #011152;
}

    .warranty-form span {
        padding-left: 2rem;
    }
/*************************************************************Contact Page************************************************************************************/
.map-form {
    max-width: 800px;
    margin: 0 auto;
}

.address-form {
    padding: 5px;
}

.address-form {
    max-width: 800px;
    margin: 0 auto;
}

    .address-form h3 {
        text-align: center;
    }

    .address-form .input-group-text {
        width: 100px;
    }

.social-form {
    text-align: center;
    display: grid;
    grid-template-columns: 2 (1fr ,1fr);
    justify-content: center;
}

    .social-form a {
        padding: 0 10px;
    }

    .social-form i {
        font-size: 12.5rem;
        background-color: #fff;
        border-radius: 0.375rem;
        margin-top: 10px;
        padding: 0 15px;
    }

    .social-form img {
        margin-top: 10px;
        width: 12.5rem;
        border-radius: 0.375rem;
    }

.message-form {
    background-color: #fff;
    border-radius: 0.375rem;
    border: 5px solid #FE980F;
    padding: 10px 10px;
    display: inline-block;
    padding: 10px 10px;
}

    .message-form .input-group-text {
        width: 120px;
    }

    .message-form h3 {
        text-align: center;
        color: #000;
    }

    .message-form p {
        color: #000;
    }

    .message-form a {
        margin: 20px auto;
    }

.message-grid {
    text-align: center;
}

@media only screen and (max-width: 1000px) {
    .social-form i {
        font-size: 9.4rem;
    }

    .social-form img {
        width: 9.4rem;
    }
}

@media only screen and (max-width: 800px) {
    .social-form i {
        font-size: 7.5rem;
    }

    .social-form img {
        width: 7.5rem;
    }
}

@media only screen and (max-width: 576px) {
    .social-form i {
        font-size: 6.25rem;
    }

    .social-form img {
        width: 6.25rem;
    }
}
/*************************************************************Profile Page************************************************************************************/
.main-panel {
    max-width: 800px;
    margin: 30px auto;
    padding: 10px;
}

    .main-panel a {
        color: #FFF;
        text-decoration: none;
        font-size: 20px;
        margin: 10px 10px;
    }

        .main-panel a:hover {
            color: #FE980F;
        }

        .main-panel a .card-profile {
            color: #000;
        }

        .main-panel a:hover .card-profile {
            outline: 5px solid #FE980F;
        }

    .main-panel .fa {
        margin: 0 10px;
    }

.card-profile {
    border: 2px solid #FFF;
    border-radius: 0.375rem;
    padding: 5px;
    align-items: center;
    vertical-align: central;
}

    .card-profile img {
        max-width: 100px;
    }

    .card-profile .fa {
        font-size: 100px;
    }

.detail-panel {
    max-width: 800px;
    margin: 30px auto;
}

    .detail-panel a {
        margin: 10px 0;
    }

    .detail-panel .input-group-text {
        width: 150px;
    }

.action-pane {
    text-align: center;
}

    .action-pane input {
        margin: 10px 20px;
    }

@media only screen and (max-width: 576px) {
    .main-panel a {
        font-size: 13px;
        margin: 10px 10px;
    }

    .card-profile img {
        max-width: 50px;
    }

    .card-profile .fa {
        font-size: 50px;
    }
}
/*************************************************************Cart Annimation************************************************************************************/
.buttons {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cart-button-call {
    position: relative;
    outline: 0;
    background-color: dimgray;
    color: white;
    border: none;
    width: 100%;
    height: 45px;
    padding: 15px;
    border-radius: 0.375rem;
    line-height: 0px;
    overflow: hidden;
    align-self: flex-end;
    text-align: center;
    text-decoration: none
}

.cart-button-empty {
    position: relative;
    outline: 0;
    background-color: gray;
    color: #fff;
    border: none;
    width: 100%;
    height: 45px;
    padding: 15px;
    border-radius: 0.375rem;
    line-height: 0px;
    overflow: hidden;
    align-self: flex-end;
    text-align: center;
}

.cart-button {
    position: relative;
    outline: 0;
    background-color: blue;
    color: #fff;
    border: none;
    width: 100%;
    height: 45px;
    padding: 10px;
    border-radius: 0.375rem;
    line-height: 0px;
    overflow: hidden;
    align-self: flex-end;
}

    .cart-button:focus {
        outline: none !important;
    }

    .cart-button .fa-cart-plus {
        position: absolute;
        z-index: 2;
        left: 50%;
        top: 50%;
        font-size: 1.2em;
        transform: translate(-50%, -50%);
    }

    .cart-button .fa-circle-thin {
        position: absolute;
        z-index: 1;
        top: 50%;
        left: -20%;
        font-size: 1.5em;
        transform: translate(-50%, -50%);
    }

    .cart-button .fa-check {
        position: absolute;
        z-index: 1;
        top: -52%;
        left: 20%;
        font-size: 1em;
        transform: translate(-50%, -50%);
    }

    .cart-button .fa-shopping-cart {
        opacity: 0;
        position: absolute;
        z-index: 2;
        left: 50%;
        top: 50%;
        font-size: 1.2em;
        transform: translate(-50%, -50%);
    }

    .cart-button.clicked .fa-cart-plus {
        animation: addicon 2s ease-in forwards;
    }

    .cart-button.clicked {
        animation: color 2s ease-in forwards;
    }

        .cart-button.clicked .fa-circle-thin {
            animation: circle 1s ease-in forwards;
        }

        .cart-button.clicked .fa-check {
            animation: check 2s ease-in forwards;
        }

        .cart-button.clicked .fa-shopping-cart {
            animation: cart 2s ease-in forwards;
        }

@keyframes addicon {
    0% {
        opacity: 1;
    }

    30%, 100% {
        opacity: 0;
    }
}

@keyframes circle {
    0% {
        left: -10%;
    }

    100% {
        left: 20%;
    }
}

@keyframes check {

    0%, 40% {
        top: -20%;
    }

    60% {
        top: 48%;
    }

    100% {
        top: 48%;
    }
}

@keyframes cart {

    0%, 80% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes color {
    0% {
        background-color: blue;
    }

    80%, 100% {
        background-color: green;
    }
}
/*http://localhost:35198/search.aspx*/

.cart-button.addedcart .fa-cart-plus {
    opacity: 0;
}

.cart-button.addedcart {
    background-color: green;
}

    .cart-button.addedcart .fa-circle-thin {
        left: 20%;
    }

    .cart-button.addedcart .fa-check {
        top: 48%;
    }

    .cart-button.addedcart .fa-shopping-cart {
        opacity: 1;
    }
/*************************************************************waiting modal************************************************************************************/
#modalWait .modal-content {
    background-color: transparent;
    border-color: transparent;
}

    #modalWait .modal-content .modal-body {
        align-self: center;
    }

.ModalLoading {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 10001;
    background-color: rgba(0, 0, 0, 0.3);
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* this is what centers your element in the fixed wrapper*/
    display: flex;
    flex-flow: column nowrap;
    justify-content: center; /* aligns on vertical for column */
    align-items: center; /* aligns on horizontal for column */
}

.Loadingimg {
    position: relative;
}
/*************************************************************Scan Panel************************************************************************************/

.panel-scan {
    display: flex;
    justify-content: center;
}

    .panel-scan input {
        background-color: white;
    }
