:root {
    --head-height: 75px;
}

small{
    font-size: .6em;
}

header h2 {
    font-size: 1.7em;
    color: #666;
    margin-bottom: 10px;
}

header h3 {
    font-size: 24px;
    color: #666;
    margin-bottom: 20px;
}

header p {
    /* font-size: .9em; */
    color: #333;
    margin-bottom: 20px;
}

button {
    padding: 10px 20px;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
}

header {
    font-family: 'MyCustomFont', sans-serif;
    line-height: 1.6;
}

header {
    position: fixed;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    width: 100%;
    top: 0;
    left: 0;
    background-color: white;
    /* border-bottom: 1px solid #ccc; */
    z-index: 1040;
    height: var(--head-height);
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); /* 添加陰影讓header更突出 */
}

header small{
    letter-spacing: -1.8px;
}

header .logo{
    margin-left: 60px;
}

header .hd_right {
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    font-size: 14px;
    letter-spacing: 0.07em;
}

header .hd_right a{
    text-decoration: none; /* 移除底線 */
    font-size: 16px;
}

.header .hd_right nav ul{
    display: flex;
}

.header .hd_right nav ul li a{
    transition: .3s;
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
    
}

.header .hd_right nav ul li a:hover {
    border-color: #4e5346;
}

header .hd_right .login_btn{
    width: 120px;
    transition: .3s;
    color: #333;
    text-align: center;
    align-content: center;
    border-left: 1px solid #dcddda;
    border-right: 1px solid #dcddda;
    height: 100%;
}

header .hd_right .login_btn:hover{
    background-color: #4e5346;
    color: #fff;
}

header .hd_right .buy_btn{
    width: 90px;
    background-color: #4e5346;
    color: #fff;
    transition: .3s;
    text-align: center;
    align-content: center;
    line-height: 60px;
    height: 100%;
    content: "\f068";
    background-repeat: no-repeat;
    background-size: 1.25rem;
}

header .hd_right .buy_btn:hover {
    /* background-color: #333; */
    opacity: .7;
}

header h1 {
    align-content: center;
}


nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    /* font-weight: bold; */
}

nav ul li a:hover {
    color: #666;
}

.hamburger-login-btn,
.hamburger-buy-btn,
.hamburger-btn {
    display: none;
}

/* 媒體查詢，針對手機裝置 */
@media (max-width: 768px) {
    nav {
        display: none;
    }

    /* 顯示漢堡按鈕 */
    .hamburger-login-btn,
    .hamburger-buy-btn{
        display: block;
        /* margin-bottom: 15px; */
    }

    .hamburger-btn {
        display: block;
        background: none;
        border: none;
        font-size: 30px;
        cursor: pointer;
    }

    .login_btn,
    .buy_btn{
        display: none;
    }

    /* 當菜單可見時，顯示菜單 */
    nav.show-menu {
        display: block;
        position: absolute;
        top: var(--head-height);
        left: 0;
        background-color: #4e5346;
        color: #fff;
        padding-bottom: 100px;
        padding-top: 65px;
        width: 100%;
        z-index: 100;

        /* 允許垂直滾動 */
        overflow-y: auto;
        max-height: calc(100vh - var(--head-height)); /* 限制高度不超過視窗 */
    }

    nav.show-menu ul li{
        padding: 5px 8%;
    }
    nav.show-menu small{
        color: #fff;
    }

    /* 將菜單設置為垂直排列 */
    nav ul {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }

    nav ul li {
        list-style: none;
    }

    nav ul li a {
        text-decoration: none;
        font-size: 18px;
        color: #fff;
    }

    header .logo{
        margin-left: 10px;
    }

    header .logo{
        margin-left: 10px;
    }
}