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

/* ページ全体に「工事中」のメッセージを表示 */
body::before {
  content: "🚧工事中 当サイトは楽天アフィリエイト広告を含みます。";
  display: block;
  color: #000000;           /* 文字色を黒に設定 */
  font-weight: bold;        /* 文字を太字に設定 */
  background-color: #ffffff; /* 背景色を白に設定 */
  font-size: 0.8em;         /* フォントサイズを小さく設定 */
  padding: 0.5em;             /* 内側の余白を追加 */
  text-align: center;       /* 文字を中央揃え */
  border-radius: 5px;       /* 角を丸くする */
  margin: 1.5em 0;            /* 上下に2行分の余白を追加 */
}

/* スマートフォン表示時のメッセージのフォントサイズと余白を調整 */
@media screen and (max-width: 768px) {
  body::before {
    font-size: 0.9em;   /* フォントサイズをさらに小さく設定 */
    padding: 0.5em;     /* 内側の余白を調整 */
    margin: 1.2em 0;    /* 上下の余白を調整 */
  }
}


/*--------------------------------------
  全体レイアウト調整
--------------------------------------*/
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  overflow-x: hidden;
}

a,
a *,
u {
  text-decoration: none !important;
  border: none !important;
}

/*--------------------------------------
  非表示要素（グローバル）
--------------------------------------*/
.date-tags,
.author-info,
.author-box,
.author-follow,
.sns-follow,
.footer .copyright::before,
.footer .copyright a {
  display: none !important;
}

/*--------------------------------------
  グリッドレイアウト
--------------------------------------*/
/* 商品画像の最大幅を100%に設定 */
.product-image img {
  max-width: 100%;
  height: auto;
}

.product-grid,
#rakuten-products-container,
.entry-cards.column-4.column-sm-2 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 0;
  margin: 0;
  width: 100%;
}

/* スマホ2列（幅均等） */
@media (max-width: 767px) {
  .product-grid,
  #rakuten-products-container,
  .entry-cards.column-4.column-sm-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .product,
  .rakuten-card,
  .entry-card {
    width: auto !important;
    margin: 0 !important;
  }

  .product-grid,
  #rakuten-products-container,
  .entry-cards.column-sm-2 {
    gap: 16px;
    padding: 0;
  }
}

/* コンテナ */
#rakuten-products-container{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)); /* 長文でも均等幅 */
  gap: 8px;
}

/* 各カード */
#rakuten-products-container .product{
  min-width: 0;              /* 子の最小幅を0にして縮められるように */
  box-sizing: border-box;
}

/* タイトルや説明の長文を折り返す */
#rakuten-products-container .product .product-title,
#rakuten-products-container .product .product-desc{
  overflow-wrap: anywhere;   /* どこでも折り返し可 */
  word-break: break-word;
}

/* サムネイル枠を一定比率に揃える（正方形例） */
#rakuten-products-container .thumb{
  aspect-ratio: 1 / 1;       /* 4 / 3 なども可 */
  overflow: hidden;
}

/* 画像を枠いっぱいに綺麗にトリミング */
#rakuten-products-container .thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 幅ズレ時に1列強制 */
@media (max-width: 767px) {
  #rakuten-products-container.force-one-column {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
}

/* 極小画面対応 */
@media (max-width: 375px) {
  .product-grid,
  #rakuten-products-container,
  .entry-cards.column-4.column-sm-2 {
    grid-template-columns: 1fr;
  }
}

/*--------------------------------------
  商品カード
--------------------------------------*/
.product,
.entry-card,
.rakuten-card {
  width: 100%;
  border: 2px solid #ccc;
  border-radius: 12px;
  padding: 15px;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s, box-shadow 0.2s;
  margin: 0;
  box-sizing: border-box;
  max-width: 100%;
}

.product:hover,
.entry-card:hover,
.rakuten-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.product > *,
.entry-card > *,
.rakuten-card > * {
  border: none !important;
}

/* 画像 */
.product img,
.entry-card img,
.rakuten-card img {
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
  display: block;
  image-rendering: auto;
  aspect-ratio: 1 / 1;
  max-width: 100% !important;
  margin: 0 auto;
}

