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

/* ==============================================
   K-Beauty Blog Stylesheet for Cocoon Child
   ==============================================
   構成:
     1. CSS変数（カラー・フォントなど）
     2. ベース
     3. ヒーローセクション
     4. レイアウト
     5. 導入文ブロック
     6. 目次（TOC）
     7. H2見出し
     8. 区切り線
     9. 商品カード・画像
    10. カテゴリバッジ
    11. レビューグリッド（良い点・気になる点）
    12. 価格テーブル
    13. 購入場所カード
    14. PR表記・この記事でわかること
    15. ユーティリティ（タグ・ラベルなど）
    16. フッター
    17. Cocoon上書き・空タグ除去
    18. レスポンシブ（スマホ対応）
============================================== */


/* ----------------------------------------------
   1. CSS変数
   カラーを変えたいときはここだけ修正すればOK！
---------------------------------------------- */
:root {
  --c-rose:    #c8546a;
  --c-deep:    #27171c;
  --c-gold:    #c09a40;
  --c-cream:   #fdf6f0;
  --c-mist:    #faf0f5;
  --c-card:    #ffffff;
  --c-text:    #2a1a1f;
  --c-muted:   #8a7070;
  --c-border:  #f0dde5;
  --c-good:    #2d7a5f;
  --c-good-bg: #eaf6f0;
  --c-bad:     #b03030;
  --c-bad-bg:  #faeaea;
}


/* ----------------------------------------------
   2. ベース
---------------------------------------------- */
body {
  background: var(--c-cream) !important;
  color: var(--c-text);
  font-family: 'Noto Sans JP', sans-serif;
  line-height: 1.75;
  font-size: 15px;
}

.entry-content,
.article {
  font-family: 'Noto Sans JP', sans-serif;
  color: var(--c-text);
}


/* ----------------------------------------------
   3. ヒーローセクション
---------------------------------------------- */
.hero {
  background: linear-gradient(140deg, #27171c 0%, #5c2535 55%, #8a4258 100%);
  color: #fff;
  padding: 64px 24px 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -70px;
  right: -60px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -90px;
  left: -50px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
}

.hero-tag {
  display: inline-block;
  background: var(--c-gold);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  padding: 4px 16px;
  border-radius: 20px;
  margin-bottom: 18px;
}

.hero h1 {
  font-family: 'Noto Serif JP', serif !important;
  font-size: clamp(17px, 3.2vw, 26px) !important;
  font-weight: 600 !important;
  line-height: 1.6 !important;
  margin-bottom: 16px !important;
  color: #fff !important;
  border: none !important;
  padding: 0 !important;
  background: none !important;
}

.hero-sub {
  font-size: clamp(13px, 2vw, 15px);
  color: rgba(255, 255, 255, 0.62);
  max-width: 560px;
  margin: 0 auto 22px;
  line-height: 1.85;
}

.hero-meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 1px;
}


/* ----------------------------------------------
   4. レイアウト
---------------------------------------------- */
.container {
  max-width: 840px;
  margin: 0 auto;
  padding: 0 20px;
}


/* ----------------------------------------------
   5. 導入文ブロック
---------------------------------------------- */
.intro-block {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-left: 4px solid var(--c-rose);
  border-radius: 0 16px 16px 0;
  padding: 26px 28px;
  margin: 16px 0 36px;   /* margin-topを調整済み */
  font-size: 15px;
  color: #4a3030;
  line-height: 2;
}

.intro-block p + p {
  margin-top: 14px;
}

.intro-block strong {
  color: var(--c-deep);
}


/* ----------------------------------------------
   6. 目次（TOC）
---------------------------------------------- */
.toc {
  background: var(--c-mist);
  border: 1px solid var(--c-border);
  border-radius: 16px;
  padding: 22px 26px;
  margin-bottom: 44px;
}

.toc-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--c-deep);
  margin-bottom: 14px;
}

.toc ol {
  padding-left: 20px;
  color: var(--c-rose);
  font-size: 14px;
  line-height: 2.2;
}

.toc ol li {
  padding-left: 4px;
}

