/* style.css - V19 Ultimate Hero Integrated */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+TC:wght@400;500;700;900&display=swap');

:root {
    --bg-color: #050505;
    --card-bg: #141414;
    --text-main: #ffffff;
    --text-sub: #888888;
    --accent-color: #00ffaa;
    --logo-red: #d63031;
    --logo-glow: rgba(0, 255, 170, 0.4);

    --bronze: #cd7f32;
    --silver: #e0e0e0;
    --gold: #ffd700;
    --diamond: #b9f2ff;

    --gradient-main: linear-gradient(135deg, #00ffaa 0%, #00c3ff 45%, #7a5cff 100%);
    --gradient-soft: linear-gradient(135deg, rgba(0,255,170,0.22), rgba(0,195,255,0.18), rgba(122,92,255,0.16));
    --hero-glow-1: rgba(0, 255, 170, 0.20);
    --hero-glow-2: rgba(0, 195, 255, 0.16);
    --hero-glow-3: rgba(122, 92, 255, 0.14);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
    overscroll-behavior-x: none;
}

body {
    position: relative;
    font-family: "Noto Serif TC", "PMingLiU", "MingLiU", serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

body.keyboard-open {
    overflow-x: hidden;
}

body,
button,
input,
textarea,
select,
a,
p,
span,
div,
li,
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: inherit;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

img,
video,
iframe {
    display: block;
    max-width: 100%;
    height: auto;
}

button,
input,
textarea,
select {
    font: inherit;
}

/* --- 跑馬燈 --- */
.announcement-bar {
    background: linear-gradient(90deg, rgba(0,255,170,0.10), rgba(0,195,255,0.08), rgba(0,255,170,0.10));
    border-bottom: 1px solid rgba(0,255,170,0.18);
    padding: 7px 0;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    width: 100%;
}

.announcement-track {
    display: inline-block;
    white-space: nowrap;
    animation: ticker-scroll var(--ticker-duration, 30s) linear infinite;
    will-change: transform;
    padding-left: 100%;
}

.announcement-track span {
    display: inline;
    color: #b0ffe8;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

@keyframes ticker-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* --- 導航列分類連結 Active 樣式 --- */
.nav-links a.nav-section-active {
    color: var(--accent-color) !important;
    text-shadow: 0 0 8px rgba(0, 255, 170, 0.4);
}

/* --- 通用容器 --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

.grid-wrapper {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-top: 30px;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.section-title {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: #fff;
    font-weight: 900;
    position: relative;
    letter-spacing: 0.5px;
}

.section-title::after {
    content: "";
    display: block;
    width: 50px;
    height: 3px;
    background: var(--accent-color);
    margin: 12px auto;
}

.section-subtitle {
    text-align: center;
    color: #777;
    font-size: 0.88rem;
    margin-top: -20px;
    margin-bottom: 28px;
    letter-spacing: 0.5px;
}

/* --- Navbar --- */
.site-top-fixed {
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid #222;
    position: sticky;
    top: 0;
    z-index: 1000;
    max-width: 100%;
}

/* 當 navbar 在 .site-top-fixed 內時，不需自己 sticky，但保留高 z-index 讓 dropdown 不被跑馬燈蓋住 */
.site-top-fixed .navbar {
    position: relative;
    z-index: 10;
}

.site-top-fixed .announcement-bar {
    position: relative;
    z-index: 1;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 12px 20px;
    gap: 16px;
    min-width: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    min-width: 0;
    position: relative;
}

.site-logo {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 14px;
    padding: 2px;
    background: var(--gradient-main);
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.04),
        0 0 12px rgba(0,255,170,0.24),
        0 0 22px rgba(0,195,255,0.18),
        0 0 30px rgba(122,92,255,0.12);
    flex-shrink: 0;
    position: relative;
}

.site-logo::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 16px;
    background: var(--gradient-main);
    filter: blur(10px);
    opacity: 0.35;
    z-index: -1;
}

.logo-text {
    font-family: 'Cinzel Decorative', 'Noto Serif TC', serif;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 3px;
    min-width: 0;
    line-height: 1;
    background: var(--gradient-main);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: none;
    animation: logoGradientFlow 5s ease infinite;
}

@keyframes logoGradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.nav-links {
    display: flex;
    gap: 22px;
    list-style: none;
    align-items: center;
    margin-left: 24px;
    min-width: 0;
}

.nav-links a {
    font-weight: 700;
    color: #888;
    position: relative;
    padding: 4px 0;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-color);
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: var(--gradient-main);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 100%;
    min-width: 0;
}

.search-box {
    position: relative;
    background: #1a1a1a;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid #333;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 220px;
    max-width: 100%;
    min-width: 0;
    flex-shrink: 1;
}

.search-box i {
    color: #777;
    flex-shrink: 0;
}

.search-box input {
    background: transparent;
    border: none;
    color: #fff;
    outline: none;
    width: 100%;
    min-width: 0;
    font-size: 0.85rem;
}

.search-box input::placeholder {
    color: #777;
}

/* Search Dropdown */
.search-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 220px;
    max-height: 320px;
    overflow-y: auto;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 6px 0;
    z-index: 999;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.search-dropdown.show {
    display: block;
}
.search-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    color: #ccc;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-dropdown-item:hover,
.search-dropdown-item.active {
    background: rgba(0,255,170,0.08);
    color: #fff;
}
.search-dropdown-item i {
    flex-shrink: 0;
    width: 16px;
    text-align: center;
    font-size: 0.8rem;
    color: #666;
}
.search-dropdown-item.active i {
    color: var(--accent-color);
}
.search-dropdown-divider {
    height: 1px;
    background: #2a2a2a;
    margin: 4px 10px;
}

.btn-line {
    background: #06c755;
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    white-space: nowrap;
    flex-shrink: 0;
    transition: 0.3s;
}

.btn-line:hover {
    background: #05b04c;
    box-shadow: 0 5px 15px rgba(6, 199, 85, 0.3);
}

/* LINE 登入按鈕 */
.btn-line-login {
    background: transparent;
    color: #00ffaa;
    border: 1.5px solid #00ffaa;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: 0.3s;
}

.btn-line-login:hover {
    background: #00ffaa;
    color: #0a0f1a;
    box-shadow: 0 4px 14px rgba(0, 255, 170, 0.35);
}

/* 顧客頭像 + 下拉 */
/* 頭像整體按鈕外框 */
.customer-avatar-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    color: var(--text-main);
    font-size: 0.82rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(0,255,170,0.25);
    border-radius: 50px;
    padding: 4px 10px 4px 4px;
    transition: background 0.2s, border-color 0.2s;
    user-select: none;
    white-space: nowrap;
}
.customer-avatar-wrap:hover {
    background: rgba(0,255,170,0.1);
    border-color: rgba(0,255,170,0.5);
}

/* 頭像圖片 */
.customer-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid var(--accent-color);
    object-fit: cover;
    flex-shrink: 0;
}

/* 頭像旁文字 */
.customer-nav-label {
    font-size: 0.8rem;
    color: #ccc;
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 下拉箭頭 */
.customer-caret {
    font-size: 0.6rem;
    color: #888;
    margin-left: 2px;
    transition: transform 0.2s;
}
.customer-avatar-wrap.open .customer-caret {
    transform: rotate(180deg);
}

/* 下拉選單 */
.customer-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #181818;
    border: 1px solid rgba(0,255,170,0.2);
    border-radius: 14px;
    padding: 6px 0;
    min-width: 170px;
    z-index: 200;
    box-shadow: 0 12px 32px rgba(0,0,0,0.6);
    animation: dropdown-in 0.15s ease;
}

@keyframes dropdown-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.customer-avatar-wrap.open .customer-dropdown {
    display: block;
}

/* 下拉分隔線 */
.customer-dropdown-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 4px 0;
}

.customer-dropdown a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 16px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.87rem;
    transition: background 0.15s;
}