/* タイトル・説明 */
.product .title,
.entry-card .title,
.rakuten-card .title {
  font-size: 1rem;
  font-weight: bold;
  margin: 0;
  line-height: 1.4;
  max-height: 2.8em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.product .description,
.entry-card .description,
.rakuten-card .description {
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.4;
  color: #555;
  max-height: 4.2em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* 情報エリア */
.product .info-grid,
.entry-card .info-grid,
.rakuten-card .info-grid {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3em;
  font-size: 0.9rem;
  margin-top: 0.6em;
}

.product .rating-number,
.entry-card .rating-number,
.rakuten-card .rating-number,
.product .review-count,
.entry-card .review-count,
.rakuten-card .review-count {
  font-weight: bold;
  color: #222;
  font-size: 14px;
}

/* ボタン */
.product .rakuten-button,
.entry-card .rakuten-button,
.rakuten-card .rakuten-button {
  display: inline-block;
  background-color: #f00;
  color: #fff !important;
  font-weight: bold;
  padding: 0.4em 0.8em;
  margin-top: 0.8em;
  border-radius: 4px;
  font-size: 0.95rem;
  text-align: center;
  white-space: nowrap;
  align-self: flex-start;
  cursor: pointer;
  border: none;
}

/* ランキング・星 */
.rank {
  font-size: 28px;
  font-weight: bold;
  color: #003366;
  margin-bottom: 10px;
  text-align: center;
}

.rating-stars {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 0;
  margin: 5px 0;
}

.rating-stars svg.star {
  width: 16px;
  height: 16px;
  fill: #FFD700;
}

/*--------------------------------------
  スマホ最適化（フォント・余白）
--------------------------------------*/
@media (max-width: 767px) {
  .product,
  .entry-card,
  .rakuten-card {
    padding: 10px;
  }

  .product .title,
  .entry-card .title,
  .rakuten-card .title {
    font-size: 0.9rem;
  }

  .product .description,
  .entry-card .description,
  .rakuten-card .description {
    font-size: 0.85rem;
  }

  .product .rakuten-button,
  .entry-card .rakuten-button,
  .rakuten-card .rakuten-button {
    font-size: 0.85rem;
    padding: 0.3em 0.6em;
  }

  .rank {
    font-size: 20px;
  }

  .product .rating-number,
  .entry-card .rating-number,
  .rakuten-card .rating-number {
    font-size: 12px;
  }
}

/*--------------------------------------
  Cocoon 標準構造調整
--------------------------------------*/
.entry-cards.column-sm-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding: 0;
}

@media screen and (min-width: 768px) {
  .entry-cards.column-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media screen and (max-width: 768px) {
  .entry-cards.column-sm-2 {
    display: grid;
  }
}

/*--------------------------------------
  slicknav スマホメニュー対応
--------------------------------------*/
.slicknav_nav ul.sub-menu {
  display: none;
}

.slicknav_nav li.slicknav_open > ul.sub-menu {
  display: block;
}

/*--------------------------------------
  その他微調整
--------------------------------------*/
.rakuten-card * {
  min-width: 0;
  box-sizing: border-box;
}

.rakuten-rating,
.rakuten-button,
.product-title,
.product-price {
  white-space: normal !important;
  overflow-wrap: break-word;
}

/* iOSフォームズーム対策 */
input[type="text"],
input[type="email"],
input[type="search"],
input[type="tel"],
textarea,
select {
  font-size: 16px;
}

/*
Theme Name: Cocoon Child
Template:   cocoon-master
Version:    1.0.0
*/

/*--------------------------------------
  ここからカスタマイズ
--------------------------------------*/

/* 楽天商品カード */
#rakuten-products-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

#rakuten-products-container .product {
  border: 1px solid #ddd;
  padding: 10px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
}

#rakuten-products-container .product:hover {
  transform: translateY(-3px);
}

#rakuten-products-container .product img {
  width: 100%;
  height: auto;
  display: block;
}

#rakuten-products-container .product-title {
  font-size: 14px;
  margin: 8px 0;
  font-weight: bold;
}

#rakuten-products-container .product-price {
  color: #e60012;
  font-size: 16px;
  margin-bottom: 5px;
}

#rakuten-products-container .product-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 5px;
}

#rakuten-products-container .product-reviews {
  font-size: 12px;
  color: #555;
}

#rakuten-products-container .product-button {
  display: inline-block;
  padding: 6px 10px;
  background: #e60012;
  color: #fff;
  text-align: center;
  text-decoration: none;
  font-size: 13px;
  border-radius: 4px;
  transition: background 0.2s ease;
}

#rakuten-products-container .product-button:hover {
  background: #cc000f;
}

