﻿/*--------------header-style1-----------------*/
.header-style1{
    position: fixed;
    z-index: 999;
    display: block;
    width: 100%;
    top: 0;
    background-color: #f9f9f9;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.35);
}
.header-style1 .header-box{
    width: 1200px;
    max-width: 100%;
    display: block;
    margin: 0 auto;
    font-size: 0;
    box-sizing: border-box;
    padding: 10px 0;
}
.header-style1 .header-logo{
    width: 270px;
    max-width: 100%;
    display: inline-block;
    position: relative;
    vertical-align: middle;
}
.header-style1 .header-function-box{
    width: calc(100% - 270px);
    display: inline-block;
    vertical-align: middle;
    font-size: 0;
    text-align: right;
}
.header-function-search-box{
    position: relative;
    display: inline-block;
    vertical-align: middle;
    border: 1px solid #d1d1d1;
    border-radius: 5px;
    width: 300px;
    overflow: hidden;
    background-color: #fff;
}
.header-function-search i{
    font-size: 22px;
    line-height: 40px;
    color: #fff;
}
.header-function-search{
    width: 40px;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    position: absolute;
    right: 0;
    top: 0;
    background-color: #1da539;
    text-align: center;
    cursor: pointer;
}
.header-function-search-text{
    width: 100%;
    height: 40px;
    line-height: 40px;
    display: block;
    position: relative;
    border: none;
    box-sizing: border-box;
    padding: 0 10px;
    font-family: "微軟正黑體";
}
.header-function-search-text::-webkit-input-placeholder{
    font-family: "微軟正黑體";
    color: #666;
}
.header-function-search-text:-moz-placeholder{
    font-family: "微軟正黑體";
    color: #666;
}
.header-function-search-text::-moz-placeholder{
    font-family: "微軟正黑體";
    color: #666;
}
.header-function-shopping-box{
    display: inline-block;
    vertical-align: middle;
    margin-left: 20px;
    position: relative;
}
.header-function-shopping{
    position: relative;
    font-size: 26px;
    line-height: 40px;
    color: #000;
    cursor: pointer;
}
.header-function-shopping span{
    position: absolute;
    top: -3px;
    right: -10px;
    border-radius: 50%;
    display: block;
    width: 20px;
    height: 20px;
    line-height: 20px;
    font-size: 12px;
    text-align: center;
    background-color: #1da539;
    color: #fff;
}
.header-menu-buycar-list-block{
    position: absolute;
    right: 0;
    width: 360px;
    display: block;
    background-color: #FFF;
    text-align: left;
    box-shadow: rgba(0,0,0,0.7)0px 0px 5px;
    transition: all .8s ease;
    transform: scale(1,0) translateY(10px);
    transform-origin: top;
}
.header-menu-buycar-list-box {
    width: 100%;
    height: 222px;
    overflow: auto;
    display: block;
    padding: 0 15px;
    box-sizing: border-box;
}
.header-menu-buycar-list-box:before {
    content: 'none';
    width: 15px;
    height: 15px;
    display: block;
    background-color: #FFF;
    position: absolute;
    top: -7px;
    right: 5px;
    box-shadow: rgba(0,0,0,0.7)0px 0px 5px;
    transform: rotate(45deg);
}
.header-menu-buycar-list-box:after {
    content: 'none';
    width: 30px;
    height: 15px;
    display: block;
    background-color: #FFF;
    position: absolute;
    top: 0px;
    right: 0px;
}
.header-menu-buycar-list {
    padding: 15px 0;
    display: block;
    position: relative;
    background-color: #FFF;
    border-bottom: 1px solid #d1d1d1;
}
.header-menu-buycar-img-box {
    width: 80px;
    height: 80px;
    display: inline-block;
    vertical-align: middle;
}
.header-menu-buycar-info-box {
    display: inline-block;
    vertical-align: middle;
    padding: 0 10px;
    box-sizing: border-box;
    width: calc(100% - 130px);
}
.header-menu-buycar-title {
    font-size: 14px;
    color: #000;
    letter-spacing: 1px;
    margin-bottom: 5px;
    display: block;
}
.header-menu-buycar-price-box {
    display: inline-block;
    vertical-align: middle;
    text-align: right;
    width: 50px;
    max-width: 100%;
}
.header-menu-buycar-price {
    font-size: 12px;
    color: #d0011b;
    margin-bottom: 5px;
}
.header-menu-buycar-del-box {
    font-size: 14px;
    color: #555;
    width: 100%;
}
.header-menu-buycar-pay {
    width: 100px;
    max-width: 100%;
    padding: 5px 10px;
    box-sizing: border-box;
    border: 1px solid #d1d1d1;
    position: relative;
    color: #555;
    font-size: 14px;
    margin: 20px auto;
    display: block;
    text-align: center;
    transition: all .5s ease;
}
.buycar-fixed-list-many-box {
    width: 100px;
    max-width: 100%;
    margin: 0 auto;
    display: inline-block;
    font-size: 0;
    line-height: initial;
    vertical-align: top;
}
.buycar-fixed-list-bth {
    display: inline-block;
    vertical-align: top;
    border: 1px solid #ddd;
    font-size: 16px;
    width: 24px;
    height: 24px;
    line-height: 20px;
    text-align: center;
    color: #9f7a5b;
    box-sizing: border-box;
    cursor: pointer;
    padding: 0;
    margin: 0;
}
.buycar-fixed-list-many-box input {
    display: inline-block;
    vertical-align: top;
    font-size: 16px;
    border: 1px solid #ddd;
    width: calc(100% - 50px);
    height: 24px;
    box-sizing: border-box;
    color: #888;
    text-align: center;
    border-right: 0;
    border-left: 0;
}



