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

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&display=swap');

/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/
@media screen and (max-width: 1023px){}
@media screen and (max-width: 834px){}
@media screen and (max-width: 480px){}

/* ─── 基本 ─── */
body {
  font-family: 'Noto Sans JP', -apple-system, sans-serif;
  background: #fff !important;
  color: #333;
  font-size: 14px;
}

/* ─── ヘッダー非表示 ─── */
#header,
#header-in,
.header-container {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

html {
  --cocoon--header-container--position-offset: 0px !important;
}

body,
#page,
#wrapper,
#container {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* ─── カスタムナビバー ─── */
.td-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #eee;
  width: 100%;
}

.td-navbar-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 32px;
  height: 52px;
}

.td-navbar-logo {
  font-size: 16px;
  font-weight: 700;
  color: #222;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.td-navbar-logo:hover {
  color: #222;
  text-decoration: none;
}

.td-navbar-links-wrap {
  position: relative;
  flex: 1;
  overflow: hidden;
}

.td-navbar-links-wrap::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 48px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.95));
  pointer-events: none;
}

.td-navbar-links {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-right: 48px;
}

.td-navbar-links::-webkit-scrollbar { display: none; }

.td-navbar-link {
  font-size: 13px;
  color: #666;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 20px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.td-navbar-link:hover {
  background: #f0f0f0;
  color: #222;
  text-decoration: none;
}

.td-navbar-link.is-active {
  background: #222;
  color: #fff;
}

/* ─── コンテンツ ─── */
#content {
  background: #f7f7f5 !important;
  padding-top: 0 !important;
}

.content-in {
  max-width: 100% !important;
  padding: 0 !important;
}

#main {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
}

.wrap {
  max-width: 100% !important;
}

/* ─── ヒーロー ─── */
.td-hero {
  position: relative;
  width: 100%;
  height: 380px;
  overflow: hidden;
}

.td-hero-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(2, 1fr);
  height: 100%;
  gap: 3px;
}

.td-hero-cell {
  overflow: hidden;
  display: block;
}

.td-hero-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.td-hero-cell:hover img {
  transform: scale(1.05);
}

.td-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.38);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.td-hero-text {
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
  margin: 0;
}

@media (max-width: 780px) {
  .td-hero { height: 220px; }
  .td-hero-grid { grid-template-columns: repeat(4, 1fr); }
  .td-hero-text { font-size: 20px; }
}

/* ─── トップページ ─── */
.td-top-page {
  max-width: 1160px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

/* ─── セクションタイトル ─── */
.td-section-title {
  font-size: 17px;
  font-weight: 700;
  color: #222;
  margin: 40px 0 16px;
  letter-spacing: -0.01em;
}

/* ─── カテゴリナビ ─── */
.td-category-nav {
  margin-bottom: 8px;
}

.td-category-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.td-category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 8px;
  border-radius: 12px;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  font-size: 12px;
  transition: transform 0.15s;
}

.td-category-item:hover {
  transform: translateY(-3px);
  text-decoration: none;
  color: #333;
}

