/*
Theme Name:RIKYU child
Theme URI:https://tcd-theme.com/tcd067
Description:WordPressテーマ「RIKYU」の子テーマ
Template:rikyu_tcd104
Author:TCD
Author URI:https://tcd-theme.com/
Version:1.0
*/
/* 税抜価格 全体 */
.single-product .price .ex-tax-price {
  font-size: 0.80em;
  color: #888;
  margin-left: 6px;
  font-weight: normal;
}

/* 数字（bdi）を必ず親サイズに従わせる */
.single-product .price .ex-tax-price .woocommerce-Price-amount,
.single-product .price .ex-tax-price .woocommerce-Price-amount bdi {
  font-size: inherit !important;
  font-weight: normal;
}

/* 投稿（ブログ）個別ページのヘッダーアイキャッチを非表示 */
.single-post .p-single__header-image {
  display: none !important;
}

/* お知らせ（News）のヘッダー画像を非表示 */
.single-news .p-single__header-image {
  display: none !important;
}


/* works（作品）個別ページのヘッダーアイキャッチを非表示 */
.single-works .p-single__header-image {
  display: none !important;
}

.single-works .p-breadcrumb a {
  text-transform: none;
}

/* =========================
   Works Gallery Card（完成形）
========================= */

/* ギャラリー全体 */
.works-archive {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
}

/* 1作品 = 1カード */
.works-archive article.work-item {
  max-width: 300px;
  width: 100%;
  background: #f5f5f5;
  padding: 16px;
  border-radius: 8px;
  margin: 0 auto;
  box-sizing: border-box;
  text-align: center;
}

/* サムネイル */
.works-archive .work-thumb {
  margin-bottom: 8px;
}

.works-archive .work-thumb img {
  width: 100%;
  max-width: 260px;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* タイトル */
.works-archive .work-title {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.6;
  font-weight: 500;
  text-align: center;
}

/* ===== Works image hover (no dark) ===== */

.works-archive .work-thumb {
  overflow: hidden;
}

.works-archive .work-thumb a img {
  transition: transform 0.4s ease !important;
}

.works-archive .work-item:hover .work-thumb a img {
  transform: scale(1.10) !important;
}

/* ===== Works card full clickable ===== */

.works-archive .work-item {
  position: relative;
}

/* カード内の最初のリンクを全面に広げる */
.works-archive .work-item .work-thumb a {
  position: static;
}

.works-archive .work-item .work-thumb a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* 中身は前面に */
.works-archive .work-item * {
  position: relative;
  z-index: 2;
}

/* カーソル */
.works-archive .work-item {
  cursor: pointer;
}

/* =========================
   ギャラリー フィルターUI
========================= */
/* フィルター全体 */
.gallery-filters {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
  position: relative;
  z-index: 10;
}

/* 各フィルター枠 */
.gallery-filters .filter-group {
  position: relative;
  width: 240px;
}

/* 見出しボタン */
.gallery-filters .filter-toggle {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #bbb;
  background: #f7f7f7;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
/* ＋ / − アイコン */
.gallery-filters .filter-toggle::after {
  content: "+";
  float: right;
  font-size: 18px;
  line-height: 1;
}

.gallery-filters .filter-group.open .filter-toggle::after {
  content: "−";
}

/* 開いている時 */
.gallery-filters .filter-group.open .filter-toggle {
  background: #eaeaea;
}

/* ドロップダウン本体（浮かせる） */
.gallery-filters .filter-list {
  position: absolute;
  top: 100%;
  left: 0;

  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;

  border: 1px solid #bbb;
  border-top: none;
  background: #f5f5f5;

  display: none;
  z-index: 20;
}

/* 開いたときだけ表示 */
.gallery-filters .filter-group.open .filter-list {
  display: block;
}

/* 各行 */
.gallery-filters .filter-list li {
  margin: 0;
  padding: 0;
}

/* リンク（箱） */
.gallery-filters .filter-list li a {
  display: block;
  padding: 12px 16px;
  font-size: 14px;
  color: #333;
  text-decoration: none;
  background: #f5f5f5;
  transition: background-color 0.2s ease;
}

/* hover */
.gallery-filters .filter-list li a:hover {
  background: #dcdcdc;
}

/* 子カテゴリ */
.gallery-filters .child-terms {
  padding-left: 20px;
}

.gallery-filters .child-terms a {
  background: #f0f0f0;
  font-size: 13.5px;
}

.gallery-filters .child-terms a:hover {
  background: #d6d6d6;
}

/* 表示順（Rikyu上書き） */
.p-archive__sort .works-sort__label {
  font-weight: 600;
  font-size: 14px;
}

.p-archive__sort .works-sort__select {
  width: 240px;
  padding: 14px 16px;
  border: 1px solid #bbb;
  background: #f7f7f7;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.p-archive__sort .works-sort__select:hover {
  background: #eaeaea;
}

.works-sort__select {
  width: 240px !important;
  padding: 14px 16px !important;
}

@media (max-width: 768px) {

  /* フィルター全体を包んでいる親（Rikyu対策） */
  .p-archive__filter,
  .l-contents,
  .l-main {
    overflow: visible !important;
  }
}

/* ===== Gallery filters : PC ===== */
@media (min-width: 769px) {

  .gallery-filters {
    display: flex;
    gap: 0 !important;              /* ボックス間の隙間をなくす */
    align-items: stretch;
  }

  .gallery-filters .filter-group {
    margin: 0 !important;
    padding: 0 !important;
    border-right: 1px solid #e5e5e5; /* デモっぽい区切り線 */
  }

  /* 最後の線は消す */
  .gallery-filters .filter-group:last-child {
    border-right: none;
  }

  /* ボタンの見た目を洗練させる */
  .gallery-filters .filter-toggle {
    padding: 14px 22px;             /* 高さを少し詰める */
    font-size: 14px;
    font-weight: 400;               /* ← 細く見える最大の理由 */
    letter-spacing: 0.05em;
    background: transparent;
  }

}

/* ===== Gallery filters : Mobile (wrap layout) ===== */
@media (max-width: 768px) {

  .gallery-filters {
    display: flex;
    flex-wrap: wrap;          /* ← 折り返す */
    gap: 8px;
    overflow: visible;        /* ← 隠さない */
    padding: 0;
  }

  .gallery-filters .filter-group {
    width: auto;              /* 横幅固定を解除 */
    min-width: auto;
    position: relative;
  }

  .gallery-filters .filter-toggle {
    white-space: normal;      /* 折り返しOK */
    font-size: 14px;
    padding: 12px 14px;
  }

  /* プルダウンは通常どおり下に */
  .gallery-filters .filter-list {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    z-index: 50;
  }
}

/* メニューの new!! を上付き・小さく表示 */
.menu-new {
  color: #e60023;
  font-size: 10px;
  font-weight: bold;
  margin-left: 4px;

  vertical-align: super;
  display: inline-block;

  transform: translateY(-4px); /* ← ここが本命 */
}
