/* 校正iphone有瀏海的機型 */
.safe-area-padding-bottom {
    /* 在 iphone x + 中本句才會生效 */
    padding-top: constant(safe-area-inset-top);
    padding-top: env(safe-area-inset-top);
    padding-right: constant(safe-area-inset-right);
    padding-right: env(safe-area-inset-right);
    padding-bottom: 85px; /* 兼容不支持 env( ) 的設備  */
    padding-bottom: calc(constant(safe-area-inset-bottom) + 85px);
    padding-bottom: calc(env(safe-area-inset-bottom) + 85px);
    padding-left: constant(safe-area-inset-left);
    padding-left: env(safe-area-inset-left);
}

@media screen and (min-width: 1213px) {
    .safe-area-padding-bottom {
        padding-top: constant(safe-area-inset-top);
        padding-top: env(safe-area-inset-top);
        padding-right: constant(safe-area-inset-right);
        padding-right: env(safe-area-inset-right);
        padding-bottom: constant(safe-area-inset-bottom);
        padding-bottom: env(safe-area-inset-bottom);
        padding-left: constant(safe-area-inset-left);
        padding-left: env(safe-area-inset-left);
    }
}

/* == nav style ==*/

.sp-is--hide {
    opacity: 0;
    pointer-events: none;
}

.sp-fixed__nav * {
    box-sizing: border-box;
}

/* == 側選單位置設定:right左右位置+寬度 == */

.sp-fixed__nav {
    position: relative;
    /* == overflow: auto; == */
    z-index: 600;
    width: 100%;
    right: 0;
    left: 0;
    margin: auto;
    -webkit-transition: all 0.5s ease;
    -moz-transition: all 0.5s ease;
    -o-transition: all 0.5s ease;
    transition: all 0.5s ease;
}

.sp-fixed__nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sp-fixed__nav ul:after {
    content: '';
    clear: both;
    display: block;
    zoom: 1;
}

/* ==  mobile  == */

