@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){
  /*必要ならばここにコードを書く*/
}

/* =========================================================
  基本調整
========================================================= */

html {
  -webkit-text-size-adjust: 100%;
}

img {
  max-width: 100%;
  height: auto;
}

/* =========================================================
  Amazon風カテゴリ一覧・商品導線CSS
========================================================= */

.eco-link-area {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 36px 0;
}

.eco-link-card {
  border: 1px solid #e5e5e5;
  border-radius: 14px;
  padding: 22px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
}

.eco-link-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef8f1;
  color: #287a42;
  margin-bottom: 10px;
}

.eco-link-card h3 {
  font-size: 20px;
  margin: 6px 0 10px;
  line-height: 1.45;
  overflow-wrap: break-word;
  word-break: break-word;
}

.eco-link-card p {
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 16px;
}

.eco-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 999px;
  background: #2f8f46;
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 700;
}

.eco-link-btn:hover {
  opacity: .86;
}

.eco-oem-card {
  background: #fffaf0;
}

/* =========================================================
  通常カテゴリカード
========================================================= */

.eco-amazon-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 28px 0;
}

.eco-amazon-card {
  display: block;
  min-height: 150px;
  padding: 20px;
  border: 1px solid #e5e5e5;
  border-radius: 14px;
  background: #fff;
  text-decoration: none !important;
  color: inherit !important;
  box-shadow: 0 4px 14px rgba(0,0,0,.05);
  transition: transform .2s ease, box-shadow .2s ease;
  will-change: transform;
}

.eco-amazon-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0,0,0,.1);
}

.eco-amazon-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 10px;
  overflow-wrap: break-word;
  word-break: break-word;
}

.eco-amazon-desc {
  font-size: 14px;
  color: #555;
  line-height: 1.7;
}

.eco-amazon-more {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 700;
  color: #2f8f46;
}

/* =========================================================
  Amazon風カテゴリ画像カード
========================================================= */

.eco-amazon-cat-wrap {
  display: grid;
  gap: 22px;
  margin: 30px 0;
}

.eco-col-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.eco-col-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.eco-col-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.eco-amazon-cat-card {
  display: block;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none !important;
  color: inherit !important;
  box-shadow: 0 4px 18px rgba(0,0,0,.06);
  transition: transform .2s ease, box-shadow .2s ease;
  will-change: transform;
}

.eco-amazon-cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 26px rgba(0,0,0,.12);
}

.eco-amazon-cat-img {
  background: #f6f6f6;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.eco-amazon-cat-img img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.eco-amazon-cat-body {
  padding: 18px;
}

.eco-amazon-cat-body h3 {
  font-size: 18px;
  line-height: 1.45;
  margin: 0 0 10px;
  overflow-wrap: break-word;
  word-break: break-word;
}

.eco-amazon-cat-body p {
  font-size: 14px;
  color: #555;
  line-height: 1.7;
  margin: 0 0 12px;
}

.eco-amazon-cat-count {
  display: block;
  font-size: 13px;
  color: #777;
  margin-bottom: 12px;
}

.eco-amazon-cat-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  background: #2f8f46;
  color: #fff !important;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}

/* =========================================================
  記事カード
========================================================= */

.eco-post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.eco-post-card {
  display: block;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,.06);
  text-decoration: none !important;
  color: inherit !important;
  transition: transform .2s ease, box-shadow .2s ease;
  will-change: transform;
}

.eco-post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0,0,0,.1);
  text-decoration: none !important;
  color: inherit !important;
}

.eco-post-card:visited {
  color: inherit !important;
}

.eco-post-img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f6f6f6;
}

.eco-post-img img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.eco-post-body {
  padding: 15px;
}

.eco-post-body h3 {
  font-size: 16px;
  line-height: 1.55;
  margin: 0 0 8px;
  overflow-wrap: break-word;
  word-break: break-word;
}

.eco-post-body p {
  font-size: 14px;
  color: #555;
  line-height: 1.7;
  margin: 0;
}

/* =========================================================
  スマホ対応
========================================================= */

@media (max-width: 900px) {
  .eco-col-4,
  .eco-col-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .eco-post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .eco-link-area,
  .eco-amazon-grid {
    grid-template-columns: 1fr;
  }

  .eco-link-card,
  .eco-amazon-card {
    padding: 18px;
  }

  .eco-link-card h3 {
    font-size: 18px;
  }
}

