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

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

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

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

/*480px以下*/
@media screen and (max-width: 480px){
  /*必要ならばここにコードを書く*/
}  /* ← ← ← この閉じカッコが無かった */

/* ------------------------------------
   カテゴリサムネイル表示（ショップカード）
------------------------------------ */

/* カードリスト（3列、スマホ1列） */
.shop-card-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
  margin-bottom: 30px;
}

@media screen and (max-width: 768px) {
  .shop-card-list {
    grid-template-columns: 1fr;
  }
}

/* 各カード */
.shop-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: #f5f5f5;
  padding: 8px;
  border-radius: 6px;
  box-sizing: border-box;
  border: none;
}

/* 画像ラッパー（縦長横長中央揃え） */
.shop-card-thumb-link {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 250px;
  overflow: hidden;
  margin-bottom: 8px;
}

/* カード内画像 */
.shop-card-thumb-link img {
  width: auto;
  max-width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border: none !important;
}

/* Lightbox内画像は元サイズで表示 */
.lightbox img,
.mfp-wrap img,
.mfp-content img {
  width: auto !important;
  height: auto !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: unset !important;
}

/* 文字部分（タイトル＋金額）高さ統一＋行間調整 */
.shop-card-text {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 2px; /* タイトルと金額の間隔 */
  text-align: center;
}

/* タイトル */
.shop-card-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0;
}

.shop-card-title a {
  color: #1a73e8;
  text-decoration: none;
}

.shop-card-title a:hover {
  text-decoration: underline;
}

/* 金額 */
.shop-card-price {
  font-size: 13px;
  font-weight: 600;
  color: #444;
  line-height: 1.2;
}

/* 画像周りの枠線を確実に消す */
.shop-card .shop-card-img,
.shop-card-thumb-link img,
.shop-card img {
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  display: block;
  margin: 0;
  padding: 0;
}

/* ==================================================
   Sidebar Category Accordion
   サイドバー：カテゴリ 親子アコーディオン表示
   （Cocoon / 子テーマ管理用）
================================================== */

/* カテゴリ全体 */
.sidebar .widget_categories ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* 親カテゴリ */
.sidebar .widget_categories > ul > li > a {
  display: block;
  padding: 6px 0;
  font-weight: 600;
  color: #333;
  text-decoration: none;
}

/* 子カテゴリ（初期は閉じる） */
.sidebar .widget_categories ul ul {
  display: none;
  margin-left: 14px;
  padding-left: 8px;
  border-left: 1px solid #ddd;
}

/* ホバー・フォーカスで開く */
.sidebar .widget_categories li:hover > ul,
.sidebar .widget_categories li:focus-within > ul {
  display: block;
}

/* 子カテゴリリンク */
.sidebar .widget_categories ul ul a {
  display: block;
  padding: 4px 0;
  font-size: 0.9em;
  color: #555;
}

/* ▶ 開閉アイコン（一般的UI） */
.sidebar .widget_categories li:has(ul) > a::after {
  content: "▶";
  font-size: 11px;
  color: #777;
  margin-left: 6px;
  display: inline-block;
  transition: transform 0.2s ease;
}

/* 開いているとき ▶ 回転 */
.sidebar .widget_categories li:hover:has(ul) > a::after,
.sidebar .widget_categories li:focus-within:has(ul) > a::after {
  transform: rotate(90deg);
}

/* ==================================================
   現在表示中カテゴリは自動展開（投稿ページ含む）
================================================== */

.sidebar .widget_categories li.current-cat > ul,
.sidebar .widget_categories li.current-cat-parent > ul,
.sidebar .widget_categories li.current-post-ancestor > ul {
  display: block;
}

/* 自動展開時の ▶ */
.sidebar .widget_categories li.current-cat > a::after,
.sidebar .widget_categories li.current-cat-parent > a::after,
.sidebar .widget_categories li.current-post-ancestor > a::after {
  transform: rotate(90deg);
}

/* 現在地の強調 */
.sidebar .widget_categories li.current-cat > a,
.sidebar .widget_categories ul ul li.current-cat > a {
  color: #000060;
  font-weight: 700;
  text-decoration: underline;
}
