﻿ 
p {
    font-size: small;
}
body {
    /*width: 100vw;*/
}
body.preload * {
    animation-duration: 0s !important;
    -webkit-animation-duration: 0s !important; 
    transition: none !important; 
}

.hidden {
    visibility: hidden;
    opacity: 0;
    display: none;
    width: 0px;
    height: 0px;
    padding: 0;
    margin: 0
}
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}
@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to { 
        opacity: 0; 
    }
} 

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

.gray {
    color: #A2A2A2;
}
/* ================================
   🔹 DROPDOWN MENU
=================================== */
#dropdownMenu {
    position: absolute;
    top: 130%;
    right: 0;
    display: none;
    z-index: 2000;
}

/* ================================
   🔹 FORM & AUTH SECTION
=================================== */
input::-ms-reveal,
input::-ms-clear {
    display: none;
}

.auth-container {
    margin-top:3vh;
    width: 100%;
    max-width: 500px;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    background-color: #fff;
    transition: all 0.5s ease;
    box-sizing: border-box;
}

.flex-center {
    display: flex;
    justify-content: center;
   /* align-items: center;*/
    height: fit-content;
}

/* Toggle login/register */
.toggle-btns {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    padding: 5px;
    background: #f1f1f1;
    border-radius: 8px;
}

    .toggle-btns button {
        flex: 1;
        padding: 6px;
        border: none;
        background: #f1f1f1;
        cursor: pointer;
        transition: background 0.3s;
        border-radius: 8px;
    }

        .toggle-btns button.active {
            background: #4f7fff;
            color: #fff;
        }

/* Auth form switching */
.auth-form {
    display: none;
    animation: fadeIn 0.5s forwards;
}

    .auth-form.active {
        display: block;
    }

    .auth-form input {
        margin-bottom: 15px;
    }

/* Social login */
.social-login {
    text-align: center;
    margin-top: 15px;
}

    .social-login p {
        display: flex;
        align-items: center;
        justify-content: center;
        color: #666;
        font-size: 14px;
        margin-bottom: 10px;
        margin-top: 10px;
        position: relative;
    }

        .social-login p::before,
        .social-login p::after {
            content: "";
            flex: 1;
            height: 1px;
            background: #ccc;
            margin: 0 10px;
        }

    .social-login button {
        border: none;
        background: #00c300;
        color: #fff;
        padding: 8px 16px;
        border-radius: 8px;
        cursor: pointer;
    }

/* Eye icon for password field */
.eye-password {
    position: absolute;
    right: 10px;
    top: 60%;
    cursor: pointer;
}

/* ================================
   🔹 OTP / CODE INPUTS
=================================== */
.code-inputs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 25px 0;
}

    .code-inputs input {
        width: 50px;
        height: 55px;
        font-size: 24px;
        text-align: center;
        border: 1px solid #ddd;
        border-radius: 10px;
    }

        .code-inputs input:focus {
            border-color: #007bff;
            outline: none;
        }

/* ================================
   🔹 SEARCH BAR
=================================== */
.search-bar {
    width: 0;
    opacity: 0;
    padding: 0;
    height: 36px;
    border-radius: 50px;
    border: 1px solid #ccc;
    transition: width 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
}

    .search-bar.active {
        width: 100%;
        opacity: 1;
        padding-right: 40px;
        padding-left: 15px;
    }

.search-icon {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

    .search-icon:hover {
        transform: translateY(-50%) scale(1.1);
    }

/* ================================
   🔹 CART & PRODUCT LIST
=================================== */
.cart-container {
    padding: 28px;
}

.item-card {
    border-radius: 12px;
    background: #fff;
    padding: 12px;
    border: 1px solid #f0eef6;
}

.card-cart {
    border-radius: 14px;
    border: 1px solid #eee;
    box-shadow: 0 4px 18px rgba(15,15,15,0.03);
}

.product-thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
}

.muted-small {
    font-size: 0.85rem;
    color: #7b7b8a;
}

/* Quantity button */
.qty-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e6e6e6;
    background: #fff;
}

.remove-btn {
    color: #d9534f;
    cursor: pointer;
}

/* ================================
   🔹 PROMO CODE & PRICE SUMMARY
=================================== */
.promo-input {
    border-radius: 30px;
    background: #fff;
    border: 1px solid #e9e6ef;
    padding: 0.375rem 0.75rem;
}

.apply-btn {
    border-radius: 30px;
    padding: 8px 18px;
}

.price-small {
    font-weight: 700;
    color: #0b5cff;
}
.history-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    background: #f5f5f5;
}

.history-item .price {
    font-size: 1rem;
}

.badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.6rem;
    border-radius: 12px;
    line-height:9px
}