.customer-dropdown a:first-child { border-radius: 12px 12px 0 0; }
.customer-dropdown a:last-child  { border-radius: 0 0 12px 12px; }

.customer-dropdown a:hover {
    background: rgba(0,255,170,0.08);
    color: var(--accent-color);
}
.customer-dropdown a.logout-link:hover {
    background: rgba(255,80,80,0.08);
    color: #ff6b6b;
}

/* ---- 顧客資料面板 ---- */
.customer-panel-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.customer-panel-content {
    background: #131313;
    border: 1px solid rgba(0,255,170,0.15);
    border-radius: 20px;
    padding: 24px 24px 28px;
    width: 100%;
    max-width: 540px;
    max-height: 88vh;
    overflow-y: auto;
    position: relative;
    animation: panel-in 0.22s ease;
}

@keyframes panel-in {
    from { opacity: 0; transform: translateY(18px) scale(0.98); }
    to   { opacity: 1; transform: none; }
}

/* 關閉按鈕 */
.cp-close-btn {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    color: #888;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}
.cp-close-btn:hover { color: #fff; background: rgba(255,255,255,0.08); }

/* 分頁 Tab */
.cp-tabs {
    display: flex;
    gap: 6px;
    margin: 16px 0 20px;
    background: rgba(255,255,255,0.04);
    border-radius: 12px;
    padding: 4px;
}

.cp-tab {
    flex: 1;
    border: none;
    background: none;
    color: #888;
    font-size: 0.88rem;
    padding: 9px 10px;
    border-radius: 9px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.cp-tab.active {
    background: rgba(0,255,170,0.12);
    color: var(--accent-color);
    font-weight: 700;
}

/* 欄位群組 */
.cp-field-group {
    margin-bottom: 18px;
}
.cp-label {
    display: block;
    font-size: 0.82rem;
    color: var(--accent-color);
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}
.cp-hint {
    font-size: 0.76rem;
    color: #666;
    margin-top: 4px;
    margin-bottom: 0;
}

/* 輸入框 */
.cp-input {
    display: block;
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #e0e8f0;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.cp-input:focus {
    border-color: rgba(0,255,170,0.4);
    box-shadow: 0 0 0 3px rgba(0,255,170,0.06);
}
.cp-input::placeholder { color: #3a4a58; }

/* 儲存按鈕 */
.cp-save-btn {
    width: 100%;
    margin-top: 8px;
    padding: 12px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #00ffaa, #00c3ff);
    color: #06060f;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
}
.cp-save-btn:hover { opacity: 0.9; transform: translateY(-1px); }

.customer-panel-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.customer-panel-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid var(--accent-color);
    object-fit: cover;
}

.customer-panel-info h3 {
    font-size: 1.1rem;
    color: var(--text-main);
}

.customer-panel-info p {
    font-size: 0.8rem;
    color: var(--text-sub);
}

.customer-level-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 4px;
}

.customer-level-badge.bronze { background: rgba(205,127,50,0.2); color: var(--bronze); border: 1px solid var(--bronze); }
.customer-level-badge.silver { background: rgba(224,224,224,0.1); color: var(--silver); border: 1px solid var(--silver); }
.customer-level-badge.gold   { background: rgba(255,215,0,0.15);  color: var(--gold);   border: 1px solid var(--gold); }
.customer-level-badge.diamond{ background: rgba(185,242,255,0.12);color: var(--diamond);border: 1px solid var(--diamond); }
.customer-level-badge.club   { background: rgba(167,139,250,0.15);color: #a78bfa;       border: 1px solid #a78bfa; }
.customer-level-badge.club-addon { border: 1px solid #a78bfa; box-shadow: 0 0 6px rgba(167,139,250,0.3); }

.customer-orders-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.customer-order-row {
    background: #1d1d1d;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.customer-order-row .order-info span {
    display: block;
    font-size: 0.82rem;
    color: var(--text-sub);
}

.customer-order-row .order-info strong {
    font-size: 0.95rem;
    color: var(--text-main);
}

.customer-order-status {
    font-size: 0.78rem;
    padding: 3px 10px;
    border-radius: 999px;
    white-space: nowrap;
    font-weight: 600;
}

.status-done    { background: rgba(0,255,170,0.12); color: #00ffaa; border: 1px solid #00ffaa44; }
.status-pending { background: rgba(255,200,0,0.12); color: #ffc800; border: 1px solid #ffc80044; }
.status-other   { background: rgba(150,150,150,0.1); color: #aaa;   border: 1px solid #aaa4; }

/* =============================
   LINE 加入好友彈窗
============================= */
.af-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: af-fade-in 0.25s ease;
}

.af-backdrop.af-closing {
    animation: af-fade-out 0.28s ease forwards;
}

@keyframes af-fade-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes af-fade-out { from { opacity: 1; } to { opacity: 0; } }

.af-card {
    position: relative;
    background: linear-gradient(160deg, #0c1a14 0%, #081510 100%);
    border: 1px solid rgba(6, 199, 85, 0.3);
    border-radius: 24px;
    padding: 40px 32px 32px;
    width: 100%;
    max-width: 360px;
    text-align: center;
    overflow: hidden;
    box-shadow: 0 0 60px rgba(6, 199, 85, 0.15), 0 24px 60px rgba(0,0,0,0.6);
    animation: af-card-in 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes af-card-in {
    from { opacity: 0; transform: translateY(24px) scale(0.95); }
    to   { opacity: 1; transform: none; }
}

/* 背景光圈 */
.af-glow {
    position: absolute;
    inset: -60px;
    background: radial-gradient(circle at 50% 30%, rgba(6,199,85,0.18), transparent 65%);
    pointer-events: none;
}

/* LINE 大 logo */
.af-line-logo {
    font-size: 2.8rem;
    color: #06C755;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 16px rgba(6,199,85,0.5));
}

/* 會員頭像 */
.af-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid #06C755;
    object-fit: cover;
    display: block;
    margin: 0 auto 16px;
    box-shadow: 0 0 0 6px rgba(6,199,85,0.12);
}

/* 標題 */
.af-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
}

/* 說明文字 */
.af-desc {
    font-size: 0.88rem;
    color: #8a9ea8;
    line-height: 1.6;
    margin-bottom: 24px;
}

/* 加好友按鈕 */
.af-btn-add {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 0;
    background: #06C755;
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    border-radius: 999px;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.15s;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.af-btn-add:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    color: #fff;
}

.af-btn-add i { font-size: 1.15rem; }

/* 略過按鈕 */
.af-btn-skip {
    background: none;
    border: none;
    color: #556070;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 6px;
    transition: color 0.2s;
}
.af-btn-skip:hover { color: #aaa; }

.af-btn-dismiss {
    background: none;
    border: none;
    color: #3a4050;
    font-size: 0.75rem;
    cursor: pointer;
    padding: 2px 12px;
    border-radius: 6px;
    transition: color 0.2s;
    margin-top: 2px;
}
.af-btn-dismiss:hover { color: #888; }

/* 手機版縮小 */
@media (max-width: 480px) {
    .af-card {
        padding: 32px 20px 24px;
        border-radius: 20px;
    }
    .af-title { font-size: 1.1rem; }
}

/* ============================= */

.hamburger {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid #2f2f2f;
    border-radius: 12px;
    background: #111;
    color: var(--accent-color);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: 0.3s;
    flex-shrink: 0;
}

.hamburger:hover,
.hamburger.active {
    border-color: var(--accent-color);
    background: rgba(0, 255, 170, 0.08);
}

.hamburger.active i::before {
    content: "\f00d";
}

/* --- Hero 超帥版 --- */
.hero {
    position: relative;
    text-align: center;
    padding: 110px 20px 95px;
    max-width: 100%;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(circle at 20% 20%, var(--hero-glow-1) 0%, transparent 28%),
        radial-gradient(circle at 80% 25%, var(--hero-glow-2) 0%, transparent 24%),
        radial-gradient(circle at 70% 78%, var(--hero-glow-3) 0%, transparent 26%),
        linear-gradient(180deg, #0b0b0b 0%, #050505 52%, #020202 100%);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: linear-gradient(to bottom, rgba(255,255,255,0.65), rgba(255,255,255,0.05));
    opacity: 0.25;
    z-index: -2;
}

.hero::after {
    content: "";
    position: absolute;
    width: 720px;
    height: 720px;
    left: 50%;
    top: 44%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(0,255,170,0.12) 0%, rgba(0,195,255,0.09) 35%, rgba(122,92,255,0.06) 55%, transparent 72%);
    filter: blur(8px);
    animation: heroPulse 6s ease-in-out infinite;
    z-index: -1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 980px;
    margin: 0 auto;
}

.hero-content::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -26px;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    border-radius: 999px;
    background: var(--gradient-main);
    box-shadow:
        0 0 12px rgba(0,255,170,0.55),
        0 0 24px rgba(0,195,255,0.25);
}

.hero-title {
    font-size: clamp(2.7rem, 6vw, 5rem);
    font-weight: 900;
    letter-spacing: 8px;
    margin-bottom: 16px;
    line-height: 1.05;
    background: linear-gradient(135deg, #ffffff 0%, #d8fff6 25%, #8fffe0 50%, #a9d9ff 75%, #ffffff 100%);
    background-size: 220% 220%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: none;
    animation: heroTitleShine 7s ease infinite, heroFadeUp 1s ease both;
}

.hero-subtitle {
    display: inline-block;
    position: relative;
    padding: 10px 20px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 999px;
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(10px);
    color: #d9d9d9;
    font-size: 0.95rem;
    letter-spacing: 6px;
    text-transform: uppercase;
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.03),
        0 0 18px rgba(0,255,170,0.10);
    animation: heroFadeUp 1.15s ease both;
}

.hero-subtitle::before,
.hero-subtitle::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 54px;
    height: 2px;
    transform: translateY(-50%);
    background: var(--gradient-main);
    opacity: 0.85;
}

.hero-subtitle::before {
    left: -68px;
}

.hero-subtitle::after {
    right: -68px;
}

.hero-tagline {
    margin-top: 16px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 1px;
    font-weight: 400;
}

@keyframes heroPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.88;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.08);
        opacity: 1;
    }
}

@keyframes heroTitleShine {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes heroFadeUp {
    from {
        opacity: 0;
        transform: translateY(22px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- 篩選 --- */
.filter-section {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
}

.filter-buttons {
    display: block;
    width: 100%;
    max-width: 100%;
}
/* 篩選按鈕單行容器：允許換行量測後由 JS 收納 */
.filter-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}
.filter-hidden-wrap {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 10px;
}
.filter-more-btn {
    border-style: dashed !important;
    color: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    min-width: 54px;
}

.filter-btn {
    background: #1a1a1a;
    color: var(--text-sub);
    border: 1px solid #333;
    padding: 8px 22px;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.filter-btn:hover {
    color: #fff;
    border-color: var(--accent-color);
}

.filter-btn.active {
    background: var(--accent-color);
    color: #000;
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(0, 255, 170, 0.4);
}

/* --- 商品卡片 --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, 280px);
    gap: 30px;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.product-card {
    width: 100%;
    min-width: 0;
    background: linear-gradient(145deg, #181818, #0d0d0d);
    border: 1px solid #282828;
    border-radius: 24px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    min-height: 520px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.product-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 12px 24px rgba(0, 255, 170, 0.12);
}

.product-img-container {
    height: 150px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border: 1px solid #222;
    overflow: hidden;
    position: relative;
}

.countdown-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 152, 0, 0.9);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.03em;
    animation: countdown-pulse 2s ease-in-out infinite;
}
.countdown-badge.last-day {
    background: rgba(244, 67, 54, 0.9);
}
@keyframes countdown-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.product-img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    transition: transform 0.35s ease;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
}

.product-card:hover .product-img {
    transform: scale(1.05);
}

.product-category-name {
    font-size: 1.5rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 15px;
    text-align: center;
}

.product-items-list {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 14px;
    border: 1px solid #222;
    padding: 6px;
    flex-grow: 1;
}

.product-item-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    padding: 10px 12px;
    border-bottom: 1px solid #1a1a1a;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}
.product-item-row .item-name-text { flex: 1; min-width: 0; }
.product-item-row .item-price-group { text-align: right; }
.product-item-row .item-btn-group {
    width: 100%; display: flex; justify-content: flex-end; gap: 6px; margin-top: 2px;
}

.product-item-row:last-child {
    border-bottom: none;
}

.product-item-row:hover {
    background: rgba(0, 255, 170, 0.15);
}

.item-name-text {
    font-weight: 900;
    color: #eee;
    font-size: 0.95rem;
    flex: 1;
    min-width: 0;
}

.item-price-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
}

.item-old-price {
    font-size: 0.72rem;
    color: #666;
    text-decoration: line-through;
    line-height: 1.1;
}

.item-price-text {
    color: var(--accent-color);
    font-weight: 900;
    font-size: 1.1rem;
    line-height: 1.2;
}

.more-hint {
    margin-top: 8px;
    background: rgba(0, 255, 170, 0.08);
    color: var(--accent-color);
    font-size: 0.82rem;
    padding: 8px;
    text-align: center;
    cursor: pointer;
    border-radius: 10px;
    border: 1px dashed #333;
    transition: 0.3s;
}

.more-hint:hover {
    background: rgba(0, 255, 170, 0.14);
}

.product-card-footer {
    margin-top: auto;
    padding-top: 15px;
}

.btn-quick-buy {
    width: 100%;
    background: transparent;
    border: 1px solid #333;
    color: #888;
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    transition: 0.3s;
}

.btn-quick-buy:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.btn-copy-price {
    width: 100%;
    background: transparent;
    border: 1px solid #333;
    color: #666;
    padding: 8px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.78rem;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 6px;
}
.btn-copy-price:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
}
.btn-copy-price i {
    font-size: 0.75rem;
}

/* ===========================
   遊戲圖示網格（精簡瀏覽模式）
   改用 flexbox 以便不足一行時置中顯示
=========================== */
#product-list.is-icon-grid {
    display: flex !important;
    flex-wrap: wrap;
    gap: 16px !important;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 12px;
    justify-content: center;
    /* 欄寬：(max-width - padding*2 - gap*3) / 4 = (1100-24-48)/4 = 257px */
}

.game-icon-card {
    /* flex 寬度依螢幕尺寸調整：(100% - gap*(N-1)) / N */
    flex: 0 0 calc((100% - 48px) / 4);   /* 桌面 4 欄 */
    max-width: 257px;
}

.game-icon-card {
    background: linear-gradient(145deg, #181818, #0d0d0d);
    border: 1px solid #262626;
    border-radius: 16px;
    padding: 14px 10px 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.game-icon-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-color);
    box-shadow: 0 8px 22px rgba(0, 255, 170, 0.18);
}

.game-icon-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 14px;
    border: 1px solid #222;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 10px;
}

.game-icon-img {
    width: 88%;
    height: 88%;
    object-fit: contain;
    transition: transform 0.3s;
}

.game-icon-card:hover .game-icon-img {
    transform: scale(1.06);
}

.game-icon-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(255, 152, 0, 0.92);
    color: #fff;
    font-size: 0.66rem;
    font-weight: 800;
    padding: 3px 7px;
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
.game-icon-badge.last-day {
    background: rgba(244, 67, 54, 0.92);
}
.game-icon-badge.hot {
    background: rgba(233, 30, 99, 0.92);
}

.game-icon-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: #eee;
    line-height: 1.3;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 2.4em;
}

/* 平板：3 欄 */
@media (max-width: 992px) {
    #product-list.is-icon-grid {
        gap: 14px !important;
    }
    .game-icon-card {
        flex: 0 0 calc((100% - 28px) / 3);  /* 3 欄 */
        max-width: none;
    }
}

/* 手機：3 欄小圖示 */
@media (max-width: 576px) {
    #product-list.is-icon-grid {
        gap: 10px !important;
        padding: 0 10px;
    }
    .game-icon-card {
        flex: 0 0 calc((100% - 20px) / 3);  /* 3 欄 */
        padding: 10px 6px 8px;
        border-radius: 12px;
    }
    .game-icon-img-wrap {
        border-radius: 10px;
        margin-bottom: 6px;
    }
    .game-icon-name {
        font-size: 0.78rem;
        min-height: 2.1em;
    }
    .game-icon-badge {
        font-size: 0.58rem;
        padding: 2px 5px;
        top: 4px;
        right: 4px;
    }
}

/* 超小手機：2 欄 */
@media (max-width: 380px) {
    .game-icon-card {
        flex: 0 0 calc((100% - 10px) / 2) !important;  /* 2 欄 */
    }
}

/* 遊戲卡片收納按鈕 */
.btn-product-collapse {
    display: block;
    margin: 18px auto 0;
    background: transparent;
    border: 1.5px solid #333;
    color: var(--text-sub);
    padding: 10px 28px;
    border-radius: 999px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.25s;
}
.btn-product-collapse:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}
.btn-product-collapse i {
    margin-right: 6px;
}

/* 遊戲搜尋按鈕（section 標題旁） */
.game-section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}
.btn-game-search {
    background: transparent;
    border: 1px solid #333;
    color: #888;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: 0.25s;
    flex-shrink: 0;
}
.btn-game-search:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* --- 搜尋狀態 --- */
#product-list {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

