
/* 🌟 質感新配色變數 */
:root {
    --bg-color: #E3DCD2;       /* 奶茶沙色 (背景) */
    --primary-color: #293c28;  /* 質感深綠 (標題、主按鈕) */
    --accent-color: #3c483c;   /* 陶土橘棕 (點綴、選中狀態) */
    --text-main: #100C0D;      /* 墨黑色 (主要文字) */
    --card-bg: #ffffff;        /* 純白 (卡片底色) */
    --border-color: #d1cbc2;   /* 邊框色 (稍微深一點的背景色) */
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body { background-color: var(--bg-color); color: var(--text-main); line-height: 1.6; padding-bottom: 0px;}

/* 頂部橫幅 */
header {
    background-color: var(--primary-color);
    color: var(--bg-color);
    padding: 10px 5px 5px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(1, 51, 40, 0.2);
    /* border-bottom: 4px solid var(--accent-color); */
    border-radius: 20px 20px 0px 0px;
}
header img { 
    width: 80px;
    height: 100%;
    line-height: 25px;
}
header p { 
    font-size: 0.7rem;
    opacity: 0.85;
    font-weight: 300;
}

/* 緊急提示區塊 */
.urgent-notice {
    background-color: rgba(255, 255, 255, 0.7);
    color: var(--text-main);
    padding: 2px;
    font-size: 0.8rem;
    text-align: center;
    /* border-bottom: 1px solid var(--border-color); */
}
.urgent-notice i { margin-right: 5px; color: var(--accent-color); }

/* ✨ 新增：頁籤（Tab）導覽樣式 ✨ 改為底部 App 導覽列 */
.tab-navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: var(--primary-color);
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.08);
    padding: 10px 5px calc(10px + env(safe-area-inset-bottom));
    z-index: 9999;
    margin: 0;
    max-width: none;
    border-radius: 20px 20px 0 0;
}

.tab-navigation button {
    background-color: transparent;
    color: #b0a8a0;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    box-shadow: none;
}

.tab-navigation button.active {
    background-color: transparent;
    color: #ffffff;
    box-shadow: none;
}

.tab-navigation button i {
    margin-right: 0;
    margin-bottom: 5px;
    font-size: 1.3rem;
}

/* ✨ 新增：內容（Content）區塊樣式 ✨ */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}
/* 價目表專用樣式 */
.price-item {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}
.price-item:last-child { border-bottom: none; }

.price-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    color: var(--primary-color);
}
.price-name { font-size: 1.05rem; }
.price-amount {
    color: var(--accent-color);
    font-size: 1rem;
    font-weight: 300;
     }
.price-desc {
    font-size: 0.85rem;
    color: #777;
    margin-top: 4px;
}
/* ＱＡ */
.qa-item {
    border-bottom: 1px solid #f0f0f0;
    padding: 15px 0;
}
.qa-item:last-child { border-bottom: none; }
.qa-question {
    font-weight: bold;
    color: var(--primary-color);
    display: flex;
    justify-content: space-between;
    cursor: pointer;
    font-size: 0.88rem;
}
.qa-answer {
    margin-top: 10px;
    color: #666;
    font-size: 0.8rem;
    display: none; /* 預設隱藏 */
    line-height: 1.6;
}
 /* 主要表單容器 */
.container { max-width: 600px; margin: 0 auto; padding: 1px 10px 130px 10px;}

.card {
    background: var(--card-bg);
    border-radius: 0px 0px 12px 12px;
    padding: 10px;
    margin-bottom: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid rgba(255,255,255,0.5);
}

.section-title {
    font-size: 1.15rem;
    font-weight: bold;
    margin-bottom: 18px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    border-bottom: 2px solid var(--bg-color);
    padding-bottom: 10px;
}
.section-title i { margin-right: 8px; color: var(--primary-color); }

/* 近三天速查預覽區塊 */
.preview-section {
    background: var(--card-bg);
    height: 50vh;
    border-radius: 12px;
    padding: 10px 15px;
    margin-bottom: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    overflow: scroll;
}
.preview-header {
    color: var(--primary-color);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 10px;
    font-weight: bold;
}
.preview-header i { 
    color: var(--primary-color);}
