﻿/*--------------header-style1-----------------*/
.header-style1{
    position: fixed;
    z-index: 999;
    display: block;
    width: 100%;
    top: 0;
    background-color: #FFF;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}
.header-style1 .header-box{
    width: 100%;
    display: block;
    margin: 0 auto;
    font-size: 0;
    padding-left: 50px;
    box-sizing: border-box;
}
.header-style1 .header-logo{
    width: 200px;
    max-width: 100%;
    display: inline-block;
    position: relative;
    vertical-align: middle;
}
.header-search-box{
    display: inline-block;
    vertical-align: middle;
    width: calc(100% - 990px);
    max-width: 100%;
    margin: 0 125px;
}
.header-search-text{
    width: calc(100% - 100px);
    display: inline-block;
    vertical-align: middle;
    border: 1px solid #d1d1d1;
    border-right: none;
    height: 42px;
    box-sizing: border-box;
    padding: 0 15px;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    font-size: 16px;
    font-family: 'Noto Sans TC';
    font-weight: 300;
    letter-spacing: 0.1em;
    color: #666;
}
.header-search-text::-webkit-input-placeholder{
    color: #888;
    font-weight: 100;
}
.header-search-text:-moz-placeholder{
    color: #888;
    font-weight: 100;
}
.header-search-text::-moz-placeholder{
    color: #888;
    font-weight: 100;
}
.header-search-btn{
    width: 100px;
    display: inline-block;
    vertical-align: middle;
    line-height: 40px;
    box-sizing: border-box;
    text-align: center;
    background-color: #007efc;
    border: none;
    color: #fff;
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
    font-size: 16px;
    font-family: 'Noto Sans TC';
    font-weight: 300;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all .3s linear;
}
.header-search-btn i{
    margin-left: 5px;
}


.header-style1 .header-menu-box{
    width: 540px;
    display: inline-block;
    vertical-align: middle;
    font-size: 0;
    text-align: right;
}
.header-style1 .header-menu{
    display: inline-block;
    vertical-align: middle;
}
.header-style1 .header-menu> li{
    display: inline-block;
    vertical-align: middle;
    position: relative;
}
.header-link-box{
    display: block;
    position: absolute;
    right: 0;
    top: 0;
}


.header-menu-title{
    width: 90px;
    height: 120px;
    position: relative;
    display:         flex;
    display: -webkit-flex;
    align-items: center;
    -webkit-align-items: center;
    justify-content: center;
    -webkit-justify-content: center;
    flex-direction: column;
    font-size: 16px;
    font-family: 'Noto Sans TC';
    font-weight: 300;
    color: #666;
    transition: all .3s linear;
}
.header-menu-title i{
    line-height: 36px;
}
.header-shopping .header-menu-title{
    background-color: #007efc;
    color: #fff;
}
.header-shopping .header-menu-title i{
    position: relative;
}
.header-shopping .header-menu-title span{
    width: 25px;
    height: 25px;
    line-height: 25px;
    text-align: center;
    box-sizing: border-box;
    border: 1px solid #007efc;
    border-radius: 50%;
    background-color: #fff;
    position: absolute;
    top: -7px;
    right: -18px;
    color: #007efc;
    font-size: 14px;
    letter-spacing: 0.1em;
    padding-left: 0.1em;
}

.header-shopping-box{
    width: 420px;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
    padding: 10px 20px;
    text-align: left;
    display: none;
}
.header-shopping-box::after{
    content: '';
    border-bottom: 7px solid #fff;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    position: absolute;
    top: -7px;
    right: 37px;
    display: block;
}
.header-shopping-name{
    font-size: 16px;
    font-family: "Noto Sans TC";
    font-weight: 300;
    letter-spacing: 0.1em;
    line-height: 30px;
    color: #888;
}
.header-shopping-list-box{
    width: 100%;
    max-height: calc(71px * 4px);
    overflow: auto
}
.header-shopping-list{
    box-sizing: border-box;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}
.header-shopping-list-img{
    width: 50px;
    height: 50px;
    display: inline-block;
    vertical-align: middle;
    overflow: hidden;
}
.header-shopping-list-info{
    display: inline-block;
    vertical-align: middle;
    margin-left: 15px;
    width: 120px;
}
.header-shopping-list-quantity{
    display: inline-block;
    vertical-align: middle;
    margin-left: 10px;
    width: 65px;
}
.header-shopping-list-price{
    display: inline-block;
    vertical-align: middle;
    margin-left: 10px;
    width: 90px;
}
.header-shopping-list-text{
    font-size: 14px;
    font-family: "Noto Sans TC";
    font-weight: 300;
    letter-spacing: 0.1em;
    line-height: 20px;
    color: #888;
    display: inline-block;
    vertical-align: middle;
}
.header-shopping-list-info p{
    font-size: 14px;
    font-family: "Noto Sans TC";
    letter-spacing: 0.1em;
    line-height: 20px;
    color: #000;
}
.header-shopping-list-quantity p,
.header-shopping-list-price p{
    font-size: 14px;
    font-family: "Noto Sans TC";
    font-weight: 300;
    letter-spacing: 0.1em;
    line-height: 20px;
    color: #007efc;
    display: inline-block;
    vertical-align: middle;
}
.header-shopping-btn{
    width: 120px;
    display: block;
    background-color: #007efc;
    text-align: center;
    color: #fff;
    box-sizing: border-box;
    border-radius: 5px;
    font-size: 14px;
    font-family: "Noto Sans TC";
    font-weight: 300;
    letter-spacing: 0.1em;
    line-height: 36px;
    margin: 20px 0;
    margin-left: auto;
    transition: all .3s linear;
}


.rwd-menu{
    width: 30px;
    max-width: 100%;
    position: absolute;
    right: 20px;
    z-index: 99999;
    display: none;
    top: calc(50% - 7px);
}
.rwd-menu span{
    width: 100%;
    display: block;
    margin: 0 auto;
    height: 2px;
    background-color: #007efc;
    position: relative;
}




/*漢堡樣式1*/
.rwd-menu-style1> span:nth-child(even){
    margin: 4px auto;
    transition: all .4s linear;
}
.rwd-menu-style1> span:nth-child(1){
    transform: scale(1);
    transform-origin: left;
    transition: all .4s linear;
}
.rwd-menu-style1> span:nth-child(3){
    transform: scale(1);
    transform-origin: right;
    transition: all .4s linear;
}
.rwd-menu-style1> span:nth-child(4){
    top: -19px;
    transform:  scale(0,1) rotate(-45deg);
}
.rwd-menu-style1> span:nth-child(4){
    display: none;
}
.rwd-menu-style1 .rwd-menu-bth-line{
    transform: rotate(-45deg);
}
.rwd-menu-style1 .rwd-menu-bth-line2{
    transform: rotate(45deg);
}
.rwd-menu-style1 .rwd-menu-bth-line,
.rwd-menu-style1 .rwd-menu-bth-line2{
    position: absolute;
    top: 6px;
    left:0;
    width: 100%;
}
.rwd-menu-style1 .rwd-menu-bth-line span,
.rwd-menu-style1 .rwd-menu-bth-line2 span{
    transform:  scale(0,1);
    transition: all .5s ease;
    position: relative;
}
.rwd-menu-style1.active .rwd-menu-bth-line span,
.rwd-menu-style1.active .rwd-menu-bth-line2 span{
    transform:  scale(1,1) ;
    transition-delay: .1s;
}
.rwd-menu-style1.active> span:nth-child(1),
.rwd-menu-style1.active> span:nth-child(2),
.rwd-menu-style1.active> span:nth-child(3){
    transform: scale(0,1);
}
.rwd-menu-style1.active> span:nth-child(odd){
    transform: scale(0);
    transition: all .4s linear;
    transition-delay: 0s;
}

/*漢堡樣式2*/

.rwd-menu-style2> span:nth-child(4){
    display: none;
}
.rwd-menu-style2> span:nth-child(2){
    display: block;
    margin: 4px auto;
}
.rwd-menu-style2{
    width: 25px;
}
.rwd-menu-style2> span{
    transition: all 0.3s ease-in-out;
}
.rwd-menu-style2 .rwd-menu-bth-line,
.rwd-menu-style2 .rwd-menu-bth-line2{
    display: none;
}
.rwd-menu-style2.active{
    animation: smallbig 0.6s forwards;
}
.rwd-menu-style2.active> span:nth-child(1){
    -webkit-transform: translateY(7px) rotate(45deg);
    -ms-transform: translateY(7px) rotate(45deg);
    -o-transform: translateY(7px) rotate(45deg);
    transform: translateY(7px) rotate(45deg);
}
.rwd-menu-style2.active> span:nth-child(2){
    opacity: 0;
}
.rwd-menu-style2.active> span:nth-child(3){
    -webkit-transform: translateY(-5px) rotate(-45deg);
    -ms-transform: translateY(-5px) rotate(-45deg);
    -o-transform: translateY(-5px) rotate(-45deg);
    transform: translateY(-5px) rotate(-45deg);
}

.rwd-menu-style2.active> span:nth-child(1), 
.rwd-menu-style2.active> span:nth-child(2), 
.rwd-menu-style2.active> span:nth-child(3) {
    -webkit-transition-delay: 0.2s;
    -o-transition-delay: 0.2s;
    transition-delay: 0.2s;
}



@keyframes smallbig{
  0%, 100%{
    -webkit-transform: scale(1);
    -ms-transform: scale(1);
    -o-transform: scale(1);
    transform: scale(1);
  }

  50%{
    -webkit-transform: scale(0);
    -ms-transform: scale(0);
    -o-transform: scale(0);
    transform: scale(0);
  }
}


/*------------------------------------------*/

@media only screen and (max-width: 1440px){
    .header-search-box {
        display: inline-block;
        vertical-align: middle;
        width: calc(100% - 850px);
        max-width: 100%;
        margin: 0 55px;
    }
}
@media only screen and (max-width: 1200px){
    .header-style1 .header-box{
        padding-left: 30px;
    }
    .header-style1 .header-logo {
        width: 160px;
    }
    .header-search-box{
        width: calc(100% - 710px);
        margin: 0px 20px;
    }
    .header-style1 .header-menu-box {
        width: 510px;
    }
    .header-menu-title {
        width: 85px;
        height: 100px;
    }
}

@media only screen and (max-width: 1000px){
    .header-style1 .header-box{
        padding: 10px 20px;
    }
    .header-style1 .header-logo{
        width: 130px;
    }
    .header-search-box{
        width: 300px;
        margin: 0;
        margin-left: calc(100vw - 520px);
    }
    .rwd-menu{
        display: block;
    }
    .header-style1 .rwd-menu{
        display: block;
    }

    .rwd-header-menu-sytle1 .header-menu:nth-child(1){
        width: 80px;
        position: fixed;
        top: 50%;
        right: 0;
        z-index: 3;
        display: flex;
        display: -webkit-flex;
        /* align-items: center; */
        /* -webkit-align-items: start; */
        /* justify-content: center; */
        /* -webkit-justify-content: center; */
        flex-direction: column;
        transform: translateY(-50%);
        transition: all .3s linear;
        /* opacity: 0; */
        pointer-events: none;
    }
    .rwd-header-menu-sytle1 .header-menu:nth-child(1).active{
        opacity: 1;
        pointer-events: all;
    }
    .header-menu:nth-child(1) .header-menu-title{
        border-bottom: 1px solid #d1d1d1;
        width: 100%;
        height: 15vh;
        min-height: 50px;
        max-height: 80px;
        right: -80px;
        transition: all .3s linear;
        background-color: #fff;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.3);
        opacity: 0;
        box-sizing: border-box;
    }
    .header-menu:nth-child(1).active .header-menu-title{
        right: 0;
        opacity: 1;
        font-size: 14px;
    }
    .header-menu:nth-child(1) > li:nth-child(1) .header-menu-title{
        border-top: 1px solid #d1d1d1;
    }
    .header-menu:nth-child(1) > li:nth-child(2) .header-menu-title{
        transition-delay: .1s;
    }
    .header-menu:nth-child(1) > li:nth-child(3) .header-menu-title{
        transition-delay: .2s;
    }
    .header-menu:nth-child(1) > li:nth-child(4) .header-menu-title{
        transition-delay: .3s;
    }
    .rwd-header-menu-sytle1 .header-menu> li{
        display: block;
        margin: 0;
    }
    .rwd-header-menu-sytle1 .header-menu> li:last-child{
        margin-bottom: 0;
    }

    .header-other{
        position: fixed;
        bottom: 0;
        left: 0;
        z-index: 4;
        width: 100%;
        background-color: #fff;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    }
    .rwd-header-menu-sytle1 .header-menu.header-other> li{
        width: 50%;
        display: inline-block;
        vertical-align: middle;
        margin-bottom: 0;
    }
    .header-other .header-menu-title{
        width: 100%;
        height: 40px;
        flex-direction: row;
    }
    .header-other .header-menu-title>i{
        margin-right: 10px;
    }
    .header-shopping .header-menu-title span{
        top: 5px;
        right: -85px;
        line-height: 1;
        display: inline-flex;
        display: -webkit-inline-flex;
        align-items: center;
        -webkit-align-items: center;
        justify-content: center;
        -webkit-justify-content: center;
        flex-direction: column;
        margin-left: 5px;
    }
}

@media only screen and (max-width: 550px){
    .header-style1 .header-box{
        padding: 5px 10px;
    }
    .header-style1 .header-logo{
        width: 90px;
    }
    .header-search-box{
        width: 160px;
        margin-left: calc(100vw - 310px);
    }
    .header-search-text{
        width: calc(100% - 50px);
        height: 28px;
        padding: 0 5px;
        font-size: 12px;
        letter-spacing: 0.03em;
    }
    .header-search-btn{
        font-size: 12px;
        line-height: 28px;
        width: 50px;
        padding: 0 1px;
    }
    .header-search-btn i{
        margin-left: 3px;
    }
    .rwd-menu{
        right: 10px;
    }
}
@media only screen and (max-width: 400px){ 
    .header-style1 .header-logo{
        width: 80px;
    }
    .header-search-box {
        width: 150px;
        margin-left: calc(100vw - 290px);
    }
}
@media only screen and (max-width: 320px){ 
    .header-style1 .header-logo{
        width: 60px;
    }
    .header-search-box {
        margin-left: calc(100vw - 270px);
    }
}
@media only screen and (max-height: 400px){
    @media only screen and (max-width: 768px){
        .rwd-header-menu-sytle1 .header-menu:nth-child(1){
            width: calc(80px * 4);
            flex-direction: row;
            top: 84px;
            transform: translateY(0);
        }
        .header-menu:nth-child(1) .header-menu-title{
            width: 80px;
            box-shadow: none;
            /* box-shadow: 10px 0 10px rgba(0, 0, 0, 0.3); */
            border: none;
            border: 1px solid #d1d1d1;
            border-right: none;
        }
        .header-menu:not(.header-other) .header-menu-title>i{
            line-height: 20px;    
        }
    }
    @media only screen and (max-width: 550px){
        .rwd-header-menu-sytle1 .header-menu:nth-child(1){
            top: 58px;
        }
    }
    @media only screen and (max-width: 320px){
        .rwd-header-menu-sytle1 .header-menu:nth-child(1){
            width: calc(70px * 4);
        }
        .header-menu:nth-child(1) .header-menu-title{
            width: 70px;
            font-size: 12px;
        }
    }
}

@media only screen and (min-width: 1001px){
    .header-search-text:focus{
        background-color: #e6f0fa;
    }
    .header-search-btn:hover{
        background-color: #004488;
    }
    .header-menu> li.active .header-menu-title,
    .header-menu-title:hover{
        color: #007efc;
    }
    .header-menu> li.header-shopping.active .header-menu-title,
    .header-shopping .header-menu-title:hover{
        background-color: #004488;
        color: #fff;
    }
    .header-menu> li.header-shopping.active .header-menu-title span,
    .header-shopping .header-menu-title:hover span{
        border-color: #004488;
        color: #004488;
    }

    .header-shopping-btn:hover{
        background-color: #004488;
        color: #fff;
    }
    .header-shopping:hover .header-shopping-box{
        display: block;
    }
}