/* -------------------------------------------
 * 年賀状 デザイン一覧 (index.php) スタイル
 * ------------------------------------------- */

/* デザイン一覧上部の要約テキスト */
.summary {
    text-align: center;
    margin-bottom: 25px;
    font-weight: bold;
    color: #555;
}

/* デザインカードのリストコンテナ */
.card-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px; 
    justify-content: center;
    padding: 0;
}

/* デザインカードアイテム */
.nenga-card {
    /* flexを維持し、幅の指定をシンプル化 */
    flex: 1 1 calc(25% - 20px); 
    min-width: 150px; 
    /* 極端に伸びるのを防ぐ */
    max-width: 300px; 
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s; 
    background-color: #ddd;
    padding: 5px;
}

.nenga-card:hover {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
    transform: translateY(-3px); /* ホバー時の浮き上がりを強調 */
}

.card-link {
    text-decoration: none;
    color: #333;
    display: block;
    text-align: center;
    padding: 0; 
}

.nenga-card img {
    width: 100%;
    height: auto;
    display: block; 
    border-radius: 8px 8px 0 0; 
    margin-bottom: 0; 
    padding: 0; 
}

/* IDと特徴のコンテナのパディング */
.design-info {
    padding: 8px 10px; 
    text-align: left;
    background-color: #ddd; /* 情報部分の背景 */
    border-radius: 0 0 8px 8px;
}

.design-id {
    margin: 0; 
    padding: 5px 0; /* 左右パディングを削除し、親のdesign-infoに任せる */
    font-size: 0.9rem;
    color: #0056b3;
    text-align: left;
    line-height: 1.2; 
    width: 100%; 
    box-sizing: border-box; 
    font-weight: bold; /* IDを太字に */
}

.features-text {
    margin-top: 5px;
    margin-bottom: 0;
    line-height: 1.5;
}

.feature-tag {
    display: inline-block;
    background-color: #eaf1f9; /* 薄い青の背景 */
    color: #0056b3; /* 濃い青の文字色 */
    font-size: 0.75rem;
    padding: 2px 6px;
    margin-right: 4px;
    margin-bottom: 4px;
    border-radius: 4px;
    font-weight: 500;
}

/* ページネーション */
.pagination {
    text-align: center;
    display: flex; 
    justify-content: center;
    margin: 40px 0;
    padding: 0;
    list-style: none;
}

