/* css/index2.css */

/* 基本設定 */
body {
    font-family: sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    font-size: 1rem; /* ページ全体の文字サイズを統一 */
}

/* ヘッダー */
header {
    background-color: #333;
    color: #fff;
    padding: 1rem 0;
    text-align: center;
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
}

header nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

header nav ul li {
    display: inline;
    margin: 0 15px;
}

header nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem; /* 明示的にフォントサイズを設定 */
}

/* メインコンテンツ */
main {
    padding: 20px;
    max-width: 1200px;
    margin: auto;
}

/* ヒーローセクション (メインビジュアル) */
.hero {
    text-align: center;
    margin-bottom: 40px;
}

.hero img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.hero p {
    font-size: 1.2rem;
    margin-top: 10px;
    color: #555;
}

/* ご注意下さいセクション */
.disclaimer {
    background-color: #fff;
    padding: 20px;
    margin-bottom: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.disclaimer h2 {
    color: #333;
    margin-bottom: 10px;
}

.disclaimer p {
    font-size: 0.9rem;
    color: #666;
}

/* お知らせセクション */
.news {
    background-color: #fff;
    padding: 20px;
    margin-bottom: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.news h2 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

.news ul {
    list-style: none;
    padding: 0;
}

.news ul li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.news ul li:last-child {
    border-bottom: none;
}

/* 作品紹介セクション */
.works,
.promotional-items {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 40px; /* セクション間の余白 */
}

.works h2,
.promotional-items h2 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

/* 商品一覧内の分類タイトル */
.promotional-items h3 {
    font-size: 1.5rem; /* フォントサイズを大きく */
    color: #0056b3; /* 色を変更 */
    text-align: left; /* 左揃え */
    margin-top: 30px; /* 上の余白 */
    margin-bottom: 15px; /* 下の余白 */
    padding-bottom: 5px;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.product-item {
    background-color: #fff;
    border: 2px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
    text-align: left;
    padding: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    box-sizing: border-box;
}

.product-item img {
    max-width: 100%; /* 画像サイズを70%に調整 */
    height: auto;
    display: block;
    margin: 0 auto 10px auto; /* センタリング */
}

.product-item h3 {
    margin: 10px 0;
    color: #333;
    font-size: 1em; /* 文字サイズをもう一段階小さく */
    text-align: center; /* センタリング */
    word-break: keep-all; /* 日本語の適切な位置で改行 */
    overflow-wrap: break-word; /* 長い単語のはみ出しを防ぐ */
}

.product-item p {
    font-size: 0.9em;
    color: #666;
    padding: 0 15px;
    text-align: left;
}

.product-item .author-info,
.product-item .description-text,
.product-item .series,
.product-item .description {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
    text-align: left;
    padding-left: 15px; /* 必要に応じて調整 */
}
.product-item .status{
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
    text-align: right;
    padding-left: 15px; /* 必要に応じて調整 */
}

.product-item .links {
    margin-top: 15px;
    text-align: left;
    padding-left: 15px;
}

.product-item .links a {
    display: inline-block;
    background-color: #007bff;
    color: #fff;
    padding: 5px 8px; /* パディングを調整してボタンを小さく */
    font-size: 0.7em; /* 現在のフォントサイズを維持 */
    text-decoration: none;
    border-radius: 5px;
    margin: 5px;
}

.product-item .links a:hover {
    background-color: #0056b3;
}

/* フッター */
footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 1rem 0;
    margin-top: 40px;
}

footer .contact-info p {
    margin: 5px 0;
    font-size: 0.9rem;
}

footer .social-links a {
    color: #fff;
    text-decoration: none;
    margin: 0 10px;
}

footer .social-links a:hover {
    text-decoration: underline;
}

.product-grid-common {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 250px));
    gap: 20px;
    margin-bottom: 40px;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    header nav ul { /* ul要素にflexboxを適用 */
        display: flex;
        flex-wrap: wrap; /* 画面幅が狭い場合に折り返す */
        justify-content: center; /* 中央揃え */
    }

    header nav ul li {
        /* display: block; を削除または変更 */
        margin: 5px 10px; /* 適度な余白を設定 */
    }

    .work-grid {
        /* 1列固定から、画面幅に応じて複数列を許容するように変更 */
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    .product-grid-common {
        /* スマートフォン向けにアイテム幅を縮小し、複数列を許容 */
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .product-item {
        padding: 5px; /* さらに削減 */
        min-width: 0; /* これが重要: アイテムがコンテンツの最小幅以下に縮小できるようにする */
        box-sizing: border-box; /* ここにも追加（念のため） */
    }

    

    .product-item h3 {
        margin: 3px 0; /* マージンをさらに削減 */
        font-size: 0.8em; /* さらに小さく */
        word-break: break-word;
    }

    .product-item p,
    .product-item .author-info,
    .product-item .description-text,
    .product-item .series,
    .product-item .description,
    .product-item .status {
        font-size: 0.7em; /* さらに小さく */
        padding: 0 3px; /* パディングをさらに削減 */
    }

    .product-item .links {
        margin-top: 5px; /* マージンを削減 */
        padding: 0 3px; /* パディングを削減 */
    }

    .product-item .links a {
        padding: 2px 4px; /* パディングをさらに削減 */
        font-size: 0.6em; /* さらに小さく */
        margin: 2px; /* マージンを削減 */
    }
}

.warning-text {
    display: inline-block; /* インライン要素だが、幅や高さ、パディングなどを設定できるようにする */
    color: red;
    font-weight: bold;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* doujin/new_index.php 固有のスタイル */
.doujin-info {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    padding: 20px;
    margin-bottom: 30px;
    text-align: left;
}
.doujin-info h2 {
    color: #333;
    margin-top: 0;
}

.doujin-info .store-links img {
    width: 100px; /* Adjust as needed */
    height: auto;
    margin-right: 10px;
}






.series-description {
    margin-bottom: 20px;
    text-align: left;
}
.series-description img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 15px auto;
}
.series-description .thumb-images img {
    width: 60px; /* D_THUMB equivalent */
    height: auto;
    margin: 5px;
    display: inline-block; /* 横並びにする */
}

.header-link {
    color: #fff !important; /* 強制的に白に設定 */
    font-weight: bold !important; /* 強制的に太字に設定 */
    text-decoration: none !important; /* 強制的に下線を削除 */
    font-size: 1.1rem !important; /* 強制的にフォントサイズを設定 */
}

.series-section {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 40px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.doujin-external-links a {
    display: inline-block;
    background-color: #007bff;
    color: #fff;
    padding: 5px 10px;
    font-size: 0.8rem;
    text-decoration: none;
    border-radius: 5px;
    margin: 3px;
}

.doujin-external-links a:hover {
    background-color: #0056b3;
}

.category-title {
    background-color: #f0f0f0; /* 明るい背景色 */
    color: #333; /* 濃い文字色 */
    text-align: center;
    padding: 10px 15px; /* パディングを調整 */
    margin-bottom: 25px; /* 下の余白を調整 */
    font-weight: bold;
    font-size: 1.3em; /* フォントサイズを調整 */
    border-bottom: 2px solid #ccc; /* 下線を追加 */
    border-radius: 5px; /* 角を丸く */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* 影を追加 */
}