/* 
 * 前台預約系統樣式表 (黑豹開發) - 專業質感優化修復版
 */

:root { 
    --primary-color: #1a1a1a;    
    --accent-color: #c5a02a;     
    --accent-hover: #a68521;     
    --accent-light: #f9f5e8;     
    --bg-color: #f8f9fa;         
    --card-bg: #ffffff; 
    --text-main: #2d2d2d; 
    --text-muted: #7a7a7a; 
    --border-color: #e0e0e0; 
    --success-color: #28a745; 
    --line-color: #06C755;
    --shadow-sm: 0 4px 12px rgba(0,0,0,0.05); 
    --shadow-md: 0 10px 30px rgba(0,0,0,0.08); 
}

body { font-family: 'Noto Sans TC', sans-serif; background-color: var(--bg-color); color: var(--text-main); margin: 0; padding: 0; line-height: 1.6; }

/* 導覽列 */
.navbar { background-color: var(--primary-color); padding: 1rem 2.5rem; display: flex; justify-content: space-between; align-items: center; color: white; box-shadow: var(--shadow-md); position: sticky; top: 0; z-index: 1000; }
.navbar-brand { font-size: 1.4rem; font-weight: 700; color: var(--accent-color); text-decoration: none; letter-spacing: 2px; text-transform: uppercase; }
.navbar-links a { color: rgba(255,255,255,0.8); text-decoration: none; margin-left: 2rem; font-size: 0.9rem; font-weight: 500; transition: color 0.3s; }
.navbar-links a:hover { color: var(--accent-color); }

.container { max-width: 1200px; margin: 3rem auto; padding: 0 1.5rem; }

/* 進度條 */
.wizard-steps { display: flex; justify-content: space-between; margin-bottom: 4rem; position: relative; max-width: 800px; margin-left: auto; margin-right: auto; }
.wizard-steps::before { content: ''; position: absolute; top: 25px; left: 10%; right: 10%; height: 4px; background: #e5e5e5; z-index: 1; border-radius: 4px; }
.step { position: relative; z-index: 2; background: var(--bg-color); padding: 0 15px; display: flex; flex-direction: column; align-items: center; flex: 1; opacity: 0.5; transition: all 0.4s; }
.step.active, .step.completed { opacity: 1; }
.step-icon { width: 50px; height: 50px; border-radius: 50%; background: white; border: 2px solid #ddd; display: flex; align-items: center; justify-content: center; margin-bottom: 0.85rem; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); font-size: 1.1rem; color: #bbb; box-shadow: 0 6px 15px rgba(0,0,0,0.08); }
.step.active .step-icon { border-color: var(--accent-color); background: var(--accent-color); color: white; transform: scale(1.2) translateY(-3px); box-shadow: 0 10px 25px rgba(197, 160, 42, 0.4); }
.step.completed .step-icon { border-color: var(--success-color); background: var(--success-color); color: white; box-shadow: 0 6px 12px rgba(40, 167, 69, 0.3); }
.step-label { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.step.active .step-label { color: var(--primary-color); font-weight: 700; }

/* 佈局容器 */
.main-layout { display: flex; gap: 3rem; align-items: flex-start; }
.content-area { flex: 1; min-width: 0; animation: fadeIn 0.6s ease-out; }

/* 服務卡片 */
.service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; }
.service-card { background: white; border-radius: 16px; cursor: pointer; border: 2px solid transparent; transition: all 0.3s; position: relative; overflow: hidden; box-shadow: var(--shadow-sm); }
.service-card:hover { transform: translateY(-8px); box-shadow: 0 15px 35px rgba(0,0,0,0.12); }
.service-card.selected { border-color: var(--accent-color); background: var(--accent-light); }
.service-card.selected::after { content: '\f058'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; top: 12px; right: 12px; color: var(--accent-color); font-size: 1.5rem; background: white; border-radius: 50%; z-index: 10; }
.service-img { width: 100%; height: 180px; object-fit: cover; }
.service-info { padding: 1.25rem; }
.service-name { font-weight: 700; font-size: 1.1rem; margin-bottom: 0.5rem; }
.price { font-weight: 700; color: var(--accent-color); font-size: 1.1rem; }

/* --- 預約明細側邊欄：高級金屬掃光效果 --- */
.sidebar-area { width: 320px; position: sticky; top: 110px; }
.booking-summary-card { 
    background: linear-gradient(135deg, #222 0%, #000 100%); /* 深色基底 */
    color: white; 
    padding: 2.5rem; 
    border-radius: 24px; 
    border-left: 5px solid var(--accent-color); 
    position: relative;
    overflow: hidden; /* 必須隱藏，防止光帶溢出 */
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    animation: goldGlow 4s infinite alternate;
}

/* 60度金屬反光帶 */
.booking-summary-card::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -100%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        60deg, 
        rgba(255, 255, 255, 0) 40%, 
        rgba(255, 255, 255, 0.1) 45%, 
        rgba(255, 255, 255, 0.15) 50%, 
        rgba(255, 255, 255, 0.1) 55%, 
        rgba(255, 255, 255, 0) 60%
    );
    animation: metalSheen 4s infinite;
    pointer-events: none;
}

@keyframes metalSheen {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(50%); }
}

