/* banner css */
.banner {
    max-width: 1240px;
    background-color: white;
    border-radius: 0.5rem;
    margin: 2rem auto;
    position: relative;
}

.banner .contain-img {
    max-width: 1024px;
    height: 465px;
    padding-bottom: 37.5%;
    margin: auto;
    overflow: hidden;
    position: relative;
}

.banner img {
    width: 100%;
    height: auto;
    position: absolute;
    left: 100%;
    top: 0;
}

/* animation xu ly cho slide banner */
.imgIn { 
    animation: moveImgIn 0.3s forwards;
}

.imgOutRight {
    animation: moveImgOutRight 0.3s forwards;
}

.imgOutLeft {
    animation: moveImgOutLeft 0.3s forwards;
}

@keyframes moveImgIn {
    100% {
        left: 0;
    }
}

@keyframes moveImgOutRight {
    100% {
        left: 100%;
    }
}

@keyframes moveImgOutLeft {
    100% {
        left: -100%;
    }
}

/* end animation xu ly */
.next,
.prev {
    background-image: url(../images/index/next.png);
    background-size: cover;
    width: 32px;
    height: 56px;
    position: absolute;
    top: calc(50% - 28px);
    opacity: 0.8;
    z-index: 1;
}

.prev {
    transform: rotate(180deg);
}

.next {
    right: 0;
}

.prev:hover,
.next:hover {
    opacity: 1;
}

.img-cur-index {
    width: 100px;
    height: 12px;
    position: absolute;
    bottom: 5px;
    left: calc(50% - 50px);
}

.cur-index {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary-color);
    float: left;
    margin-left: 10px;
    opacity: 0.3;
}

.cur-index:nth-child(1) {
    margin-left: 0;
    opacity: 1;
}

/* end banner css */
/* flash-sale css */
.flash-sale {
    max-width: 1240px;
    height: auto;
    background-color: var(--gray);
    margin: 0 auto 2rem;
    position: relative;
}

.flash-sale .title-bar {
    width: 100%;
    height: 6rem;
    background-color: var(--white);
    border-radius: 0.5rem;
    margin-bottom: 0.2rem;
}

.flash-sale .title {
    width: fit-content;
    height: 6rem;
    float: left;
    line-height: 6rem;
    color: var(--primary-color);
    font-size: 2rem;
    padding: 0 1.5rem;
}

.flash-sale .count-down {
    width: fit-content;
    height: 6rem;
    float: left;
    padding: 0 1.5rem;
}

.flash-sale .count-down-cell {
    width: 4rem;
    height: 4rem;
    float: left;
    border-radius: 0.7rem;
    margin: 1rem 0 0;
    background-color: var(--primary-color);
    font-weight: bold;
    font-size: 2rem;
    line-height: 4rem;
    letter-spacing: 0.1rem;
    text-align: center;
    color: var(--white);
}

.flash-sale .two-dots {
    height: 6rem;
    float: left;
    line-height: 6rem;
    font-weight: bolder;
    font-size: 2rem;
}

.flash-sale .prod-bar {
    max-width: 1240px;
    height: auto;
    display: flex;
    flex-wrap: nowrap;
    overflow: hidden;
    /* padding: 0 3rem; */
}

.flash-sale .contain-prod {
    width: calc(248px - 0.5rem);
    height: fit-content;
    float: left;
    padding: 1rem 0;
    margin: 0 0.25rem 0;
    border-radius: 0.5rem;
    background-color: var(--white);
}

.flash-sale .contain-img {
    width: 100%;
    height: 15rem;
    text-align: center;
    overflow: hidden;
    position: relative;
    /* background-color: blue; */
}

.flash-sale .contain-img img {
    width: auto;
    height: 15rem;
    border-radius: 0.5rem;
}

.flash-sale .contain-img .sale-percent {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    background-color: var(--orange);
    font-size: 1.75rem;
    font-weight: bolder;
    text-align: center;
    line-height: 5rem;
    color: var(--white);
    position: absolute;
    top: 0;
    right: 1rem;
    font-family: arial, sans-serif;
}

.flash-sale .prod-name {
    width: 100%;
    height: 3.9rem;
    margin-top: 0.9rem;
    padding: 0 1rem;
    font-size: 1.7rem;
    text-align: center;
    color: var(--black-text);
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    display: -webkit-box;
}

.flash-sale .sale-price {
    width: calc(50% - 1rem);
    height: fit-content;
    font-size: 1.8rem;
    color: var(--orange);
    font-weight: bold;
    float: left;
    margin: 1rem 0 0 1rem;
    font-family: arial, sans-serif;
}

.flash-sale .real-price {
    width: calc(50% - 1rem);
    height: fit-content;
    text-decoration: line-through;
    font-size: 1.6rem;
    color: var(--gray-text);
    float: right;
    margin: 1.1rem 1rem 0 0;
    font-family: arial, sans-serif;
    text-align: right;
}

