@charset "UTF-8";

/*!
Theme Name: Cocoon Child
Description: Cocoon専用の子テーマ
Theme URI: https://wp-cocoon.com/
Author: わいひら
Author URI: https://nelog.jp/
Template:   cocoon-master
Version:    1.1.3
*/

/************************************
** 子テーマ用のスタイルを書く
************************************/
/*必要ならばここにコードを書く*/

/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/
/*1023px以下*/
@media screen and (max-width: 1023px){
  /*必要ならばここにコードを書く*/
}

/*834px以下*/
@media screen and (max-width: 834px){
  /*必要ならばここにコードを書く*/
}

/*480px以下*/
@media screen and (max-width: 480px){
  /*必要ならばここにコードを書く*/
}

/* ============================
   トップページ 全体
============================ */
.fanza-top {
  max-width: 1100px;
  margin: 0 auto;
}

/* ============================
   ヒーローエリア
============================ */
.fanza-top-hero {
  background: #ffe6f1;
  padding: 40px;
  border-radius: 20px;
  margin-bottom: 50px;
}

.fanza-top-hero-inner {
  display: flex;
  gap: 40px;
}

.fanza-top-hero-text {
  flex: 1;
}

.fanza-top-hero-search {
  flex: 1;
  background: #fff5fa;
  padding: 30px;
  border-radius: 16px;
}

@media screen and (max-width: 834px) {
  .fanza-top-hero-inner {
    flex-direction: column;
  }
}


/* ============================
   セクション見出し
============================ */
.fanza-top-h2 {
  border-left: 6px solid #ff4c8b;
  padding-left: 12px;
  margin: 50px 0 20px;
  font-size: 26px;
}


/* ============================
   人気カテゴリ グリッド
============================ */
.fanza-top-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-bottom: 50px;
}

@media screen and (max-width: 834px) {
  .fanza-top-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 480px) {
  .fanza-top-grid {
    grid-template-columns: 1fr;
  }
}

/* カード本体 */
.fanza-top-card {
  display: block;
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  text-decoration: none;
  color: inherit;
  border: 1px solid #eee;
  transition: all 0.2s;
}

.fanza-top-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.fanza-top-card-title {
  font-size: 22px;
  margin-bottom: 8px;
}

/* ============================
   年代カード
============================ */
.fanza-top-era-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

@media screen and (max-width: 600px) {
  .fanza-top-era-grid {
    grid-template-columns: 1fr;
  }
}

.fanza-top-era-card {
  display: block;
  background: #fff;
  border-radius: 16px;
  padding: 25px;
  text-decoration: none;
  border: 1px solid #eee;
  transition: all 0.2s;
}

.fanza-top-era-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ============================
   About セクション
============================ */
.fanza-top-about {
  background: #fff5fa;
  padding: 30px;
  border-radius: 16px;
  margin-bottom: 80px;
}

/* 空要素（自動挿入されたp/div）を完全非表示にする */
.fanza-top-grid > *:empty,
.fanza-top-era-grid > *:empty {
  display: none !important;
}

/* Cocoon が固定ページに自動生成する空の記事カードを消す */
.entry-card,
.entry-card-thumb,
.entry-card-content,
.entry-card-snippet,
.entry-card-meta {
  display: none !important;
}

.fanza-top-grid > .entry-card,
.fanza-top-era-grid > .entry-card {
  display: none !important;
}

/* Cocoon が勝手に生成する空のカラムボックスを削除 */
.column-contents,
.column-contents:empty {
  display: none !important;
}

/* 空の p や div をグリッドから除外する */
.fanza-top-grid > p:empty,
.fanza-top-grid > div:empty,
.fanza-top-era-grid > p:empty,
.fanza-top-era-grid > div:empty {
  display: none !important;
}

/* Cocoon の空エントリーカードを削除 */
.entry-card,
.entry-card-wrap,
.entry-card-content,
.entry-card-snippet {
  display: none !important;
}

.fanza-top p:empty {
  display: none !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}
.fanza-top-grid > *:empty,
.fanza-top-era-grid > *:empty {
  display: none !important;
}

.fanza-top-grid div:empty,
.fanza-top-era-grid div:empty {
  display: none !important;
}

/* ============================================
   トップページ（.fanza-top）だけ Cocoon の余白をリセット
============================================ */

/* 記事本文のデフォルト余白を無効化 */
.page .entry-content > * {
  margin: 0 !important;
  padding: 0 !important;
}