#product-list.is-searching,
.product-grid#product-list.is-searching {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    justify-content: center;
    align-content: start;
}

.empty-state {
    color: #888;
    width: 100%;
    text-align: center;
    padding: 40px 20px;
    grid-column: 1 / -1;
}

/* --- Membership --- */
.membership-section {
    margin-top: 50px;
}

.membership-desc {
    max-width: 760px;
    margin: 0 auto 30px;
    text-align: center;
    color: #aaa;
    font-size: 1rem;
    line-height: 1.9;
}

.vip-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    gap: 24px;
    margin: 0 auto;
    align-items: stretch;
    max-width: 100%;
    min-width: 0;
}

.vip-card {
    background: var(--card-bg);
    border: 1px solid #333;
    border-radius: 22px;
    padding: 28px 22px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 320px;
    position: relative;
    overflow: hidden;
    max-width: 100%;
    min-width: 0;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.vip-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.vip-card h3,
.vip-title {
    font-size: 1.35rem;
    font-weight: 900;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.vip-card .vip-threshold,
.vip-threshold {
    font-size: 0.95rem;
    color: var(--accent-color);
    font-weight: 800;
    margin-bottom: 16px;
}

.vip-card .vip-benefits {
    list-style: none;
    width: 100%;
    text-align: left;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vip-card .vip-benefits li {
    color: #d7d7d7;
    font-size: 0.95rem;
    line-height: 1.7;
    padding-left: 18px;
    position: relative;
}

.vip-card .vip-benefits li::before {
    content: "•";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent-color);
    font-weight: 900;
}

.tier-bronze { border-top: 5px solid var(--bronze); }
.tier-silver { border-top: 5px solid var(--silver); }
.tier-gold { border-top: 5px solid var(--gold); }
.tier-diamond {
    border-top: 5px solid var(--diamond);
    background: linear-gradient(180deg, #1a2a33 0%, #141414 100%);
}
.tier-club {
    border-top: 5px solid #a78bfa;
    background: linear-gradient(180deg, #1e1530 0%, #141414 100%);
}
.tier-club .vip-icon { color: #a78bfa; border-color: #a78bfa44; }

.vip-icon {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    font-size: 1.6rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid #2a2a2a;
    color: var(--accent-color);
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.02);
}

.vip-note {
    max-width: 900px;
    margin: 30px auto 0;
    padding: 18px 20px;
    border: 1px solid #222;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.02);
    color: #999;
    font-size: 0.92rem;
    line-height: 1.8;
    text-align: center;
}

.vip-note p + p {
    margin-top: 6px;
}

/* --- how to buy --- */
.steps-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 40px 0;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.step-card {
    background: linear-gradient(145deg, #141414, #0d0d0d);
    border: 1px solid #262626;
    border-radius: 24px;
    padding: 30px 22px;
    width: 250px;
    max-width: 100%;
    min-width: 0;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.step-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 16px 28px rgba(0, 255, 170, 0.1);
}

.step-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--accent-color);
    background: rgba(0, 255, 170, 0.06);
    border: 1px solid #2a2a2a;
}

.step-number {
    font-size: 0.9rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--accent-color);
    margin-bottom: 8px;
}

.step-title {
    font-size: 1.3rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 10px;
}

.step-desc {
    font-size: 0.95rem;
    color: #aaa;
    line-height: 1.8;
}

.step-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    font-size: 1.3rem;
    opacity: 0.7;
}

/* --- QA --- */
.qa-container {
    margin: 0 auto;
    max-width: 800px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.qa-item {
    background: #111;
    border: 1px solid #222;
    border-radius: 12px;
    margin-bottom: 10px;
    width: 100%;
    overflow: hidden;
    transition: 0.3s;
}

.qa-item.active {
    border-color: var(--accent-color);
}

.qa-question {
    width: 100%;
    background: none;
    border: none;
    padding: 20px 25px;
    color: #fff;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.qa-answer {
    max-height: 0;
    padding: 0 25px;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    color: #888;
    background: #0c0c0c;
}

.qa-item.active .qa-answer {
    padding: 15px 25px 25px;
    border-top: 1px solid #222;
}

/* --- Footer --- */
footer {
    background: #080808;
    border-top: 3px solid var(--accent-color);
    padding: 80px 0 0;
    margin-top: 100px;
    max-width: 100%;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 0;
}

.footer-sections-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    width: 100%;
    gap: 40px;
    padding: 0 20px 60px;
    min-width: 0;
}

.footer-section {
    max-width: 100%;
    min-width: 0;
}

.footer-section h3 {
    color: #fff;
    margin-bottom: 25px;
    font-weight: 900;
    position: relative;
    display: inline-block;
}

.footer-section h3::after {
    content: "";
    display: block;
    width: 30px;
    height: 3px;
    background: var(--accent-color);
    margin: 8px auto 0;
}

.footer-section p {
    color: #888;
    font-size: 0.95rem;
    margin-bottom: 10px;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.footer-section a,
.legal-links a {
    word-break: break-word;
    overflow-wrap: anywhere;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    max-width: 100%;
    min-width: 0;
}

.fb-btn,
.store-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 30px;
    border-radius: 999px;
    font-weight: 700;
    width: 220px;
    max-width: 100%;
    color: #fff;
    transition: all 0.3s ease;
}

.fb-btn {
    background: #1877f2;
}

.fb-btn:hover {
    background: #145dbf;
    box-shadow: 0 8px 20px rgba(24, 119, 242, 0.4);
}

.store-btn {
    background: #ff6600;
}

.store-btn:hover {
    background: #e65c00;
    box-shadow: 0 8px 20px rgba(255, 102, 0, 0.4);
}

.line-id-box {
    display: inline-block;
    border: 1px solid #00c300;
    padding: 8px 20px;
    border-radius: 999px;
    background: rgba(0, 195, 0, 0.05);
    color: #00c300 !important;
    font-weight: 900;
    transition: 0.3s;
}

.line-id-box:hover {
    background: #00c300;
    color: #000 !important;
    box-shadow: 0 0 20px rgba(0, 195, 0, 0.5);
}

.mail-link {
    color: var(--accent-color);
    font-weight: 700;
    word-break: break-all;
}

.mail-link:hover {
    text-decoration: underline;
}

.legal-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
}

