:root {
    --font-family: 'Roboto', sans-serif;
    --color-bg-gradient-start: #0d6dfc;
    --color-bg-gradient-end: #0b5ed7;
    --color-header-bg: rgba(255, 255, 255, 0.1);
    --color-warning-bg: rgba(255, 165, 0, 0.8);
    --color-text: #333;
    --color-primary: #0d6dfc;
    --color-primary-hover: #0b5ed7;
    --color-price: #e74c3c;
    --color-cart-bg: #2c3e50;
    --color-cart-plus: #0d6dfc;
    --color-cart-minus: #e74c3c;
    --box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    --box-shadow-header: 0 2px 10px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-family);
}

body {
    min-height: 100vh;
}

.btn-primary {
    background: var(--color-primary) !important;
    border-color: var(--color-primary-hover) !important;
}

.btn-primary:hover {
    background: var(--color-primary-hover) !important;
}

.header {
    background: linear-gradient(135deg, var(--color-bg-gradient-start), var(--color-bg-gradient-end));
    color: white;
    text-align: center;
    font-weight: bold;
    font-size: 30px;
    box-shadow: var(--box-shadow-header);
}

.warning-bar {
    background: linear-gradient(135deg, var(--color-bg-gradient-start), var(--color-bg-gradient-end));
    font-size: 14px;
    color: white;
    white-space: nowrap;
    position: relative;
}

.warning-bar .container-fluid {
    overflow: hidden;
    background-color: #33333334;
}

.warning-bar .container {
    padding: 4px 0;
    overflow: hidden;
}

.marquee {
    display: inline-block;
    padding-left: 100%;
    /* Để bắt đầu từ ngoài màn hình bên phải */
    animation: marquee 20s linear infinite;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
        /* Bắt đầu từ ngoài màn hình */
    }

    100% {
        transform: translateX(-100%);
        /* Chạy hết chiều dài text */
    }
}

.search-container {
    background: linear-gradient(135deg, var(--color-bg-gradient-start), var(--color-bg-gradient-end));
    text-align: center;
    padding: 10px;
}

.search-box {
    max-width: 400px;
    padding: 10px 16px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    box-shadow: var(--box-shadow);
}


.category-item {
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease;
    margin: 0px !important;
    padding: 10px 5px !important;
}

.category-item:first-child {
    margin-right: 20px !important;
}

.category-item:hover .category-image,
.category-item.active .category-image {
    transform: scale(1.1);
}

.category-item.active {
    font-size: large;
    font-weight: bold;
    transform: scale(1.2);
}

.category-image {
    transition: transform 0.3s ease;
    width: 60px;
    height: 60px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    /* box-shadow: var(--box-shadow); */
    border-radius: 4px;
}