.td-category-item:nth-child(1)  { background: #fff8e1; }
.td-category-item:nth-child(2)  { background: #fce4ec; }
.td-category-item:nth-child(3)  { background: #e8f5e9; }
.td-category-item:nth-child(4)  { background: #e3f2fd; }
.td-category-item:nth-child(5)  { background: #fff3e0; }
.td-category-item:nth-child(6)  { background: #ede7f6; }
.td-category-item:nth-child(7)  { background: #e0f7fa; }
.td-category-item:nth-child(8)  { background: #e8eaf6; }
.td-category-item:nth-child(9)  { background: #fce4ec; }
.td-category-item:nth-child(10) { background: #fff9c4; }

.td-category-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
}

.td-category-icon svg {
  width: 32px;
  height: 32px;
}

.td-category-name {
  text-align: center;
  line-height: 1.4;
  color: #555;
}

/* ─── ランキング ─── */
.td-ranking-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.td-ranking-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #fff;
  border-radius: 10px;
  text-decoration: none;
  color: #333;
  transition: box-shadow 0.15s;
}

.td-ranking-item:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  text-decoration: none;
  color: #333;
}

.td-rank-num {
  font-size: 22px;
  font-weight: 900;
  min-width: 32px;
  text-align: center;
  color: #ddd;
  flex-shrink: 0;
}

.td-rank-1 { color: #f9a825; }
.td-rank-2 { color: #90a4ae; }
.td-rank-3 { color: #a1887f; }

.td-ranking-item img {
  width: 68px;
  height: 68px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 6px;
  background: #f7f7f5;
}

.td-no-image {
  width: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7f7f5;
  border-radius: 6px;
  color: #ccc;
  font-size: 11px;
  flex-shrink: 0;
}

.td-ranking-info {
  flex: 1;
  min-width: 0;
}

.td-ranking-title {
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 4px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.td-ranking-price {
  font-size: 14px;
  color: #e53935;
  font-weight: 700;
  margin: 0;
}

/* ─── 商品グリッド ─── */
.td-product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.td-product-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: #333;
  transition: box-shadow 0.15s;
}

.td-product-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  text-decoration: none;
  color: #333;
}

.td-card-image {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: #f7f7f5;
}

.td-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.td-card-body {
  padding: 10px 12px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.td-card-cat {
  font-size: 10px;
  color: #999;
  align-self: flex-start;
}

.td-card-title {
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.td-card-price {
  font-size: 14px;
  color: #e53935;
  font-weight: 700;
  margin: 0;
  margin-top: auto;
}

.td-empty {
  color: #aaa;
  text-align: center;
  padding: 40px 0;
  grid-column: 1 / -1;
}

/* ─── 商品詳細ページ ─── */
.td-product-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.td-product-main {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 40px;
  align-items: start;
}

.td-product-image-wrap {
  background: #f7f7f5;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.td-product-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
}

.td-product-no-image {
  color: #ccc;
  font-size: 14px;
}

.td-product-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.td-product-cat {
  font-size: 11px;
  color: #999;
  align-self: flex-start;
}

.td-product-title {
  font-size: 18px;
  line-height: 1.6;
  color: #222;
  margin: 0;
  font-weight: 700;
}

.td-product-price {
  font-size: 28px;
  font-weight: 900;
  color: #e53935;
  margin: 0;
}

.td-product-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  padding: 12px 0;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
}

.td-meta-label { color: #aaa; min-width: 60px; }
.td-meta-value { color: #333; font-weight: 700; }

.td-product-description {
  font-size: 14px;
  line-height: 1.9;
  color: #555;
}

.td-buy-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.td-btn-amazon,
.td-btn-rakuten {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 20px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.15s;
}

.td-btn-amazon  { background: #ff9900; color: #fff; }
.td-btn-rakuten { background: #bf0000; color: #fff; }

.td-btn-amazon:hover,
.td-btn-rakuten:hover {
  opacity: 0.85;
  text-decoration: none;
  color: #fff;
}

.td-affiliate-note {
  font-size: 11px;
  color: #ccc;
  margin: 0;
  text-align: center;
}

/* ─── カテゴリページ ─── */
.td-category-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
}

.td-back-link {
  font-size: 13px;
  color: #999;
  text-decoration: none;
}

.td-back-link:hover { text-decoration: underline; }

.td-category-page-title {
  font-size: 24px;
  font-weight: 700;
  margin: 8px 0 4px;
  color: #222;
}

.td-category-count {
  font-size: 13px;
  color: #aaa;
  margin: 0;
}

/* ─── サイドバー非表示 ─── */
.home #sidebar,
.single-product #sidebar,
.page #sidebar {
  display: none !important;
}

.home .content-in,
.single-product .content-in,
.page .content-in {
  grid-template-columns: 1fr !important;
  display: block !important;
}

/* ─── フッター ─── */
#footer {
  background: #222 !important;
  color: #aaa !important;
}

#footer a { color: #aaa !important; }

/* ─── レスポンシブ ─── */
@media (max-width: 780px) {
  .td-category-grid { grid-template-columns: repeat(4, 1fr); }
  .td-product-grid  { grid-template-columns: repeat(2, 1fr); }
  .td-ranking-list  { grid-template-columns: 1fr; }
  .td-product-main  { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 480px) {
  .td-category-grid { grid-template-columns: repeat(3, 1fr); }
  .td-category-emoji { font-size: 26px; }
  .td-product-grid  { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}