@media (max-width: 600px) {
  .eco-col-4,
  .eco-col-3,
  .eco-col-2,
  .eco-post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .eco-amazon-cat-body {
    padding: 14px;
  }

  .eco-amazon-cat-body h3 {
    font-size: 15px;
  }

  .eco-amazon-cat-body p {
    font-size: 13px;
    line-height: 1.6;
  }

  .eco-amazon-cat-count {
    font-size: 12px;
  }

  .eco-amazon-cat-btn {
    width: 100%;
    font-size: 13px;
  }

  .eco-post-body {
    padding: 14px;
  }

  .eco-post-body h3 {
    font-size: 15px;
  }

  .eco-post-body p {
    font-size: 13px;
    line-height: 1.6;
  }
}

@media (max-width: 420px) {
  .eco-link-area,
  .eco-amazon-grid {
    grid-template-columns: 1fr;
  }

  .eco-link-card {
    padding: 16px;
  }
}

/* =========================================================
  サイドバーをコンテンツ下部に移動（PCのみ）
========================================================= */

@media (min-width: 835px) {

  .content {
    display: flex;
    flex-direction: column;
  }

  .main {
    width: 100%;
    order: 1;
    float: none;
  }

  .sidebar {
    width: 100%;
    order: 2;
    float: none;
    margin-top: 40px;

    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
  }

  .widget {
    border: 1px solid #e5e5e5;
    padding: 16px;
    border-radius: 8px;
    background: #fff;
  }

  .widget-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
    border: none;
    padding: 0;
  }
}

@media (max-width: 767px) {

  .sidebar {
    display: block;
  }

  .widget {
    margin-bottom: 16px;
  }
}

/* =========================================================
  おしゃれなSNSフォローボタン
  [profile_follow_buttons]
========================================================= */

.eco-follow-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0;
  align-items: center;
}

.eco-follow-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 8px;
  border-radius: 9999px;
  text-decoration: none !important;
  background: #ffffff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
  border: 1px solid currentColor;
  max-width: 100%;
}

.eco-follow-link:hover,
.eco-follow-link:focus {
  text-decoration: none !important;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0,0,0,.12);
  opacity: .96;
}

.eco-follow-link:focus-visible {
  outline: 2px solid #666;
  outline-offset: 2px;
}

.eco-follow-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .02em;
  flex: 0 0 36px;
  color: #fff;
}

.eco-follow-text {
  display: inline-block;
  white-space: normal;
}

/* X */
.eco-follow-x {
  color: #111111 !important;
  background: #ffffff;
}

.eco-follow-x .eco-follow-icon {
  background: #111111;
}

/* Instagram */
.eco-follow-instagram {
  color: #c13584 !important;
  background: #ffffff;
  border-color: #c13584;
}

.eco-follow-instagram .eco-follow-icon {
  background: linear-gradient(135deg,#f58529 0%,#dd2a7b 45%,#8134af 75%,#515bd4 100%);
}

/* Facebook */
.eco-follow-facebook {
  color: #1877f2 !important;
  background: #ffffff;
  border-color: #1877f2;
}

.eco-follow-facebook .eco-follow-icon {
  background: #1877f2;
}

/* LINE */
.eco-follow-line {
  color: #06c755 !important;
  background: #ffffff;
  border-color: #06c755;
}

.eco-follow-line .eco-follow-icon {
  background: #06c755;
  font-size: 10px;
}

/* Pinterest */
.eco-follow-pinterest {
  color: #e60023 !important;
  background: #ffffff;
  border-color: #e60023;
}

.eco-follow-pinterest .eco-follow-icon {
  background: #e60023;
}

/* Blog */
.eco-follow-hatena {
  color: #2e7d32 !important;
  background: #ffffff;
  border-color: #2e7d32;
}

.eco-follow-hatena .eco-follow-icon {
  background: #2e7d32;
}

/* Amazon */
.eco-follow-amazon {
  color: #ff9900 !important;
  background: #ffffff;
  border-color: #ff9900;
}

.eco-follow-amazon .eco-follow-icon {
  background: #ff9900;
  color: #fff;
}

/* Cocoon対策 */
.entry-content .eco-follow-links,
.article .eco-follow-links,
.widget .eco-follow-links,
.author-box .eco-follow-links,
.profile-box .eco-follow-links {
  margin-top: 18px;
  margin-bottom: 18px;
}

.entry-content .eco-follow-link::after,
.widget .eco-follow-link::after,
.author-box .eco-follow-link::after,
.profile-box .eco-follow-link::after {
  display: none !important;
  content: none !important;
}

/* スマホ */
@media (max-width: 767px) {

  .eco-follow-links {
    gap: 10px;
  }

  .eco-follow-link {
    flex: 1 1 calc(50% - 10px);
    justify-content: flex-start;
    min-width: calc(50% - 10px);
    padding: 8px 12px 8px 8px;
    font-size: 13px;
  }

  .eco-follow-icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    font-size: 12px;
  }

  .eco-follow-line .eco-follow-icon {
    font-size: 9px;
  }
}