/* PC → 4列 */
@media screen and (min-width: 1025px) {
  #rakuten-products-container {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* タブレット → 3列 */
@media screen and (min-width: 768px) and (max-width: 1024px) {
  #rakuten-products-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* スマホ → 2列 */
@media screen and (max-width: 767px) {
  #rakuten-products-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 強制1列表示クラス（JSで付与） */
#rakuten-products-container.force-one-column {
  grid-template-columns: 1fr !important;
}

/* カード幅ぶれ防止の微調整 */
#rakuten-products-container.force-one-column .product {
  width: 100% !important;
}

.keyword-grid {
  display: grid;
  grid-gap: 10px; /* ボックス間の余白 */
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.keyword-item {
  padding: 10px;
  border: 2px solid #ff6347; /* ポップな色の枠線 */
  border-radius: 12px; /* 角丸 */
  text-align: center;
  display: block;
  background: #ededb8; /* 背景色を #ededb8 に変更 */
  color: #333; /* 文字色 */
  font-weight: bold; /* 太字 */
  text-decoration: none; /* 下線を消す */
  transition: all 0.3s ease; /* ホバー時のアニメーション */
}

.keyword-item:hover {
  background: #ff9800; /* ホバー時の背景色 */
  color: white; /* ホバー時の文字色 */
  transform: translateY(-5px); /* 上に浮き上がる効果 */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* 影を追加 */
}

@media screen and (min-width: 768px) {
  .keyword-grid {
    grid-template-columns: repeat(5, 1fr); /* 横5列 */
  }
}

@media screen and (max-width: 767px) {
  .keyword-grid {
    grid-template-columns: repeat(3, 1fr); /* 横3列 */
  }
}

.entry-content p:empty {
  display: none;
}

.content,
.entry-content,
.main {
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.date-tags {
  margin-bottom: 0;
}

.entry-content > * {
  margin-top: 0;
}

.entry-content {
  margin-top: 0;
}
.date-tags {
  margin-bottom: 0;
}
.main {
  border-top: none;
}

.content-top {
  margin-top: 0;
  padding-top: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.article-header .entry-title {
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.entry-content > .gift-title {
  margin-top: 0.3em;  /* 微調整用 */
  margin-bottom: 0.3em;
}

/* アピールエリアそのものの余白を削除 */
.content-top-in,
#content-top-in,
.content-top-in.wrap,
#content-top-in.wrap {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* アピールエリア直後の要素の余白も削除 */
#content-top-in + * {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* アピールエリア直下の本文上部余白を削除 */
.content-top-in + main.main {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* 記事ヘッダーの上部余白を削除 */
.article-header.entry-header {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* アピールエリア（#content-top-in）そのものの余白を削除 */
#content-top-in,
.content-top-in {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* アピールエリア直後の要素の上部余白を削除 */
#content-top-in + *,
.content-top-in + * {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* メインコンテンツ（本文領域）のさらに上部余白もゼロにする */
main.main {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* 記事ヘッダーの上部余白もリセット */
.article-header.entry-header {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.gift-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.gift-title {
  font-family: 'Comic Sans MS', 'Arial', sans-serif;
  font-size: 1.6rem;
  font-weight: bold;
  color: #ff4b5c;
  text-shadow: 1px 1px 0 #fff, 2px 2px 0 #ff9a9e, 3px 3px 0 #fad0c4;
  padding: 4px 8px;
  display: inline-block;
  border-radius: 8px;
  background: #ededb8; /* 黄色の四角部分 → 淡い黄緑・クリーム系へ変更 */
  animation: bounce 1.5s infinite ease-in-out;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.gift-title span {
  color: #ff8c00;
  text-shadow: 1px 1px 0 #fff, 2px 2px 0 #ffd27f;
}

.sub-copy {
  font-family: 'Arial', sans-serif;
  font-size: 1.12rem;
  color: #333;
  line-height: 1.6;
  padding: 10px;
  background-color: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0 0, 0.1);
  max-width: 60%;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@media screen and (max-width: 768px) {
  .gift-container {
    flex-direction: column;
    align-items: center;
  }

  .gift-title {
    font-size: 1.4rem;
  }

  .sub-copy {
    font-size: 1rem;
    max-width: 80%;
  }
}

/* 通知エリアの基本設定 */
.notice-area {
  overflow: hidden;
  position: relative; /* 携帯などでの基準位置調整に */
  white-space: nowrap;
}

/* 通知メッセージのスタイルと floatFade アニメーション */
.notice-area-message {
  display: inline-block;
  font-size: 14px;              /* スマホなどでの基本フォントサイズ */
  opacity: 0;                   /* 初期は透過状態（見えない） */
  animation: floatFade 8s ease-in-out infinite;
  will-change: opacity, transform; /* パフォーマンス最適化の hint */
}

/* floatFade キーフレーム定義 */
@keyframes floatFade {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  50% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-20px);
  }
}

/* PC（幅1023px以上）の場合のサイズ・速度調整 */
@media screen and (min-width: 1023px) {
  .notice-area-message {
    font-size: 16px;             /* PCでは文字を大きく */
    animation-duration: 12s;      /* 少しゆっくりめに設定 */
  }
}
.gift-container-link {
  display: block;          /* ブロック要素にして余白が効くように */
  margin-bottom: 1em;      /* 下方向に1行（1em）の空白を追加 */
  text-decoration: none;   /* 必要に応じて装飾をリセット */
}