/* 全域設定 */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background: #f5f6fa;
    font-family: Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
}

#restaurant-discount,
#food-exhibition,
#partner-activity,
#brand-recommend {
    scroll-margin-top: 130px;
}

/* =========================
   第一條：總導覽列
========================= */

.main-navbar {

    width: 100%;
    height: 52px;

    background: #2c3e50;
    border-bottom: 1px solid #1f2d3a;

    display: flex;
    align-items: center;

    position: sticky;
    top: 0;
    z-index: 10000;
}

/* 中間主選單 */
.nav-menu {
    flex: 1;

    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

/* 右側會員 + 購物車 */
.nav-user {
    position: absolute;
    right: 25px;

    display: flex;
    align-items: center;
    gap: 18px;
}

.main-navbar a {
    text-decoration: none;
    color: white;

    font-size: 16px;
    font-weight: bold;

    transition: 0.2s;
}

.main-navbar a:hover {
    color: #f1c40f;
}

.welcome-text {
    color: #66b3ff;
    font-size: 15px;
    font-weight: bold;
}

.cart-link {
    color: #ffd54f !important;
}
.logout-link {
    color: #ffcc66;
    text-decoration: none;
    font-weight: bold;
    margin-left: 12px;
}

.logout-link:hover {
    color: #ffd98a;
}

/* =========================
   第二條：會員 navbar
========================= */

.navbar {

    position: sticky;

    top: 52px;
    left: 0;

    width: 100%;
    height: 64px;

    background: #0f172a;
    color: white;

    display: flex;
    align-items: center;

    padding: 0 32px;

    z-index: 9999;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}


/* 左、中、右 */

.nav-left,
.nav-center,
.nav-right {

    flex: 1;

    display: flex;
    align-items: center;
}

.nav-left {
    justify-content: flex-start;
}

.nav-center {
    justify-content: center;
}

.nav-right {

    justify-content: flex-end;

    gap: 32px;
}


/* Logo */

.nav-logo {

    color: white;

    font-size: 22px;
    font-weight: bold;

    text-decoration: none;
}

.nav-logo:hover {

    color: #38bdf8;
}


/* navbar 右邊連結 */

.nav-right a {

    color: white;

    text-decoration: none;

    font-weight: bold;
}

.nav-right a:hover {

    color: #38bdf8;
}


/* 問候語 */

.welcome-user {

    color: #facc15;

    font-weight: bold;

    font-size: 18px;

    white-space: nowrap;
}


/* 登出按鈕 */

.logout-form {

    margin: 0;
}

.logout-btn {

    background: #ef4444;

    color: white;

    border: none;

    padding: 8px 14px;

    border-radius: 8px;

    cursor: pointer;

    font-weight: bold;
}

.logout-btn:hover {

    background: #dc2626;
}


/* 管理員下拉 */

.dropdown {

    position: relative;

    display: inline-block;
}

.dropdown-btn {

    background: transparent;

    color: white;

    border: none;

    cursor: pointer;

    font-size: 15px;

    font-weight: bold;

    padding: 8px 12px;
}

.dropdown-btn:hover {

    color: #ffd166;
}

.dropdown-content {

    display: none;

    position: absolute;

    top: 36px;
    right: 0;

    background-color: white;

    min-width: 170px;

    box-shadow: 0 4px 12px rgba(0,0,0,0.15);

    border-radius: 8px;

    z-index: 9999;

    overflow: hidden;
}

.dropdown-content a {

    display: block;

    color: #333;

    padding: 12px 14px;

    text-decoration: none;

    white-space: nowrap;
}

.dropdown-content a:hover {

    background-color: #f1f5f9;

    color: #2563eb;
}

.dropdown:hover .dropdown-content {

    display: block;
}


/* =========================
   頁面內容區
========================= */

.page-container {

    width: 85%;

    margin: 40px auto;
}


/* 頁面標題 */

.page-title {

    text-align: center;

    margin-bottom: 40px;

    font-size: 36px;

    color: #2c3e50;
}


/* 卡片 */

.card-box {

    background: white;

    padding: 30px;

    border-radius: 14px;

    box-shadow: 0 2px 12px rgba(0,0,0,0.08);

    margin-bottom: 30px;

    line-height: 1.8;
}
.business-sub-navbar {
    background: #eef2f5;
    border-bottom: 1px solid #d8dde3;

    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;

    min-height: 48px;
}

.business-sub-navbar a {
    display: inline-block;
    padding: 14px 28px;

    text-decoration: none;
    color: #2c3e50;
    font-weight: 600;
    font-size: 16px;

    transition: all 0.25s ease;
}

.business-sub-navbar a:hover {
    background: #dce4ea;
    color: #0f4c81;
}
.business-sub-navbar,
.sub-navbar {

    background: #eef2f5;
    border-bottom: 1px solid #d8dde3;

    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;

    min-height: 48px;
}

.business-sub-navbar a,
.sub-navbar a {

    display: inline-block;
    padding: 14px 28px;

    text-decoration: none;
    color: #2c3e50;
    font-weight: 600;
    font-size: 16px;

    transition: all 0.25s ease;
}

.business-sub-navbar a:hover,
.sub-navbar a:hover {

    background: #dce4ea;
    color: #0f4c81;
}
