/* index.css - 書籍一覧ページ専用スタイル */

/*------------------------------------*\
    $ヒーローセクション
\*------------------------------------*/
.hero_section {
    background: linear-gradient(135deg, #033769 0%, #0056b3 100%);
    color: #fff;
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero_section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M0,0V15.81C13,36.21,27.64,56.61,47.34,72.05c33.73,26.26,79.94,41.66,130.62,41.66,96.11,0,167.41-55.75,211.27-113,48.65-63.05,121.37-117.83,223.93-117.83,137.89,0,244.46,101.89,282.49,140.8,27.35,27.94,58.21,57.88,97.47,74.97,114.28,49.78,225.85-18.03,316.44-84.74V0Z" fill="rgba(255,255,255,0.1)"/></svg>') no-repeat bottom;
    background-size: 100% 100px;
}

.hero_content {
    position: relative;
    z-index: 1;
}

.hero_title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero_subtitle {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

/* 検索フォーム */
.search_form {
    max-width: 600px;
    margin: 0 auto;
}

.search_box {
    position: relative;
    display: flex;
    background: #fff;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    overflow: hidden;
}

.search_input {
    flex: 1;
    padding: 16px 24px;
    border: none;
    font-size: 1.1rem;
    outline: none;
    color: #333;
}

.search_btn {
    background: #e74c3c;
    border: none;
    padding: 0 30px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search_btn:hover {
    background: #c0392b;
}

.search_btn i {
    color: #fff;
    font-size: 1.2rem;
}

/*------------------------------------*\
    $メインコンテンツ
\*------------------------------------*/
.main_content {
    padding: 60px 0;
    background: #f8f9fa;
    min-height: 500px;
}

/* 検索結果ヘッダー */
.search_results_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 15px 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.search_results_text {
    font-size: 1.1rem;
    color: #333;
    margin: 0;
}

.clear_search {
    color: #e74c3c;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.clear_search:hover {
    opacity: 0.7;
}

/*------------------------------------*\
    $書籍グリッド
\*------------------------------------*/
.book_grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.book_card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}

.book_card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.book_link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 書籍画像 */
.book_image_wrapper {
    position: relative;
    padding-top: 140%; /* 縦長の比率 */
    background: #f5f5f5;
    overflow: hidden;
}

.book_image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.book_card:hover .book_image {
    transform: scale(1.05);
}

.book_image_placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e9ecef;
}

.book_image_placeholder i {
    font-size: 4rem;
    color: #adb5bd;
}

/* 送料無料バッジ */
.free_shipping_badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #28a745;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* 書籍情報 */
.book_info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.book_name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #033769;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book_author {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 12px;
}

.book_description {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 価格セクション */
.price_section {
    margin: auto 0 10px 0;
    padding-top: 10px;
}

.price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e74c3c;
}

.tax_included {
    font-size: 0.75rem;
    color: #666;
    margin-left: 4px;
}

.shipping_fee {
    font-size: 0.85rem;
    color: #666;
    margin: 5px 0;
}

.shipping_fee i {
    color: #28a745;
    margin-right: 5px;
}

/* 販売者情報 */
.book_seller {
    font-size: 0.8rem;
    color: #999;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.seller_label {
    font-weight: 500;
}

/* アクションボタン */
.book_action {
    padding: 0 20px 20px;
}

.view_detail_btn {
    width: 100%;
    background: #033769;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.view_detail_btn:hover {
    background: #022549;
}

.view_detail_btn i {
    font-size: 0.9rem;
}

/*------------------------------------*\
    $空状態
\*------------------------------------*/
.empty_state {
    text-align: center;
    padding: 80px 20px;
    color: #6c757d;
}

.empty_state i {
    font-size: 5rem;
    color: #dee2e6;
    margin-bottom: 30px;
}

.empty_state h3 {
    font-size: 1.5rem;
    color: #495057;
    margin-bottom: 15px;
}

.empty_state p {
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.empty_state .btn {
    display: inline-block;
    padding: 12px 30px;
    background: #033769;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.empty_state .btn:hover {
    background: #022549;
}

/*------------------------------------*\
    $ページネーション
\*------------------------------------*/
.pagination_wrapper {
    display: flex;
    justify-content: center;
    margin-top: 50px;
}

.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 8px;
}