.page-link {
    padding: 8px 12px;
    margin: 0 3px;
    text-decoration: none;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.page-link:hover {
    background-color: #eee;
}

.page-link.active {
    background-color: #e5004f;
    color: white;
    border-color: #e5004f;
    font-weight: bold;
}

/* 全デザインを見るボタン (index.phpで使用) */
.submit-button.all-designs-link {
    display: inline-block;
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
    background-color: #5cb85c;
    color: white;
    border: 1px solid #4cae4c;
    border-radius: 5px;
    transition: background-color 0.3s;
    text-decoration: none;
    cursor: pointer;
}
.submit-button.all-designs-link:hover {
    background-color: #449d44;
}

/* -------------------------------------------
 * 年賀状 詳細ページ (detail.php) スタイル
 * ------------------------------------------- */

.back-link {
    display: inline-block;
    margin-top: 10px;
    color: #e5004f;
    text-decoration: none;
    font-weight: bold;
}

.detail-container {
    display: flex;
    gap: 40px;
    background: lightgoldenrodyellow;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.design-large-image {
    width: 50%;
    max-width: 500px;
    height: auto;
    border-radius: 6px;
    object-fit: contain;
}

.detail-info {
    width: 50%;
}

.detail-info h2 {
    color: #e5004f;
    margin-top: 0;
}

.detail-id span, .detail-price span {
    font-weight: bold;
    color: #1a73e8;
    font-size: 1.1rem;
}

.description {
    margin: 20px 0;
    padding: 15px;
    background-color: #f3f3f3;
    border-left: 4px solid #e5004f;
    border-radius: 4px;
}

.order-button {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: #e5004f;
    color: white;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: none;
    border-radius: 50px; /* 角丸を強調 */
    transition: background-color 0.2s;
    margin-top: 30px;
    box-shadow: 0 4px 6px rgba(229, 0, 79, 0.3);
}

.order-button:hover {
    background-color: #c40040;
}

/* 詳細ページのキーワードセクション */
.features-section {
    margin: 20px 0;
    padding: 15px;
    background-color: #f8f8f8;
    border-left: 4px solid #e5004f;
    border-radius: 4px;
}

.features-section h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1rem;
    color: #333;
}

.features-list {
    margin: 0;
}

.feature-tag-detail {
    display: inline-block;
    background-color: #e5004f; /* メインカラーの背景 */
    color: white; /* 白い文字色 */
    font-size: 0.9rem;
    padding: 4px 10px;
    margin-right: 6px;
    margin-bottom: 6px;
    border-radius: 50px; /* 角丸を強調 */
    font-weight: bold;
}

/* -------------------------------------------
 * 年賀状 申込ページ (order.php) スタイル
 * ------------------------------------------- */
.order-page {
    text-align: center;
}

.order-page h2 {
    color: #e5004f;
    margin-bottom: 30px;
}

.form-section {
    max-width: 600px;
    margin: 0 auto 40px;
    padding: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.form-section ol {
    list-style-position: inside;
    text-align: left;
    max-width: 400px;
    margin: 20px auto;
    font-size: 1.1rem;
    line-height: 2;
}

.dummy-text {
    margin-top: 20px;
    color: #999;
    font-style: italic;
}

.back-to-home {
    color: #0056b3;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
}

/* -------------------------------------------
 * トップページのスタイル
 * ------------------------------------------- */

/* キャンペーンタイトル */
.campaign-title {
    font-size: 24px;
    font-weight: bold;
    color: #cc0000; /* 赤色 */
    text-align: center;
    margin-bottom: 5px;
}

/* ハイライトボックス */
.campaign-highlight-box {
    display: block;
    background-color: #ffe800; /* 強い黄色 */
    color: #ff0000; /* 赤文字 */
    font-size: 32px;
    font-weight: 900; /* 太いフォント */
    padding: 10px 40px;
    border-radius: 5px;
    margin: 15px auto 25px auto;
    width: fit-content;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 影を付けて浮き上がらせる */
    /* 画面幅全体を使うように親要素で調整するか、<center>タグまたはmargin: 0 auto; で中央寄せする */
    margin-left: auto;
    margin-right: auto;
    width: fit-content;
}

/* 通常テキスト */
.campaign-text {
    text-align: center;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.8;
    color: #333;
    margin-bottom: 40px;
}
.campaign-text strong {
    color: #cc0000;
}

/* 3つの特徴ボックスのグリッドレイアウト */

.nenga-features-grid {
    display: flex;
    justify-content: center;
    gap: 10px; /* ボックス間の隙間 */
    margin-bottom: 40px;
    padding: 0 15px; /* 画面端に近すぎるのを防ぐ */
}

.feature-box {
    flex: 1 1 30%; /* 3つのボックスがほぼ均等な幅になるように設定 */
    max-width: 300px; /* 最大幅を設定して、画面が大きい時に伸びすぎるのを防ぐ */
    color: #fff;
    font-weight: bold;
    text-align: center;
    padding: 15px 10px;
    border-radius: 8px; /* 角丸 */
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); /* ボックスに影を付けて立体感を出す */
    cursor: pointer; /* クリックできることがわかるように */
    transition: transform 0.2s;
}

/* ボックス内のテキストのフォントサイズ調整 */
.feature-text-large {
    font-size: 18px;
    display: block; /* 1行全体を使う */
    white-space: nowrap; /* テキストが折り返さないように */
}

/* ボックスの背景色 (添付画像の色合いを再現) */
.primary-bg {
    background-color: #008000; /* 深緑 (年内12/26まで受付) */
}

.secondary-bg {
    background-color: #5555ff; /* 濃い青 (制作費・送料無料) */
}

.tertiary-bg {
    background-color: #cc0000; /* 濃い赤 (148種の絵柄デザイン) */
}


/* -------------------------------------------
 * レスポンシブ対応
 * ------------------------------------------- */

/* タブレット (900px以下) */
@media (max-width: 900px) {
    .nenga-card {
        /* 3列表示 */
        flex: 1 1 calc(33.33% - 20px); 
    }
}

/* モバイル (600px以下) */
@media (max-width: 600px) {
    .card-list {
        gap: 10px; 
        margin-left: 0;
        margin-right: 0;
        padding-left: 0; 
        padding-right: 0; 
    }
    .nenga-card {
        /* 2列表示 */
        /* .containerのパディング外で利用する場合の計算 */
        flex: 1 1 calc(50% - 10px); 
        min-width: 140px; 
        padding: 5px; /* 全周パディングを少し減らす */
    }
    
    /* IDと情報部分の調整 */
    .design-info {
        padding: 5px 8px; 
    }
}

/* トップページ レスポンシブ (400px以下) */
@media (max-width: 768px) {
    .campaign-title {
        font-size: 20px;
    }
    
    .campaign-highlight-box {
        font-size: 24px;
        padding: 8px 30px;
    }

    .nenga-features-grid {
        flex-direction: column; /* 縦に並べる */
        align-items: center; /* 中央揃え */
        gap: 15px;
    }

    .feature-box {
        width: 90%; /* 幅を広げる */
        max-width: 400px;
        padding: 12px 10px;
    }

    .feature-text-large {
        font-size: 16px;
    }
}

/* 詳細ページ レスポンシブ (400px以下) */
@media (max-width: 400px) {    
    .detail-container {
        flex-direction: column;
    }

    .design-large-image, .detail-info {
        width: 100%;
        max-width: none;
    }
}