

body{
    /* font-family: 'Noto Serif TC', serif; */
    color: var(--color_gray);
    padding-top: 60px;
}
h1{
    font-size: 6vmin;
    color: white;
}


.main_nav li:first-child a{
    border-bottom: solid 9px var(--color_greengray);
}
.top{
    width: 100%;
}
.top .img{
    width: 100vw;
    height: 350px;
    position: relative;
    background-image: url(pictures/shoppingpage.jpg);
    background-size: 100%;
    background-repeat: no-repeat;
    background-position: bottom;
    background-attachment: fixed;
}
.top .img::before, .top .img::after{
    content: '　';
    display: block;
    width: 0;
    height: 350px;
    position: absolute;
}
.top .img::before{
    background-color: var(--color_greengray);
    animation: backgroundmove 1.5s ease;
    z-index: 2;
}
.top .img::after{
    background-color: var(--color_green);
    animation: backgroundmove2 1.5s ease .3s;
    z-index: 1;
}
@keyframes backgroundmove{
    0%{ width: 100%;}
    100%{width: 0%;}

}@keyframes backgroundmove2{
    0%{ width: 100%;
        opacity: 0;
    }
    100%{width: 0%;
        opacity: 1;
    }
}
.top .txt{
    background-color: var(--color_greengray);
    text-align: center;
    position: relative;
    margin-top: -5%;
    margin-left: 16%;
    box-shadow: 0 0 10px;
    z-index: 3;
    padding: 2vw 5vw;
    width: fit-content;

}
.category{
    display: flex;
    /* justify-content: space-evenly; */
    width: 70%;
    margin: 0 auto;
    padding: 10vh;
}
.category a{
    text-decoration: none;
    font-size: 1rem;
    color: black;
    display: block;
}
.category li{
    height: 35px;
    line-height: 35px;
    text-align: center;
    border-radius: 2px;
    width: 100%;
    z-index: 1;
}
.category>li{
    margin: 0 2%;
    background-color: #F3F0DF;
}
.category>li:first-child{
    background-color: var(--color_yellow);
}
.category ol{
    display: none;
    width: 100%;
    z-index: 1;
}

.category ul li:hover{
    background-color: var(--color_yellow);
}
.category li:hover ol{
    display: block;
}
.category ol li:hover a{
    color: var(--color_yellow);
}
.category ol li{
    border-bottom: solid .5px var(--color_brightyellow);
    
}

main .container{
    text-align: center;
}
main h2{
    font-size: 1.6rem;
    padding: 80px 0 20px 0;
}
main .col-12 a::after{
    content: '　';
    position: relative;
    top: -20%;
    border-bottom-width: 4px;
    border-bottom-style: solid;
    border-color: var(--color_yellow);
}
main .wrap{
    width: 70%;
    position: relative;
    margin: auto;
}
.col{
    padding: 15px;
}
.card{
    backdrop-filter: blur(4px);
    background-color: rgba(243, 243, 243, 0.6);
    border-radius: 10px;
    box-shadow: 0 0 10px #d9d9d9;
    transition: .5s;
    height: 100%;    
}
.card:hover{
    box-shadow: 0 0 10px #ababab;
    background-color: rgba(116, 125, 120, 0.6);
}
.card .item{
    position: relative;
    height: 70%;
    flex-grow: 1;
}
.item img{
    width: 70%;
    height: 100%;
    object-fit: contain;
    opacity: 1;
    transition: .5s;
}
.item img:nth-child(2){
    position: absolute;
    top: 10%;
    left: 0;
    opacity: 0;
    width: 100%;
    
}
.card:hover .item img:nth-child(1){
    opacity: 0;
}
.card:hover .item img:nth-child(2){
    opacity: 1;
}
.card:hover .txt{
    visibility: hidden;
}
.card:hover .buybtn{
    opacity: 1;
    color: white;
}
.card .buybtn:hover{
    background-color: var(--color_yellow);
}
.card .txt{
    visibility: visible;
    height: 30%;
}
.card .txt p{
    line-height: 1.2;
}
.card .txt p:nth-child(1){
    font-size: 1.2rem;
    font-weight: 500;
}
.card .txt p:nth-last-child(1), .card .txt p:nth-last-child(1)::before{
    font-size: 1.6rem;
    color: var(--color_yellow);
    line-height: 1.6;
    font-weight: 900;
}
.card .txt p:nth-last-child(1)::before{
    content: "NT$";
}
.card .buybtn{
    padding: 5%;
    width: 100%;
    transform: translate(0, -100%);
    border: none;
    font-size: 1.2rem;
    background-color: rgb(247, 192, 110);
    color: inherit;
    opacity: 0;
    transition: opacity .5s, color, .2s;
    border-radius: 0 0 10px 10px;
    cursor: pointer;
}
@media  screen and (max-width: 1023px) {
    .main_nav li:first-child {
        background-color:  var(--color_greengray);
        color: white;
    }
    .top .img{
        background-position: top;
    }
    .category{
        padding: 10vh 0;
        width: 85%;
    }
    .category ul li:checked{
        background-color: var(--color_yellow);
    }
    .category li a:checked ol{
        display: block;
    }
    .category ol li:checked a{
        color: var(--color_yellow);
    }
    .card{
        height: 28vh;
    }
    .card:active .item img:nth-child(1){
        opacity: 0;
    }
    .card:active .item img:nth-child(2){
        opacity: 1;
    }
    .card:active .txt{
        visibility: hidden;
    }
    .card:active .buybtn{
        opacity: 1;
        color: white;
    }
    main .wrap {
        width: 80%;
    }
   
}
@media  screen and (max-width: 779px) {
    .top .img{
       height: 200px;
    }
    .top .img::before, .top .img::after{
        height: 200px;
    }
    .top .txt{
        padding: 3vw 5vw;
    }
    main .wrap {
        width: 100%;
    }
    main h2{
        padding: 45px 0 20px 0;
    }
    main .col-12 a h2::before {
    content: '　';
    font-size: 1.2rem;
    border-left-width: 4px;
    border-left-style: solid;
    border-color: var(--color_yellow);
    }
    main .col-12 a::after {
        border-bottom-style: none;
    }
}