@keyframes goldGlow {
    from { 
        box-shadow: 0 15px 40px rgba(0,0,0,0.3), 0 0 5px rgba(197, 160, 42, 0.1); 
    }
    to { 
        box-shadow: 0 20px 50px rgba(0,0,0,0.4), 0 0 30px rgba(197, 160, 42, 0.5); 
    }
}
.summary-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 2rem; color: var(--accent-color); letter-spacing: 1.5px; text-transform: uppercase; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 1rem; }
.summary-item { margin-bottom: 1.5rem; }
.summary-label { color: rgba(255,255,255,0.5); font-size: 0.8rem; text-transform: uppercase; margin-bottom: 0.4rem; display: block; }
.summary-value { font-size: 1.1rem; font-weight: 600; color: #fff; line-height: 1.4; }
.total-price { font-size: 2.25rem; font-weight: 700; color: var(--accent-color); margin-top: 0.5rem; }

/* 時段選取與提示 */
.premium-popover { position: absolute; bottom: calc(100% + 15px); left: 0; width: 280px; background: var(--primary-color); color: white; padding: 15px 20px; border-radius: 16px; font-size: 0.85rem; font-weight: 500; line-height: 1.5; box-shadow: 0 15px 35px rgba(0,0,0,0.25); z-index: 1000; border-top: 3px solid var(--accent-color); animation: popIn 0.3s ease-out; }
.popover-arrow { position: absolute; top: 100%; left: 15px; width: 0; height: 0; border-left: 8px solid transparent; border-right: 8px solid transparent; border-top: 8px solid var(--primary-color); }

/* 時段按鈕 */
.time-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; margin-bottom: 1.5rem; }
.time-btn { padding: 12px 5px; border: 1px solid var(--border-color); background: white; border-radius: 12px; cursor: pointer; transition: all 0.25s; font-weight: 600; color: var(--text-main); font-size: 0.95rem; }
.time-btn:hover:not(:disabled) { border-color: var(--accent-color); background-color: var(--accent-light); color: var(--primary-color); transform: translateY(-2px); box-shadow: 0 4px 8px rgba(197, 160, 42, 0.15); }
.time-btn.selected { background-color: var(--accent-color); color: white !important; border-color: var(--accent-color); transform: scale(1.05); box-shadow: 0 5px 15px rgba(197, 160, 42, 0.3); }
.time-btn.selected:hover { background-color: var(--accent-light); color: #3e2723 !important; }
.time-btn:disabled { background-color: #f0f0f0; color: #bbb; cursor: not-allowed; border-color: #eee; }

/* 預約成功動畫 */
.checkmark { width: 100px; height: 100px; border-radius: 50%; display: block; stroke-width: 2; stroke: #fff; stroke-miterlimit: 10; box-shadow: inset 0px 0px 0px #7ac142; animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both; margin: 0 auto; }
.checkmark__circle { stroke-dasharray: 166; stroke-dashoffset: 166; stroke-width: 2; stroke-miterlimit: 10; stroke: #7ac142; fill: none; animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards; }
.checkmark__check { transform-origin: 50% 50%; stroke-dasharray: 48; stroke-dashoffset: 48; animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards; }

/* --- 查詢預約紀錄區塊修復 --- */
.query-section { background: white; border-radius: 24px; padding: 3rem; margin-top: 5rem; box-shadow: var(--shadow-md); border: 1px solid #eee; }
.booking-item { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 1.5rem 2rem; 
    background: #fff;
    border-radius: 16px;
    margin-bottom: 1rem;
    border: 1px solid #f0f0f0;
    transition: all 0.3s;
}
.booking-item:hover { transform: translateX(5px); border-color: var(--accent-color); box-shadow: var(--shadow-sm); }
.booking-info h6 { font-size: 1.1rem; color: var(--primary-color); font-weight: 700; margin-bottom: 0.5rem; }
.booking-info .small { color: var(--text-muted); }

/* LINE 按鈕 */
#line-notify-btn { background: linear-gradient(135deg, #06C755 0%, #05a346 100%) !important; border: 2px solid rgba(255,255,255,0.2) !important; color: white !important; box-shadow: 0 10px 20px rgba(6,199,85,0.2) !important; transition: all 0.3s; }
#line-notify-btn:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 15px 30px rgba(6,199,85,0.3) !important; }

/* 表單與按鈕通用 */
.form-control { width: 100%; padding: 14px 18px; border: 1px solid var(--border-color); border-radius: 12px; font-size: 1rem; transition: all 0.3s; }
.btn { padding: 14px 28px; border-radius: 12px; transition: all 0.3s; border: none; font-weight: 700; cursor: pointer; }
.btn-accent { background: var(--accent-color); color: white; }
.btn-outline { background: white; border: 1px solid var(--border-color); color: var(--text-main); }

@keyframes fadeIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes stroke { 100% { stroke-dashoffset: 0; } }
@keyframes scale { 0%, 100% { transform: none; } 50% { transform: scale3d(1.1, 1.1, 1); } }
@keyframes fill { 100% { box-shadow: inset 0px 0px 0px 50px #7ac142; } }

@media (max-width: 992px) { .main-layout { flex-direction: column; } .sidebar-area { width: 100%; position: static; margin-top: 2rem; } }