.status-on-delivery {
    background: rgba(255,153,51,0.12);
    color: #ff9800;
    border: 1px solid rgba(255,153,51,0.18);
}

.status-completed {
    background: rgba(160,160,160,0.08);
    color: #6c757d;
    border: 1px solid rgba(160,160,160,0.12);
}
.status-failed {
    background: rgba(255, 0, 0, 0.10);
    color: #e63946;
    border: 1px solid rgba(255, 0, 0, 0.15);
}
/* tweak card spacing to match mockup */
.tab-card .card {
    border-radius: 12px;
}
/* ================================
   🔹 CAROUSEL
=================================== */
.carousel-inner img {
    height: 375px;
    /*object-fit: cover;*/
    margin: auto;
    /*max-width: 400px;*/
    max-height: 40vh;
    width: auto;
}
.carousel-control-next, .carousel-control-prev {
    width: 25% !important; 
}
    .policy-wrapper {
        padding: 1rem 0;
    }

    #policy-content {
        max-width: 1170px;
        margin: auto;
        line-height: 1.8;
        color: #333;
    }

    .policy-title {
        font-size: 38px;
        font-weight: 700;
        margin-bottom: 0.5rem;
    }

    .policy-updated {
        color: #666;
        margin-bottom: 2rem;
    }
    /* ================================
   🔹 RESPONSIVE MEDIA QUERIES
=================================== */
    @media (max-width: 1024px) {
        .auth-container {
            box-shadow: none;
        }

        .search-bar.active {
            width: 100%;
        }
    }

    .on-device {
        display: none;
    }

    @media (min-width: 768px) {
        btn-primary {
            padding-top: 58px;
        }

        .carousel-inner img {
            height: 45vh;
            /*max-height: 600px;*/
        }
    }

    @media (max-width: 560px) {

        html {
            width: fit-content !important
        }
    }

    @media (max-width: 480px) {
        .auth-container {
            padding: 20px;
        }
    }

    html {
        width: 100%
    }

    @media (max-width: 991.98px) {
        .desktop-summary {
            display: none;
        }

        .on-device {
            display: initial;
        }

        .cart-container {
            padding: 16px;
        }

        .product-thumb {
            width: 64px;
            height: 64px;
        }
    }

    @media (min-width: 992px) {
        .mobile-summary {
            display: none;
        }
    }

    .line-login-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        background-color: #06C755;
        color: white;
        border: none;
        border-radius: 6px;
        padding: 8px 16px;
        font-size: 16px;
        font-weight: 500;
        width: 100%;
        transition: background-color 0.2s;
    }

        .line-login-btn:hover {
            background-color: #05b54c !important;
        }

        .line-login-btn:active {
            background-color: #049940 !important;
        }

    .line-logo {
        width: 24px;
        height: 24px;
    }

    .data-required-label::after {
        content: " *";
        color: red;
    }

    .cart-counter {
        display: none;
        justify-content: center;
        align-items: center;
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background-color: #007bff;
        color: #ffffff !important;
        font-family: Arial, sans-serif;
        font-size: 12px;
        font-weight: bold;
        position: absolute;
        top: 0;
        right: 0;
        transform: translate(0, -25%);
    }

    .waiting-counter {
        display: none;
        justify-content: center;
        align-items: center;
        width: 17px;
        height: 17px;
        border-radius: 50%;
        background-color: #eb5959;
        color: #ffffff !important;
        font-family: Arial, sans-serif;
        font-size: 11px;
        font-weight: bold;
        position: absolute;
        top: 5px;
        right: 5px;
    }

    li .waiting-counter {
        transform: translate(0px, calc(50% - 5px));
    }

    #nonMobileActionBar .cart-counter {
        /*   width: 20px;
    height: 20px;
    font-size: 12px;*/
        transform: translate(40%, -25%);
        right: 0
    }

    .cart-counter.animate {
        animation: pulse1 0.4s ease-in-out;
    }

    #nonMobileActionBar .cart-counter.animate {
        animation: pulse2 0.4s ease-in-out;
    }

    @keyframes pulse1 {
        0% {
            transform: scale(1) translate(0, -25%);
        }

        50% {
            transform: scale(1.2) translate(0, -25%);
        }

        100% {
            transform: scale(1) translate(0, -25%);
        }
    }

    @keyframes pulse2 {
        0% {
            transform: scale(1) translate(40%, -25%);
        }

        50% {
            transform: scale(1.2) translate(40%, -25%);
        }

        100% {
            transform: scale(1) translate(40%, -25%);
        }
    }

    .cart-counter span, .waiting-counter span {
        color: white !important;
        font-family: 'mont-extra-light';
    }

    @keyframes pulse {
        0% {
            transform: scale(1);
        }

        50% {
            transform: scale(1.2);
        }

        100% {
            transform: scale(1);
        }
    }

    @keyframes shrink {
        0% {
            transform: scale(1);
        }

        50% {
            transform: scale(0.8);
        }

        100% {
            transform: scale(1);
        }
    }


    .bg-lblue-30 {
        --bs-bg-opacity: 1;
        background-color: rgb(145 200 255 / 30%) !important;
    }

    .card-item-container {
        display: grid !important;
        gap: 0.75rem;
    }

    .card-item {
        border: 1px solid #e6e6e6 !important;
        border-radius: 12px !important;
        padding: 1rem 1.25rem;
        background-color: #fff;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
        overflow: hidden;
        transition: transform .2s
    }

        .card-item .card-head:hover {
            cursor: pointer;
        }

    .no-animate, .no-animate * {
        animation-duration: 0s !important;
        -webkit-animation-duration: 0s !important;
        transition: none !important;
        transform: none !important
    }

    .card-item-container.selectable .card-item.active, .card-item-container.selectable .card-item:hover {
        border-color: var(--bs-blue) !important;
        background-color: #ddeeff1a !important;
        box-shadow: #0d6efd45 -1px 1px 4px 1px !important;
        cursor: pointer !important;
        transition: all 0.2s ease-in-out;
    }

    .card-item:hover, .card-item.active {
        transform: translateY(-2px);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }

    .card-item .card-head:hover > img {
        transform: scale(1.05)
    }

    .card-head {
        overflow: hidden;
    }

        .card-head img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform .4s
        }
    /*  .card-item:hover {
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    }*/

    .card-item h6 {
        font-size: 1rem;
    }


    .grid-2 {
        grid-template-columns: repeat(2, minmax(200px, 1fr));
    }

    @media (min-width: 992px) {
        .card-item-container:not(.selectable) {
            grid-template-columns: repeat(2, minmax(200px, 1fr));
        }

        .grid-4 {
            grid-template-columns: repeat(4, minmax(200px, 1fr)) !important;
        }
    }

    @media (max-width: 105px) {
        .card-item-container {
            grid-template-columns: repeat(1, minmax(200px, 1fr));
        }
    }

    .card-shadow-20 {
        box-shadow: 0 2px 8px 0px rgb(0 0 0 / 20%);
    }
    /* --- Mobile bottom sheet style --- */
    @media (max-width: 767.98px) {
        .modal-dialog {
            position: fixed;
            bottom: 0;
            margin: 0;
            width: 100%;
            transition: transform 0.3s ease-out;
            transform: translateY(100%);
        }

        .modal.show .modal-dialog {
            transform: translateY(0);
        }

        .modal-content {
            border-radius: 16px 16px 0 0;
        }
    }
    /* Overlay fade-in */
    .modal-backdrop.show {
        opacity: 0.15;
        background-color: #0000;
        animation: fadeInBackdrop 0.3s ease forwards;
    }

    @keyframes fadeInBackdrop {
        from {
            opacity: 0;
        }

        to {
            opacity: 0.6;
        }
    }
    /* Slide-up for mobile */
    @media (max-width: 767.98px) {
        .modal-dialog-slide-up {
            position: fixed;
            bottom: -100%;
            margin: 0;
            width: 100%;
            transition: all 0.4s ease;
        }

        .modal.show .modal-dialog-slide-up {
            bottom: 0;
        }

        .modal-content {
            border-radius: 20px 20px 0 0;
        }
    }
    /* Fade-in for tablet & desktop */
    @media (min-width: 768px) {
        .custom-fade .modal-dialog {
            transform: translateY(-20px);
            opacity: 0;
            transition: all 0.3s ease-in-out;
        }

        .custom-fade.show .modal-dialog {
            transform: translateY(0);
            opacity: 1;
        }
    }
    /* Toast position & style */
    .toast-container {
        position: fixed;
        top: 1rem;
        right: 1rem;
        z-index: 1080;
    }

    .toast {
        border-radius: 12px;
        font-weight: 500;
    }

    .unavailable {
        filter: brightness(0.55) grayscale(0.35);
        touch-action: none;
        cursor: not-allowed;
    }

    .cast-shadow {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        background: #00000080;
        z-index: 999;
        height: 100%;
        box-shadow: inset 0px 0px 20px 4px #626262a3;
    }

        .cast-shadow label, .cast-shadow #text.cast-shadow span, .cast-shadow p {
            position: absolute;
            top: 50%;
            left: 0;
            font-size: 1.33rem;
            width: 100%;
            text-align: center;
            background: #cbcbcb61;
            color: #ffffff;
            z-index: 999;
            text-shadow: 1px 1px 3px black;
        }

    .cart-btn {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        border-radius: 0 !important;
    }