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

/************************************
** 子テーマ用のスタイルを書く
************************************/
/*必要ならばここにコードを書く*/


/* ================================================
   トップページ全体のスタイル
================================================ */
#top-page-container {
  width: 100%;
  background: #f8f9fa;
  padding: 40px 0;
}

.top-page-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ================================================
 セクション共通スタイル
================================================ */
.top-section {
  margin-bottom: 30px;
  background: #fff;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 2px solid #f0f0f0;
}

.section-title {
  font-size: 28px;
  font-weight: bold;
  color: #333;
  margin: 0;
  position: relative;
  padding-left: 20px;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 30px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 3px;
}

.view-all-link {
  font-size: 14px;
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.view-all-link:hover {
  color: #764ba2;
}

/* ==========================================
   最新記事（post）カードレイアウト
========================================== */

/* セクション全体の余白を少し詰める */
.latest-posts-section {
  margin-bottom: 30px;
  padding-bottom: 10px;
}

/* グリッド：PC 4カラム */
.latest-posts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 12px;
}

/* カード */
.latest-post-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: transform .1s ease;
}
.latest-post-card:hover {
  transform: translateY(-3px);
}

.latest-post-thumb img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

/* コンテンツ部 */
.latest-post-content {
  padding: 10px 12px 14px;
}

.latest-post-category {
  font-size: 12px;
  color: #ff6600;
  display: inline-block;
  margin-bottom: 4px;
}

.latest-post-title {
  font-size: 15px;
  font-weight: bold;
  line-height: 1.4;
  margin-bottom: 6px;
}

.latest-post-date {
  font-size: 12px;
  color: #777;
}

/* ==========================================
 スマホ版（1カラム）
========================================== */
@media (max-width: 768px) {

  /* セクション上下をさらに詰める */
  .latest-posts-section {
      margin-bottom: 20px;
      padding-bottom: 5px;
  }

  /* スマホでは 1 カラム */
  .latest-posts-grid {
      grid-template-columns: 1fr;
      gap: 14px;
  }

  .latest-post-thumb img {
      height: 180px; /* スマホでは少し大きめに */
  }

  .latest-post-content {
      padding: 10px 12px;
  }
}



/* ================================================
 グリッドレイアウト
================================================ */
.products-grid,
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* ================================================
 商品カード共通
================================================ */
.product-card,
.review-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
}

.product-card:hover,
.review-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.product-card-link,
.review-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.product-image,
.review-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #f5f5f5;
  position: relative;
}

.product-image img,
.review-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.product-card:hover .product-image img,
.review-card:hover .review-image img {
  transform: scale(1.1);
}

.no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
  color: #999;
  font-size: 14px;
}

/* ================================================
 商品カードコンテンツ
================================================ */
.product-content,
.review-content {
  padding: 16px;
}

