@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
*/

/************************************
** 子テーマ用のスタイルを書く
************************************/
/*必要ならばここにコードを書く*/
.header-site-logo-image
  {
  transform: translateY(20px);
}
.new-entry-cards {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.new-entry-card-title {
  text-align: left;
}

.popular-entry-cards {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.popular-entry-card-title {
  text-align: left;
}

.post-9 .date-tags {
  display: none;
}
/* ===== カードを縦並びに変更 ===== */
.rakuten-item-box {
  display: flex !important;
  flex-direction: column !important;
  align-items: center;
}

/* ===== 画像を大きく ===== */
.rakuten-item-thumb {
  width: 100%;
  text-align: center;
  margin-bottom: 10px;
}

.rakuten-item-thumb img {
  width: 220px !important;   /* ← 好みで調整（200〜260推奨） */
  height: auto !important;
  border-radius: 12px;
}

/* ===== タイトルを画像下に ===== */
.product-item-title {
  width: 100%;
  text-align: center;
  margin: 8px 0 4px;
}

.product-item-title a {
  font-size: 15px !important;
  font-weight: 700;
  line-height: 1.6;
  color: #222 !important;
  text-decoration: none;
}

/* hover */
.product-item-title a:hover {
  color: #e60023 !important;
}

/* ===== ボタンも中央寄せ ===== */
.product-item-buttons {
  width: 100%;
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

/* ===== PC専用微調整 ===== */
@media screen and (min-width: 769px) {
  .rakuten-item-thumb img {
    width: 240px !important;
  }
}

/* ===== タイトルを白文字に ===== */
.product-item-title a {
  color: #ffffff !important;
}

/* hover時も白を維持（色変化防止） */
.product-item-title a:hover {
  color: #ffffff !important;
}
/* ===== PC版：楽天商品カードを3列中央ぞろい ===== */
@media screen and (min-width: 1024px) {

  /* 親要素をグリッド化 */
  .rakuten-item-box {
    width: 30% !important;
    margin: 1.5% !important;
  }

  /* 並びを中央に */
  .rakuten-item-box {
    display: inline-flex !important;
    vertical-align: top;
  }

  /* カードを中央寄せ */
  .rakuten-item-box {
    justify-content: center;
  }
}

/* ===== 親ラッパー（もしある場合） ===== */
.rakuten-item-box {
  box-sizing: border-box;
}

.ad-area .ad-label {
  display: none !important;
}

/* --- Cocoon用：サイドバーの新着・人気記事をカード風にする --- */

/* ==================================================
 * 1. 新着・人気記事 共通設定（カード風デザイン）
 * ================================================== */
.widget_new_entries ul li a,
.widget_popular_entries ul li a {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 10px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    position: relative;
}

/* ホバー時の浮き上がり演出 */
.widget_new_entries ul li a:hover,
.widget_popular_entries ul li a:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* サムネイル画像の調整 */
.widget_new_entries .card-thumb,
.widget_popular_entries .card-thumb {
    width: 90px;
    height: 65px;
    margin-right: 12px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 6px;
}

.widget_new_entries .card-thumb img,
.widget_popular_entries .card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* タイトル文字の調整 */
.widget_new_entries .card-title,
.widget_popular_entries .card-title {
    font-size: 14px;
    font-weight: bold;
    line-height: 1.4;
    margin: 0;
}

/* ==================================================
 * 2. 新着記事（個別設定：白背景・黒文字）
 * ================================================== */
.widget_new_entries ul li a {
    background: #ffffff;
    border: 1px solid #eee;
}

.widget_new_entries .card-title {
    color: #333;
}

/* ==================================================
 * 3. 人気記事（個別設定：黒背景・白文字）
 * ================================================== */
.widget_popular_entries ul li a {
    background: #222222 !important; /* ダークな背景 */
    border: 1px solid #444 !important;
}

/* 人気記事の文字を白くする */
.widget_popular_entries .card-title,
.widget_popular_entries a {
    color: #ffffff !important;
}

/* 順位バッジのデザイン調整（1,2,3位を色分け） */
.widget_popular_entries .ranking-number {
    position: absolute;
    top: -8px;
    left: -8px;
    width: 26px;
    height: 26px;
    line-height: 26px;
    text-align: center;
    font-size: 13px;
    font-weight: bold;
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* 順位の色（金・銀・銅） */
.widget_popular_entries li:nth-child(1) .ranking-number { background: #ffd700; color: #000; }
.widget_popular_entries li:nth-child(2) .ranking-number { background: #c0c0c0; color: #000; }
.widget_popular_entries li:nth-child(3) .ranking-number { background: #c47222; color: #fff; }
.widget_popular_entries li:nth-child(n+4) .ranking-number { background: #666; color: #fff; }

/* ==================================================
 * 4. Cocoon特有の余白・枠線リセット
 * ================================================== */
.widget_new_entries ul, .widget_popular_entries ul {
    border: none !important;
    padding: 0 !important;
}
.widget_new_entries li, .widget_popular_entries li {
    border: none !important;
    padding: 0 !important;
    list-style: none !important;
}

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

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

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