/* 書籍購入エントリーフォーム用CSS */

body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.content-wrapper {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.main-content {
    flex: 1;
    max-width: 750px; /* 明確な最大幅を設定 */
    min-width: 0; /* フレックスアイテムの縮小を許可 */
}

.sidebar {
    width: 350px;
    flex-shrink: 0; /* サイドバーの幅を固定 */
    /*position: relative;*/
    min-width: 350px; /* 最小幅も設定 */
}

.sticky-sidebar {
    position: sticky;
    top: 20px;
    z-index: 100; /* 他の要素に隠れないように */
}

.book-section {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    width: 100%; /* 幅を100%に設定 */
    box-sizing: border-box; /* パディングを含めた幅計算 */
}

.sidebar-box {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    width: 100%; /* 幅を100%に設定 */
    box-sizing: border-box; /* パディングを含めた幅計算 */
}

.book-image {
    width: 100%;
    max-width: 300px;
    height: auto;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    border-radius: 5px;
    margin-bottom: 20px;
}

.book-image-main {
    width: 100%;
    max-width: 300px;
    height: auto;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    border-radius: 5px;
    margin-bottom: 20px;
}

.price-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #e0e0e0;
}

.price-display {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #e0e0e0;
    text-align: center;
}

.price-text {
    font-size: 28px;
    font-weight: bold;
    color: #d32f2f;
    margin-bottom: 5px;
}

.tax-included {
    font-size: 14px;
    color: #666;
}

.shipping-info {
    color: #4caf50;
    font-weight: 600;
    font-size: 16px;
}

.product-description {
    border-top: 2px solid #e0e0e0;
    padding-top: 25px;
    margin-top: 25px;
}

/* フォームセクション関連 */
.form-step-section {
    margin-bottom: 30px;
    padding: 25px 0;
    border-bottom: 1px solid #eee;
    transition: all 0.3s ease;
    transform: translateY(20px);
    opacity: 0;
}

.form-step-section:last-child {
    border-bottom: none;
}

.form-step-section.show {
    transform: translateY(0);
    opacity: 1;
}

.form-step-section.completed {
    opacity: 0.7;
}

.form-step-section.completed h4 {
    color: #28a745;
}

.form-step-section.completed h4:before {
    content: '✓ ';
    color: #28a745;
    font-weight: bold;
}

/* 確認画面のスタイル調整 */
#confirm-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin-top: 20px;
}

#confirm-section h4 {
    color: #495057;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

/* ボタンスタイル */
.btn-purchase {
    background-color: #ff4444;
    color: white;
    font-size: 18px;
    font-weight: bold;
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    width: 100%;
    margin-top: 15px;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-purchase:hover {
    background-color: #cc0000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 68, 68, 0.3);
    color: white;
}

.guarantee-badge {
    background: #4caf50;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
    margin: 10px 0;
    font-size: 14px;
    font-weight: bold;
}

/* エラーメッセージ */
.error-message {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.error-message.show {
    display: block;
}

/* パスワードセクション */
#password-section {
    display: none;
    margin-top: 20px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.member-info-display {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 5px;
    padding: 15px;
    margin-top: 15px;
}

.member-info-display h6 {
    color: #155724;
    margin-bottom: 10px;
}

.book-info-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.book-info-list li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.book-info-list li strong {
    color: #666;
    margin-right: 10px;
}

footer {
    padding-top: 1em;
    padding-bottom: 1em;
    text-align: center;
    background: #fff;
}

/* レスポンシブ対応 */
@media (max-width: 1199px) {
    .main-container {
        max-width: 100%;
        padding: 15px;
    }
    
    .content-wrapper {
        gap: 20px;
    }
    
    .main-content {
        max-width: 700px;
    }
    
    .sidebar {
        width: 320px;
        min-width: 320px;
    }
}

@media (max-width: 991px) {
    .main-container {
        padding: 0;
    }
    
    .content-wrapper {
        flex-direction: column;
        gap: 0;
    }
    
    .main-content {
        max-width: 100%;
        width: 100%;
    }
    
    .book-section {
        border-radius: 0;
        margin-bottom: 10px;
        padding: 20px;
    }
    
    .sidebar {
        width: 100%;
        min-width: 100%;
        position: static;
    }
    
    .sticky-sidebar {
        position: static;
    }
    
    .sidebar-box {
        border-radius: 0;
        margin-bottom: 10px;
        padding: 20px;
    }
}

@media (max-width: 767px) {
    .content-wrapper {
        gap: 0;
    }
    
    .book-section,
    .sidebar-box {
        padding: 15px;
        margin-bottom: 5px;
    }
    
    .price-text {
        font-size: 24px;
    }
}

@media (max-width: 576px) {
    .book-section,
    .sidebar-box {
        padding: 15px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    .btn-purchase {
        font-size: 16px;
        padding: 12px 20px;
    }
    
    .price-text {
        font-size: 22px;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"],
    select {
        font-size: 16px !important;
    }
    
    footer {
        padding-top: 1em;
        padding-bottom: 6rem;
        text-align: center;
        background: #fff;
    }
}













/*------------------------------------*\
    $RELATED BOOKS
\*------------------------------------*/

.related_books {
    background: #f8f9fa;
    padding: 2rem 0 4rem 0;
    margin-top: 60px;
}

.section_title {
    text-align: center;
    font-size: 2.5rem;
    margin-top: 0;
    font-weight: 700;
    color: #033769;
    margin-bottom:30px;
}

.related_books_slider {
    padding: 20px 0 40px;
}

.related_books_slider .swiper-slide {
    height: auto;
    display: flex;
}

.book_item {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    height: 100%;
    width: 100%;
    min-height: 300px;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.book_item:hover {
    transform: translateY(-5px);
}

.book_item .book_image {
    margin-bottom: 20px;
}

.book_item .book_image img {
    width: 100%;
    max-width: 150px;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.book_item .book_info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #033769;
    margin-bottom: 15px;
    line-height: 1.4;
}

.book_item .book_info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.book_item .author {
    color: #666;
    margin-bottom: 10px;
}

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

.book_link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.3s ease;
}

.book_link:hover {
    transform: translateY(-5px);
}

.book_info h3 .book_link {
    color: #033769;
    text-decoration: none;
}

.book_info h3 .book_link:hover {
    color: #e74c3c;
    transform: none;
}

/* Swiper Navigation */
/* モバイル固定CTA */
.mobile_fixed_cta{
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.96);
    box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
    padding: 8px 10px;
    display: none;
    z-index: 1001;
}

.mobile_cta_btn{
    flex: 1 1 0;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 10px 14px;
    font-size: 1rem;
    font-weight: 700;
}

.mobile_fixed_cta{ gap: 8px; }

.mobile_cta_btn--line{
    background: #00c300;
}

@media (max-width: 768px){
    .mobile_fixed_cta{ display: flex; }
    body{ padding-bottom: 70px; }
}
.swiper-button-next,
.swiper-button-prev {
    color: #bd052c !important;
}

.swiper-pagination-bullet {
    background: #bd052c !important;
}

.swiper-pagination-bullet-active {
    background: #bd052c !important;
}


/* 展開可能な項目のみに+マークを表示 */
.toc_subtitle.has-items {
    cursor: pointer;
    position: relative;
}

.toc_subtitle.has-items:after {
    content: '+';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2em;
    font-weight: normal;
    transition: transform 0.3s ease;
}

.toc_subtitle.has-items.active:after {
    content: '-';
}

/* 展開できない項目には+マークを表示しない */
.toc_subtitle.no-items {
    cursor: default;
}

.toc_subtitle.no-items:after {
    display: none;
}