.legal-links a {
    color: #555;
    font-size: 0.85rem;
    position: relative;
    padding-bottom: 4px;
}

.legal-links a:hover {
    color: var(--accent-color);
}

.legal-links a::after {
    content: "";
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 0;
    background: var(--accent-color);
    transition: width 0.3s;
}

.legal-links a:hover::after {
    width: 100%;
}

.footer-bottom {
    background: #000;
    width: 100%;
    padding: 25px;
    color: #444;
    font-size: 0.75rem;
    border-top: 1px solid #111;
    text-align: center;
}

/* --- Modal --- */
.custom-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.modal-content {
    background: #1a1a1a;
    border: 1px solid var(--accent-color);
    border-radius: 24px;
    padding: 30px;
    width: 100%;
    max-width: 450px;
    text-align: center;
    box-shadow: 0 0 50px rgba(0, 255, 170, 0.2);
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    min-width: 0;
}

.close-modal {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 1.5rem;
    color: #888;
    cursor: pointer;
    transition: 0.3s;
}

.close-modal:hover {
    color: var(--accent-color);
}

.item-selector {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.select-item-btn {
    background: #252525;
    border: 1px solid #333;
    padding: 15px;
    border-radius: 12px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    transition: 0.3s;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.select-item-btn:hover {
    border-color: var(--accent-color);
    background: rgba(0, 255, 170, 0.1);
}

.modal-price-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
}

.modal-old-price {
    text-decoration: line-through;
    font-size: 0.75rem;
    color: #666;
}

.game-menu-modal {
    width: min(92vw, 520px);
    max-width: 92vw;
    overflow-x: hidden;
}

.game-menu-modal h3 {
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.5;
    margin-bottom: 20px;
    padding-right: 32px;
    word-break: break-word;
    text-align: center;
}

.game-menu-modal .item-selector {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.game-menu-modal .select-item-btn {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 14px;
    border-radius: 12px;
    overflow: hidden;
}

.game-menu-modal .item-name {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
    font-size: 1.02rem;
    font-weight: 600;
    line-height: 1.45;
    color: #f2f2f2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-menu-modal .modal-price-group {
    flex: 0 0 auto;
    min-width: 86px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.game-menu-modal .modal-old-price {
    font-size: 0.82rem;
    color: #666;
    text-decoration: line-through;
    line-height: 1.1;
    white-space: nowrap;
}

.game-menu-modal .item-price {
    color: var(--accent-color);
    font-weight: 900;
    font-size: 1.08rem;
    line-height: 1.2;
    white-space: nowrap;
}

.modal-type-section {
    margin-bottom: 1.4rem;
}

.modal-type-label {
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.42rem 0.85rem;
    border-radius: 8px;
    margin-bottom: 0.7rem;
    display: inline-block;
    border-left: 3px solid currentColor;
}


/* --- 平板 --- */
@media (max-width: 992px) {
    .nav-container {
        gap: 10px;
    }

    .nav-links {
        position: fixed;
        top: 73px;
        right: -100%;
        width: min(280px, 78vw);
        max-width: 78vw;
        height: calc(100vh - 73px);
        background: rgba(15, 15, 15, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        gap: 0;
        padding: 24px 18px;
        margin-left: 0;
        transition: 0.35s ease;
        border-left: 1px solid #333;
        z-index: 999;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .nav-links.active {
        right: 0;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .nav-links li {
        width: 100%;
        list-style: none;
        border-bottom: 1px solid #222;
    }

    .nav-links a {
        display: block;
        width: 100%;
        text-align: left;
        padding: 16px 8px;
        font-size: 1rem;
    }

    .nav-links a::after {
        display: none;
    }

    .search-box {
        width: 180px;
    }

    .hamburger {
        display: inline-flex;
    }
}

/* --- 桌機搜尋結果置中 --- */
@media (min-width: 769px) {
    #product-list.is-searching,
    .product-grid#product-list.is-searching {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(240px, 280px));
        gap: 24px;
        justify-content: center;
    }

    #product-list.is-searching .search-card {
        min-height: 360px;
    }
}

/* --- 手機 --- */
@media (max-width: 768px) {
    body,
    button,
    input,
    textarea,
    select,
    a,
    p,
    span,
    div,
    li,
    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        /* Noto Serif TC 已透過 Google Fonts 載入，iOS/Android 皆適用 */
        font-family: "Noto Serif TC", "STKaiti", "KaiTi", "PMingLiU", serif !important;
    }

    .container {
        padding: 24px 10px 50px;
    }

    .grid-wrapper {
        margin-top: 18px;
    }

    /* ── 手機 Navbar（flex 佈局，不再用 display:contents）── */
    .nav-container {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        padding: 10px 12px;
        gap: 8px;
    }

    .logo {
        flex-shrink: 0;
        gap: 8px;
    }

    .logo-text {
        font-size: 1rem;
        letter-spacing: 0.8px;
    }

    .site-logo {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }

    /* nav-actions 在手機維持 flex，讓子元素自然排列 */
    .nav-actions {
        display: flex;
        flex: 1;
        align-items: center;
        justify-content: flex-end;
        gap: 6px;
        min-width: 0;
    }

    .search-box {
        flex: 1;
        width: auto;
        min-width: 0;
        max-width: 100%;
        padding: 6px 10px;
    }

    .search-box input {
        font-size: 16px !important;
        min-width: 0;
        transform: translateZ(0);
    }

    /* 隱藏桌機 LINE 聯絡按鈕 */
    .btn-line {
        display: none;
    }

    /* LINE 登入按鈕：手機顯示圖示+短文字 */
    .btn-line-login {
        flex-shrink: 0;
        padding: 8px 12px;
        font-size: 0.8rem;
        gap: 5px;
        border-width: 1.5px;
    }

    /* 頭像旁的名字隱藏，只保留頭像 */
    #customer-name {
        display: none;
    }

    .hamburger {
        flex-shrink: 0;
    }

    .hero {
        padding: 78px 12px 68px;
    }

    .hero-content::before {
        width: 88px;
        top: -18px;
    }

    .hero-title {
        font-size: 2.2rem;
        letter-spacing: 3px;
        margin-bottom: 12px;
    }

    .hero-subtitle {
        font-size: 0.72rem;
        letter-spacing: 2.5px;
        padding: 8px 14px;
    }

    .hero-subtitle::before,
    .hero-subtitle::after {
        width: 28px;
    }

    .hero-subtitle::before {
        left: -36px;
    }

    .hero-subtitle::after {
        right: -36px;
    }

    .section-title {
        font-size: 1.35rem;
        margin-bottom: 20px;
    }

    .filter-section {
        margin-bottom: 20px;
    }

    .filter-buttons {
        gap: 8px;
    }

    .filter-btn {
        padding: 6px 12px;
        font-size: 0.78rem;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 340px));
        gap: 18px;
        padding: 0 12px;
        justify-content: center;
        max-width: 760px;
        margin: 0 auto;
    }

    .product-card {
        padding: 20px 18px;
        min-height: auto;
        border-radius: 20px;
        background: linear-gradient(145deg, #181818, #0d0d0d);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    }

    .product-card:hover {
        box-shadow: 0 8px 26px rgba(0, 255, 170, 0.14);
        border-color: var(--accent-color);
    }

    .product-img-container {
        height: 150px;
        margin-bottom: 16px;
        border-radius: 16px;
    }

    .product-img {
        max-width: 82%;
        max-height: 82%;
        transform: none !important;
        transition: none !important;
    }

    .product-card:hover .product-img {
        transform: none !important;
    }

    .product-category-name {
        font-size: 1.22rem;
        font-weight: 800;
        margin-bottom: 14px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.3;
        text-align: center;
    }

    .product-items-list {
        padding: 8px;
        border-radius: 12px;
    }

    .product-item-row {
        padding: 12px 10px;
        gap: 8px;
        align-items: center;
    }

    .product-item-row:hover {
        background: rgba(0, 255, 170, 0.08);
    }

    .item-name-text {
        font-size: 0.98rem;
        line-height: 1.4;
        font-weight: 600;
    }

    .item-price-group {
        align-items: flex-end;
    }

    .item-price-text {
        font-size: 1.08rem;
        line-height: 1.2;
        font-weight: 800;
    }

    .item-old-price {
        font-size: 0.82rem;
    }

    .more-hint {
        display: none;
    }

    .product-card-footer {
        padding-top: 16px;
    }

    .btn-quick-buy {
        padding: 12px 10px;
        font-size: 0.98rem;
        border-radius: 12px;
        margin-top: 0;
        font-weight: 700;
    }

    .btn-copy-price {
        font-size: 0.9rem;
        padding: 11px;
        font-weight: 600;
    }

    #product-list.is-searching,
    .product-grid#product-list.is-searching {
        grid-template-columns: repeat(auto-fit, minmax(160px, 220px));
        gap: 14px;
        padding: 0 8px;
        justify-content: center;
        margin: 0 auto;
        max-width: 720px;
    }

    #product-list.is-searching .search-card {
        width: 100%;
        min-width: 0;
    }

    .vip-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .vip-card {
        min-height: auto;
        padding: 22px 16px;
        width: 100%;
    }

    .vip-card h3,
    .vip-title {
        font-size: 1.1rem;
    }

    .vip-card .vip-threshold,
    .vip-card .vip-benefits li,
    .membership-desc,
    .vip-threshold {
        font-size: 0.88rem;
    }

    .vip-icon {
        width: 56px;
        height: 56px;
        font-size: 1.25rem;
        margin-bottom: 12px;
    }

    .vip-note {
        font-size: 0.84rem;
        padding: 14px 12px;
        margin-top: 18px;
    }

    .steps-container {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .step-card {
        width: 100%;
        max-width: 340px;
        padding: 22px 16px;
    }

    .step-arrow {
        transform: rotate(90deg);
        margin: -2px 0;
    }

    .step-icon {
        width: 58px;
        height: 58px;
        font-size: 1.35rem;
    }

    .step-title {
        font-size: 1.05rem;
    }

    .step-desc {
        font-size: 0.85rem;
    }

    .footer-sections-wrapper {
        grid-template-columns: 1fr;
        gap: 22px;
        padding: 0 12px 36px;
    }

    .fb-btn,
    .store-btn {
        width: 100%;
        max-width: 250px;
    }

    .custom-modal {
        padding: 10px;
    }

    .modal-content,
    .game-menu-modal {
        width: 100%;
        max-width: 100%;
        border-radius: 18px;
        padding: 22px 16px;
        max-height: 85vh;
    }

    .game-menu-modal h3 {
        font-size: 1.18rem;
        font-weight: 800;
        margin-bottom: 16px;
        padding-right: 30px;
        text-align: center;
    }

    .game-menu-modal .item-selector {
        gap: 11px;
    }

    .game-menu-modal .select-item-btn {
        padding: 14px 12px;
        border-radius: 12px;
        gap: 10px;
    }

    .game-menu-modal .item-name {
        font-size: 0.98rem;
        font-weight: 600;
        line-height: 1.4;
    }

    .game-menu-modal .modal-price-group {
        min-width: 78px;
    }

    .game-menu-modal .modal-old-price {
        font-size: 0.78rem;
    }

    .game-menu-modal .item-price {
        font-size: 1.02rem;
        font-weight: 900;
    }

    .modal-type-label {
        font-size: 0.82rem;
        padding: 0.4rem 0.8rem;
    }

    .game-menu-modal .close-modal {
        top: 12px;
        right: 14px;
        font-size: 1.5rem;
    }

    input,
    textarea,
    select {
        font-size: 16px !important;
    }

    body {
        touch-action: pan-y;
    }

    /* 評價：手機雙欄小卡 */
    .reviews-section {
        padding: 28px 0 36px;
    }

    .reviews-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-top: 14px;
    }

    .review-card {
        padding: 10px 12px;
        gap: 5px;
        border-radius: 10px;
    }

    .review-card:hover {
        transform: none;
    }

    .review-card::before {
        font-size: 2.5rem;
        top: 4px;
        right: 8px;
    }

    .review-content {
        font-size: 0.72rem;
        line-height: 1.5;
    }

    .review-header {
        font-size: 0.62rem;
        flex-wrap: wrap;
        gap: 2px;
    }

    .stars {
        font-size: 0.7rem;
        letter-spacing: 1px;
    }

    .review-badge {
        font-size: 0.58rem;
        padding: 1px 5px;
    }

    .review-source {
        font-size: 0.58rem;
        padding: 1px 5px;
        margin-left: 0;
    }

    .btn-show-more-reviews {
        padding: 9px 24px;
        font-size: 0.82rem;
    }

    /* 顧客訂單面板：底部彈出 */
    .customer-panel-modal {
        padding: 0;
        align-items: flex-end;
    }

    .customer-panel-content {
        border-radius: 20px 20px 0 0;
        max-height: 90vh;
        padding: 22px 16px 30px;
    }

    .customer-panel-header {
        gap: 12px;
        margin-bottom: 16px;
    }

    .customer-panel-avatar {
        width: 46px;
        height: 46px;
    }

    .customer-panel-info h3 {
        font-size: 1rem;
    }

    .customer-order-row {
        padding: 10px 12px;
    }

    .customer-order-row .order-info strong {
        font-size: 0.88rem;
    }

    .customer-order-row .order-info span {
        font-size: 0.76rem;
    }

    .customer-order-status {
        font-size: 0.72rem;
        padding: 2px 8px;
    }
}

