/* 🌟 日系核心色彩：極淺灰背景，柔和深灰字 */
:root {
    --bg-color: #FAFAFA;      /* 帶有一點點溫暖的極淺灰 */
    --card-bg: #FFFFFF;
    --text-main: #2D2D2D;     /* 避免純黑，深灰更高級柔和 */
    --text-muted: #888888;
    --wa-green: #25D366;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent; /* 移除手機點擊時的藍色高亮 */
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    padding-bottom: 60px;
}

/* 1. 極簡 Header */
header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px); /* 現代磨砂玻璃效果 */
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #EEEEEE;
}

.header-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header h1 {
    font-size: 1.15rem;
    font-weight: 400;
    letter-spacing: 3px;
    margin: 0 0 6px 0;
}

.sub-nav a {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 1px dashed #CCCCCC;
    padding-bottom: 1px;
}

/* 2. 手機雙欄網格 (大留白，呈現逛實體店的呼吸感) */
.book-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 16px; /* 上下間距大一點 */
    padding: 24px 16px;
    max-width: 600px;
    margin: 0 auto;
}

/* 3. 書籍卡片 (大封面佔比 80%) */
.book-card {
    display: flex;
    flex-direction: column;
    background-color: var(--card-bg);
    padding: 8px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03); /* 極淡陰影 */
}

/* 確保所有封面比例統一，多餘裁剪 */
.img-wrapper {
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 2px;
    box-shadow: 1px 2px 6px rgba(0,0,0,0.08); /* 書籍立體陰影 */
}

.book-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* 極精簡文字區 */
.book-info {
    margin: 10px 0 6px 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.book-info .tag {
    font-size: 0.75rem;
    font-weight: bold;
    color: var(--text-main);
}

.book-info .isbn {
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

/* 極簡查詢按鈕 */
.wa-order-btn {
    background: transparent;
    border: 1px solid #DDDDDD;
    color: var(--text-main);
    padding: 6px 0;
    border-radius: 2px;
    font-size: 0.75rem;
    letter-spacing: 1px;
    cursor: pointer;
    width: 100%;
    margin-top: auto; /* 確保按鈕永遠對齊底部 */
}

.wa-order-btn:active {
    background-color: #F5F5F5;
}

/* 4. 翻頁按鈕區 */
.pagination-area {
    max-width: 600px;
    margin: 20px auto 60px auto;
    padding: 0 16px;
    text-align: center;
}

.page-indicator {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    letter-spacing: 2px;
}

/* 巨大的下一版按鈕，吸引客人一直點下去 */
.next-btn {
    display: block;
    width: 100%;
    padding: 16px;
    background-color: var(--text-main);
    color: #FFFFFF;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: bold;
    letter-spacing: 2px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.next-btn:active {
    background-color: #000000;
}

/* 上一版按鈕做得很內斂灰色，不搶視覺 */
.prev-btn {
    display: inline-block;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 16px;
    cursor: pointer;
    text-decoration: underline;
}

/* 5. 常駐右下角 WhatsApp */
.floating-wa {
    position: fixed;
    bottom: 24px;
    right: 20px;
    background-color: var(--wa-green);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.4rem;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 9999;
}

.msg {
    grid-column: span 2;
    text-align: center;
    color: var(--text-muted);
    padding: 60px 0;
    font-size: 0.85rem;
}
/* --- 書籍詳細頁樣式 --- */
.back-btn {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.detail-container {
    max-width: 600px;
    margin: 0 auto;
    padding-bottom: 60px;
}

.detail-hero {
    width: 100%;
    /* 滿版寬度 */
}

.detail-hero img {
    width: 100%;
    height: auto;
    display: block;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.detail-info {
    padding: 24px 20px;
    background: #FFF;
    border-bottom: 1px solid #EEE;
}

.detail-info p {
    margin: 0 0 16px 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-main);
}

.detail-info strong {
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.recommend-section {
    padding: 24px 20px;
}

.recommend-section h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0 0 16px 0;
    text-align: center;
    font-weight: normal;
    letter-spacing: 1px;
}

.recommend-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.pure-image {
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}