
#menu-control {
    display: none;
    opacity: 0;
    position: fixed;
    top: 0;
    left: 0;
    z-index: -2;
}

header nav > .search-box input {
    border: 1px solid #999999;
    border-radius: 4px;
    box-sizing: border-box;
    font-family: "Microsoft JhengHei";
    font-size: 16px;
    font-weight: 700;
    outline: none;
    padding: 1px 31px 3px 15px;
    resize: none;
}

header nav > .search-box button {
    border: none;
    border-radius: 16px;
    box-sizing: border-box;
    color: #ffffff;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    outline: none;
    padding: 0px;
}

header nav > .search-box button:hover {
    -webkit-filter: brightness(105%); /* Safari */
    filter: brightness(105%);
}

header nav > .search-box {
    width: 180px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    position: relative;
}

header nav > .search-box > form {
    width: 100%;
    height: 40px;
    pointer-events: auto;
    position: relative;
}

header nav > .search-box .search-input {
    width: 100%;
    height: 40px;
}

header nav > .search-box input::placeholder {
    color: #9b9b9b;
    font-size: 16px;
}

header nav > .search-box button {
    background-color: rgba(0, 0, 0, 0);
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
}

header nav > .search-box > i {
    color: #9b9b9b;
    cursor: pointer;
    font-size: 20px;
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
}

header nav > .search-box button > i {
    color: #9b9b9b;
    cursor: pointer;
    font-size: 20px;   
}