/* 極小画面 */
@media (max-width: 420px) {

  .eco-follow-link {
    flex: 1 1 100%;
    min-width: 100%;
  }
}

/* =========================================================
  スマホはみ出し対策・最終調整
========================================================= */

body {
  overflow-x: hidden;
}

html {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

.entry-content,
.article,
.content,
.content-in,
.main,
.sidebar,
.eco-link-area,
.eco-amazon-grid,
.eco-amazon-cat-wrap,
.eco-post-grid {
  max-width: 100%;
}

.entry-content img,
.article img,
.eco-amazon-cat-img img,
.eco-post-img img {
  max-width: 100%;
  height: auto;
}

.entry-content table,
.article table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  white-space: normal;
}

.entry-content,
.article,
.eco-link-card,
.eco-amazon-card,
.eco-amazon-cat-card,
.eco-post-card,
.eco-follow-link {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* スマホではカードを1列にして安全優先 */
@media (max-width: 600px) {

  .eco-col-4,
  .eco-col-3,
  .eco-col-2,
  .eco-post-grid,
  .eco-amazon-grid {
    grid-template-columns: 1fr !important;
  }

  .eco-amazon-cat-wrap,
  .eco-post-grid,
  .eco-amazon-grid {
    gap: 14px;
  }

  .eco-amazon-cat-card,
  .eco-post-card,
  .eco-amazon-card,
  .eco-link-card {
    width: 100%;
    max-width: 100%;
  }

  .eco-amazon-cat-body,
  .eco-post-body,
  .eco-link-card {
    padding: 14px;
  }

  .eco-amazon-cat-body h3,
  .eco-post-body h3,
  .eco-link-card h3,
  .eco-amazon-title {
    font-size: 15px;
    line-height: 1.5;
  }

  .eco-amazon-cat-body p,
  .eco-post-body p,
  .eco-link-card p,
  .eco-amazon-desc {
    font-size: 13px;
    line-height: 1.7;
  }

  .eco-link-btn,
  .eco-amazon-cat-btn {
    width: 100%;
  }
}

/* SNSボタンもスマホでは1列安全 */
@media (max-width: 480px) {

  .eco-follow-link {
    flex: 1 1 100%;
    min-width: 100%;
    max-width: 100%;
  }

  .eco-follow-text {
    white-space: normal;
  }
}

iframe {
  max-width:100%;
}

input,
textarea,
select {
  max-width:100%;
}


/* =========================================================
  スマホスワイプ安定化・描画軽量化 完全版
========================================================= */

html {
  -webkit-text-size-adjust: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

body {
  max-width: 100vw;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

/* タップ時の青ハイライト防止 */
* {
  -webkit-tap-highlight-color: transparent;
}

/* 入力欄のiPhone自動ズーム防止 */
input,
textarea,
select {
  max-width: 100%;
  font-size: 16px;
}

/* タッチ操作安定化 */
a,
button {
  touch-action: manipulation;
}

/* 画像・iframe・動画のはみ出し防止 */
img,
iframe,
video {
  max-width: 100%;
}

img {
  height: auto;
}

iframe,
video {
  height: auto;
}

/* カード類の描画軽量化 */
.eco-link-card,
.eco-amazon-card,
.eco-amazon-cat-card,
.eco-post-card,
.eco-follow-link {
  will-change: auto !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.05) !important;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* PCだけ軽いhoverを残す */
@media (min-width: 769px) {

  .eco-amazon-card:hover,
  .eco-amazon-cat-card:hover,
  .eco-post-card:hover,
  .eco-follow-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,.08) !important;
  }

}

/* スマホでは動きを止めて安定優先 */
@media (max-width: 768px) {

  .eco-link-card,
  .eco-amazon-card,
  .eco-amazon-cat-card,
  .eco-post-card,
  .eco-follow-link {
    transform: none !important;
    transition: none !important;
    animation: none !important;
    box-shadow: 0 2px 6px rgba(0,0,0,.05) !important;
  }

  .eco-link-card:hover,
  .eco-amazon-card:hover,
  .eco-amazon-cat-card:hover,
  .eco-post-card:hover,
  .eco-follow-link:hover {
    transform: none !important;
    box-shadow: 0 2px 6px rgba(0,0,0,.05) !important;
  }

  .eco-amazon-grid,
  .eco-amazon-cat-wrap,
  .eco-post-grid,
  .eco-link-area {
    contain: layout paint;
  }

  body {
    -webkit-font-smoothing: antialiased;
  }

}

/* 超小型スマホ */
@media (max-width: 480px) {

  .eco-link-card,
  .eco-amazon-card,
  .eco-amazon-cat-card,
  .eco-post-card {
    border-radius: 10px;
  }

  .eco-amazon-cat-body,
  .eco-post-body,
  .eco-link-card {
    padding: 12px;
  }

  .eco-amazon-cat-body h3,
  .eco-post-body h3,
  .eco-link-card h3,
  .eco-amazon-title {
    font-size: 14px;
    line-height: 1.5;
  }

  .eco-amazon-cat-body p,
  .eco-post-body p,
  .eco-link-card p,
  .eco-amazon-desc {
    font-size: 12px;
    line-height: 1.6;
  }

}

/* =========================================================
  購入先比較カード
========================================================= */

.eco-shop-area {
  margin: 38px 0;
  padding: 24px;
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 3px 14px rgba(0,0,0,.05);
}

.eco-shop-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.5;
}

