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

/************************************
** 子テーマ用のスタイルを書く
************************************/
/*必要ならばここにコードを書く*/
.mhnlist img{width:40px!important;}
.mhntable-w th:first-child{width:20%;}
.mhntable-w img{width:60px!important;}
.mhntable-e img{width:60px!important;}
.mhntable-e tr:nth-child(2) td{text-align:center;}
.mhntable-s th:first-child{width:34%;}
.mhntable-s th:last-child{width:16%;}
.mhntable-s td:nth-child(1),.mhntable-s td:nth-child(3){text-align:center;}
.mhntable-st ul{margin:0!important;padding:0 0 0 16px!important;}
.mhntable-st td:nth-child(1),.mhntable-st td:nth-child(3){text-align:center;}
.mhn-others td{text-align:center;}
.mhn-others img{width:60px!important;}
.mhn-ranking th:first-child{width:20%;}
/* 1列目（属性アイコン） */
.mhn-ranking td:first-child img{
  width:16px;
  height:auto;
}

.mhn-ranking td:nth-child(2) img,
.mhn-ranking td:nth-child(3) img,
.mhn-ranking td:nth-child(4) img{
  width:60px;
  height:auto;
}
/* ===== 属性ボタン 1行5列 × 2行 ===== */
/* ===== 枠で囲む ===== */
.mhn-attr-picker-wrapper{
  position: relative;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 0px 5px 0px;
}

/* ===== ラベルを枠線に重ねる ===== */
.mhn-attr-label{
  position: absolute;
  top: -10px;
  left: 12px;
  background: #fff;
  padding: 0 8px;
  font-size: 16px;
  font-weight: 700;
}
.mhn-attr-picker{
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin: 25px 0 10px;
}

.mhn-attr-btn{
  padding: 10px 0;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
}

.mhn-attr-btn.is-active{
  border-color: #888;
}

/* パネル余白 */
.mhn-attr-panel{
  margin-top: 10px;
}
.mhn-attr-picker img{width:16px!important;}
.mhn-attr-btn.is-active{
  border-color: #888;
  background-color: #f2f2f2;
  font-weight: 800;
}
.scroll-table{
    display: block;
    overflow-x: auto;
    overflow-y: scroll;
    max-height: 500px;
  white-space: wrap;
    border: 1px solid #ccc;
}
.scroll-table img{width:40px!important;}
.fixedth1,
.scroll-table tr td:first-child{
  position: sticky;
  top: 0;
  left: 0;
  &:before{
    content: "";
    position: absolute;
    top: -1px;
    left: -1px;
    width: 100%;
    height: 100%;
    border: 1px solid #ccc;
	pointer-events: none;
  }:
}
.scroll-table .fixedth1:first-child{
  z-index: 4;
}
.fixedth1{
  z-index: 3;
}

.scroll-table tr td:first-child{
	background: white;
 	z-index: 2;
}

.scroll-table td, .scroll-table th {
  white-space: nowrap;
}

.scroll-table td{
	text-align:center;
	z-index: 1;	
}

.button-link{
  display: block;
  width: 100%;
  box-sizing: border-box;

  background: #ff2d80;
  color: #fff;
  font-weight: 700;
  text-align: center;
  text-decoration: none;

  padding: 14px 16px;
  margin:10px 0 24px 0;
  border-radius: 8px;
}
.button-link:hover{
  background:#e60073;
	color: #fff;
  transform:translateY(2px);
  box-shadow:0 2px 0 #cc1f6f;
}
table.chapter-list {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

table.chapter-list th,
table.chapter-list td {
  font-size: 10px;
  line-height: 1.2;
  padding:12px 4px;
  text-align: center;
  vertical-align: middle;
  word-break: break-word;
}

table.chapter-list th {
  width: 36px;
  white-space: nowrap;
}

table.chapter-list img {
  width: 24px;
  height: 24px;
  vertical-align: middle;
}

@media screen and (max-width: 767px) {
  table.chapter-list th,
  table.chapter-list td {
    font-size: 9px;
    padding:7px 3px;
  }

  table.chapter-list img {
    width: 20px;
    height: 20px;
  }
}
.pr-box {
  position: relative;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 16px;
  margin:40px 0 24px;
  background: #fff;
}

.pr-box::before {
  content: "PR";
  position: absolute;
  top: -12px;
  left: 12px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}
.pr-box2 {
  position: relative;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 16px;
  margin:40px auto 24px;
  background: #fff;
  width:342px;
}

.pr-box2::before {
  content: "PR";
  position: absolute;
  top: -12px;
  left: 12px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}
.pr-text{margin:0px!important;font-weight: 700;}
.pr-text-sub{margin:0px!important;font-size:12px;}

/* =========================================
   アフィリエイトカード用 横スライダー
   ========================================= */

.aff-slider {
  position: relative;
  margin: 18px 0;
  padding: 0 28px 14px;
}

.aff-slider__viewport {
  overflow: hidden;
}

.aff-slider__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.aff-slider__track::-webkit-scrollbar {
  display: none;
}

.aff-slider__slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  box-sizing: border-box;
  padding: 0 4px;
}

