@charset "UTF-8";

/* ==================================================
   個別セール記事 情報ボックス
================================================== */
.MainSect > h1.ArticleH1, .MainSect > h2 {
    text-wrap: initial;
    word-break: normal;
    line-height: 1.4;
    margin-bottom: 15px;
}

.MainSect > h1.ArticleH1 {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ==================================================
   トグルボタン
================================================== */
.ViewToggleBtn {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, border-color 0.2s;
    height: 34px;
    outline: none;
    flex-shrink: 0;
}
.ViewToggleBtn:hover {
    background: #f4f6f6;
    border-color: #007185;
}
.ViewToggleBtn img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.ViewToggleBtn:hover img {
    opacity: 1;
}

.ArticleInfoBox {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid #eee;
}
.ArticleInfoBox .InfoPeriod {
    margin-bottom: 12px;
    font-weight: bold;
    color: #333;
    font-size: 15px;
}
.ArticleInfoBox .PeriodDate {
    color: #cc0c39;
}
.ArticleInfoBox .InfoBadges {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ArticleInfoBox .InfoPublisher {
    display: flex;
}
.ArticleInfoBox .InfoGenre {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.ArticleInfoBox .BadgeList {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.ArticleInfoBox .PublisherBadge,
.ArticleInfoBox .ArticleGenre {
    font-size: 12px;
    font-weight: normal;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
    border: 1px solid;
    background-color: #fff;
    line-height: 1.5;
}
.ArticleInfoBox .PublisherBadge {
    color: #d67a00;
    border-color: #ffcc80;
    background-color: #fffaf0;
}
.ArticleInfoBox .ArticleGenre {
    color: #1a66a1;
    border-color: #99c2ff;
    background-color: #f0f7ff;
}

.AuthorMeta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #ddd;
    font-size: 12px;
    color: #666;
}
.AuthorMeta a { 
    color: #007185; 
    text-decoration: underline; 
    font-weight: bold;
}
.AuthorMeta .UpdateDate {
    color: #007185;
}

/* ==================================================
   目次（TOC）メニュー
================================================== */
.TocBox {
    margin-bottom: 25px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    overflow: hidden;
}
.TocSummary {
    padding: 12px 15px;
    background: #f9f9f9;
    font-weight: bold;
    font-size: 15px;
    cursor: pointer;
    outline: none;
    color: #333;
}
.TocSummary:hover {
    background: #f1f1f1;
}
.TocList {
    padding: 10px 15px 15px;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.TocList li {
    list-style: none;
}
.TocList a {
    display: inline-block;
    background: #e8f0fe;
    color: #007185;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none;
    transition: background 0.2s;
}
.TocList a:hover {
    background: #d2e3fc;
}

/* ==================================================
   個別セール記事 小見出し
================================================== */
.SubSectTitle {
    font-size: 18px;
    color: #333;
    background-color: #f4f6f6;
    border-left: 5px solid #ff8400;
    padding: 10px 15px;
    margin: 30px 0 15px;
    border-radius: 0 4px 4px 0;
}

/* ==================================================
   Amazon公式ボタン
================================================== */
.AmazonBtnArea {
    margin: 15px 0 30px;
    text-align: center;
    width: 100%;
}
.AmazonLinkBtn {
    display: block;
    width: 100%;
    padding: 14px;
    background: #ff9900;
    color: #232f3e;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    border-radius: 8px;
    box-sizing: border-box;
    transition: background-color 0.2s;
}
.AmazonLinkBtn:hover {
    background: #e38800;
}

/* ==================================================
   本用カードデザイン
================================================== */
.BookList {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}
.BookCard {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 240px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
    cursor: default;
    
    content-visibility: auto;
    contain-intrinsic-size: 240px 380px;
}
.BookCard:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.CardLink {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    cursor: pointer;
}

.BookCard .CardImage {
    width: 100%;
    height: 220px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fafafa;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}
.BookCard .CardImage img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.15));
}
.BookCard .CardImage.is-adult img {
    filter: blur(8px);
}

.CardBody {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.CardTitle {
    font-size: 14px;
    color: #333;
    line-height: 1.4;
    font-weight: bold;
    margin: 0 0 10px 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    text-wrap: wrap;
    word-break: break-all;
}

.CardPriceBox {
    margin-top: auto;
    display: flex;
    flex-direction: column;
}
.BadgeArea {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 4px;
}
.FreeTag, .DiscountRate, .PointRateBadge {
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    border-radius: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 18px;
}
.FreeTag {
    background-color: #cc0c39;
    width: 76px;
}
.DiscountRate {
    background-color: #2196f3;
    padding: 0 6px;
}
.PointRateBadge {
    background-color: #ff8400;
    padding: 0 6px;
}

.PriceWrapper {
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
}
.PriceColumn {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.ListPrice {
    color: #888;
    font-size: 12px;
    line-height: 1;
    margin-bottom: 2px;
}
.ListPriceEmpty {
    height: 12px;
    margin-bottom: 2px;
}
.CurrentPrice {
    color: #cc0c39;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
}
.Points {
    color: #007185;
    font-size: 12px;
    margin-left: 4px;
    line-height: 1.2;
}

.SampleBtn {
    position: relative;
    z-index: 2;
    margin-left: auto;
    padding: 2px 10px;
    border: 1px solid #ccc;
    border-radius: 12px;
    background-color: #fff;
    color: #888;
    font-size: 11px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.2s;
    line-height: 1.4;
    display: inline-block;
    white-space: nowrap;
}

.SampleBtn:hover {
    background-color: #f8f8f8;
    color: #666;
    border-color: #999;
}

/* ==================================================
   リスト表示切り替え時 (画像なし・2行構成の極限高密度レイアウト)
================================================== */
.BookList.is-list-view {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 20px;
    border-top: 2px solid #232f3e;
}

.BookList.is-list-view .BookCard {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 5px;
    text-align: left;
    border: none;
    border-bottom: 1px dashed #ddd;
    border-radius: 0;
    box-shadow: none;
    background-color: transparent;
    width: 100%;
    height: auto;
    min-height: auto;
    /* content-visibilityのバグで中身が消えるのを防ぐ */
    content-visibility: visible;
    contain-intrinsic-size: auto;
    overflow: visible;
}

.BookList.is-list-view .BookCard:hover {
    transform: none;
    background-color: #f4f6f6;
    box-shadow: none;
    z-index: 1;
}

/* 画像は完全に非表示 */
.BookList.is-list-view .CardImage {
    display: none;
}

/* 内部の余白をなくす */
.BookList.is-list-view .CardBody {
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    gap: 6px;
    width: 100%;
}

/* 1行目：タイトル（太字・黒色・少し大きくして主張） */
.BookList.is-list-view .CardTitle {
    font-size: 15px;
    font-weight: bold;
    color: #111;
    line-height: 1.4;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    width: 100%;
}

.BookList.is-list-view .BookCard:hover .CardTitle {
    text-decoration: underline;
    color: #cc0c39;
}

/* 2行目：その他の情報 (4ブロックに分けて垂直位置を完全に揃える) */
.BookList.is-list-view .CardPriceBox {
    margin-top: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    flex-wrap: nowrap;
}

/* 2行目：その他の情報 (4ブロックに分けて垂直位置を完全に揃える) */
.BookList.is-list-view .CardPriceBox {
    margin-top: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    flex-wrap: nowrap;
}

/* ブロック1：バッジエリア (固定幅) */
.BookList.is-list-view .BadgeArea {
    width: 78px; 
    margin: 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

/* 残りの要素をまとめるラッパー */
.BookList.is-list-view .PriceWrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-grow: 1;
    gap: 0;
}

.BookList.is-list-view .PriceColumn {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: flex-start;
    flex-shrink: 0;
}

/* ブロック2：元値 (固定幅。元値なしのEmptyも空間として維持してズレを防ぐ) */
.BookList.is-list-view .ListPrice,
.BookList.is-list-view .ListPriceEmpty {
    display: inline-block;
    width: 48px;
    margin: 0 6px 0 0;
    text-align: right;
    font-size: 11px;
}

/* ブロック3-A：価格 (固定幅) */
.BookList.is-list-view .CurrentPrice {
    display: inline-block;
    width: 52px;
    text-align: right;
    font-size: 15px;
}

/* ブロック3-B：ポイント (固定幅) */
.BookList.is-list-view .Points {
    display: inline-block;
    width: 65px;
    margin-left: 4px;
    text-align: left;
    flex-shrink: 0;
}

/* ブロック4：サンプルボタン (右端に寄せる) */
.BookList.is-list-view .SampleBtn {
    margin-left: auto;
    margin-top: 0;
    flex-shrink: 0;
}

/* スマホ表示時の調整 */
@media screen and (max-width: 559px) {
    .BookList { flex-direction: column; gap: 10px; }
    .BookCard {
        width: 100%;
        flex-direction: row;
        height: 130px;
        contain-intrinsic-size: auto 130px;
    }
    .BookCard .CardImage {
        width: 120px;
        height: auto;
        padding: 8px;
        border-bottom: none;
        border-right: 1px solid #f0f0f0;
    }
    .CardBody {
        padding: 10px;
        width: calc(100% - 120px);
        gap: 2px;
    }
    .CardTitle { font-size: 13px; -webkit-line-clamp: 2; margin-bottom: 2px; }
    .BadgeArea { min-height: auto; }
    .FreeTag, .DiscountRate, .PointRateBadge { font-size: 10px; height: 16px; }
    .FreeTag { width: 68px; }
    .DiscountRate, .PointRateBadge { padding: 0 4px; }
    .ListPrice { font-size: 11px; margin-bottom: 1px; }
    .ListPriceEmpty { height: 11px; margin-bottom: 1px; }
    .CurrentPrice { font-size: 16px; }

    /* スマホ時のリストビュー調整 (通常カードのスマホレイアウトを上書きリセット) */
    .BookList.is-list-view .BookCard {
        flex-direction: column;
        padding: 10px 0;
        border-radius: 0;
        height: auto;
        min-height: auto;
        contain-intrinsic-size: auto;
        content-visibility: visible;
        overflow: visible;
    }
    .BookList.is-list-view .CardBody {
        width: 100%;
        padding: 0 5px;
        gap: 6px;
    }
    .BookList.is-list-view .CardTitle {
        font-size: 14px;
        white-space: nowrap;
    }
    
    /* ブロックごとの幅をスマホの画面幅に合わせて切り詰め */
    .BookList.is-list-view .BadgeArea {
        width: 70px;
    }
    .BookList.is-list-view .ListPrice,
    .BookList.is-list-view .ListPriceEmpty {
        width: 42px;
        margin: 0 4px 0 0;
    }
    .BookList.is-list-view .CurrentPrice {
        width: 48px;
        font-size: 14px;
    }
    .BookList.is-list-view .Points {
        width: 50px;
        margin-left: 2px;
        font-size: 11px;
    }
    .BookList.is-list-view .SampleBtn {
        padding: 2px 6px;
        font-size: 10px;
    }
}