.rwd-menu{
    width: 30px;
    max-width: 100%;
    position: absolute;
    right: 20px;
    z-index: 99999;
    display: none;
    top: calc(50% - 14px);
}
.rwd-menu span{
    width: 100%;
    display: block;
    margin: 0 auto;
    height: 2px;
    background-color: #ee1b2d;
    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);
  }
}

.header-function-search-rwd,
.header-function-shopping-rwd{
    display: none;
}

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

@media only screen and (max-width: 1200px){
    .header-style1 .header-box{
        width: 95%;
        margin: 0 auto;
    
    }
}

@media only screen and (max-width: 768px){
    .header-style1 .header-logo{
        width: 212px;
        max-width: 60vw;
    }
    .header-style1 .header-function-box{
        width: calc(100% - 212px);
        min-width: calc(100% - 60vw);
        padding-right: 5px;
        box-sizing: border-box;
    }
    .header-function-search-box{
        position: fixed;
        top: 62px;
        width: 100%;
        left: 0;
        border: none;
        border-bottom: 1px solid #d1d1d1;
        border-radius: 0;
        box-sizing: border-box;
        padding: 5px;
        background-color: #fff;
        display: none;
    }
    .header-function-search-text{
        display: block;
        border: 1px solid #d1d1d1;
        box-sizing: border-box;
        border-radius: 5px;
        background-color: #fff;
    }
    .header-function-search{
        right: 5px;
        top: 5px;
        border-top-right-radius: 5px;
        border-bottom-right-radius: 5px;
    }
    .header-function-search-rwd{
        display: inline-block;
        vertical-align: middle;
        font-size: 22px;
    }
    .header-menu-buycar-list-box:before,
    .header-menu-buycar-list-box:after{
        display: none;
    }
    .header-menu-buycar-list-block{
        position: fixed;
        top: 62px;
        width: 100%;
        left: 0;
        border-bottom: 1px solid #d1d1d1;
    }
    .header-function-shopping-box.open .header-menu-buycar-list-block{
        transform: scale(1,1) translateY(0px);
        box-shadow: none;
    }
    .header-function-shopping{
        font-size: 22px;
    }
}
@media only screen and (min-width: 769px){
    .header-function-shopping-box:hover .header-menu-buycar-list-block{
        transform: scale(1,1) translateY(10px);
    }
}