
/* ===============================
   精讚 - 日系風格 Header
   =============================== */

#upheaderbar.jp-topbar {
    position: relative;
    z-index: 1000;
    width: 100%;
    margin: 0;
    padding: 0;
    background: rgba(255, 252, 245, 0.96);
    border-bottom: 1px solid #e5e8db;
    box-shadow: 0 3px 18px rgba(41, 72, 53, .07);
    color: #244b3c;
    font-family: "Noto Sans TC", sans-serif;
}

.jp-topbar-inner {
    max-width: 1500px;
    min-height: 72px;
    margin: 0 auto;
    padding: 10px 22px;
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Logo */
.jp-topbar-brand {
    flex-shrink: 0;
}

.jp-topbar-brand a {
    display: flex;
    align-items: center;
}

.jp-topbar-logo {
    max-height: 48px;
    width: auto;
    object-fit: contain;
}

/* Navigation */
.jp-topbar-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 14px;
}

.jp-topbar-nav a {
    color: #315344;
    text-decoration: none;
    white-space: nowrap;
    transition: color .2s;
}

.jp-topbar-nav a:hover {
    color: #9b7c47;
}

.jp-topbar-user {
    color: #597a66;
    font-weight: 600;
}

.jp-topbar-simulating {
    background: #a76542;
    color: white !important;
    padding: 5px 10px;
    border-radius: 20px;
}

.jp-topbar-nav .jp-topbar-auth {
    background: #194d3a;
    color: #fff;
    border-radius: 24px;
    padding: 9px 16px;
    transition: background .2s;
}

.jp-topbar-nav .jp-topbar-auth:hover {
    color: #fff;
    background: #32745b;
}

/* Search */
.jp-topbar-search {
    margin: 0 0 0 auto;
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.jp-search-input-wrap {
    position: relative;
    min-width: 140px;
}

.jp-search-input {
    width: 220px;
    max-width: 100%;
    height: 37px;
    padding: 7px 32px 7px 15px;
    background: white;
    color: #284b3d;
    border: 1px solid #dfe7df;
    border-radius: 24px;
    outline: none;
    font-size: 13px;
    transition: border-color .2s, box-shadow .2s;
}

.jp-search-input:focus {
    border-color: #83aa91;
    box-shadow: 0 0 0 3px rgba(93,145,109,.12);
}

.jp-search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #a7b3a8;
    font-size: 13px;
}

.jp-search-select {
    height: 37px;
    max-width: 110px;
    padding: 0 8px;
    background: #fff;
    color: #385747;
    border: 1px solid #dfe7df;
    border-radius: 20px;
    font-size: 12px;
}

.jp-search-button {
    height: 37px;
    padding: 0 15px;
    border: none;
    border-radius: 22px;
    background: #194d3a;
    color: white;
    cursor: pointer;
    white-space: nowrap;
    font-size: 13px;
    transition: background .2s;
}

.jp-search-button:hover {
    background: #34755b;
}

/* Language */
.jp-topbar-language {
    flex-shrink: 0;
}

.jp-language-button {
    padding: 8px 12px;
    background: #edf3e9;
    color: #315b46;
    border: 1px solid #dfe8dc;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
}

.jp-topbar-language .dropdown-menu {
    border: 1px solid #e3e8df;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

/* Responsive */
@media (max-width: 1100px) {
    .jp-topbar-inner {
        flex-wrap: wrap;
        gap: 12px;
    }

    .jp-topbar-search {
        order: 3;
        width: 100%;
        margin-left: 0;
    }

    .jp-search-input-wrap {
        flex: 1;
    }

    .jp-search-input {
        width: 100%;
    }

    .jp-topbar-language {
        margin-left: auto;
    }
}

@media (max-width: 600px) {
    .jp-topbar-inner {
        padding: 10px 12px;
    }

    .jp-topbar-logo {
        max-height: 38px;
    }

    .jp-topbar-nav {
        gap: 8px;
        font-size: 12px;
    }

    .jp-topbar-nav .jp-topbar-auth {
        padding: 7px 12px;
    }

    .jp-topbar-search {
        flex-wrap: wrap;
    }

    .jp-search-input-wrap {
        flex-basis: 100%;
    }

    .jp-search-select {
        flex: 1;
        max-width: none;
    }

    .jp-search-button {
        min-width: 90px;
    }
}

