:root { 
    --primary-color: #F37021; 
    --primary-gradient: linear-gradient(135deg, #F37021 0%, #FF8C00 100%);
    --dark-bg: #1a1a1a; 
    --darker-bg: #0f0f0f;
    --light-bg: #f8f9fa; 
}
body { font-family: 'Noto Sans TC', sans-serif; background-color: var(--light-bg); display: flex; flex-direction: column; min-height: 100vh; }

.navbar-custom { background-color: var(--dark-bg); box-shadow: 0 4px 20px rgba(0,0,0,0.4); border-bottom: 1px solid rgba(255,255,255,0.05); }
.navbar-brand { color: #fff !important; font-weight: 700; font-size: 1.35rem; letter-spacing: 0.5px; }
.nav-link { color: rgba(255,255,255,0.7) !important; font-weight: 500; white-space: nowrap; transition: 0.3s; padding: 0.5rem 1rem; border-radius: 50px; }
.nav-link:hover { color: #fff !important; background: rgba(255,255,255,0.1); }

@media (max-width: 991px) {
    .navbar-custom .container-fluid { flex-direction: column; align-items: stretch; }
    .navbar-brand { margin-right: 0; margin-bottom: 10px; text-align: center; display: block; }
    .navbar-collapse { display: block !important; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; padding-bottom: 5px; width: 100%; }
    .navbar-nav { flex-direction: row !important; gap: 5px; justify-content: flex-start; margin-left: 0 !important; }
    .nav-item { display: inline-block; }
}

.navbar-toggler { display: none !important; }
.navbar-collapse::-webkit-scrollbar { display: none; }

.hero-premium {
    background-color: var(--darker-bg);
    background-image: radial-gradient(at 0% 0%, rgba(243, 112, 33, 0.15) 0px, transparent 50%), radial-gradient(at 100% 100%, rgba(243, 112, 33, 0.1) 0px, transparent 50%);
    color: #fff; padding: 5rem 2rem; border-radius: 2rem; box-shadow: 0 20px 50px rgba(0,0,0,0.5); margin-bottom: 3rem; border: 1px solid rgba(255,255,255,0.05);
}
.text-gradient { background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
/* [修改] 加入 max-width: 100vw 防止手機板跑版 */
/* 修改後的玻璃擬態卡片樣式 */
.glass-card {
    background: rgba(255, 255, 255, 0.05); /* 極淡的背景 */
    backdrop-filter: blur(12px);           /* 毛玻璃模糊效果 */
    -webkit-backdrop-filter: blur(12px);   /* Safari 瀏覽器支援 */
    border: 1px solid rgba(255, 255, 255, 0.1); /* 淡白邊框 */
    border-radius: 1.5rem;                 /* 圓角 */
    padding: 2rem;                         /* 內距 */
    
    /* RWD 關鍵修正 */
    max-width: 90vw;       /* 手機上最大寬度為螢幕的 90% (留一點邊才好看) */
    width: 100%;           /* 嘗試佔滿可用空間 */
    margin-left: auto;     /* 水平置中 */
    margin-right: auto;    /* 水平置中 */
    overflow: hidden;      /* 防止內容超出框框 */
}

.btn-primary-custom { background: var(--primary-gradient); border: none; color: white; padding: 8px 24px; border-radius: 50px; font-weight: 500; transition: 0.3s; box-shadow: 0 4px 15px rgba(243, 112, 33, 0.3); }
.btn-primary-custom:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(243, 112, 33, 0.5); filter: brightness(1.1); }
.card-custom { border: none; border-radius: 16px; box-shadow: 0 4px 20px rgba(0,0,0,0.05); background: #fff; transition: 0.3s; overflow: hidden; }
.card-custom:hover { transform: translateY(-5px); box-shadow: 0 15px 35px rgba(0,0,0,0.1); }
.profile-img-lg { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 3px solid var(--primary-color); }
.video-container { border-radius: 1rem; overflow: hidden; box-shadow: 0 15px 40px rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.1); }

.menu-img-wrap { height: 180px; overflow: hidden; position: relative; background: #eee; cursor: zoom-in; }
.menu-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.menu-img-wrap img:hover { transform: scale(1.08); }
.zoom-thumb { cursor: zoom-in; transition: opacity 0.2s; }
.zoom-thumb:hover { opacity: 0.8; }

.category-badge { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); color: #fff; padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 500; }
/* 1. 購物車按鈕：將 bottom 從 20px 改為 120px (往上移 100px) */
.mobile-cart-btn { 
    position: fixed; 
    bottom: 120px; /* [修改處] */
    right: 20px; 
    z-index: 999; 
    width: 60px; 
    height: 60px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 1.5rem; 
    background: var(--primary-gradient); 
    color: white; 
    border: none; 
    box-shadow: 0 4px 20px rgba(243, 112, 33, 0.5); 
}

/* 2. 歷史紀錄按鈕：將 bottom 從 90px 改為 190px (跟著往上移 100px) */
.mobile-history-btn { 
    position: fixed; 
    bottom: 190px; /* [修改處] */
    right: 20px; 
    z-index: 999; 
    width: 50px; 
    height: 50px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 1.2rem; 
    background: #333; 
    color: white; 
    border: none; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.3); 
}
.footer { background: var(--dark-bg); color: #888; padding: 20px 0; margin-top: auto; font-size: 0.85rem; border-top: 1px solid rgba(255,255,255,0.05); }
.footer-btn { display: inline-block; padding: 6px 16px; border: 1px solid rgba(255,255,255,0.2); border-radius: 50px; color: #aaa; text-decoration: none; margin: 0 5px; transition: 0.2s; }
.footer-btn:hover { color: #fff; border-color: var(--primary-color); background: var(--primary-color); }

/* Line Pay Button Style */
.btn-linepay { background-color: #06C755; color: white; border: none; font-weight: bold; }
.btn-linepay:hover { background-color: #05b34c; color: white; }

/* --- [新增] 清單檢視模式 (List View) --- */
/* 當容器切換到 view-list 模式時，強制每個項目佔滿一行 */
.row.view-list .menu-item-col {
    width: 100% !important;
    flex: 0 0 100%;
    max-width: 100%;
}

/* 調整卡片佈局為水平排列 */
.row.view-list .card-custom {
    flex-direction: row; /* 水平排列 */
    align-items: center; /* 垂直置中 */
    height: auto !important; /* 高度自動 */
    padding: 5px;
}

/* 圖片區域調整 */
.row.view-list .menu-img-wrap {
    width: 100px; /* 固定圖片寬度 */
    height: 100px; /* 固定圖片高度 */
    flex-shrink: 0; /* 防止圖片被壓縮 */
    border-radius: 8px;
    margin-right: 15px;
    position: relative;
}

/* 圖片顯示方式 */
.row.view-list .menu-img-wrap img {
    border-radius: 8px;
    height: 100%;
}

/* --- 修正清單模式：標籤移至圖片上方 + 維持灰底白字 --- */
.row.view-list .menu-img-wrap {
    /* 1. 開啟 Flex 垂直排列 */
    display: flex;
    flex-direction: column;
    
    /* 2. 高度改為 auto，才能包住「標籤」和「圖片」 */
    height: auto !important; 
    width: 100px; /* 維持固定寬度 */
    margin-right: 15px;
    background: transparent;
}

.row.view-list .menu-img-wrap img {
    /* 圖片高度固定，避免跑版 */
    height: 100px;
    width: 100%;
    object-fit: cover;
    border-radius: 6px; 
}

.row.view-list .category-badge {
    /* 3. 關鍵：利用 order: -1 讓標籤「插隊」跑到圖片上面 */
    order: -1; 
    
    /* 4. 解除絕對定位 */
    position: static;
    
    /* === 5. 外觀樣式修正 (灰底白字) === */
    background-color: #000000;  /* 深灰色背景 */
    color: #ffffff;             /* 白色文字 */
    border: none;               /* 不需要邊框 */
    
    /* 6. 排版微調 */
    margin-bottom: 4px;         /* 標籤跟圖片之間的距離 */
    width: 100%;                /* 寬度與圖片切齊 */
    text-align: center;         /* 文字置中 */
    
    font-size: 0.7rem;
    padding: 2px 0;
    border-radius: 4px;         /* 稍微圓角 */
    
    /* 確保單行顯示，太長就變吊橋符號... */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    
    /* 移除磨砂特效 (因為現在背景是實色且不擋圖) */
    backdrop-filter: none;
}

/* 內容區域填滿剩餘空間 */
.row.view-list .card-body {
    padding: 5px 10px !important;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 手機版 RWD 優化：清單模式下，內容若太多則換行 */
@media (max-width: 576px) {
    .row.view-list .card-body {
        flex-direction: column; /* 手機版內容垂直排列 */
        align-items: flex-start;
    }
    .row.view-list .card-body .d-flex.justify-content-between {
        width: 100%;
        margin-top: 8px; /* 價格與按鈕往下推 */
        justify-content: space-between !important;
    }
}