/*
Theme Name: BUZZ Child
Theme URI: http://buzz-stock.jp
Description: Cocoon子テーマ — バズった商品まとめサイト
Author: buzz-stock.jp
Template: cocoon-master
Version: 1.0
*/

/* ==================================================
   Cocoonのスタイルをリセット・上書き
   ================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f7f6f3;
  --white: #ffffff;
  --text: #1a1a18;
  --text-muted: #888884;
  --text-light: #b5b4af;
  --border: #e4e3de;
  --border-dark: #cccbc5;
  --accent: #d04a2f;
  --accent-light: #f9ede9;
  --tag-bg: #eeede8;
  --font-sans: 'DM Sans', 'Noto Sans JP', sans-serif;
  --radius: 4px;
  --radius-lg: 8px;
}

body {
  font-family: var(--font-sans) !important;
  background: var(--bg) !important;
  color: var(--text) !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
  -webkit-font-smoothing: antialiased;
}

/* Cocoon固有の余白・枠をリセット */
#container, #contents, #main, .wrap {
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
}

.entry-content { padding: 0 !important; }

/* ヘッダー */
#header {
  background: var(--white) !important;
  border-bottom: 1px solid var(--border) !important;
  box-shadow: none !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 100 !important;
  padding: 0 !important;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

#site-name, #site-name a {
  font-size: 18px !important;
  font-weight: 500 !important;
  letter-spacing: 0.15em !important;
  color: var(--text) !important;
  text-decoration: none !important;
}

#site-name a span { color: var(--accent); }

/* Cocoonのナビ上書き */
#navi, .navi-in {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

/* 検索フォーム */
.search-bar { flex: 1; max-width: 400px; position: relative; }

.search-bar input[type="search"] {
  width: 100%;
  height: 36px;
  background: var(--bg);
  border: 1px solid var(--border) !important;
  border-radius: var(--radius);
  padding: 0 12px 0 36px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
  box-shadow: none !important;
}

.search-bar input:focus { border-color: var(--border-dark) !important; }
.search-bar input::placeholder { color: var(--text-light); }

.search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--text-light);
  pointer-events: none;
}

/* ナビゲーション */
.buzz-nav { display: flex; gap: 4px; flex-shrink: 0; }

.buzz-nav a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: var(--radius);
  transition: background 0.12s, color 0.12s;
}

.buzz-nav a:hover { background: var(--bg); color: var(--text); }
.buzz-nav a.active { color: var(--text); font-weight: 500; }

/* トレンドバー */
.trending-bar {
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}

.trending-bar::-webkit-scrollbar { display: none; }

.trending-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
  flex-shrink: 0;
}

.trending-item {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  transition: color 0.12s;
}

.trending-item:hover { color: var(--text); }
.trending-arrow { font-size: 10px; color: var(--accent); }

/* ヒーロー */
.hero {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 40px 24px;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 48px;
}

.hero-text h1 {
  font-size: 28px !important;
  font-weight: 300 !important;
  letter-spacing: 0.04em;
  line-height: 1.3 !important;
  color: var(--text) !important;
  margin-bottom: 8px !important;
  border: none !important;
  padding: 0 !important;
}

.hero-text h1 strong { font-weight: 500; }

.hero-text p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 400px;
}

.hero-stats { display: flex; gap: 32px; margin-left: auto; flex-shrink: 0; }
.stat { text-align: center; }

.stat-num {
  font-size: 24px;
  font-weight: 300;
  color: var(--text);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 11px;
  color: var(--text-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* カテゴリ */
.categories {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cat-btn {
  padding: 6px 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.12s;
  letter-spacing: 0.03em;
  text-decoration: none;
  display: inline-block;
}

.cat-btn:hover { border-color: var(--border-dark); color: var(--text); }
.cat-btn.active { background: var(--text); border-color: var(--text); color: var(--white); }

/* メイン */
.buzz-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 24px 60px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.sort-select {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  outline: none;
}

/* グリッド */
.featured-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 32px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.product-card {
  background: var(--white);
  padding: 20px;
  cursor: pointer;
  transition: background 0.12s;
  position: relative;
}

.product-card:hover { background: #fafaf8; }
.product-card.featured { padding: 28px; }

/* ランクバッジ */
.rank {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 22px;
  height: 22px;
  background: var(--text);
  color: var(--white);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rank.gold { background: #b8993a; }
.rank.silver { background: #8a8a8a; }
.rank.bronze { background: #9a6840; }

/* バズバッジ */
.buzz-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 10px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 3px;
  letter-spacing: 0.05em;
}

/* サムネイル（正方形・角丸） */
.product-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--bg);
  border-radius: 16px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

.product-img .emoji-icon { font-size: 48px; opacity: 0.8; }

/* タグ */
.tags { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }

.tag {
  font-size: 10px;
  color: var(--text-muted);
  background: var(--tag-bg);
  padding: 2px 7px;
  border-radius: 2px;
  letter-spacing: 0.04em;
}

.tag.new { background: #e8f3e8; color: #3a7a3a; }
.tag.sale { background: var(--accent-light); color: var(--accent); }

/* 商品情報 */
.product-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 4px;
}

.product-brand {
  font-size: 11px;
  color: var(--text-light);
  margin-bottom: 10px;
  letter-spacing: 0.04em;
}

.product-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.price { font-size: 15px; font-weight: 500; color: var(--text); letter-spacing: -0.01em; }
.price-old { font-size: 11px; color: var(--text-light); text-decoration: line-through; margin-left: 4px; }

.buzz-score { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text-muted); }

.buzz-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* 購入ボタン */
.buy-buttons { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }

.btn-buy {
  flex: 1;
  min-width: 0;
  padding: 7px 6px;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  text-decoration: none !important;
  text-align: center;
  border: none;
  transition: opacity 0.12s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.btn-buy:hover { opacity: 0.85; }
.btn-buy:active { transform: scale(0.97); }
.btn-amazon { background: #f0c040 !important; color: #111 !important; }
.btn-rakuten { background: #bf0000 !important; color: #fff !important; }
.btn-official { background: transparent !important; color: var(--text-muted) !important; border: 1px solid var(--border-dark) !important; }
.btn-official:hover { color: var(--text) !important; background: var(--bg) !important; }

/* フッター */
#footer {
  background: var(--white) !important;
  border-top: 1px solid var(--border) !important;
  padding: 32px 24px !important;
  color: var(--text-light) !important;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo { font-size: 14px; font-weight: 500; letter-spacing: 0.12em; color: var(--text); }
.footer-logo span { color: var(--accent); }
.footer-copy { font-size: 11px; color: var(--text-light); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 12px; color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }

/* ページネーション */
.load-more-wrap { text-align: center; margin-top: 32px; }
.page-numbers {
  display: inline-flex;
  gap: 4px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  transition: all 0.12s;
}
.page-numbers.current, .page-numbers:hover {
  background: var(--text);
  border-color: var(--text);
  color: var(--white);
}
