/* ==========================================
   bookinfo.css  –  書籍詳細ページ
   アクセント: #e8780a（オレンジ）
   ========================================== */

:root {
    --accent:        #e8780a;
    --accent-dark:   #c96508;
    --accent-light:  #fff4eb;
    --accent-mid:    #fde3c8;
    --text:          #1a1a1a;
    --text-sub:      #666;
    --text-muted:    #999;
    --border:        #e8e0d8;
    --bg-card:       #ffffff;
    --bg-page:       #faf8f6;
    --red:           #e03a3a;
    --shadow-sm:     0 2px 8px rgba(0,0,0,.07);
    --shadow-md:     0 6px 24px rgba(0,0,0,.10);
    --shadow-lg:     0 12px 40px rgba(0,0,0,.13);
    --radius-sm:     6px;
    --radius-md:     12px;
    --radius-lg:     18px;
}

/* ── ページ背景 ─────────────────────────────── */
.book-info-page {
/*    background: var(--bg-page); */
    min-height: 100vh;
    margin-top: 0;        /* 追加 */
    padding-top: 0;       /* 追加 */
}

/* ── ラッパー ───────────────────────────────── */
.content-wrapper {
    margin: 0 auto;
    max-width: 1000px;
    padding: 32px 16px 60px;
}

/* ── ヘッダー下ライン ───────────────────────── */
.page-header h1::after {
    background-color: #e8780a;
}

/* ── メインカード ───────────────────────────── */
.book-card {
    display: flex;
    gap: 36px;
    background: var(--bg-card);
    padding: 36px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 28px;
    align-items: flex-start;
    border-top: 4px solid var(--accent);
    position: relative;
    overflow: hidden;
}

/* カード右上の装飾三角 */
.book-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 80px; height: 80px;
    background: linear-gradient(225deg, var(--accent-mid) 50%, transparent 50%);
    pointer-events: none;
}

/* ── 表紙画像エリア ─────────────────────────── */
.book-card-visual {
    flex-shrink: 0;
    width: 180px;
}

.book-card-visual img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-card-visual img:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 18px 48px rgba(0,0,0,.18);
}

/* ── 書籍情報エリア ─────────────────────────── */
.book-card-body {
    flex-grow: 1;
    min-width: 0;
}

/* タイトル */
.book-title {
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--text);
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}

.book-title .vol {
    font-size: 1.55rem;   /* 1.1rem → 1.55rem */
    font-weight: 600;
    color: var(--accent);
    margin-left: 4px;
}

/* スペックグリッド */
.specs-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    margin: 16px 0;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.specs-grid dl {
    display: flex;
    margin: 0;
    min-width: 140px;
    font-size: 1rem;
}

.specs-grid dl.publisher {
    flex-basis: 100%;
}

.specs-grid dt {
    width: 70px;
    color: var(--text-muted);
    flex-shrink: 0;
    font-size: 1rem;
    padding-top: 2px;
}

.specs-grid dd {
    margin: 0;
    font-weight: 700;
    color: var(--text);
}

/* ── お得パネル ─────────────────────────────── */
.benefit-panel {
    background: linear-gradient(135deg, #fff8f2 0%, #fff4eb 100%);
    border: 2px solid var(--accent-mid);
    border-left: 4px solid var(--accent);
    padding: 14px 20px;
    border-radius: var(--radius-md);
    line-height: 1.5;
    position: relative;
}

.panel-label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-dark);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
}

.panel-label::before,.panel-label::after {
    content: '';
    display: inline-block;
    width: 16px; height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

.price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    color: var(--text);
    flex-wrap: wrap;
    justify-content: center;
}

.price-val {
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent);
    letter-spacing: -0.02em;
    line-height: 1;
}

.tax-note {
    font-size: 1rem;
    color: var(--text-sub);
}

.weight-inline {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-muted);
}

.off-row {
    display: flex;
    margin-top: 6px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    justify-content: center;
}

.off-highlight {
    color: var(--red);
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(transparent 65%, rgba(232, 120, 10, .25) 65%);
    padding: 0 2px;
}

/* ── サブコンテンツ ─────────────────────────── */
.sub-content-grid {
    padding: 0;
}

/* 作品紹介 */
.description-box {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 24px 28px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    border-left: 3px solid var(--accent);
}