.toc ol li span {
  color: var(--c-text);
}

.toc ol a {
  color: var(--c-text);
  text-decoration: none;
}

.toc ol a:hover {
  color: var(--c-rose);
  text-decoration: underline;
}


/* ----------------------------------------------
   7. H2見出し
---------------------------------------------- */
.product-h2 {
  font-family: 'Noto Serif JP', serif !important;
  font-size: 20px !important;
  font-weight: 600 !important;
  color: var(--c-deep) !important;
  border-bottom: 2px solid var(--c-rose) !important;
  border-left: none !important;
  padding: 0 0 10px 0 !important;
  margin-bottom: 18px !important;
  background: none !important;
  line-height: 1.5;
}

.section-h2 {
  font-family: 'Noto Serif JP', serif !important;
  font-size: 22px !important;
  font-weight: 600 !important;
  color: var(--c-deep) !important;
  border-bottom: 2px solid var(--c-rose) !important;
  border-left: none !important;
  padding: 0 0 10px 0 !important;
  margin: 56px 0 28px !important;
  background: none !important;
  line-height: 1.45;
}


/* ----------------------------------------------
   8. 区切り線
---------------------------------------------- */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 36px 0;
  color: #f4c2c2;
  font-size: 18px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--c-border);
}


/* ----------------------------------------------
   9. 商品カード・画像
---------------------------------------------- */
.product-card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: 22px;
  overflow: hidden;
  margin-bottom: 56px;
  box-shadow: 0 2px 22px rgba(42, 26, 31, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 36px rgba(42, 26, 31, 0.12);
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--c-border);
}

.number-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--c-rose);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.header-text {
  flex: 1;
}

.brand-name {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 4px;
}

.card-product-name {
  font-size: 16px;
  font-weight: 500;
  color: var(--c-deep);
  line-height: 1.5;
}

.vol-tag {
  display: inline-block;
  background: var(--c-border);
  color: var(--c-muted);
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 8px;
  margin-left: 6px;
}

/* 商品画像 */
.card-img {
  width: 100%;
  max-height: 260px;
  overflow: hidden;
  background: var(--c-mist);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.card-img img {
  width: auto;
  max-width: 100%;
  max-height: 240px;
  object-fit: contain;
  display: block;
  border-radius: 8px;
}

.card-body {
  padding: 22px 24px;
}

.star-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.stars {
  color: var(--c-gold);
  font-size: 15px;
  letter-spacing: 1px;
}

.star-label {
  font-size: 12px;
  color: var(--c-muted);
}

.product-desc {
  font-size: 14px;
  color: #5a4040;
  line-height: 1.95;
  margin-bottom: 20px;
}

.product-desc strong {
  color: var(--c-deep);
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--c-mist);
  border-radius: 14px;
  padding: 14px 20px;
  margin-bottom: 18px;
  gap: 12px;
  flex-wrap: wrap;
}

.price-label {
  font-size: 12px;
  color: var(--c-muted);
  font-weight: 500;
  margin-bottom: 4px;
}

.price-value {
  font-family: 'Noto Serif JP', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--c-rose);
}

.price-note {
  font-size: 11px;
  color: var(--c-muted);
  line-height: 1.9;
}


/* ----------------------------------------------
   10. カテゴリバッジ
---------------------------------------------- */
.category-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 4px 11px;
  border-radius: 30px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}