@media screen and (max-width: 767px) {
    #menu-control:checked ~ header > nav > .menu-container {
        right: 0;
    }

    header {
        display: flex;
        width: 100%;
        height: 70px;
        align-items: center;
        justify-content: center;
        background-color: #e84c2e;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 3;
    }

    /* ---------------------------------------------------------------------------------------------------- */

    header > .menu-btn {
        width: 32px;
        height: 20px;
        display: block;
        position: fixed;
        top: 25px;
        right: 20px;
        z-index: 4;
    }
    
    header > .menu-btn > span {
        width: 32px;
        height: 3px;
        background-color: #ffffff;
        display: block;
        position: absolute;
        left: 0;
        transition: 0.4s;
    }

    header > .menu-btn > span:nth-child(1) {
        top: 0px;
    }

    header > .menu-btn > span:nth-child(2) {
        top: 8.5px;
    }

    header > .menu-btn > span:nth-child(3) {
        top: 17px;
    }

    #menu-control:checked ~ header > .menu-btn > span:nth-child(1) {
        width: 30px;
        top: 12px;
        left: 0px;
        transform: translateY(-6px) rotate(45deg);
    }

    #menu-control:checked ~ header > .menu-btn > span:nth-child(2) {
        transform: scaleX(0);
    }

    #menu-control:checked ~ header > .menu-btn > span:nth-child(3) {
        width: 30px;
        top: 0px;
        left: 0px;
        transform: translateY(6px) rotate(-45deg);
    }

    /* ---------------------------------------------------------------------------------------------------- */

    header nav .menu-logo > a {
        width: 120px;
        display: block;
    }

    header nav .menu-logo img {
        max-width: 100%;
    }

    header nav {
        display: flex;
        width: 100%;
        gap: 15px;
        justify-content: flex-start;
        align-items: center;
        padding-left: 20px;
    }

    header nav > .menu-container {
        display: flex;
        justify-content: center;
        align-items: flex-start;
        width: 100%;
        height: calc(100vh - 70px);
        position: fixed;
        top: 70px;
        right: -100%;
        z-index: 10;
        transition: right 0.5s;
        background-color: rgba(232, 76, 46); /* 背景色設置為半透明 */
    }

    header nav > .menu-container > ul {
        display: flex;
        justify-content: flex-start;
        align-items: flex-start;
        list-style: none;
    }

    header > nav > .menu-container > .menu {
        height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding-top: 70px;
    }

    header .menu-container .menu li a {
        gap: 10px;
    }

    header .menu-container .menu li a.down {
        padding-right: 22px;
    }

    header .menu-container .menu li a.down::after {
        content: "\f078";
        width: 16px;
        height: 16px;
        font-family: "Font Awesome 6 Free";
        font-size: 16px;
        font-weight: 900;
        pointer-events: none;
        position: absolute;
        top: 17.5px;
        right: 0px;
    }
    header .menu-container .menu li > .menu-open::after {
        transform: rotate(180deg);
        top: 17.5px !important;
        right: 0px !important;
    }

    header .menu-container .menu li .sub-menu {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        max-height: 0px;
        overflow: hidden;
        padding-left: 16px;
        transition: max-height 0.5s ease;
    }

    header .menu-container .menu li .sub-menu li.line { display: none; }

    header .menu-container .menu li .sub-menu li a {
        box-sizing: border-box;
        color: #ffffff;
        display: block;
        padding: 15px 0px;
    }
    header .menu-container .menu li .sub-menu li a:link { color: #ffffff; }
    header .menu-container .menu li .sub-menu li a:active { color: #ffffff; }

    header .menu-container .menu li a .img-box {
        position: relative;
        z-index: 0;
        width: 6px;
    }

    header > .menu-container > .menu li a .img-box img {
        width: 100%;
    }

    header .line {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        left: 0;
        width: 100%;
        height: 2px;
        background-color: #e84c2e;
    }

    header nav > .menu-container > ul > li > a {
        width: 100%;
        box-sizing: border-box;
        color: #ffffff;
        padding: 15px 0px;
        max-height: 100px;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        position: relative;
    }
    header nav > .menu-container > ul > li > a:link { color: #ffffff; }
    header nav > .menu-container > ul > li > a:active { color: #ffffff; }

    .mobile-submenu > ul {
        display: flex;
        flex-direction: column;
        padding: 0 0 0 20px;
        gap: 20px;
    }

    .mobile-submenu a {
        text-decoration: none;
        color: #ffffff;
        white-space: nowrap;
        width: 100%;
    }

    header nav > .menu-container > ul > .mobile-submenu {
        display: none;
    }

    header nav > .menu-container > ul > .mobile-submenu.active {
        display: flex;
    }

    header nav > .search-box {
        width: 140px;
    }
}

@media screen and (min-width: 768px) {
    header .menu-btn {
        display: none;
    }

    header {
        display: flex;
        width: 100%;
        height: 100px;
        align-items: center;
        justify-content: center;
        background-color: #e84c2e;
    }

    header nav .menu-logo > a {
        display: block;
    }

    header nav .menu-logo > a > img {
        max-width: 200px;
    }

    header nav {
        display: flex;
        max-width: 1280px;
        width: calc(100% - 40px);
        gap: 40px;
        justify-content: space-between;
        align-items: center;
    }

    header nav > .menu-container > ul {
        height: 100px;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        align-content: flex-start;
        flex-wrap: wrap;
    }

    .mobile-submenu {
        display: none;
    }

    .location-container {
        position: relative;
    }

    .pc-submenu {
        color: #ffffff;
        list-style: none;
        position: absolute;
        top: 99px;
        left: 0;
        z-index: 100;
        background-color: #ffffff;
        box-shadow: 0px 0px 09px #000000;
        border-radius: 20px;
        padding: 10px 5px;
        display: none;
    }

    .pc-submenu > li > a {
        text-decoration: none;
        color: #000000;
        white-space: nowrap;
        padding: 10px 20px;
        display: block;
    }

    .pc-submenu > li > a > span {
        color: #8e8e8e;
    }

    .pc-submenu > .line {
        width: 90%;
        height: 2px;
        background-color: #d9d9d9;
    }

    header nav > .menu-container > ul > li > a {
        color: #ffffff;
        padding: 40px 20px;
        max-height: 50px;
        display: flex;
        justify-content: center;
        align-items: center;
        white-space: nowrap;
    }

    header nav > .menu-container > ul > li:hover > .pc-submenu {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    header .menu-container .menu li a .img-box {
        display: none;
    }
}