/* --- 熱銷榜 & 限時禮包：手機橫向捲動 --- */
@media (max-width: 640px) {
    #hot-section .product-grid,
    #limited-section .product-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 12px;
        padding: 0 16px 12px;
        max-width: 100%;
    }
    #hot-section .product-grid::-webkit-scrollbar,
    #limited-section .product-grid::-webkit-scrollbar { display: none; }

    #hot-section .product-card,
    #limited-section .product-card {
        min-width: 200px;
        max-width: 220px;
        flex-shrink: 0;
        scroll-snap-align: start;
        padding: 14px;
    }
    #hot-section .product-img-container,
    #limited-section .product-img-container {
        height: 100px;
    }
    #hot-section .product-category-name,
    #limited-section .product-category-name {
        font-size: 0.85rem;
    }
    #hot-section .product-item-row,
    #limited-section .product-item-row {
        flex-wrap: wrap;
        gap: 2px;
    }
    #hot-section .item-btn-group,
    #limited-section .item-btn-group {
        width: 100%;
        justify-content: center;
        margin-top: 4px;
    }
}

/* --- 超小手機 --- */
@media (max-width: 420px) {
    .product-grid,
    #product-list.is-searching,
    .product-grid#product-list.is-searching {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 0 12px;
        max-width: 440px;
        margin: 0 auto;
    }

    .product-card {
        padding: 16px;
        border-radius: 16px;
    }

    .product-img-container {
        height: 130px;
        margin-bottom: 14px;
    }

    .product-category-name {
        font-size: 1.15rem;
        margin-bottom: 12px;
    }

    .item-name-text {
        font-size: 0.95rem;
    }

    .item-price-text {
        font-size: 1rem;
    }

    .item-old-price {
        font-size: 0.78rem;
    }

    .btn-quick-buy {
        font-size: 0.95rem;
        padding: 12px 8px;
    }

    .btn-copy-price {
        font-size: 0.85rem;
        padding: 10px;
    }

    .product-item-row {
        padding: 10px 8px;
    }

    .search-box {
        flex: 1;
        width: auto;
        max-width: 100%;
    }

    /* 超小螢幕隱藏登入文字，只留圖示 */
    .btn-line-login {
        padding: 8px 9px;
        gap: 0;
    }

    .btn-login-text {
        display: none;
    }

    .btn-line-login i {
        font-size: 1.1rem;
    }

    .hero {
        padding: 64px 10px 56px;
    }

    .hero-title {
        font-size: 1.8rem;
        letter-spacing: 2px;
    }

    .hero-subtitle {
        font-size: 0.64rem;
        letter-spacing: 1.8px;
        padding: 7px 10px;
    }

    .hero-subtitle::before,
    .hero-subtitle::after {
        display: none;
    }

    .logo-text {
        font-size: 0.92rem;
    }

    #product-list.is-searching,
    .product-grid#product-list.is-searching {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .game-menu-modal {
        padding: 20px 14px;
    }

    .game-menu-modal h3 {
        font-size: 1.08rem;
        line-height: 1.4;
    }

    .game-menu-modal .select-item-btn {
        padding: 13px 11px;
        gap: 9px;
    }

    .game-menu-modal .item-name {
        font-size: 0.94rem;
        line-height: 1.4;
    }

    .game-menu-modal .modal-price-group {
        min-width: 72px;
    }

    .game-menu-modal .modal-old-price {
        font-size: 0.74rem;
    }

    .game-menu-modal .item-price {
        font-size: 0.96rem;
    }
}

