.banner {
    padding: 15px 0;
    @media (max-width: 640px){
        padding: 10px 0 0;
    }
    .banner-item {
        &:not(:last-child) {
            margin-bottom: 7px;
        }

        img {
            display: block;
        }
    }
}

.banner-category .slick-slide {
    margin: 0 10px;
}

.banner-category .slick-list {
    margin: 0 -10px;
}

.shine-hover {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 6px;
}

.shine-hover img {
    display: block;
    width: 100%;
    position: relative;
    z-index: 1;
    transition: transform 0.4s ease;
}

.shine-hover::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -75%;
    width: 40%;
    height: 200%;
    background: linear-gradient(120deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.8) 50%,
            rgba(255, 255, 255, 0) 100%);
    transform: rotate(25deg);
    z-index: 2;
    /* 🔥 nằm trên ảnh */
    pointer-events: none;
    transition: left 0.7s ease;
}

.shine-hover:hover::before {
    left: 130%;
}

.shine-hover:hover img {
    transform: scale(1.03);
}

#ajax-loading {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.loading-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.7);
}

.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 48px;
    height: 48px;
    border: 5px solid #ddd;
    border-top-color: #333;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.banner-slider {
    .slick-slide {
        border-radius: 5px;
        overflow: hidden;

        img {
            aspect-ratio: 21/9;
            object-fit: cover;
            width: 100%;
            height: 100%;
            object-position: center;

            transition: all 0.3s ease;

            
        }
    }

}

.home-category-product {
    padding: 15px 0 30px;
}
.home-category-product-bg{
    background: #cff9f9;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-top: 1px solid #FFF;
    @media (max-width: 768px){
        padding: 10px 4px;
    }
    .category-product-slider {
        
        .category-item {
            &:not(:last-child) {
                border-bottom: 1px solid white;
            }
        }
    }
}
.category-product-slider{
    .slick-arrow{
        top: 49%;
    }
}
/* Fix CLS: reserve space for category slider items/images */
.home-category-product .category-product-slider {
    min-height: 120px;
}

