@charset "UTF-8";

/*!
Theme Name: Cocoon Child
Description: Cocoon専用の子テーマ
Template: cocoon-master
Version: 1.1.3
*/

/* =================================================
   共通（snkr-grid 系のみ）
   ================================================= */
.archive.category .snkr-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.snkr-card {
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.snkr-thumb img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #fafafa;
}

.snkr-body {
  padding: 10px;
}

.snkr-title {
  font-size: 14px;
  line-height: 1.4;
  margin: 0 0 6px;
}

.snkr-price {
  color: #d32f2f;
  font-weight: bold;
  font-size: 13px;
  margin: 0;
}

.snkr-update {
  font-size: 11px;
  color: #777;
  margin-top: 4px;
}

/* =================================================
   トップページ（固定ページ）
   ================================================= */
.home .snkr-grid {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

/* =================================================
   カテゴリページ（アーカイブ）
   ================================================= */

.archive.category .snkr-grid {
  margin-bottom: 24px;
}


/* =================================================
   投稿詳細ページ
   ================================================= */
.single .sneaker-image-wrap {
  text-align: center;
  margin-bottom: 20px;
}

.single .sneaker-main-image {
  max-width: 360px;
  width: 100%;
  height: auto;
}

.single .sneaker-price-table {
  width: 100%;
  border-collapse: collapse;
}

.single .sneaker-price-table th,
.single .sneaker-price-table td {
  padding: 8px;
  border: 1px solid #ddd;
}

/* =================================================
   ランキングバッジ（トップ専用）
   ================================================= */
.home .snkr-card {
  position: relative;
}

.home .snkr-rank {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 10;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.95);
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}

.home .rank-1 { background: #fff2b3; }
.home .rank-2 { background: #f0f0f0; }
.home .rank-3 { background: #f7d7b5; }

/* =================================================
   モバイル
   ================================================= */
@media screen and (max-width: 768px) {
  .snkr-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .home .snkr-grid,
  .archive.category .snkr-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* ============================
   Cocoon標準レイアウトを復元
   ============================ */
.archive.category .entry-cards,
.archive.category .entry-card,
.archive.category .entry-card-wrap {
  display: block !important;
  grid-template-columns: none !important;
  gap: 0 !important;
}

/* フッター：アフィリエイト表記 */
.footer-affiliate-note {
  font-size: 12px;
  color: #777;
  text-align: center;
  margin: 12px 0;
}

/* =========================
   Cocoon カテゴリページ 2カラム化
   ========================= */

/* カテゴリページ限定 */
.category .archive-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

/* カード全体を縦型に */
.category .entry-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
}

/* 画像 */
.category .entry-card-thumb {
  aspect-ratio: 1 / 1;
  background: #f5f5f5;
  overflow: hidden;
}

.category .entry-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* コンテンツ */
.category .entry-card-content {
  padding: 12px 14px 14px;
}

.category .entry-card-title {
  font-size: 15px;
  line-height: 1.4;
  margin: 0;
}

/* =========================
   モバイル：1カラム
   ========================= */
@media screen and (max-width: 768px) {
  .category .archive-list {
    grid-template-columns: 1fr;
  }
}

.sneaker-image-wrap {
  position: relative;
  display: inline-block;
}

.sneaker-main-image {
  display: block;
  max-width: 100%;
  height: auto;
}

.image-credit {
  position: absolute;
  right: 8px;
  bottom: 6px;
  font-size: 11px;
  color: #666;
  background: rgba(255, 255, 255, 0.8);
  padding: 2px 6px;
  border-radius: 3px;
  line-height: 1;
}

/* フッター：アフィリエイト表記 */
.footer-affiliate-note {
  font-size: 12px;
  color: #777;
  text-align: center;
  margin: 12px 0;
}

/* 投稿同モデルおすすめ */
.related-by-model {
  margin-top: 48px;
}

.related-sneaker-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  list-style: none;
  padding: 0;
}

.related-sneaker-item {
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 8px;
  text-align: center;
}

.related-sneaker-item img {
  max-width: 100%;
  height: auto;
}

.related-sneaker-item .title {
  display: block;
  font-size: 13px;
  margin-top: 6px;
}

.related-sneaker-item .price {
  display: block;
  font-size: 12px;
  color: #d33;
  margin-top: 2px;
}

/* 比較表横スクロール */
.sneaker-price-table-wrap{
  width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}

.sneaker-price-table{
  min-width:600px;
}

@media(max-width:768px){
  .sneaker-price-table{
    min-width:650px;
  }
}

/* Cocoonカテゴリページ 正しい2カラム */
.archive.category #content-in {
  display: flex;
  gap: 24px;
}

.archive.category .main {
  flex: 1;
  min-width: 0;
}

.archive.category .sidebar {
  width: 320px;
  flex-shrink: 0;
}