.category-name {
    font-size: 12px;
    color: var(--color-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* số dòng tối đa */
    -webkit-box-orient: vertical;
    overflow: hidden;
}


.product-item {
    display: flex;
    padding: 12px 8px;
    transition: background 0.3s ease;
}

.product-item:hover {
    background: hsla(200, 100%, 50%, 0.1);
}

.product-item:hover .product-image {
    transform: scale(1.1);
}

.product-image {
    overflow: hidden;
    height: 100px;
    width: auto;
    border-radius: 8px;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.3s ease-in-out;
}

.product-name {
    font-size: 16px;
    font-weight: bold;
    margin: 0 !important;
    color: var(--color-text);

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;

    /* Thêm phần này để luôn chiếm 2 dòng */
    line-height: 1.2em;
    height: calc(1.2em * 2);
}



.product-price {
    color: var(--color-price);
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 4px;
}

.link {
    color: var(--color-primary);
    text-decoration: none;
    cursor: pointer;
}

.add-button {
    margin-right: 6px;
    width: 35px;
    height: 35px;
    background: var(--color-primary);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-button:hover {
    background: var(--color-primary-hover);
    transform: scale(1.1);
}

/* Khi màn hình nhỏ hơn md (mobile, tablet) -> chuyển sang list */
@media (max-width: 768px) {
    .product-item {
        display: flex !important;
        flex-direction: row !important;
        /* xếp ngang */
        align-items: center !important;
    }

    .product-image {
        width: 50px !important;
        height: 100px;
        margin-right: 15px;
        flex-shrink: 0;
        object-fit: contain;
    }

    .product-info {
        flex: 1;
        padding: 0 !important;
    }

    .add-button {
        margin-left: auto;
        margin-top: 0;
    }

    .cart-icon {
        width: 50px;
        height: 50px;
    }

    .cart-icon i {
        width: 30px;
        height: 30px;
    }

    .cart-count {
        right: -5px !important;
        top: -5px !important;
    }

    .cart-total {
        display: none;
    }

    .cart-footer .cart-total {
        display: block;
    }
}


.cart {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--color-cart-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.cart-count {
    position: absolute;
    top: -3px;
    right: -3px;
    background: var(--color-price);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.cart-fixed {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.cart-icon {
    width: 60px;
    height: 60px;
    position: relative;
    font-size: 28px;
    background: linear-gradient(135deg, #0068FF, #0095FF);
    padding: 10px;
    border-radius: 100%;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 149, 255, 0.6);
}

.cart-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 149, 255, 0.4);
}

.cart-icon i {
    position: absolute;
    font-size: 24px;
    color: white;
}

.cart-total {
    margin-right: 10px;
    font-weight: bold;
    font-size: 16px;
    color: var(--color-price);
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #b1b1b1;
}

.cart-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 10px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-size: 14px;
    /* tuỳ chỉnh */
    font-weight: bold;
    color: var(--color-text);

    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* tối đa 2 dòng */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}


.cart-item-price {
    color: var(--color-price);
    font-size: 12px;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-item-quantity button {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    font-weight: bold;
    cursor: pointer;
}

.cart-item-quantity .plus {
    background: var(--color-cart-plus);
    color: white;
}

.cart-item-quantity .minus {
    background: var(--color-cart-minus);
    color: white;
}

.variant-item {
    font-size: 14px;
    padding: 2px;
    cursor: pointer;
    padding-right: 10px;
    border-radius: 4px;
}

.variant-item.selected {
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

input[type="radio"] {
    appearance: none;
    /* Bỏ style mặc định */
    -webkit-appearance: none;
    /* Cho Safari */
    -moz-appearance: none;
    /* Cho Firefox */
    height: 18px;
    border-radius: 50%;
    outline: none;
    cursor: pointer;
    position: relative;
    transition: 0.2s ease;
    padding: 0 !important;
}

.contact-container {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 1;
}

.contact-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.3s ease;
}

.contact-buttons.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.contact-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
}

.contact-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.zalo-btn {
    background: linear-gradient(135deg, rgb(0, 104, 255, .6), rgba(0, 149, 255, .6));

}

.messenger-btn {
    background: linear-gradient(135deg, rgb(0, 104, 255, .6), rgba(0, 149, 255, .6));
}

.main-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2bff00, #00bb9c);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 255, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
    position: relative;
}

.main-btn {
    position: relative;
    z-index: 1;
    overflow: visible;
}

/* Khi active: xoay + hiệu ứng bật */
.main-btn.active {
    transform: rotate(45deg) scale(1.2);
}

/* tạo các vòng sáng */
.main-btn::before,
.main-btn::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(0, 255, 0, 0.7);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
    z-index: -1;
}

/* vòng sáng thứ nhất */
.main-btn::before {
    animation: ring 1.5s infinite;
}

/* vòng sáng thứ hai (trễ hơn để tạo hiệu ứng nối tiếp) */
.main-btn::after {
    animation: ring 2s infinite 1s;
}

@keyframes ring {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }

    70% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}


/* Icons */
.icon {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

.swiper img {
    user-select: none;
    /* Ngăn chọn ảnh */
    -webkit-user-drag: none;
    /* Ngăn kéo ảnh */
    pointer-events: none;
    /* (Tùy chọn) Ngăn click chuột vào ảnh */
}

/* Nút điều hướng mặc định ẩn (opacity 0 + translate) */
.swiper-button-next,
.swiper-button-prev {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    /* tránh bị click khi ẩn */
    transition: all 0.3s ease;

    width: 40px !important;
    height: 40px !important;
    background-color: #0d6dfc55;
    border-radius: 50%;
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    box-shadow: var(--box-shadow) !important;
}

/* Khi hover Swiper: hiện nút + animation */
.swiper:hover .swiper-button-next,
.swiper:hover .swiper-button-prev {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Hover nút: đổi màu */
.swiper-button-next:hover,
.swiper-button-prev:hover {
    background-color: var(--color-primary);
}

/* Icon mũi tên */
.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 10px !important;
    color: white;
}

#mainBtn i {
    transform: rotate(-30deg) !important;
}