.cat-skin { background: #fce8ef; color: #a03060; }
.cat-hair { background: #e8f4fc; color: #1a6a9a; }
.cat-body { background: #e8f8ee; color: #1a7a4a; }
.cat-care { background: #fff0e0; color: #a05020; }


/* ----------------------------------------------
   11. レビューグリッド（良い点・気になる点）
---------------------------------------------- */
.review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.review-box {
  border-radius: 14px;
  padding: 14px 16px;
}

.review-box.good {
  background: var(--c-good-bg);
  border: 1px solid #c2e8d8;
}

.review-box.bad {
  background: var(--c-bad-bg);
  border: 1px solid #f0c8c8;
}

.review-box h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  border: none !important;
  padding: 0 !important;
  background: none !important;
}

.review-box.good h4 { color: var(--c-good); }
.review-box.bad  h4 { color: var(--c-bad); }

.review-box ul {
  list-style: none;
  padding: 0;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.review-box li {
  font-size: 13px;
  color: var(--c-text);
  padding: 3px 0 3px 16px;
  position: relative;
  line-height: 1.6;
}

.review-box li:last-child {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

.review-box li::before {
  position: absolute;
  left: 0;
  font-weight: 700;
  font-size: 11px;
  top: 5px;
}

.review-box.good li::before {
  content: '✓';
  color: var(--c-good);
}

.review-box.bad li::before {
  content: '✗';
  color: var(--c-bad);
}


/* ----------------------------------------------
   12. 価格テーブル
---------------------------------------------- */
.price-table-wrap {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: 20px;
  overflow-x: auto;
  margin-bottom: 16px;
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  min-width: 500px;
}

.price-table thead tr {
  background: var(--c-deep);
  color: #fff;
}

/* Cocoon上書き対策 */
.price-table-wrap table thead tr th,
.price-table-wrap .price-table thead tr th,
table.price-table thead tr th {
  color: #ffffff !important;
  background: var(--c-deep) !important;
  font-weight: 500 !important;
  border-color: var(--c-deep) !important;
  padding: 14px 18px;
  text-align: left;
}

.price-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--c-border);
}

.price-table tr:last-child td {
  border-bottom: none;
}

.price-table tr:nth-child(even) td {
  background: var(--c-mist);
}

.price-col {
  text-align: right;
  font-weight: 600;
  color: var(--c-rose);
  font-family: 'Noto Serif JP', serif;
  font-size: 15px;
}

.center {
  text-align: center;
}


/* ----------------------------------------------
   13. 購入場所カード
---------------------------------------------- */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 24px;
  margin-bottom: 8px;
}

.shop-card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: 16px;
  padding: 20px 18px;
}

.shop-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--c-deep);
  margin-bottom: 10px;
  line-height: 1.5;
  border: none !important;
  padding: 0 !important;
  background: none !important;
}

.shop-card p {
  font-size: 13px;
  color: #5a4040;
  line-height: 1.75;
}

.shop-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 8px;
  margin-bottom: 8px;
}

.badge-best   { background: #fff0d0; color: #9a6000; }
.badge-cheap  { background: #e8f8ee; color: #1a7a4a; }
.badge-global { background: #e8f4fc; color: #1a6a9a; }
.badge-direct { background: #fce8ef; color: #a03060; }


/* ----------------------------------------------
   14. PR表記・この記事でわかること
---------------------------------------------- */
.pr-notice {
  font-size: 12px;
  color: var(--c-muted);
  text-align: right;
  margin-top: 8px;
  margin-bottom: 8px;
}

.article-summary {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: 16px;
  padding: 22px 26px;
  margin: 0 0 36px;
}

.summary-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--c-deep);
  margin-bottom: 14px;
}

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

.article-summary li {
  font-size: 14px;
  color: var(--c-text);
  padding: 4px 0 4px 20px;
  position: relative;
  line-height: 1.7;
}

.article-summary li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--c-rose);
  font-weight: 700;
  font-size: 12px;
  top: 6px;
}


