﻿@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    margin: 0;
    padding: 0;
    overflow: hidden;
}

#container {
    width: 100vw;
    height: 100vh;
    background-color: #f0f0f0;
    position: relative;
}

#gifContainer {
    position: absolute;
    bottom: 60px;
    left: 0px;
}

#animatedGif {
    width: 110px;
    cursor: pointer;
}

.animated-arrow{
    color: red;
}

.animated-arrow::before {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border-left: 2px solid black;
    border-bottom: 2px solid black;
    transform: rotate(-45deg);
    animation: arrow-move 1s infinite;
}

@keyframes arrow-move {
    0%, 100% {
        transform: translateY(-5px) rotate(-45deg);
    }

    50% {
        transform: translateY(5px) rotate(-45deg);
    }
}



.user-icon {
    position: fixed;
    top: 15px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid white;
    transition: background-color 0.3s, transform 0.3s;
    z-index: 1000;
}

.dropdown-menu {
    position: absolute;
    right: 0;
    top: 50px;
    z-index: 2000;
    display: none;
}

.mySwiper {
    position: absolute !important;
    bottom: 0px;
    width: 100%;
    height: 100px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    padding: 5px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    opacity: 1;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

    .mySwiper.hidden {
        transform: translateY(100%);
        opacity: 0;
    }

.swiper-slide img {
    width: 100%;
    height: 100px;
    cursor: pointer;
    object-fit: cover;
    border: 2px solid white;
    margin: 0 2px;
    border-radius: 5px;
}

.toggle-container {
    position: absolute;
    bottom: 15px;
    left: 10px;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.hover-icon:hover {
    cursor: pointer;
}

#arrowIcon {
    transition: transform 0.3s ease;
}

.rotate-icon {
    transform: rotate(180deg);
}

.btn-arrow {
    background-color: #F8F8F8;
    color: #2bd156;
}

    .btn-arrow:hover {
        background-color: #F8F8F8;
        color: #2bd156;
    }


.intro_img {
    display: none;
    top: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    position: absolute;
    justify-content: center;
    align-items: center;
    display: flex;
    height: 100vh;
    cursor: pointer;
}

    .intro_img img {
        width: 70%;
        max-width: 400px;
        border-radius: 20px;
    }


/* icon sản giỏ hàng */
.icon-cart {
    position: fixed;
    top: 20px;
    right: 20px;
    cursor: pointer;
}

.cart-list {
    position: fixed;
    top: 0;
    border-radius: 10px 0px 0px 10px;
    right: -50%;
    width: 45%;
    height: 100%;
    background-color: white;
    box-shadow: -2px 0 5px rgba(0,0,0,0.5);
    transition: right 0.3s ease;
    z-index: 1000;
}

    .cart-list.visible {
        right: 0;
    }

.cart-header {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #ccc;
}

.cart-items {
    padding: 10px;
    overflow-y: auto;
    height: calc(100% - 135px);
}

    .cart-items div {
        /*        padding: 5px 0;*/
        /*        border-bottom: 1px solid #eee;*/
    }

.cart-footer {
    background-color: #f8f9fa;
    border-top: 2px solid #e0e0e0;
    padding: 20px;
    border-radius: 8px;
    font-size: 16px;
}

    .cart-footer .d-flex p {
        color: #555;
    }

    .cart-footer .btn {
        padding: 8px 12px;
        border-radius: 6px;
        font-size: 14px;
    }

#totalAmount {
    color: #ff5722;
}

.img-fluid-custom {
    width: 70%;
    height: 100px;
    border-radius: 6px;
}

.overlay {
    display: none; /* Ẩn mặc định */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Màu nền mờ */
    z-index: 5; /* Đặt z-index cao hơn container */
}

    /* Hiển thị overlay khi giỏ hàng mở */
    .overlay.visible {
        display: block;
    }


.page-wrapper button {
    padding: 20px;
    border: none;
    background: #d5d8e7;
    position: relative;
    outline: none;
    border-radius: 5px;
    color: #292d48;
    font-size: 18px;
}

.btn-addtocart {
    padding: 10px;
    margin-left: 5px;
}

    .btn-addtocart .cart-item:before {
        content: '';
        display: none;
        line-height: 24px;
        height: 24px;
        width: 24px;
        font-size: 12px;
        font-weight: 600;
        background: #2bd156;
        color: white;
        border-radius: 20px;
        text-align: center;
    }

    .btn-addtocart .sendtocart .cart-item {
        display: block;
        animation: xAxis 1s forwards cubic-bezier(1, 0.44, 0.84, 0.165);
    }

        .btn-addtocart .sendtocart .cart-item:before {
            animation: yAxis 1s alternate forwards cubic-bezier(0.165, 0.84, 0.44, 1);
        }

.product-price {
    background: #f9f9f9;
    padding: 15px 20px;
}

.text-price-product {
    color: #368b04;
    font-size: 30px;
    font-weight: 500;
    position: relative;
}

.currency-symbol {
    font-size: 12px;
    vertical-align: super;
    margin-left: 2px;
    position: relative;
    top: -3px;
}

.font-semibold {
    font-weight: 600;
}