.flash-sale .sold {
    width: calc(100% - 2rem);
    height: 2rem;
    float: left;
    margin: 1rem 0 0 1rem;
    border-radius: 1.5rem;
    overflow: hidden;
    background-color: var(--light-red);
    position: relative;
}

.flash-sale .sold-progress {
    height: 2rem;
    background-color: var(--red);
}

.flash-sale .sold span {
    position: absolute;
    width: 100%;
    font-size: 1.5rem;
    line-height: 2rem;
    text-align: center;
    top: 0;
    color: var(--white);
}

.flash-sale .contain-prod:hover {
    box-shadow: 0 0 0.5rem var(--gray-text);
}

.flash-sale .contain-prod:hover .prod-name {
    color: var(--primary-color);
}

.flash-sale .contain-prod:hover .contain-img img {
    width: auto;
    height: 17rem;
    margin-top: -0.5rem;
}

.flash-sale .to-left,
.flash-sale .to-right {
    width: 5rem;
    height: 5rem;
    background-color: transparent;

    position: absolute;
    bottom: calc(50% - 4rem);
    z-index: 1;

    font-size: 5rem;
    color: var(--primary-color);

    border: none;
    border-radius: 50%;
    opacity: 0.7;
}

.flash-sale .to-left {
    left: 0.2rem;

    text-align: left;
}

.flash-sale .to-right {
    right: 0.2rem;

    text-align: right;
}

@keyframes opacity-full {
    100% {
        opacity: 1;
    }
}

.flash-sale .to-left:hover,
.flash-sale .to-right:hover {
    animation: opacity-full 0.2s forwards;
}

/* end flash-sale css */
/* top-prod css */
.top-prod {
    max-width: 1240px;
    height: 59.5rem;
    margin: 0 auto 2rem;
}

.top-prod .title-bar {
    width: 100%;
    height: 6rem;
    background-color: var(--white);
    border-radius: 0.5rem;
    margin-bottom: 0.2rem;
    line-height: 6rem;
    color: var(--primary-color);
    font-size: 2rem;
    text-indent: 1.5rem;
}

.top-prod .prod-area {
    max-width: 1234px;
    margin: auto;
    height: 53rem;
    border-radius: 0.5rem;
    background-color: var(--white);
}

.top-prod .prod-column {
    width: 400px;
    height: 530px;
    float: left;
    border-right: 0.2rem dashed var(--gray-text);
}

.top-prod .cont-prod {
    width: 100%;
    height: 10rem;
    margin-top: 0.5rem;
    border-radius: 0.5rem;
}

@keyframes border-up-top-prod {
    100% {
        border-bottom: 10rem solid var(--tertiary-color);
    }
}

.top-prod .cont-prod:hover {
    animation: border-up-top-prod 0.2s forwards;
}

.top-prod .rank {
    width: 2rem;
    height: 10rem;
    float: left;
    padding-top: 3.2rem;
    margin: 0 0 0 1rem;
    font-size: 1.5rem;
    font-family: arial, sans-serif;
    font-weight: bold;
    text-align: center;
}

.top-prod .rank .fa-arrow-up {
    color: green;
}

.top-prod .rank .fa-arrow-down {
    color: red;
}

.top-prod .prod-column .cont-img {
    width: 10rem;
    height: 10rem;
    text-align: center;
    float: left;
    overflow: hidden;
}

.top-prod .prod-column .cont-img img {
    width: auto;
    height: 10rem;
    border-radius: 0.3rem;
}

.top-prod .prod-column .name {
    width: calc(100% - 14rem);
    height: 3rem;
    float: left;
    line-height: 3rem;
    font-size: 1.6rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--black-text);
    margin-top: 1rem;
}

.top-prod .prod-column .author {
    width: calc(100% - 14rem);
    height: 2rem;
    float: left;
    line-height: 2rem;
    font-size: 1.4rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--gray-text);
    margin-top: 0.2rem;
}

.top-prod .prod-column .score {
    width: calc(100% - 14rem);
    height: 2rem;
    float: left;
    line-height: 2rem;
    font-size: 1.4rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--primary-color);
    margin-top: 0.1rem;
}

.top-prod .prod-detail {
    width: calc(100% - 400px);
    height: 530px;
    float: left;
}

.top-prod .cont-detail {
    width: 600px;
    height: 510px;
    margin: 1rem auto;
}

.top-prod .cont-detail .cont-img {
    width: 190px;
    height: 190px;
    overflow: hidden;
    text-align: center;
    float: left;
}

.top-prod .cont-detail .cont-img img {
    width: auto;
    height: 190px;
    border: 2px solid var(--primary-color);
    border-radius: 0.5rem;
}