/* ── 平板中段（576px - 768px）評價雙欄 ── */
@media (min-width: 576px) and (max-width: 768px) {
    .reviews-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 避免鍵盤收起後某些元件殘留撐寬 */
.navbar,
.nav-container,
.search-box,
.container,
.grid-wrapper,
.product-grid,
#product-list,
.custom-modal,
.game-menu-modal,
.footer-container,
.footer-sections-wrapper,
.footer-section,
.steps-container,
.step-card,
.vip-grid,
.vip-card,
.qa-container {
    max-width: 100%;
    min-width: 0;
}

/* footer 綠標 */
.trust-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    padding: 6px 12px;
    border: 1px solid rgba(0, 195, 0, 0.35);
    border-radius: 999px;
    background: rgba(0, 195, 0, 0.08);
    color: #e8fbe8;
    font-weight: 700;
}

.trust-badge i {
    color: #00c300;
    font-size: 1rem;
    filter: drop-shadow(0 0 6px rgba(0, 195, 0, 0.4));
}

/* --- 評價區塊 --- */
.reviews-section {
    background: linear-gradient(180deg, #0a0a0a 0%, #0d0d0d 100%);
    border-top: 1px solid #1a1a1a;
    padding: 48px 0 56px;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 20px;
    margin-top: 24px;
}
@media (min-width: 769px) {
    .reviews-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

.review-card {
    background: linear-gradient(135deg, #141414 0%, #111 100%);
    border: 1px solid #222;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.review-card::before {
    content: '\201C';
    position: absolute;
    top: 12px;
    right: 20px;
    font-size: 5rem;
    line-height: 1;
    color: var(--accent-color);
    opacity: 0.07;
    font-family: Georgia, serif;
    pointer-events: none;
}

.review-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 255, 170, 0.3);
    box-shadow: 0 8px 32px rgba(0, 255, 170, 0.06);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: var(--text-sub);
}

.review-header span:first-child {
    color: var(--accent-color);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.review-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 255, 170, 0.08);
    border: 1px solid rgba(0, 255, 170, 0.2);
    color: var(--accent-color);
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
}