/* ----------------------------------------------
   15. ユーティリティ
---------------------------------------------- */
.point-label {
  display: inline-block;
  background: var(--c-rose);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  margin-right: 4px;
  vertical-align: middle;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag {
  background: var(--c-mist);
  color: var(--c-rose);
  font-size: 12px;
  padding: 4px 13px;
  border-radius: 20px;
  border: 1px solid var(--c-border);
}


/* ----------------------------------------------
   16. フッター
---------------------------------------------- */
.footer {
  background: var(--c-deep);
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  padding: 40px 24px;
  font-size: 12px;
  margin-top: 60px;
  line-height: 2.3;
}

.footer strong {
  color: rgba(255, 255, 255, 0.8);
}


/* ----------------------------------------------
   17. Cocoon上書き・空タグ除去
---------------------------------------------- */

/* 記事タイトルを非表示 */
.article .entry-title {
  display: none;
}

/* 記事上部のシェアボタン・日付を非表示 */
.entry-header .sns-share,
.article-header .sns-share,
.entry-header .post-date,
.article-header .post-date,
.article-header .entry-header-items {
  display: none;
}

/* ヒーロー上の余白をリセット */
.entry-content {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

.entry-content > .hero:first-child {
  margin-top: -1.5em;
}

/* WordPressが自動挿入する空のpタグを非表示 */
.entry-content > p:empty,
.card-body > p:empty,
.product-card > p:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  line-height: 0 !important;
}


/* ----------------------------------------------
   18. レスポンシブ（スマホ対応）
   ※ メディアクエリをここに1か所にまとめています
---------------------------------------------- */
@media (max-width: 767px) {

  /* コンテナ横幅を最大化 */
  .container {
    padding: 0 !important;
    max-width: 100% !important;
  }

  /* Cocoonのコンテンツ余白をリセット */
  .entry-content {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .entry-content > *:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  /* ヒーロー */
  .hero {
    padding: 48px 16px 40px;
    margin-bottom: 0 !important;
  }

  /* PR表記 */
  .pr-notice {
    padding: 0 16px !important;
  }

  /* 導入文 */
  .intro-block {
    padding: 20px 16px !important;
    border-radius: 0 !important;
    font-size: 14px !important;
  }

  .intro-block p {
    font-size: 14px !important;
    line-height: 1.8 !important;
  }

  /* この記事でわかること */
  .article-summary {
    padding: 16px !important;
  }

  /* 目次 */
  .toc {
    padding: 16px !important;
  }

  /* 商品カード */
  .product-card {
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
  }

  .card-header {
    padding: 16px !important;
    flex-wrap: wrap;
  }

  .card-body {
    padding: 16px !important;
  }

  /* 価格ボックス */
  .price-row {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 12px !important;
    padding: 12px 14px !important;
  }

  /* レビューグリッド */
  .review-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .card-header {
    flex-wrap: wrap;
  }
}

/* ヒーロー画像に重なる日付だけ非表示 */
.article .entry-header {
  display: none;
}

.post-body-text p {
  margin-bottom: 0;
}

/* ===================================================
   SNSリンク（ヘッダー用）
   style.cssの一番下に追加してください
=================================================== */

/* SNSアイコンボタン共通 */
.kbn-sns-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.kbn-sns-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none !important;
  transition: opacity 0.2s ease, transform 0.2s ease;
  letter-spacing: 0.5px;
}

.kbn-sns-btn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

/* X（Twitter）ボタン */
.kbn-sns-btn--x {
  background: #000;
  color: #fff !important;
  border: 2px solid #000;
}

/* Instagramボタン */
.kbn-sns-btn--instagram {
  background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  color: #fff !important;
  border: none;
}

/* SVGアイコン */
.kbn-sns-btn svg {
  width: 14px;
  height: 14px;
  fill: #fff;
  flex-shrink: 0;
}

/* フッター内のPolylang言語切り替えリンク */
.footer .widget_polylang a {
  color: rgba(255, 255, 255, 0.8) !important;
}

.footer .widget_polylang .current-lang a {
  color: #ffffff !important;
  font-weight: bold;
}

.footer {
  background: #fdf6f0 !important;
  color: var(--c-deep) !important;
}

/* 言語リンクの色も暗色に変更 */
.footer .widget_polylang a {
  color: var(--c-deep) !important;
}

.footer .widget_polylang .current-lang a {
  color: var(--c-rose) !important; /* ピンクで現在言語を強調 */
  font-weight: bold;
}

/* コピーライトの色も調整 */
.footer .copyright {
  color: var(--c-deep) !important;
}

.footer .widget_polylang ul {
  list-style: none;        /* ・を消す */
  padding: 0;
  margin: 0 auto;
  display: flex;
  justify-content: center; /* 中央寄せ */
  gap: 16px;               /* リンク間の余白 */
}

.footer .widget_polylang li {
  margin: 0;
  padding: 0;
}