.page-item {
    margin: 0;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: #fff;
    color: #033769;
    text-decoration: none;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: #033769;
    color: #fff;
    border-color: #033769;
}

.page-item.active .page-link {
    background: #033769;
    color: #fff;
    border-color: #033769;
}

.page-item.disabled .page-link {
    color: #adb5bd;
    background: #f8f9fa;
    cursor: not-allowed;
}

.page-item.disabled .page-link:hover {
    background: #f8f9fa;
    color: #adb5bd;
    border-color: #dee2e6;
}

/*------------------------------------*\
    $特徴セクション
\*------------------------------------*/
.features_section {
    background: #fff;
    padding: 80px 0;
    border-top: 1px solid #e9ecef;
}

.features_grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.feature_item {
    text-align: center;
}

.feature_item i {
    font-size: 3rem;
    color: #033769;
    margin-bottom: 20px;
}

.feature_item h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 10px;
}

.feature_item p {
    color: #666;
    font-size: 1rem;
}

/*------------------------------------*\
    $レスポンシブ対応
\*------------------------------------*/
@media (max-width: 768px) {
    .hero_title {
        font-size: 2rem;
    }
    
    .hero_subtitle {
        font-size: 1rem;
    }
    
    .search_input {
        font-size: 1rem;
        padding: 12px 16px;
    }
    
    .search_btn {
        padding: 0 20px;
    }
    
    .main_content {
        padding: 40px 0;
    }
    
    .book_grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .book_info {
        padding: 15px;
    }
    
    .book_name {
        font-size: 1rem;
    }
    
    .price {
        font-size: 1.2rem;
    }
    
    .view_detail_btn {
        font-size: 0.9rem;
        padding: 10px 15px;
    }
    
    .features_section {
        padding: 60px 0;
    }
    
    .feature_item i {
        font-size: 2.5rem;
    }
    
    .search_results_header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/*------------------------------------*\
    $TABLE OF CONTENTS
\*------------------------------------*/

.table_of_contents {
    margin-bottom: 40px;
    padding: 2rem;
}

.table_of_contents h3 {
    font-size: 1.5rem;
    color: #033769;
    margin-bottom: 25px;
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 3px solid #c7c7c7
}

/* 新アコーディオン構造 */
.toc_list{  border-radius:10px; overflow:hidden; }
.toc_chapter{ background: #f6f6f6 }
.toc_chapter:last-child{ border-bottom:none; }


/* 章見出しは常時展開（トグルUIなし） */
/* 章見出しは中見出し（クリック対象）に統合したため非表示（念のため） */
.toc_chapter_header{ display:none; }

/* 章の中身（小見出しリスト）は常時表示 */
.toc_sublist{ padding:12px 16px 16px; background:#fff; }
    
.toc_subitem{ border:0; border-radius:0; margin:0; padding:0; }
.toc_subtitle{
    position:relative; margin:0; padding:18px 44px 18px 20px; cursor:pointer;
    font-size:1.1em; font-weight:600; color:#033769; background:transparent;
    border-bottom:1px solid #d6d6d6;
}
.toc_chapter:last-child .toc_subtitle{ border-bottom:none; }
.toc_subtitle:after{ content:'+'; position:absolute; right:14px; top:50%; transform:translateY(-50%); color:#7a869a; font-size:1.2rem; transition:transform .2s ease; }
.toc_subtitle.active:after{ transform:translateY(-50%) rotate(45deg); }

/* 小見出しクリックで出る「小見出しリスト」 */
.toc_minilist{ margin:0; padding:8px 20px 14px; display:none; }
.toc_minilist.active{ display:block; }
.toc_miniitem{ list-style:none; position:relative; display:flex; align-items:center; gap:19px;margin-bottom:0;margin-top: 5px; }
.toc_miniitem:before{ content:"\25B6"; font-size:12px; color:#033769; position:static; line-height:1; }
/* 既存のリンクは見た目と挙動をテキスト化 */
.toc_miniitem a{ color:inherit; text-decoration:none; border:0; pointer-events:none; cursor:default; }
.toc_miniitem a:hover{ color:inherit; }