.review-source {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 165, 0, 0.08);
    border: 1px solid rgba(255, 165, 0, 0.25);
    color: #ffa500;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
    margin-left: 6px;
}

.cooperation-text {
    color: #aaa;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 10px;
}

.stars {
    font-size: 0.95rem;
    letter-spacing: 3px;
    line-height: 1;
}

.review-content {
    font-size: 0.92rem;
    color: #bbb;
    line-height: 1.7;
    margin: 0;
    flex: 1;
}

/* 評價隱藏/展開 */
.review-card.review-hidden {
    display: none;
}

.btn-show-more-reviews {
    background: transparent;
    border: 1.5px solid #333;
    color: var(--text-sub);
    padding: 10px 28px;
    border-radius: 999px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.25s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-show-more-reviews:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.btn-show-more-reviews.expanded i {
    transform: rotate(180deg);
}

.btn-show-more-reviews i {
    transition: transform 0.25s;
}

/* 評價手機覆寫（放在 base styles 之後確保優先權） */
@media (max-width: 768px) {
    .reviews-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .review-card {
        padding: 10px 12px;
        gap: 5px;
        border-radius: 10px;
    }
    .review-card::before {
        font-size: 2.5rem;
        top: 4px;
        right: 8px;
    }
    .review-content {
        font-size: 0.72rem;
        line-height: 1.5;
    }
    .review-header {
        font-size: 0.62rem;
    }
    .stars {
        font-size: 0.7rem;
        letter-spacing: 1px;
    }
    .review-badge,
    .review-source {
        font-size: 0.58rem;
        padding: 1px 5px;
    }
    .review-source {
        margin-left: 0;
    }
}

/* ── Toast 通知 ── */
.site-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1e1e1e;
    border: 1px solid #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 999px;
    font-size: 0.88rem;
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 8px 28px rgba(0,0,0,0.5);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.site-toast--error {
    border-color: rgba(255, 80, 80, 0.5);
    background: linear-gradient(135deg, #1e1010, #1a1a1a);
    color: #ff8080;
}

.site-toast--success {
    border-color: rgba(0, 255, 170, 0.4);
    background: linear-gradient(135deg, #0e1e18, #141414);
    color: var(--accent-color);
}

.site-toast--show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 480px) {
    .site-toast {
        bottom: 20px;
        font-size: 0.82rem;
        padding: 10px 18px;
        max-width: 88vw;
        white-space: normal;
        text-align: center;
    }
}

/* ===========================
   購物車按鈕（加入）
=========================== */
.btn-add-cart {
    background: none; border: 1px solid #444; color: #888;
    border-radius: 6px; padding: 2px 7px; font-size: 0.8rem;
    cursor: pointer; margin-left: 6px; transition: all 0.2s;
    flex-shrink: 0;
}
.btn-add-cart:hover { color: #00ffaa; border-color: #00ffaa; }
.btn-add-cart-sm {
    display: inline-block; margin-left: 8px; color: #888;
    cursor: pointer; font-size: 0.85rem; transition: color 0.2s;
}
.btn-add-cart-sm:hover { color: #00ffaa; }

/* 購物車 Toast */
.cart-toast {
    position: fixed; top: 24px; left: 50%; transform: translateX(-50%) translateY(-20px);
    z-index: 99999;
    background: rgba(0,0,0,0.92); color: #00ffaa; padding: 12px 28px;
    border-radius: 12px; font-size: 0.95rem; font-weight: 600;
    opacity: 0; transition: all 0.3s; pointer-events: none;
    box-shadow: 0 4px 20px rgba(0,255,170,0.15);
}
.cart-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===========================
   購物車 FAB
=========================== */
/* 浮動社群按鈕 */
#fb-fab {
    position: fixed; bottom: 152px; right: 24px; z-index: 1000;
    width: 52px; height: 52px; border-radius: 50%;
    background: #1877f2; color: #fff;
    font-size: 1.5rem; text-decoration: none;
    box-shadow: 0 4px 20px rgba(24,119,242,0.4);
    transition: all 0.3s; display: flex; align-items: center; justify-content: center;
}
#fb-fab:hover { transform: scale(1.1); box-shadow: 0 4px 25px rgba(24,119,242,0.6); }

#line-fab {
    position: fixed; bottom: 92px; right: 24px; z-index: 1000;
    width: 52px; height: 52px; border-radius: 50%;
    background: #06c755; color: #fff;
    font-size: 1.5rem; text-decoration: none;
    box-shadow: 0 4px 20px rgba(6,199,85,0.4);
    transition: all 0.3s; display: flex; align-items: center; justify-content: center;
}
#line-fab:hover { transform: scale(1.1); box-shadow: 0 4px 25px rgba(6,199,85,0.6); }

#cart-fab {
    position: fixed; bottom: 24px; right: 24px; z-index: 1000;
    width: 56px; height: 56px; border-radius: 50%; border: none;
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 100%);
    border: 2px solid #333; color: #00ffaa;
    font-size: 1.3rem; cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    transition: all 0.3s; display: flex; align-items: center; justify-content: center;
}
#cart-fab:hover { border-color: #00ffaa; box-shadow: 0 4px 25px rgba(0,255,170,0.3); transform: scale(1.05); }
#cart-badge {
    position: absolute; top: -4px; right: -4px;
    background: #ff4444; color: #fff; border-radius: 50%;
    width: 22px; height: 22px; font-size: 0.7rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}