.product-name,
.review-product-name {
  font-size: 15px;
  font-weight: bold;
  color: #333;
  margin: 0 0 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-summary,
.review-excerpt {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
  margin: 8px 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ================================================
 日付表示
================================================ */
.product-date {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
}

/* ================================================
 ストアタグ
================================================ */
.product-store-tag,
.review-store-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 9999px;
  line-height: 1.3;
  margin-bottom: 6px;
}

/* 業務スーパー */
.product-store-tag.gyomusuper,
.review-store-tag.gyomusuper {
  background: #d4f5b2;
  color: #336600;
}

/* その他のストア用（必要に応じて追加） */
.product-store-tag.donquijote,
.review-store-tag.donquijote {
  background: #ffe4b5;
  color: #ff6b00;
}

/* ================================================
 ランキングバッジ
================================================ */
.ranking-card {
  position: relative;
}

.ranking-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  color: #fff;
  z-index: 10;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.ranking-badge.gold {
  background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
}

.ranking-badge.silver {
  background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
}

.ranking-badge.bronze {
  background: linear-gradient(135deg, #cd7f32 0%, #d4a574 100%);
}

.ranking-badge.default {
  background: linear-gradient(135deg, #95a5a6 0%, #bdc3c7 100%);
}

/* ================================================
 評価表示
================================================ */
.product-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 13px;
}

.rating-stars,
.review-stars {
  color: #ff9800;
  letter-spacing: 1px;
}

.rating-avg {
  font-weight: bold;
  color: #2e7d32;
}

.rating-count {
  color: #777;
  font-size: 12px;
}

.review-rating {
  margin: 6px 0;
}

/* ================================================
 レビューカード固有
================================================ */
.review-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.review-date {
  font-size: 11px;
  color: #999;
}

/* ================================================
 レスポンシブデザイン
================================================ */

/* タブレット（768px〜1024px） */
@media (max-width: 1024px) {
  .products-grid,
  .reviews-grid {
      grid-template-columns: repeat(3, 1fr);
      gap: 20px;
  }
  
  .top-section {
      padding: 30px;
  }
}

/* スマートフォン横向き（480px〜768px） */
@media (max-width: 768px) {
  .products-grid,
  .reviews-grid {
      grid-template-columns: repeat(2, 1fr);
      gap: 16px;
  }
  
  .section-title {
      font-size: 24px;
  }
  
  .top-section {
      padding: 20px;
      margin-bottom: 40px;
  }
  
  .section-header {
      flex-direction: column;
      align-items: flex-start;
      gap: 10px;
  }
  
  .product-image,
  .review-image {
      height: 160px;
  }
}

/* スマートフォン縦向き（〜480px） */
@media (max-width: 480px) {
  .products-grid,
  .reviews-grid {
      grid-template-columns: 1fr;
      gap: 20px;
  }
  
  .top-page-inner {
      padding: 0 15px;
  }
  
  .section-title {
      font-size: 20px;
      padding-left: 15px;
  }
  
  .section-title::before {
      width: 4px;
      height: 24px;
  }
  
  .product-image,
  .review-image {
      height: 200px;
  }
  
  .product-content,
  .review-content {
      padding: 12px;
  }
  
  .ranking-badge {
      width: 30px;
      height: 30px;
      font-size: 14px;
  }
}

/* ================================================
 アニメーション
================================================ */
@keyframes fadeInUp {
  from {
      opacity: 0;
      transform: translateY(20px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

.product-card,
.review-card {
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: both;
}

.product-card:nth-child(1),
.review-card:nth-child(1) { animation-delay: 0.05s; }
.product-card:nth-child(2),
.review-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3),
.review-card:nth-child(3) { animation-delay: 0.15s; }
.product-card:nth-child(4),
.review-card:nth-child(4) { animation-delay: 0.2s; }

/* ローディング時のスケルトンスクリーン（オプション） */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
      background-position: 200% 0;
  }
  100% {
      background-position: -200% 0;
  }
}




/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/
/*1023px以下*/
@media screen and (max-width: 1023px){
  /*必要ならばここにコードを書く*/
}

/*834px以下*/
@media screen and (max-width: 834px){
  /*必要ならばここにコードを書く*/
}

/*480px以下*/
@media screen and (max-width: 480px){
  /*必要ならばここにコードを書く*/
}


/* ================================================
   Cocoonデフォルトスタイルの調整（必要に応じて使用）
================================================ */

/* トップページのみCocoonのコンテンツエリアの余白を調整 */
.page-template-page-top .content-in {
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.page-template-page-top .content {
  background: transparent;
}

.page-template-page-top .main {
  padding: 0px 0;
}

/* Cocoonのエントリーカードとの競合を回避 */
.page-template-page-top .entry-card-wrap {
  display: none;
}

/* サイドバーを非表示にする場合（1カラムレイアウト） */
.page-template-page-top .sidebar {
  display: none;
}

.page-template-page-top .main {
  width: 100%;
  max-width: none;
}

/* パンくずリストの調整 */
.page-template-page-top .breadcrumb {
  margin-bottom: 20px;
}

/* Cocoonのカード系スタイルをリセット */
.page-template-page-top .e-card-wrap,
.page-template-page-top .ecb-entry-border,
.page-template-page-top .entry-card-snippet {
  all: initial;
}

/* トップページタイトルを非表示 */
.page-template-page-top .entry-title {
  display: none;
}

/* コンテンツ幅の最適化 */
.page-template-page-top #content {
  max-width: 1280px;
  margin: 0 auto;
}

/* モバイル時の余白調整 */
@media (max-width: 768px) {
  .page-template-page-top .main {
      padding: 10px;
  }
  
  .page-template-page-top #content {
      padding: 0 10px;
  }
}