.home-category-product .category-slider__item {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.home-category-product .category-item {

}

.home-category-product .category-icon {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
}

.home-category-product .category-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.common-title {
    font-size: 23px;
    font-weight: 500;
    color: #c1282d;
    margin-bottom: 15px;

    span {
        border-bottom: 1px solid #c1282d;
        width: fit-content;
    }
}

.cart-notification {
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 12px;
    width: 300px;
    display: flex;
    gap: 10px;
    margin-top: 10px;
    border-radius: 6px;
    animation: fadein 0.3s ease;
    position: relative;
}

.cart-notification img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

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

.cart-notification .info .name {
    font-weight: bold;
    margin-bottom: 4px;
}

.cart-notification .info .price {
    color: #f00;
}

.cart-notification .info .old-price {
    text-decoration: line-through;
    color: #888;
    font-size: 0.9em;
}

.cart-notification .view-cart-btn {
    display: inline-block;
    margin-top: 6px;
    padding: 4px 8px;
    background: var(--color-3);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85em;
}

.mb-3 {
    margin-bottom: 20px;
}

.cart-notification.fade-out {
    animation: fadeout 0.5s forwards;
}

@keyframes fadein {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeout {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}



/* Category  */
.home-categories {
    padding: 15px 0;
}



.btn-show-all {
    background-color: var(--color-3);
    color: var(--color-2);
    padding: 5px 15px;
    border-radius: 5px;
    font-weight: 700;
    font-size: 15px;
    display: none;
    margin: 20px auto 0;
}

.item-category {
    background-color: var(--color-2);
    font-weight: 700;
    position: relative;
    text-align: center;
    display: block;
    margin: 60px 0px 0;
    padding: 60px 8px 15px;
}

.item-category .wrap-img {
    padding-bottom: 70%;
    border-radius: 50%;
    width: 70%;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
}

.item-category .name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    overflow: hidden;
    height: 37px;
    font-size: 13px;
}

/* Flash sale  */
.flash-sale {
    margin-top: 15px;
}

.flash-sale .inner {
    background-color: var(--color-5);
    padding: 30px 20px;
    border-radius: 5px;
}

.flash-sale .title {
    color: var(--color-2);
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    background: #ffb700;
    display: inline-block;
    padding: 7px 20px;
    height: 46px;
    margin-left: 27px;
}

.flash-sale .title-wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.flash-sale .title::before {
    content: "";
    position: absolute;
    display: block;
    top: 0;
    border: 23px solid #ffb700;
    z-index: 0;
    left: -23px;
    border-right-width: 2px;
    border-left-color: transparent;
}

.flash-sale .title::after {
    content: "";
    position: absolute;
    display: block;
    top: 0;
    border: 23px solid #ffb700;
    z-index: 0;
    border-color: #ffb700;
    right: -23px;
    border-left-width: 2px;
    border-right-color: transparent;
}

.flash-sale .time-sale {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-align: center;
}

.flash-sale .time-sale span {
    margin-right: 8px;
    color: var(--color-2);
}

.flash-sale .time-sale .time {
    background-color: #ffb700;
    color: var(--color-1);
    border-radius: 5px;
    padding: 4px;
    width: 37px;
}

.flash-sale .time-sale .number {
    font-weight: 700;
}

.flash-sale .time-sale .type {
    font-size: 12px;
}

.flash-sale .see-all {
    text-align: right;
}

.flash-sale .see-all svg {
    width: 25px;
    height: 25px;
}

.flash-sale .see-all a {
    color: var(--color-2);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: underline;
}

.flash-sale .item-product {
    border: none !important;
}


.item-product {
    background-color: var(--color-2);
    border-radius: 5px;
    border: 1px solid #f4f4f4;
    padding: 10px;
    position: relative;
    overflow: hidden;
    height: 100%;
}

.item-product .discount {
    background: linear-gradient(93.01deg, #ff2310 15.48%, #d31100 92.66%);
    border-radius: 5px 5px 0px 5px;
    padding: 0px 10px;
    color: #fff;
    position: absolute;
    right: 5px;
    top: 5px;
    height: 24px;
    line-height: 24px;
    text-align: center;
}

.item-product .discount::before {
    content: "";
    position: absolute;
    right: 0;
    top: 22px;
    border-left: 10px solid transparent;
    border-bottom: 0px solid transparent;
    border-top: 10px solid #d31100;
}

.item-product .wrap-img {
    position: relative;
    height: 0;
    overflow: hidden;
    display: block;
    padding-bottom: 100%;
}

.item-product .wrap-img img {
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: all 0.5s ease 0s;
}

.item-product .wrap-img .image1 {
    transform: translateY(0);
}

.item-product .wrap-img .image2 {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-100%);
}

.item-product:hover .image1 {
    opacity: 0;
    transform: translateY(100%);
}

.item-product:hover .has-one .image1 {
    opacity: 1;
    transform: translateY(0%);
}

.item-product:hover .image2 {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.item-product .name {
    font-size: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    overflow: hidden;
    height: 39px;
}

.item-product .des {
    margin-top: 10px;
    display: none;
}

.item-product .des ul {
    margin-left: 18px;
}

.item-product .price-wrap {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px 8px;
}

.item-product .price-new {
    font-size: 15px;
    color: #d60505;
    font-weight: 700;
}

.item-product .price-old {
    color: #8a919b;
    font-size: 12px;
}

.item-product .price-wrap .hot img {
    width: 35px;
}

.item-product .quick-view {
    display: flex;
}

.item-product .quick-view svg {
    width: 24px;
    height: 24px;
}

.item-product .add-cart-ajax {
    background-color: var(--color-5);
    color: var(--color-2);
    padding: 5px 15px;
    border-radius: 5px;
    display: inline-block;
    font-weight: 700;
}

.item-product .view-detail-btn {
    background-color: var(--color-3);
    color: var(--color-2);
    padding: 5px 15px;
    border-radius: 5px;
    display: inline-block;
    font-weight: 700;
}

.item-product .add-cart-ajax:hover {
    background-color: var(--color-3);
}

.item-product .product-button {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    padding-top: 12px;
    gap: 4px;
    width: 100%;
}

.item-product .product-info {
    background-color: var(--color-2);
    position: relative;
    z-index: 2;
    transition: .3s;
    padding-top: 10px;
}

.item-product:hover .product-info {
    transform: translateY(-45px);
}

.shopping-day {
    position: absolute;
    bottom: 5px;
    right: 5px;
    z-index: 1;
}

.shopping-day img {
    width: 40px;
}

.item-product .product-thumb .brand {
    position: absolute;
    top: 0px;
    left: 0px;
    z-index: 1;
}

.item-product .product-thumb .brand img {
    max-width: 60px;
}

.stars {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 5px;
}

.stars ul li {
    list-style: none;
    display: flex;
}

.stars ul {
    display: inline-flex;
}

.stars ul li svg {
    width: 20px;
    height: 20px;
}

.item-product .product-thumb {
    position: relative;
}

.flash-sale .item-product .productcount {
    display: block;
}

.item-product.sale {
    border: 5px solid var(--color-5);
}


.item-product .productcount {
    margin-top: 15px;
    margin-bottom: 5px;
    min-height: 17px;
    display: none;
}

.item-product .productcount .countitem {
    background-color: #ffe8e6;
    border-radius: 10px;
    position: relative;
    height: 17px;
}

.item-product .productcount .fire {
    position: absolute;
    width: 22px;
    height: 22px;
    top: -9px;
    left: 0;
    z-index: 1;
}

.item-product .productcount .countdown {
    position: absolute;
    border-radius: 10px;
    background: linear-gradient(to right, #c8103d, #f4b631);
    z-index: 0;
    left: 0;
    top: 0;
    height: 17px;
}

.item-product .productcount .number {
    font-size: 12px;
    position: absolute;
    top: 0;
    z-index: 3;
    color: var(--color-2);
    line-height: 17px;
    left: 50%;
    min-width: 70px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
    transform: translateX(-50%);
}

.flashsale-slider {
    padding-bottom: 30px;
    margin-top: 25px;
}

.flashsale-slider .slick-slide {
    margin: 0 8px;
}

.flashsale-slider .slick-list {
    margin: 0 -8px;
}

.flashsale-slider .slick-dots {
    bottom: -10px;
}

.slick-dots li {
    height: 15px;
    width: 15px;
    border: none;
    background-color: #FFF;
}

.slick-dots li button {
    font-size: 24px;
}

.slick-dots li.slick-active {
    background-color: #fabd5c;
}

.slick-dots li button:before {
    display: none;
}

/* Product category  */
.header-category {
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;

    .title {}
    @media (max-width: 450px){
        >*{
            &:nth-child(1){
                flex: 1;
                width: auto;
                max-width: calc(100% - 120px);
            }
            &:nth-child(2){
                max-width: 100px;
            }
        }
    }
}
.box-category {
    box-shadow: rgba(79, 78, 78, 0.15) -1px -1px 8px;
    border-radius: 5px;
    overflow: hidden;

    &:not(:last-child) {
        margin-bottom: 20px;
    }
    .list-category{
        @media (max-width: 768px){
           li{
            &:not(.item-show-all){
                display: none;
            }
           }
        }
    }
}
.home-product {
 

   

    .product-block {
        padding: 20px;
    }

    .banner-category {
        &:not(:last-child) {
            margin-bottom: 20px;
        }

        img {
            border-radius: 6px;
            height: 100%;
        }
    }
}

.list-category {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    width: fit-content;
    margin-left: auto;
    overflow-x: auto;
    white-space: nowrap;
    gap: 10px;
    max-width: 100%;
    &::-webkit-scrollbar {
        display: none;
    }
    li {
        list-style: none;

        a {
            display: block;
            padding: 5px 10px;
        }

        &.item-show-all {
            position: sticky;
            right: 0;
            z-index: 1;

            a {
                display: flex;
                align-items: center;
                gap: 5px;
            
                white-space: nowrap;
                background: white;
                text-transform: uppercase;
                &:hover{
                    color: var(--color-3);
                }
                svg {
                    width: 20px;
                    height: 15px;
                    transition: all 0.3s ease;
                }

                span {
                    font-size: 14px;
                    font-weight: 500;
                    @media (max-width: 450px){
                        font-size: 12px;
                    }
                }

                &:hover {

                    svg {

                        transform: translateX(5px);
                    }
                }
            }
        }
    }
}

/* News home  */
.news-home {
    padding: 30px 0;

    .common-title2 {
        border-bottom: 1px solid #eee;

    }
}

.common-title2 {
    position: relative;
    width: fit-content;
    max-width: 100%;
    background: #cff9f9;
    padding: 1px;
    &::before {
        content: '';
        position: absolute;
        bottom: 0;
        left: calc(100% - 0.5px);
        width: 30px;
        height: 100%;
        background: #cff9f9;
        clip-path: polygon(0 0, 0% 100%, 100% 100%);
    }
    >* {
        
        color: #000;
        margin: 10px 10px 10px 10px;
        text-transform: uppercase;
        width: fit-content;
        position: relative;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        text-overflow: ellipsis;
        overflow: hidden;
        font-size: 18px;
        line-height: 26px;
        z-index: 2;
        
        @media (max-width: 768px){
            font-size: 16px;
        }
        @media (max-width: 450px){
            font-size: 14px;
        }
        @media (max-width: 320px){
            font-size: 12px;
        }

        
    }
}

.news-home-block {
    margin-top: 15px;
    >.row{
        gap: 10px 0;
    }
}

.item-news-home {
    .wrap-img {
        padding-bottom: 64.5%;
        margin-bottom: 10px;
        border-radius: 5px;
        overflow: hidden;
        position: relative;

        img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            position: absolute;
            top: 0;
            left: 0;
            transition: all 0.3s ease;
        }
    }

    >.row {
        align-items: center;
    }

    .des {
        display: none;
    }

    &.left {
        .wrap-img {
            padding-bottom: 67.5%;
            margin-bottom: 0;
        }

        .title {
            display: none;
        }

        .name {
            font-size: 20px;
        }

        .des {
            font-size: 15px;
            margin-top: 5px;
            display: none;
        }
    }

}





/* Đối tác  */
.doi-tac-slider .slick-slide {
    margin: 0 8px;
    background-color: var(--color-2);
    padding: 5px;
    border-radius: 5px;
    height: auto;
}

.doi-tac-slider .slick-list {
    margin: 0 -8px;
}

.doi-tac-slider .item img {
    border-radius: 5px;
}

.doi-tac {
    background: #cff9f9;
    padding: 20px 0;
}

.form-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 31;
    display: none;
    min-width: 370px;
}

.form-popup.show {
    display: block;
}

.form-popup .content img {
    height: 600px;
    cursor: pointer;
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 31;
    display: none;
}

.popup-overlay.show {
    display: block;
}

.close-form-popup {
    position: absolute;
    top: -8px;
    right: 0px;
    cursor: pointer;
}

.home-block {
    padding: 15px;
    >.row{
        gap: 15px 0;
    }
    .home-product-slider {
        .slick-slide {
            >* {
                &:not(:last-child) {
                    margin-bottom: 10px;
                }
            }
        }

        .child {}

        .slick-slide {
            margin: 0 8px;
        }

        .slick-list {
            margin: 0 -8px;
        }

    }
}

@media (max-width: 1400px) {
    .form-popup .content img {
        max-height: 530px;
    }
}

@media (max-width: 992px) {
    .category-slider {
        grid-template-columns: repeat(6, 1fr);
    }

}

@media (max-width: 768px) {
    .category-slider {
        grid-template-columns: repeat(4, 1fr);
    }

    .slick-dots li {
        height: 8px;
        width: 8px;
    }

    .category-child {
        text-align: left;
        margin-top: 12px;
    }

    .item-product .product-button {
        position: unset;
        padding-top: 5px;
    }

    .item-product:hover .product-info {
        transform: translateY(0px);
    }

    .item-product .add-cart-ajax {
        font-size: 12px;
        padding: 5px;
    }

    .banner .img-m {
        display: block;
    }

    .banner .img-pc {
        display: none;
    }



    .product-category .title {
        position: relative;
    }

    .product-category .title::before {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 2px;
        background-color: var(--color-3);
    }
}

@media (max-width: 550px) {
    .category-slider {
        grid-template-columns: repeat(3, 1fr);
    }

    .news-home {
        padding: 20px 0;
    }

    .news-home .inner {
        padding: 15px;
    }

    .item-news-home .des {
        display: none;
    }

  

    .news-home-block {
        margin-top: 15px;
    }

    .product-category .title {
        font-size: 20px;
    }

    .product-category .inner {
        padding: 15px 10px;
        margin-top: 20px;
    }

    .product-category .clm,
    .flash-sale .clm,
    .product-list .clm {
        padding: 0px 4px;
    }

    .product-category .row,
    .flash-sale .row,
    .product-list .row {
        padding: 0px -4px;
    }



    .item-product .des {
        font-size: 13px;
    }

    .product-category .category-child {
        margin-bottom: 10px;
    }

    .product-category .banner-category {
        margin-top: 15px;
    }

    .flash-sale .inner {
        padding: 15px 10px;
        position: relative;
    }

    .flashsale-slider .slick-slide {
        margin: 0 4px;
    }

    .flashsale-slider .slick-list {
        margin: 0 -4px;
    }

    .item-product .price-wrap {
        margin-top: 10px;
        flex-direction: column;
        min-height: 40px;
    }

    .flash-sale .see-all {
        position: absolute;
        top: 26px;
        right: 12px;
    }

    .flashsale-slider .slick-dots {
        bottom: -5px;
    }

    .flash-sale {
        margin-top: 5px;
    }

    .flash-sale .time-sale span {
        display: none;
    }

    .flash-sale .title-wrap {
        display: block;
        text-align: center;
    }

    .flash-sale .time-sale .time {
        display: flex;
        gap: 5px;
        align-items: center;
        width: unset;
    }

    .flash-sale .time-sale {
        background: #ffb700;
        justify-content: center;
        border-radius: 5px;
        font-size: 16px;
        gap: 10px 15px;
        margin-top: 10px;
    }

    .flash-sale .time-sale .type {
        font-size: 14px;
        transform: translateY(1px);
    }

    .category-slider .slick-slide {
        margin: 45px 8px 0;
        padding: 50px 5px 15px;
    }

    .item-product .view-detail-btn {
        font-size: 12px;
    }

    .btn-show-all {
        display: block;
        grid-column: 1 / -1;
    }

    .flash-sale .title {
        font-size: 16px;
        line-height: 33px;
        margin-left: 0px;
    }
}