.eco-shop-lead {
  font-size: 14px;
  line-height: 1.8;
  color: #555;
  margin: 0 0 18px;
}

.eco-shop-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.eco-shop-card {
  display: block;
  padding: 18px;
  border: 1px solid #e5e5e5;
  border-radius: 14px;
  background: #fff;
  color: inherit !important;
  text-decoration: none !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}

.eco-shop-card:hover {
  text-decoration: none !important;
  opacity: .9;
}

.eco-shop-card-main {
  border: 2px solid #2f8f46;
  background: #f6fff8;
}

.eco-shop-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef8f1;
  color: #287a42;
  margin-bottom: 8px;
}

.eco-shop-label-yahoo {
  background: #fff7e6;
  color: #b36b00;
}

.eco-shop-label-amazon {
  background: #fff3df;
  color: #b05d00;
}

.eco-shop-card h3 {
  font-size: 17px;
  margin: 0 0 8px;
  line-height: 1.45;
}

.eco-shop-card p {
  font-size: 13px;
  line-height: 1.7;
  color: #555;
  margin: 0 0 14px;
}

.eco-shop-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #2f8f46;
  color: #fff !important;
  font-size: 13px;
  font-weight: 700;
}

.eco-shop-btn-yahoo {
  background: #f39800;
}

.eco-shop-btn-amazon {
  background: #ff9900;
}

@media (max-width: 768px) {
  .eco-shop-area {
    padding: 16px;
  }

  .eco-shop-grid {
    grid-template-columns: 1fr;
  }

  .eco-shop-btn {
    width: 100%;
  }
}
/* OEMカード1枚表示用 */
.eco-link-area-single {
  grid-template-columns: 1fr;
}

.eco-link-area-single .eco-link-card {
  max-width: 100%;
}

/* OEMカード1枚表示用 */
.eco-link-area-single {
  grid-template-columns: 1fr;
}

.eco-link-area-single .eco-link-card {
  max-width: 100%;
}