.product-info {
    list-style-type: circle;
    padding: 0px 25px;
    margin: 0;
}

    .product-info li {
        padding: 8px 0;
    }

        .product-info li:last-child {
            border-bottom: none;
        }


.cart {
    position: fixed;
    top: 15px;
    right: 70px;
    width: 35px;
    height: 35px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    border: none;
}

    .cart i:hover {
        color: rgba(0, 0, 0, 0.3);
    }

    .cart i {
        font-size: 24px;
        color: white;
    }

    .cart:before {
        content: attr(data-totalitems);
        font-size: 12px;
        font-weight: 600;
        position: absolute;
        top: -5px;
        right: -12px;
        background: #2bd156;
        line-height: 22px;
        padding: 0 5px;
        height: 22px;
        min-width: 22px;
        color: white;
        text-align: center;
        border-radius: 24px;
    }

    .cart.hide-before:before {
        content: '';
        background: transparent;
    }

    .cart.shake {
        animation: shakeCart 0.4s ease-in-out forwards;
    }

@keyframes xAxis {
    100% {
        transform: translateX(calc(50vw - 105px));
    }
}

@keyframes yAxis {
    100% {
        transform: translateY(calc(-50vh + 75px));
    }
}

@keyframes shakeCart {
    25% {
        transform: translateX(6px);
    }

    50% {
        transform: translateX(-4px);
    }

    75% {
        transform: translateX(2px);
    }

    100% {
        transform: translateX(0);
    }
}


.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Màu nền mờ */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999; /* Đặt lên trên cùng */
}

.loader {
    width: 50px;
    padding: 8px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: #25b09b;
    --_m: conic-gradient(#0000 10%,#000), linear-gradient(#000 0 0) content-box;
    -webkit-mask: var(--_m);
    mask: var(--_m);
    -webkit-mask-composite: source-out;
    mask-composite: subtract;
    animation: l3 1s infinite linear;
}

@keyframes l3 {
    to {
        transform: rotate(1turn);
    }
}


.user-icon {
    position: fixed;
    top: 15px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    border: none;
}

    .user-icon i:hover {
        color: rgba(0, 0, 0, 0.3);
        cursor: pointer;
    }

    .user-icon i {
        font-size: 24px;
        color: white;
    }

.dropdown-menu-custom {
    top: 50px;
    right: 15px;
    position: absolute;
    z-index: 1000;
    display: none;
    float: right;
    min-width: 10rem;
    padding: .5rem 0;
    margin: .125rem 0 0;
    font-size: 1rem;
    color: #212529;
    text-align: left;
    list-style: none;
    background-color: #fff;
    background-clip: padding-box;
    border-radius: .25rem;
    padding: 10px;
    border-radius: 8px;
    background-color: #ffffff;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    transition: opacity 0.3s ease;
}

    /* Mũi tên cho dropdown */
    .dropdown-menu-custom::before {
        content: "";
        position: absolute;
        top: -14px;
        right: 18px;
        border-width: 7px;
        border-style: solid;
        border-color: transparent transparent #ffffff transparent;
    }

.dropdown-item.active, .dropdown-item:active {
    color: #fff;
    text-decoration: none;
    background-color: #3c8b4b;
}


.dropdown-menu-custom {
    display: none;
}

.dropdown-login {
    display: none;
    position: absolute;
    top: 15px;
    right: 20px;
    background-color: #ffffff;
    padding: 8px 12px;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
    border: 1px solid #ddd;
}

.visible {
    display: block !important;
}

.text-delete:hover {
    color: blue;
}


.btn-favorite {
    color: #6c757d;
    border-color: #6c757d;
}

    .btn-favorite:hover {
        color: red;
        border-color: red;
    }

#productRating i {
    margin-right: 5px; /* Khoảng cách giữa các ngôi sao */
    font-size: 16px; /* Kích thước ngôi sao */
    color: #ffc107; /* Màu vàng */
}


/* Dành cho màn hình nhỏ (dưới 768px) */
@media (max-width: 768px) {
    .cart-list {
        width: 100%;
        right: -100%;
        border: 0px;
        border-radius: 0px;
    }
}

.img-fluid-custom {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Thiết kế responsive */
@media (max-width: 576px) {
    .img-fluid-custom {
        max-width: 25%;
        height: auto;
        border-radius: 8px;
    }

    .form-control-sm {
        width: 25%;
    }

    .cart-footer .d-flex {
        flex-direction: column;
    }

    .cart-items {
        height: calc(100% - 168px);
    }

    #saveCartButton {
        margin-right: 0px;
        margin-bottom: 5px;
    }

    .cart-footer .btn {
        padding: 5px;
    }

    .infoproduct-text {
        text-align: center;
        justify-content: center;
    }
}


@media (max-width: 1024px) {
    /* Styles cho màn hình nhỏ hơn hoặc bằng 1024px */
    .cart-footer .btn {
        padding: 5px;
    }

    .action-button-cart {
        flex-direction: column;
    }

    .btn-favorite {
        margin-bottom: 10px;
    }

    .btn-addtocart {
        margin-left: 0px;
    }
}


#modalContent {
    background-color: #f9f9f9;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.4);
}