.description-box h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-dark);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.description-box h3::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.description-box p {
    font-size: 1rem;
    color: var(--text-sub);
    line-height: 1.8;
    margin: 0;
}

/* ── サイドバーレイアウト ───────────────────── */
.sidebar-layout-flex {
    display: flex;
    gap: 20px;
    align-items: stretch;
}

.link-sidebar { flex: 2; min-width: 0; }
.amazon-sidebar { flex: 1; min-width: 0; }

/* 関連リンクカード */
.link-group {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 22px 24px;
    box-shadow: var(--shadow-sm);
    height: 100%;
    box-sizing: border-box;
}

.link-group h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-dark);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.link-group h4::before {
    content: '';
    display: inline-block;
    width: 10px; height: 10px;
    background: var(--accent);
    border-radius: 2px;
    flex-shrink: 0;
}

.related-links-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.related-links-list a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bg-page);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    text-decoration: none;
    font-size: 1rem;
    line-height: 1.4;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.related-links-list a::before {
    content: '›';
    color: var(--accent);
    font-size: 1.2rem;
    font-weight: 700;
    flex-shrink: 0;
    line-height: 1;
}

.related-links-list a:hover {
    background: var(--accent-light);
    border-color: var(--accent);
    color: var(--accent-dark);
}

/* 戻るボタン */
.action-area {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px dashed var(--border);
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    background: var(--bg-page);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-sub);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}

.btn-back .arrow {
    font-size: 1.1rem;
    color: var(--accent);
}

.btn-back:hover {
    background: var(--accent-light);
    border-color: var(--accent);
    color: var(--accent-dark);
}

/* Amazonカード */
.amazon-links {
    background: #fffdf5;
    border: 1px solid #f0e6c0;
    border-top: 3px solid #f0a500;
    padding: 18px;
    border-radius: var(--radius-md);
    height: 100%;
    box-sizing: border-box;
}

.amazon-flex-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-top: 10px;
}

.amazon-disclaimer {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

.amazon-img-link img {
    width: 110px;
    height: auto;
    border-radius: 4px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: opacity 0.2s, transform 0.2s;
    flex-shrink: 0;
}

.amazon-img-link img:hover {
    opacity: 0.82;
    transform: scale(1.03);
}

/* 在庫なしアラート */
.alert-box-warn {
    background: #fff8f2;
    border: 2px solid var(--accent-mid);
    border-left: 5px solid var(--accent);
    border-radius: var(--radius-md);
    padding: 28px 32px;
    margin: 40px auto;
    max-width: 600px;
    text-align: center;
}

.alert-box-warn .main-msg {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 8px;
}

.alert-box-warn .sub-msg {
    font-size: 0.9rem;
    color: var(--text-sub);
    margin: 0;
    line-height: 1.7;
}

/* ── レスポンシブ ───────────────────────────── */
@media (max-width: 768px) {
    .content-wrapper {
        padding: 20px 12px 48px;
    }

    .book-card {
        flex-direction: column;
        align-items: center;
        padding: 24px 20px;
        gap: 24px;
    }

    .book-card::before { display: none; }

    .book-card-visual {
        width: 180px;
    }

    .book-card-body {
        width: 100%;
    }

    .book-title {
        font-size: 1.3rem;
        text-align: center;
    }

    .specs-grid {
        display: block;
        max-width: 280px;
        margin: 12px auto 16px;
    }

    .specs-grid dl {
        width: 100%;
        margin-bottom: 5px;
    }

    .specs-grid dl.publisher {
        flex-basis: auto;
    }

    .benefit-panel {
        padding: 12px 16px;
        text-align: center;
    }

    .price-val {
        font-size: 1.5rem;
    }

    .sidebar-layout-flex {
        flex-direction: column;
        gap: 16px;
    }

    .link-sidebar,
    .amazon-sidebar {
        width: 100%;
    }

    .description-box {
        padding: 18px 16px;
    }

    .link-group {
        padding: 18px 16px;
    }

    .amazon-img-link img {
        width: 80px;
    }

    .action-area {
        text-align: center;
    }

    .btn-back {
        width: 80%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .book-title {
        font-size: 1.15rem;
    }

    .price-val {
        font-size: 1.4rem;
    }
}