.preview-scroll-container {
    display: flex !important;
    flex-wrap: nowrap !important; /* 💡 絕對不准換行，解決爆開 */
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 15px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch; /* 讓手機滑動順暢 */
}

.preview-day-card {
   /* min-width: 230px; /* 💡 稍微加寬，讓時間按鈕有空間呼吸 */
    flex-shrink: 0;   /* 💡 防止卡片被硬生生擠扁 */
    border: 1px solid var(--bg-color);
    border-radius: 10px;
    padding: 5px;
    background: #fbfbfb;
    width: 200px !important;
}
.preview-scroll-container::-webkit-scrollbar { display: none; }

.preview-date-title {
    font-weight: bold;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--border-color);
    font-size: 1.05rem;
}
.preview-designer-row {
    margin-bottom: 12px;
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    border: 1px solid #f0f0f0;
}
.preview-designer-name {
    font-size: 1rem;
    font-weight: bold;
    color: var(--text-main);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.preview-times {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important; 
    gap: 8px !important;
}
.preview-time-tag {
    background: white;
    color: var(--accent-color);
    padding: 5px 5px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--accent-color);
}
.preview-time-tag:hover, .preview-time-tag:active {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(204, 139, 101, 0.3);
}
.preview-empty {
    background: #f5f5f5;
    color: #999;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    border: 1px dashed #ccc;
    cursor: not-allowed;
}

/* 表單元素 */
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-size: 0.95rem;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--primary-color);
}
.form-control {
    width: 100%;
    padding: 14px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background-color: #fafafa;
    transition: all 0.3s;
    appearance: none;
    color: var(--text-main);
}
.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(204, 139, 101, 0.15);
}

/* 時間選擇按鈕 (動態生成) */
.time-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 15px;
}
.time-btn {
    background-color: transparent;
    color: var(--accent-color);
    border: 1.5px solid var(--accent-color);
    padding: 2px 5px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}
.time-btn:hover { background-color: rgba(204, 139, 101, 0.05); }
.time-btn.selected {
    background-color: var(--accent-color);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(204, 139, 101, 0.3);
}
.time-message {
    grid-column: span 3;
    text-align: center;
    padding: 20px;
    color: var(--text-light);
    font-size: 0.95rem;
    background: #fafafa;
    border-radius: 8px;
    border: 1px dashed var(--border-color);
}

/* 底部固定複製按鈕 */
.fixed-bottom {
    position: fixed;
    /* 動態計算高度：75px (導覽列高度) + 手機原生安全邊界 */
    bottom: calc(50px + env(safe-area-inset-bottom)); 
    left: 0;
    width: 100%;
    background: transparent; /* 移除白色底圖，讓按鈕直接懸浮 */
    box-shadow: none;
    padding: 15px 20px;
    display: flex;
    justify-content: center;
    z-index: 10000; /* 拉到最上層，絕對不會被蓋住 */
    pointer-events: none; /* 魔法屬性：讓按鈕旁邊的空白處不會擋住點擊 */
}

.copy-btn {
    pointer-events: auto; /* 恢復按鈕本身的點擊功能 */
    background-color: #3d5e41;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 16px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    width: 100%;
    max-width: 600px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 6px 20px rgba(1, 51, 40, 0.4); /* 加強陰影，凸顯懸浮感 */
    transition: all 0.2s;
}
.copy-btn:active { transform: scale(0.98); }

/* 確認資料模態窗樣式 */
.confirm-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(16, 12, 13, 0.7); /* 墨黑色半透明 */
    z-index: 99999;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.confirm-modal.show { display: flex; }