/* ===========================
   購物車 Drawer
=========================== */
#cart-backdrop {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,0.5); opacity: 0;
    pointer-events: none; transition: opacity 0.3s;
}
#cart-backdrop.open { opacity: 1; pointer-events: auto; }

#cart-drawer {
    position: fixed; right: 0; top: 0; height: 100%; width: 380px;
    z-index: 1001; background: #0d0d0d; border-left: 1px solid #222;
    display: flex; flex-direction: column;
    transform: translateX(100%); transition: transform 0.3s ease;
}
#cart-drawer.open { transform: translateX(0); }

.cart-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 20px; border-bottom: 1px solid #222;
}
.cart-header h3 { margin: 0; font-size: 1.1rem; color: #fff; }
.cart-close { background: none; border: none; color: #888; font-size: 1.2rem; cursor: pointer; }
.cart-close:hover { color: #fff; }

.cart-items { flex: 1; overflow-y: auto; padding: 12px 16px; }

.cart-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 0; border-bottom: 1px solid #1a1a1a;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-game { font-size: 0.75rem; color: #888; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item-coins { font-size: 0.9rem; color: #eee; font-weight: 600; }
.cart-item-controls {
    display: flex; align-items: center; gap: 6px;
}
.cart-item-controls button {
    width: 26px; height: 26px; border-radius: 6px; border: 1px solid #444;
    background: none; color: #ccc; cursor: pointer; font-size: 0.9rem;
    display: flex; align-items: center; justify-content: center;
}
.cart-item-controls button:hover { border-color: #00ffaa; color: #00ffaa; }
.cart-item-controls span { min-width: 20px; text-align: center; color: #fff; font-weight: 700; }
.cart-item-price { color: #00ffaa; font-weight: 700; font-size: 0.95rem; min-width: 60px; text-align: right; }
.cart-item-remove { background: none; border: none; color: #666; cursor: pointer; padding: 4px; }
.cart-item-remove:hover { color: #ff4444; }

.cart-footer { padding: 16px 20px; border-top: 1px solid #222; }
.cart-total-row {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 12px; font-size: 1rem; color: #fff;
}
.cart-btn {
    width: 100%; padding: 12px; border: none; border-radius: 12px;
    font-size: 0.95rem; font-weight: 700; cursor: pointer;
    margin-bottom: 8px; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.cart-btn-line { background: #06c755; color: #fff; }
.cart-btn-line:hover { background: #05b04a; }
.cart-btn-order { background: #00ffaa; color: #000; }
.cart-btn-order:hover { background: #00e699; }
.cart-btn-clear {
    width: 100%; padding: 8px; border: 1px solid #333; border-radius: 8px;
    background: none; color: #888; font-size: 0.85rem; cursor: pointer;
}
.cart-btn-clear:hover { color: #ff4444; border-color: #ff4444; }

/* 購物車表單 */
.cart-form {
    padding: 12px 20px; border-top: 1px solid #222;
    max-height: 45vh; overflow-y: auto;
}
.cart-form-title {
    font-size: 0.9rem; font-weight: 700; color: #00ffaa;
    margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid #222;
}
.cart-form-row { margin-bottom: 8px; }
.cart-form-row label {
    display: block; font-size: 0.75rem; color: #888;
    margin-bottom: 3px;
}
.cart-form-value {
    font-size: 0.85rem; color: #ccc; padding: 6px 0;
    line-height: 1.4;
}
.cart-form-input {
    width: 100%; padding: 8px 10px; border-radius: 8px;
    border: 1px solid #333; background: #111; color: #fff;
    font-size: 0.85rem; outline: none; box-sizing: border-box;
}
.cart-form-input:focus { border-color: #00ffaa; }
select.cart-form-input { cursor: pointer; }
textarea.cart-form-input { resize: vertical; min-height: 40px; }
.cart-form-divider {
    font-size: 0.85rem; font-weight: 700; color: #00c3ff;
    margin: 14px 0 10px; padding-top: 12px;
    border-top: 1px solid #222;
}
.cart-form-warning {
    font-size: 0.78rem; color: #ff9800; margin-top: 8px;
    padding: 6px 8px; background: rgba(255,152,0,0.08); border-radius: 6px;
}

/* 卡片雙按鈕 */
.item-btn-group {
    display: flex; gap: 4px; align-items: center;
}
.btn-add-cart, .btn-line-ask {
    border: none; cursor: pointer; border-radius: 8px;
    font-size: 0.82rem; display: flex; align-items: center; gap: 4px;
    padding: 6px 12px; transition: all 0.15s;
    white-space: nowrap;
}
.btn-add-cart {
    background: rgba(0,255,170,0.12); color: #00ffaa;
}
.btn-add-cart:hover { background: rgba(0,255,170,0.25); }
.btn-line-ask {
    background: rgba(6,199,85,0.12); color: #06c755;
}
.btn-line-ask:hover { background: rgba(6,199,85,0.25); }

.btn-fb-share {
    border: none; cursor: pointer; border-radius: 8px;
    font-size: 0.8rem; display: inline-flex; align-items: center; gap: 4px;
    padding: 5px 12px; transition: all 0.15s; white-space: nowrap;
    background: rgba(24,119,242,0.15); color: #1877f2;
}
.btn-fb-share:hover { background: rgba(24,119,242,0.3); }

/* 手機：按鈕隱藏文字只留圖示，加大觸控區域 */
@media (max-width: 480px) {
    .btn-add-cart .btn-label, .btn-line-ask .btn-label { display: none; }
    .btn-add-cart, .btn-line-ask {
        font-size: 1rem; padding: 8px 12px; border-radius: 10px;
    }
    .product-item-row .item-btn-group { margin-top: 4px; }
}
@media (min-width: 481px) and (max-width: 768px) {
    .btn-add-cart, .btn-line-ask {
        font-size: 0.85rem; padding: 8px 14px;
    }
}

@media (max-width: 480px) {
    #cart-drawer { width: 100%; }
}

/* ---------------------------
   特約俱樂部頁面
--------------------------- */
#clubs-display {
    width: 100%;
    padding: 10px 0;
}
.clubs-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 16px;
}
.clubs-game-group {
    margin-bottom: 32px;
}
.clubs-game-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.clubs-game-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}
.clubs-game-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}
.clubs-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    justify-items: center;
}
.club-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 16px;
    transition: transform 0.2s, border-color 0.2s;
    width: 100%;
}
.club-card:hover {
    transform: translateY(-2px);
    border-color: rgba(167,139,250,0.4);
}
.club-card-main {
    display: flex;
    align-items: center;
    gap: 14px;
}
.club-card-logo {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.1);
}
.club-card-info {
    flex: 1;
    min-width: 0;
}
.club-card-name {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.club-card-stars {
    margin: 4px 0;
}
.club-card-toggle {
    color: #999;
    font-size: 0.7rem;
    transition: transform 0.25s;
    flex-shrink: 0;
}
.club-card.expanded .club-card-toggle {
    transform: rotate(180deg);
}
.club-card-detail {
    font-size: 0.85rem;
    color: #bbb;
    line-height: 1.5;
    padding: 12px 0 0;
    margin-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.3s ease, margin 0.3s ease;
    padding: 0;
    margin: 0;
}
.club-card.expanded .club-card-detail {
    max-height: 200px;
    opacity: 1;
    padding: 12px 0 0;
    margin-top: 12px;
}
@media (max-width: 576px) {
    .clubs-card-grid {
        grid-template-columns: 1fr;
    }
}