/* YoruLog カスタムCSS - Cocoon子テーマ用 */

/* --- CTAボタン --- */
.cta-btn {
  display: inline-block;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  text-decoration: none !important;
  border-radius: 8px;
  transition: opacity 0.2s, transform 0.15s;
  line-height: 1.4;
  cursor: pointer;
  letter-spacing: 0.04em;
}
.cta-btn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}
.cta-btn:active {
  transform: translateY(0);
}

.cta-fanza {
  background: #b01030 !important;
  color: #fff !important;
  border: 2px solid #b01030 !important;
}
.cta-fanza:visited { color: #fff !important; }

.cta-dlsite {
  background: #0073e6;
  color: #fff !important;
  border: 2px solid #0073e6;
}
.cta-dlsite:visited { color: #fff !important; }

.cta-fanza-outline {
  background: transparent !important;
  color: #b01030 !important;
  border: 2px solid #b01030 !important;
}
.cta-dlsite-outline {
  background: transparent;
  color: #0073e6 !important;
  border: 2px solid #0073e6;
}

.cta-block {
  display: block;
  width: 100%;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.cta-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 24px 0;
}

/* --- 商品カード --- */
.product-card {
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 20px;
  background: #fff;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.product-card__image {
  text-align: center;
  margin-bottom: 14px;
}
.product-card__image img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

.product-card__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.5;
}

.product-card__meta {
  font-size: 14px;
  color: #666;
  margin-bottom: 12px;
  line-height: 1.6;
}
.product-card__meta span {
  display: inline-block;
  margin-right: 12px;
}

.product-card__price {
  font-size: 20px;
  font-weight: 700;
  color: #e8380d;
  margin-bottom: 14px;
}

.product-card__score {
  display: inline-block;
  background: #ffecd2;
  color: #e8380d;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 14px;
  margin-bottom: 10px;
}

.product-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.product-card__tag {
  display: inline-block;
  background: #f5f5f5;
  color: #555;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 14px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin: 24px 0;
}
.product-grid .product-card {
  margin-bottom: 0;
}

/* --- 単一記事 上部広告（Customizer「YoruLog 単一記事」／未設定時は HTML 自体が出ない） --- */
.yorulog-ad-slot {
  margin: 0 0 1.25rem;
  text-align: center;
}

/* --- 関連記事ブロック --- */
.yorulog-related {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid #f0f0f0;
}

.yorulog-related__heading {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-left: 12px;
  border-left: 4px solid #e8380d;
}

.yorulog-related__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0 0 30px;
}

.yorulog-related__item {
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.yorulog-related__item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.yorulog-related__item a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.yorulog-related__thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.yorulog-related__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yorulog-related__body {
  padding: 12px 14px;
}

.yorulog-related__title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  margin: 0;
}

.yorulog-related__label {
  display: inline-block;
  font-size: 11px;
  background: #e8380d;
  color: #fff;
  padding: 2px 8px;
  border-radius: 3px;
  margin-bottom: 6px;
}
.yorulog-related__label--matome {
  background: #6c5ce7;
}

/* --- レスポンシブ --- */
@media (max-width: 600px) {
  .cta-btn {
    padding: 12px 20px;
    font-size: 15px;
  }
  .cta-group {
    flex-direction: column;
    align-items: center;
  }
  .product-grid {
    grid-template-columns: 1fr;
  }
  .product-card__title {
    font-size: 16px;
  }
  .yorulog-related__list {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .yorulog-related__title {
    font-size: 13px;
  }
}

@media (max-width: 400px) {
  .yorulog-related__list {
    grid-template-columns: 1fr;
  }
}

/* --- シングル記事: Cocoonのアイキャッチ表示を非表示（本文内yl-coverを正とする） --- */
.single figure.eye-catch {
  display: none !important;
}

/* ============================================================
   単ページテンプレ (yl- プレフィックス)
   ============================================================ */

/* --- 広告エリア --- */
.yl-ad-top {
  margin: 0 0 24px;
  text-align: center;
}

/* --- 表紙 --- */
.yl-cover {
  margin: 0 0 4px;
  text-align: center;
}
.yl-cover a {
  display: block;
}
.yl-cover__img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 4px;
}

/* --- CTA 共通 --- */
.yl-cta {
  text-align: center;
}
.yl-cta--top {
  margin: 20px 0 24px;
}
.yl-cta--mid {
  margin: 12px 0 16px;
}
.yl-cta--bottom {
  margin: 28px 0 16px;
}

/* 中盤CTA: 小さめ・控えめ（通常CTAとは別クラス） */
.yl-cta-mid-btn {
  font-size: 13px !important;
  padding: 7px 18px !important;
  font-weight: 400 !important;
  border-radius: 4px;
  letter-spacing: 0;
  opacity: 0.85;
}

/* --- 冒頭一言 --- */
.yl-intro {
  font-size: 15px;
  line-height: 1.85;
  margin: 0 0 20px;
  color: #333;
}

/* --- サンプル画像群 --- */
.yl-samples {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 4px;
}
.yl-sample-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

/* --- 終盤セクション --- */
.yl-closing {
  margin: 24px 0 20px;
  padding: 18px 20px;
  background: #fafafa;
  border-radius: 8px;
  border-left: 3px solid #e8380d;
}

/* こんな人におすすめ */
.yl-target {
  padding-left: 1.4em;
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.9;
  color: #444;
}
.yl-target li {
  margin-bottom: 3px;
}

/* 最後の誘導文 */
.yl-outro {
  font-size: 14px;
  line-height: 1.8;
  color: #555;
  margin: 0;
}

/* --- 作品情報テーブル --- */
.yl-meta-table {
  margin: 20px 0 28px;
}
.yl-meta-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.yl-meta-table th,
.yl-meta-table td {
  padding: 8px 12px;
  border: 1px solid #e8e8e8;
  vertical-align: top;
  line-height: 1.6;
}
.yl-meta-table th {
  width: 28%;
  background: #f5f5f5;
  color: #555;
  font-weight: 600;
  white-space: nowrap;
}
.yl-meta-table td {
  color: #333;
}

/* --- 単ページ レスポンシブ --- */
@media (max-width: 600px) {
  .yl-closing {
    padding: 14px 16px;
  }
  .yl-meta-table th,
  .yl-meta-table td {
    font-size: 12px;
    padding: 6px 10px;
  }
  .yl-meta-table th {
    width: 32%;
  }
}