.top-prod .cont-detail .name {
    width: calc(100% - 210px);
    height: 45px;
    margin: 0 10px;
    float: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 22px;
    font-weight: bold;
    font-family: arial, sans-serif;
    line-height: 45px;
    color: var(--black-text)
}

.top-prod .cont-detail .inf {
    width: calc(100% - 210px);
    height: 50px;
    margin: 5px 10px 0;
    float: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 16px;
    line-height: 25px;
    color: var(--black-text);
}

.top-prod .cont-detail .sale-price {
    width: calc(100% - 210px);
    height: 22px;
    margin: 20px 10px 0;
    float: left;
    font-size: 22px;
    line-height: 22px;
    font-weight: bold;
    color: var(--black-text);
    font-family: arial, sans-serif;
}

.top-prod .cont-detail .real-price {
    width: fit-content;
    height: 20px;
    margin: 14px 10px 0;
    float: left;
    font-size: 16px;
    line-height: 20px;
    color: var(--gray-text);
    font-family: arial, sans-serif;
    text-decoration: line-through;
}

.top-prod .cont-detail .sale-percent {
    width: fit-content;
    height: 30px;
    margin: 9px 0 0;
    padding: 5px;
    border-radius: 0.5rem;
    float: left;
    background-color: var(--light-orange);
    font-size: 16px;
    line-height: 20px;
    color: var(--orange);
    font-family: arial, sans-serif;
    font-weight: bold;
}

.top-prod .cont-detail .description {
    width: 100%;
    height: 310px;
    margin-top: 10px;
    float: left;
    font-size: 14px;
    line-height: 20px;
    text-align: justify;
    overflow: hidden;
    color: var(--black-text);
    font-family: 'Open Sans';
}

.top-prod .cont-detail .description p {
    margin: 8px 0;
}

.mini-game {
    position: fixed;
    bottom: 8rem;
    right: 1rem;

    width: 4.5rem;
    height: 6.5rem;

    border-radius: 0.5rem;

    background-color: var(--primary-color);
    color: var(--secondary-color);

    text-align: center;
    font-size: 1.2rem;
    font-weight: bolder;

    transition: 1s;
}

.mini-game .fas {
    display: block;

    /* background-color: blue; */
    font-size: 3rem;

    transition: 1s;
}

@keyframes mini-game {
    0% {
        background-color: var(--secondary-color);
    }

    100% {
        background-color: var(--tertiary-color);
    }
}

.mini-game:hover {
    width: 9rem;
    height: 13rem;

    color: var(--primary-color);
    font-size: 2.5rem;

    transform: rotate(360deg);
    animation: mini-game 0.5s infinite alternate;
}

@keyframes mini-game-fas {
    0% {
        margin-top: -2rem;
    }

    100% {
        margin-top: 0;
    }
}

.mini-game:hover .fas {
    font-size: 6rem;

    animation: mini-game-fas 0.5s infinite alternate;
}

/* .mini-game  */
/* end top-prod css */
/* responsive css */
@media all and (max-width: 1024px) {

    /* banner */
    .banner .contain-img {
        height: 0;
        padding-bottom: 45.5%;
    }

    .img-cur-index {
        width: 90px;
        height: 10px;
        left: calc(50% - 45px);
    }

    .cur-index {
        width: 10px;
        height: 10px;
    }

    /* flash-sale */
    .flash-sale .contain-prod {
        width: calc(215px - 0.5rem);
    }

    /* top-prod */
    .top-prod {
        height: 345px;
    }

    .top-prod .prod-area {
        height: 290px;
        background-color: transparent;
    }

    .top-prod .prod-detail {
        display: none;
    }

    .top-prod .prod-column {
        width: 100%;
        height: 32rem;
        border-right: none;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-around;
    }

    .top-prod .cont-prod {
        width: 360px;
        float: left;
        background-color: var(--white);
    }
}

@media all and (max-width: 740px) {

    /* banner */
    .next,
    .prev {
        width: 17.1px;
        height: 30px;
        top: calc(50% - 15px);
    }

    .img-cur-index {
        width: 80px;
        height: 8px;
        left: calc(50% - 40px);
        bottom: 3px;
    }

    .cur-index {
        width: 8px;
        height: 8px;
    }

    /* flash-sale */
    .flash-sale .contain-prod {
        width: calc(165px - 0.5rem);
    }

    /* top-prod */
    .top-prod {
        height: 270px;
    }

    .top-prod .prod-area {
        height: 225px;
    }

    .top-prod .cont-prod {
        width: 280px;
    }
}

@media all and (max-width: 600px) {

    /* top-prod */
    .top-prod {
        height: 415px;
    }

    .top-prod .prod-area {
        width: 90%;
        height: 370px;
    }

    .top-prod .cont-prod {
        width: 100%;
    }
}