@media screen and (max-width: 1212px) {
    /* ==
     ** [左側電梯]分館
      == */
    .elevatorHome {
        position: fixed;
        left: 50%;
        bottom: 0;
        transform: translateX(-50%);
        width: 100%;
        z-index: 103;
        display: none;
        padding-bottom: 75px;
        /* ==  custom  == */
        background-color: #895d25;
    }

    .elevatorHome {
        border-radius: 15px;
    }

    .sp-fixed__nav .sp-nav_ul-1 {
        border-top-right-radius: 15px;
        border-top-left-radius: 15px;
    }

    .sp-fixed__nav .sp-nav_ul-2 {
        border-bottom-left-radius: 15px;
        border-bottom-right-radius: 15px;
    }

    .sp-fixed__nav {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        position: relative;
    }

    .sp-nav_ul {
        display: flex;
        flex-wrap: wrap;
        overflow-x: auto;
        justify-content: initial;
        width: 100%;
        /* ==  custom  == */
        background-color: #895d25;
        color: #51261e;
    }

    .sp-nav_ul-2 {
        background-color: #fff;
    }

    /* ==  側選單子選項設定:文字大小  == */
    .sp-fixed__nav li {
        display: inline-block;
        text-align: center;
        font-size: 14px;
    }

    /* ==  mobile active text color  == */
    .sp-fixed__nav li.active a {
        /* ==  custom  == */
        color: #ffb946;
    }

    .sp-fixed__nav li.active {
        /* ==  custom  == */
        border: 1px solid #ffb946;
    }

    /* ==  側選單子選項設定:底圖+底色+上下距  == */
    .sp-fixed__nav a {
        display: inline-block;
        position: static;
        z-index: 1;
        min-width: 43px;
        padding: 6px 4px;
        text-decoration: none;
        /* ==  custom  == */
        color: #5d5d5d;
    }

    /* ==  誘因列表 + 各館列表  == */
    .sp-fixed__nav ul.sp-nav_ul-1, .sp-fixed__nav ul.sp-nav_ul-2 {
        padding-top: 16px;
    }

    .sp-fixed__nav li.sp-nav_g1, .sp-fixed__nav li.sp-nav_g2 {
        margin-left: 1%;
        margin-right: 1%;
    }

    .sp-fixed__nav li.sp-nav_g1:nth-child(3n+1), .sp-fixed__nav li.sp-nav_g2:nth-child(3n+1) {
        margin-left: 3%;
    }

    .sp-fixed__nav li.sp-nav_g1 {
        width: 30%;
        background-color: #fff;
        border-radius: 25px;
        margin: 0 1% 8px 1%;
        /*border: 1px solid rgba(255, 152, 0, 0.4);*/
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .sp-fixed__nav li.sp-nav_g1 a {
        color: #362200;
    }

    .sp-fixed__nav li.sp-nav_g2 {
        min-width: 30%;
        border-radius: 25px;
        background-color: #f7f7f7;
        margin: 0 1% 8px 1%;
    }

    .sp-fixed__nav li.sp-nav_g2 a {
        padding: 6px 0;
    }

    /* ==  精選品類 標題  == */
    .sp-nav__home_2 {
        width: 100%;
        font-size: 15px;
        text-align: center;
        margin-top: 10px;
        margin-bottom: 10px;
        color: #5d5d5d;
        font-weight: 700;
    }

    /* ==  修正滾軸 + 隱藏desktop按鈕  == */
    .sp-nav_ul::-webkit-scrollbar, .sp-fixed__nav li.sp-nav__app, .sp-fixed__nav li.sp-nav__top {
        display: none;
    }

    /* ==  app error  == */
    .n-sp__box {
        overflow: visible;
    }

    /* ==  app error  == */
    .n-sp__box {
        overflow: visible;
    }
}

@media screen and (min-width: 1213px) {
    /* == == initial style == == */
    /* ==   == */
    /* == 側選單位置設定:right左右位置+寬度 == */
    .sp-fixed__nav {
        position: fixed;
        z-index: 600;
        width: 140px;
        left: 1%;
        margin-left: 0;
        top: 5%;
        -webkit-transition: all 0.5s ease;
        -moz-transition: all 0.5s ease;
        -o-transition: all 0.5s ease;
        transition: all 0.5s ease;
        overflow-x: hidden;
    }

    .sp-fixed__nav ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    /* == 側選單子選項設定:文字大小 == */
    .sp-fixed__nav li {
        display: block;
        text-align: center;
        font-size: 16px;
    }

    .sp-fixed__nav li.sp-nav_g1 a::before {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 70%;
        height: 1px;
        /* ==  custom  == */
        background-color: #fff;
    }

    /* == 側選單子選項設定:底圖+底色+上下距 == */
    .sp-fixed__nav a {
        background: url(nav_bg.png?234235) 0 0 repeat-y;
        display: block;
        padding: 7px 20px;
        position: relative;
        z-index: 1;
        text-decoration: none;
        font-family: Microsoft JhengHei;
        /* ==  custom  == */
        color: #fff;
    }

    /* ==  hover or active : text-color  == */
    .sp-fixed__nav li a.active, .sp-fixed__nav a:hover {
        /* ==  custom  == */
        color: #330707;
    }

    /* ==  側選單子選項設定:滑過去的底色  == */
    .sp-fixed__nav li a.active:after, .sp-fixed__nav a:hover:after {
        position: absolute;
        z-index: -1;
        content: "";
        top: 0;
        height: 57px;
        left: 49%;
        transform: translateX(-50%);
        /* ==  custom  == */
        width: 100px;
        color: #330707;
        background-color: #f2cc65;
    }

    .sp-fixed__nav li.sp-nav_g2 a.active, .sp-fixed__nav .sp-nav_g2 a:hover {
        /* ==  custom  == */
        color: #ffd272;
        background-color: #690000;
    }

    /* ==  側選單子選項設定:滑過去的底色  == */
    .sp-fixed__nav li.sp-nav_g2 a.active:after, .sp-fixed__nav .sp-nav_g2 a:hover:after {
        /* ==  custom  == */
        background-color: transparent;
        /* color: #f8dd25; */
    }

    /* ==  側選單表頭設定:底圖+高  == */
    .sp-nav__home a {
        overflow: hidden;
        background: url(nav_home.png) 0 0 no-repeat;
        height: 161px;
        white-space: nowrap;
        text-indent: 1000%;
    }

    .sp-nav__home a:hover:after, .sp-nav__top a:hover:after, .sp-nav__app a:hover:after {
        background: none;
    }

    /* == 側選單表底設定:底圖+高 == */
    .sp-nav__app a {
        overflow: hidden;
        background: url(nav_app.png?345623) 0 0 no-repeat;
        white-space: nowrap;
        text-indent: 1000%;
        /* ==  custom  == */
        height: 165px;
    }

    .sp-nav__home_2 a {
        overflow: hidden;
        background: url(nav_home_2.png?4623423) 0 0 no-repeat;
        white-space: nowrap;
        text-indent: 1000%;
        margin-top: -1px;
        pointer-events: none;
        /* ==  custom  == */
        height: 38px;
    }

    /* ==  標題去掉hover  == */
    .sp-nav__home_2 a:after {
        display: none;
    }

    /* ==  第二段  == */
    .sp-fixed__nav li.sp-nav_g2 {
        height: 37px;
        background: url(nav_bg_2.png?623425) 0 0 repeat-y;
        padding-left: 10px;
        padding-right: 10px;
        position: relative;
    }

    .sp-fixed__nav li.sp-nav_g2 a {
        color: #330707;
    }

    .sp-fixed__nav li.sp-nav_g2::before {
        height: 1px;
        background-color: #fff;
        bottom: 0;
        content: '';
        position: absolute;
        display: block;
        width: 70%;
        left: 50%;
        transform: translateX(-50%);
    }

    /* == TODO 改成最後一個 == */
    .sp-fixed__nav li.sp-nav_g2:nth-last-child(1):before, .sp-fixed__nav li.sp-nav_g2:nth-last-child(2):before {
        height: 0px;
    }

    .sp-fixed__nav a.nav_bg2 {
        width: 49%;
        float: left;
        padding: 7px 0;
        background: none;
        position: relative;
    }

    .sp-fixed__nav li.sp-nav_g2 a.active:after, .sp-fixed__nav .sp-nav_g2 a:hover:after {
        height: 36px;
        width: 100%;
        /* == background-color: #5d468b; == */
    }

    .sp-fixed__nav li.sp-nav_g2 a:nth-child(odd):before {
        width: 1px;
        height: 100%;
        background-color: #fff;
        bottom: 0;
        content: '';
        position: absolute;
        display: block;
        right: 0;
    }

    .sp-nav__bottom {
        background: url(nav_bg_2_bottom.png?2345236) 0 0 no-repeat;
        height: 24px;
    }
}

/* ==  新電梯desktop 隱藏  == */

@media screen and (min-width: 1213px) {
    .elevator__mobile__btn {
        display: none;
    }
}

.overlay-mask {
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: 99;
}

.footer__box, js--elevator--activity {
    display: none;
}

@media screen and (max-width: 1213px) {
    /*.js--elevator--activity {*/
    /*display: block;*/
    /*}*/
    .footer__box {
        position: fixed;
        display: block;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 91px;
        z-index: 107;
    }

    .footer__box .footer__ul {
        display: flex;
        margin-top: 25px;
        padding-top: 15px;
        height: 66px;
        justify-content: center;
        align-items: center;
        /*align-self: ;*/
        background: center 0 url(footer_bg.png?38372) no-repeat;
        background-size: cover;
        /* background-color: #ff5ccf;
        border-top: 4px solid #000;
        border-top-left-radius: 14.5px;
        border-top-right-radius: 14.5px; */
        box-sizing: border-box;
        position: relative;
    }

    .footer__box li {
        /*position: relative;*/
        /*z-index: 2;*/
        width: calc(100% / 3 - 2%);
        padding: 1%;
        text-align: center;
        color: #fff;
        font-size: 12px;
    }

    .footer__box li img {
        position: relative;
        z-index: 2;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 1px;
        padding: 4px;
        /*padding: 0 5px 5px 5px;*/
        width: auto;
        height: 30px;
    }

    .footer__box li.icon__main img {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        top: -13px;
        width: 65px;
        height: 65px;
    }

    .footer__box li.icon__main p {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        top: 48px;
        color: #fff;
    }

    /*.footer__box li.icon__main a {*/
    /*width: 30%;*/
    /*height: 85px;*/
    /*}*/

}

/* ==  新電梯打開後按鈕變色  == */

.footer__fixed-active {
    position: relative;
    transition: 1s;
}

.footer__fixed-active:after {
    position: absolute;
    display: block;
    content: '';
    top: calc(50% - 27px);
    left: calc(50% - 17px);
    width: 35px;
    height: 35px;
    /* background-color: #895d25; */
    border-radius: 50%;
    padding: 0;
    z-index: 1;
}
@media screen and (max-width: 767px) {
    .footer__box {
        height: 95px;
    }
    .footer__box .footer__ul {
        padding-top: 9px;
        height: 70px;
    }
    .footer__box li.icon__main p {
        top: 48px;
    }
    .footer__box li.icon__main img {
        /* top: -10px; */
        margin-bottom: 4px;
    }
}