/* Gutenberg が勝手に生成する余白系ブロックを無効化 */
.fanza-top .wp-block-group,
.fanza-top .wp-block-columns,
.fanza-top .wp-block-column,
.fanza-top .wp-block-group__inner-container,
.fanza-top .alignwide,
.fanza-top .alignfull {
  margin: 0 !important;
  padding: 0 !important;
  max-width: 100% !important;
}

/* Cocoon の “本文内の段落margin” を消す */
.fanza-top p {
  margin: 0 0 12px 0 !important;
}

/* グリッド白い箱の原因の不要な div を無効化 */
.fanza-top > div[style*="height"],
.fanza-top div[style*="padding"],
.fanza-top div[style*="margin"] {
  margin: 0 !important;
  padding: 0 !important;
}

/* カードの高さ自動調整 */
.fanza-top-card,
.fanza-top-era-card {
  height: auto !important;
}

.fanza-top-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 10px;
}

.fanza-top-tags a {
  display: inline-block;
  background: #ffedf5;
  color: #ff4c8b;
  padding: 6px 12px;
  border-radius: 20px;
  margin: 5px;
  text-decoration: none;
  font-size: 14px;
}

.fanza-top-tags a:hover {
  background: #ff4c8b;
  color: #fff;
}

.fanza-api-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 20px 0;
}

.fanza-api-card {
  display: block;
  background: #fff;
  border-radius: 10px;
  padding: 10px;
  border: 1px solid #eee;
  text-decoration: none;
  color: #000;
  transition: 0.2s;
}

.fanza-api-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.fanza-api-thumb {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
}

.fanza-api-title {
  font-size: 14px;
  margin-top: 10px;
}

/* ======== 見出しデザイン（ピンク太線） ======== */
.section-title {
    font-size: 1.6em;
    font-weight: bold;
    padding: 12px 0;
    margin: 50px 0 20px;
    border-left: 10px solid #e91e63;
    padding-left: 15px;
    background: #fceef4;
    color: #333;
}

/* ======== 広告ボックス（枠＋影） ======== */
.ad-box {
    background: #fff;
    border: 2px solid #f8c6d5;
    padding: 20px;
    margin-bottom: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* PC幅でも綺麗にセンタリング */
.ad-box ins {
    display: block;
    margin: 0 auto;
}

/* スマホ最適化 */
@media (max-width: 600px) {
    .section-title {
        font-size: 1.4em;
    }
    .ad-box {
        padding: 15px;
    }
}

/* ============================
   懐えろトップページ用 共通スタイル
============================ */

.fanza-top {
  max-width: 1100px;
  margin: 0 auto;
}

/* セクション見出し */
.fanza-top-h2 {
  border-left: 6px solid #ff4c8b;
  padding-left: 12px;
  margin: 50px 0 20px;
  font-size: 26px;
}

/* カテゴリカード用グリッド */
.fanza-top-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

/* カテゴリカード本体 */
.fanza-top-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #f3d1e0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.fanza-top-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

/* カテゴリ画像 */
.fanza-cat-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

/* カード内テキスト */
.fanza-top-card-inner {
  padding: 18px 20px 20px;
}

.fanza-top-card-label {
  font-size: 13px;
  color: #888;
  margin-bottom: 4px;
}

.fanza-top-card-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.fanza-top-card-text {
  font-size: 14px;
  line-height: 1.7;
}

/* タグボタン */
.fanza-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 40px;
}

.fanza-tag-list a {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #ff4c8b;
  font-size: 13px;
  text-decoration: none;
  color: #ff4c8b;
  background: #fff;
  transition: all 0.2s;
}

.fanza-tag-list a:hover {
  background: #ff4c8b;
  color: #fff;
}

/* 商品カード（API用） */
.fanza-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin: 20px 0 40px;
}

.fanza-item-card {
  background: #fff;
  border-radius: 10px;
  border: 1px solid #f3d1e0;
  overflow: hidden;
  text-align: left;
  font-size: 13px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.fanza-item-card img {
  width: 100%;
  display: block;
}

.fanza-item-card a {
  color: inherit;
  text-decoration: none;
}

.fanza-item-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.fanza-item-title {
  padding: 8px 10px 10px;
  line-height: 1.5;
}

/* スマホ調整 */
@media screen and (max-width: 768px) {
  .fanza-top-h2 {
    font-size: 22px;
    margin: 40px 0 16px;
  }

  .fanza-top-card-inner {
    padding: 14px 15px 16px;
  }

  .fanza-top-card-title {
    font-size: 18px;
  }

  .fanza-cat-thumb {
    height: 160px;
  }

  .fanza-items-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .fanza-item-title {
    font-size: 12px;
  }
}

/* カテゴリカードのグリッド */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 20px;
}

.category-card {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: 0.3s;
}

.category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.category-card img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 12px;
}