.confirm-modal .modal-content {
    background-color: white;
    padding: 25px;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    text-align: center;
}
.confirm-modal .modal-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.preview-box {
    background: #fafafa;
    padding: 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-family: monospace;
    font-size: 1.05rem;
    line-height: 1.6;
    text-align: left;
    white-space: pre-wrap;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    
    /* 🌟 新增的防卡死魔法 */
    max-height: 50vh; /* 限制文字框最高只能佔螢幕的一半 */
    overflow-y: auto; /* 字太多時，自動產生上下滑動卷軸 */
    overscroll-behavior: contain; /* 防止滑到底時不小心滑到後面的網頁 */
}
.confirm-actions { display: flex; gap: 12px; }
.btn-confirm-copy { 
    flex: 1; padding: 14px; background: var(--primary-color); color: white; border: none; border-radius: 8px; font-weight: bold; cursor: pointer; font-size: 1rem; transition: 0.3s;
}
.btn-cancel-copy { 
    flex: 1; padding: 14px; background: transparent; color: var(--text-light); border: 1px solid var(--border-color); border-radius: 8px; font-weight: bold; cursor: pointer; font-size: 1rem; transition: 0.3s;
}

/* 載入中遮罩 */
#loader {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(227, 220, 210, 0.9); /* 奶茶沙色半透明 */
    z-index: 999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.1rem;
}
.spinner {
    border: 4px solid rgba(204, 139, 101, 0.2);
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    width: 45px; height: 45px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}
/* 頁尾門市資訊樣式 */
.shop-footer-info {
    margin-top: 30px;
    padding: 20px 5px 60px;
    border-top: 1px solid var(--border-color);
    color: var(--bg-color);
    background-color: #666;
}
.info-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    padding-left: 20px;
}
.info-item i {
    color: var(--bg-color);
    margin-top: 4px;
    width: 15px;
    text-align: center;
}
.info-label {
    font-weight: bold;
    min-width: 70px;
}
/* 圖片通用樣式 */
.card-image {
    width: 100%;
    height: auto;
    border-radius: 8px; /* 圓角與卡片一致 */
    margin-bottom: 15px;
    display: block;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
/* 🌟 多人預約圓形按鈕專屬樣式 (調整為較小巧精緻) */
.people-btn-group {
    width: 100%;
    display: flex;
    gap: 10px; /* 縮小按鈕之間的間距 */
    justify-content: flex-start;
    margin-top: 5px;
}
.people-btn {
    flex: 1;
    width: 45px; /* 原本是 60px，縮小寬度 */
    /*height: 30px; /* 修正高度，讓文字有足夠空間置中 */
    border-radius: 8px; /* 調整圓角比例 */
    border: none;
    background-color: #d7d7d7;
    color: #adafb3;
    font-size: 16px; /* 原本是 22px，縮小字體 */
    font-weight: bold;
    font-family: 'Segoe UI', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.people-btn.active {
    background-color:var(--accent-color);
    color: white;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
    transform: scale(1.05); 
}
/* iframe 專屬樣式，讓它無縫融入網頁 */
.member-iframe {
    width: 100%;
    height: 85vh; /* 佔據螢幕高度，可依需求微調 */
    border: none;
    border-radius: 0 0 12px 12px;
    display: block;
    background-color: var(--bg-color);
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
/* 🌟 新增：左右滑動的動畫效果 */
@keyframes slideLeftRight {
    0% { transform: translateX(0); }
    50% { transform: translateX(-20px); } /* 向左移動 4px */
    100% { transform: translateX(0); }
}

/* 將動畫綁定到這個類別，設定 1.5秒來回一次、平滑過渡、無限循環 */
.swipe-animation {
    animation: slideLeftRight 2.0s ease-in-out infinite;
}
@media (max-width: 576px) {
    .tab-navigation button {
        font-size: 0.8rem;       /* 縮小整體字體尺寸 */
        white-space: nowrap;     /* 魔法屬性：強制文字同一行顯示，絕對不換行 */
    }
    
    .tab-navigation button i {
        margin-right: 3px;       /* 縮小 icon 與文字之間的間距 */
        font-size: 0.85rem;      /* 同步微調 icon 大小，讓比例看起來更和諧 */
    }
}