/* 既存カードの外側余白をスライダー内では調整 */
.aff-slider .aff-card {
  margin: 0;
  height: 100%;
}

/* 左右矢印 */
.aff-slider__arrow {
  position: absolute;
  top: calc(50% - 7px);
  z-index: 2;
  width: 24px;
  height: 36px;
  transform: translateY(-50%);
  border: 1px solid #ddd;
  border-radius: 999px;
  background: #fff;
  color: #333;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
}

.aff-slider__arrow--prev {
  left: 0;
}

.aff-slider__arrow--next {
  right: 0;
}

.aff-slider__arrow:disabled {
  opacity: .35;
  cursor: default;
}

/* ドット */
.aff-slider__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  gap: 7px;
}

.aff-slider__dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
}

.aff-slider__dot.is-active {
  background: #333;
}

/* aff-slider内に自動生成された空pを無効化 */
.aff-slider p:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  line-height: 0 !important;
}

/* =========================================
   カード本体
   ========================================= */

.aff-card {
  display: flex;
  align-items: stretch;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  margin: 12px 0;
}

/* 画像カラム */
.aff-card__image {
  flex: 0 0 120px;
  display: flex;
  align-items: stretch;
}

.aff-card__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
  display: block;
  background: #fff;
}

.aff-card__body {
  flex: 1 1 auto;
  min-width: 0;
}

.aff-card__title {
  font-size: 1rem;
  margin: 0 0 .25rem !important;
  line-height: 1.35;
}

.aff-card__desc {
  font-size: .9rem;
  color: #555;
  margin: .25rem 0 .75rem;
}

/* ボタン行 */
.aff-card__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: .25rem 0 .5rem;
}

/* ボタン */
.aff-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: .4rem .7rem;
  border: 1px solid #111;
  border-radius: 8px;
  background: #fff;
  font-size: .9rem;
  font-weight: bold;
  text-decoration: none;
}

.aff-card__btn.btn-amazon {
  color: #111;
  background: #ff9900;
  border-color: #ff9900;
  text-decoration: none;
}

.aff-card__btn.btn-rakuten {
  color: #fff;
  background: #ff008c;
  border-color: #e60044;
  text-decoration: none;
}

.aff-card__btn:hover {
  filter: saturate(1.1);
}

/* 注記 */
.aff-card__note {
  color: #777;
  font-size: .8rem;
  margin: 0 0 !important;
}

/* =========================================
   900px以下：横並び維持でややコンパクト化
   ========================================= */

@media (max-width: 900px) {
  .aff-card {
    padding: 10px;
    gap: 10px;
  }

  .aff-card__image {
    flex: 0 0 100px;
  }

  .aff-card__title {
    font-size: .95rem;
  }

  .aff-card__desc {
    font-size: .88rem;
  }

  .aff-card__btn {
    min-height: 36px;
    padding: .45rem .7rem;
  }
}

/* =========================================
   640px以下：スライダー内カードを縦並びに変更
   商品名 → 画像 → 説明 → ボタン → 補足
   ========================================= */

@media (max-width: 640px) {
  .aff-slider {
    padding: 0 22px 18px;
  }

  .aff-slider__arrow {
    width: 22px;
    height: 32px;
    font-size: 20px;
  }

  .aff-slider__slide {
    padding: 0 3px;
  }

  .aff-slider .aff-card {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "img"
      "desc"
      "actions"
      "note";
    row-gap: 8px !important;
    padding: 12px !important;
    text-align: center;
  }

  .aff-slider .aff-card__body {
    display: contents;
  }

  .aff-slider .aff-card__title {
    grid-area: title;
    margin: 0 !important;
    text-align: center;
  }

  .aff-slider .aff-card__image {
    grid-area: img;
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .aff-slider .aff-card__image img {
    width: 130px;
    height: auto;
    object-fit: contain;
  }

  .aff-slider .aff-card__desc {
    grid-area: desc;
    margin: 0 !important;
    text-align: center;
  }

  .aff-slider .aff-card__actions {
  grid-area: actions;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  margin: 0 !important;
}

  .aff-slider .aff-card__btn {
  width: 100%;
  min-width: 0;
}

  .aff-slider .aff-card__note {
    grid-area: note;
    margin: 0 !important;
    text-align: center;
  }
}
/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/
/*1023px以下*/
@media screen and (max-width: 1023px){
  /*必要ならばここにコードを書く*/
}

/*834px以下*/
@media screen and (max-width: 834px){
  /*必要ならばここにコードを書く*/
.mhntable-e tr:nth-child(2) td{font-size:10px;}
.mhn-others .mhnfs{font-size:10px;}
.mhntable-w .mhnfs{font-size:10px;}
.mhn-ranking .mhnfs{font-size:10px;}
}
/*480px以下*/
@media screen and (max-width: 480px){
  /*必要ならばここにコードを書く*/
}
