/* ============================================
 * 納品実績 一覧＋ポップアップ
 * サイトのカードデザイン（白背景・#efefef枠・角丸15px）に合わせる
 * ============================================ */

.wd-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ブロック設定・ショートコードで4カラムを選んだ場合 */
.wd-list--col4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 959px) {
  .wd-list,
  .wd-list--col4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 599px) {
  .wd-list,
  .wd-list--col4 {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ============================================
 * 絞り込みUI
 * ============================================ */

.wd-filter {
  margin-bottom: 24px;
}

.wd-filter__row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.wd-filter__row--sub {
  margin-top: -4px;
}

.wd-filter__label {
  flex: 0 0 8em;
  padding-top: 5px;
  font-size: 13px;
  font-weight: bold;
  color: var(--ark-color--text, #333);
}

.wd-filter__options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
}

.wd-filter label {
  cursor: pointer;
}

.wd-filter input[data-wd-filter] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.wd-filter__pill {
  display: inline-block;
  border: 1px solid var(--ark-color--main, #fb8603);
  color: var(--ark-color--main, #fb8603);
  background: #fff;
  border-radius: 9999px;
  padding: 4px 14px;
  font-size: 13px;
  line-height: 1.6;
  transition: background .2s, color .2s;
}

.wd-filter label:hover .wd-filter__pill {
  background: var(--ark-color--pale, #fff4e8);
}

.wd-filter input:checked + .wd-filter__pill {
  background: var(--ark-color--main, #fb8603);
  color: #fff;
}

.wd-filter input:focus-visible + .wd-filter__pill {
  outline: 2px solid var(--ark-color--link, #0d77d9);
  outline-offset: 2px;
}

/* フォトブースタイプの絞り込み（カテゴリー選択時のみ表示） */
.wd-filter__booth {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wd-filter__booth[hidden] {
  display: none;
}

/* ウェディング・フォトブースタイプのピルは色分け */
.wd-filter__pill--wedding {
  border-color: #e0719b;
  color: #e0719b;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.wd-filter__pill--wedding svg {
  width: 15px;
  height: 15px;
  display: block;
  /* 文字の見た目上の中心に合わせてアイコンを1px上げる */
  position: relative;
  top: -1px;
}

.wd-filter label:hover .wd-filter__pill--wedding {
  background: #fdf0f5;
}

.wd-filter input:checked + .wd-filter__pill--wedding {
  background: #e0719b;
  color: #fff;
}

.wd-filter__pill--sub {
  border-color: #999;
  color: #666;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.wd-filter__pill--sub svg {
  width: 15px;
  height: 15px;
  display: block;
  /* 文字の見た目上の中心に合わせてアイコンを1px上げる */
  position: relative;
  top: -1px;
}

.wd-filter label:hover .wd-filter__pill--sub {
  background: #f3f3f3;
}

.wd-filter input:checked + .wd-filter__pill--sub {
  background: #666;
  color: #fff;
}

/* リセットボタン */
.wd-filter__reset {
  border: 1px solid #999;
  color: #666;
  background: #fff;
  border-radius: 9999px;
  padding: 4px 20px;
  font-size: 13px;
  line-height: 1.6;
  cursor: pointer;
  transition: background .2s, color .2s;
}

.wd-filter__reset:hover {
  background: #666;
  color: #fff;
}

.wd-filter-empty {
  text-align: center;
  color: #777;
  padding: 24px 0;
}

@media (max-width: 599px) {
  .wd-filter__row {
    flex-direction: column;
    gap: 6px;
  }

  .wd-filter__label {
    flex: none;
    padding-top: 0;
  }

  .wd-filter__row--sub .wd-filter__label:empty,
  .wd-filter__row .wd-filter__label:empty {
    display: none;
  }
}

/* カード */
.wd-card {
  background: #fff;
  border: 3px solid #efefef;
  border-radius: var(--w-radius, 15px);
  padding: .75rem;
  cursor: pointer;
  transition: border-color .25s, transform .25s, box-shadow .25s;
}

.wd-card:hover,
.wd-card:focus-visible {
  border-color: var(--ark-color--main, #fb8603);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .08);
  outline: none;
}

.wd-card__thumb {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #f5f5f5;
}

.wd-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wd-card__noimg {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #aaa;
  font-size: 13px;
}

.wd-card__body {
  padding-top: .75em;
}

.wd-card__title {
  margin: 0;
  font-size: 16px;
  font-weight: bold;
  line-height: 1.5;
  color: var(--ark-color--text, #333);
}

.wd-card__badges,
.wd-modal__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

/* バッジ（サイトの商品タグ表現に合わせる） */
.wd-badge {
  display: inline-block;
  border: 1px solid var(--ark-color--main, #fb8603);
  color: var(--ark-color--main, #fb8603);
  background: #fff;
  padding: 2px 8px;
  font-size: 14px;
  line-height: 1.6;
  border-radius: 3px;
}

.wd-badge--sub {
  border-color: #999;
  color: #666;
}

.wd-badge--wedding {
  border-color: #e0719b;
  color: #e0719b;
}

/* 表面加工バッジ：メインカラーの塗りで区別 */
.wd-badge--finish {
  background: var(--ark-color--main, #fb8603);
  border-color: var(--ark-color--main, #fb8603);
  color: #fff;
}

/* ウェディングバッジ：指輪アイコン付き */
.wd-badge--wedding {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.wd-badge--wedding svg {
  width: 15px;
  height: 15px;
  display: block;
  /* 文字は行ボックス基準で中央に置かれ、見た目上わずかに上に寄るため
     アイコン側を1px上げて視覚的な高さを揃える */
  position: relative;
  top: -1px;
}

.wd-empty {
  text-align: center;
  color: #777;
}

/* 絞り込みで非表示になったカード */
.wd-list .wd-card--hide {
  display: none;
}

/* 表示中のページに含まれないカード */
.wd-list .wd-card--page {
  display: none;
}

/* SEO用のポップアップ内容HTML（画面には出さない） */
.wd-card__seo {
  display: none;
}

/* ============================================
 * ページネーション
 * ============================================ */

.wd-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}

.wd-pagination[hidden] {
  display: none;
}

.wd-pagination__btn {
  min-width: 40px;
  height: 40px;
  padding: 0 8px;
  border: 1px solid var(--ark-color--main, #fb8603);
  border-radius: 9999px;
  background: #fff;
  color: var(--ark-color--main, #fb8603);
  font-size: 14px;
  cursor: pointer;
  transition: background .2s, color .2s;
}

.wd-pagination__btn:hover {
  background: var(--ark-color--pale, #fff4e8);
}

.wd-pagination__btn.is-current {
  background: var(--ark-color--main, #fb8603);
  color: #fff;
  cursor: default;
}

/* 前へ・次へ矢印：擬似要素のシェブロンで描く（約20px相当） */
.wd-pagination__btn--nav {
  position: relative;
}

.wd-pagination__btn--nav::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-top: 1px solid currentColor;
  border-left: 1px solid currentColor;
}

.wd-pagination__btn--prev::before {
  transform: translate(-30%, -50%) rotate(-45deg);
}

.wd-pagination__btn--next::before {
  transform: translate(-70%, -50%) rotate(135deg);
}

.wd-pagination__btn--nav:disabled {
  border-color: #ddd;
  color: #ccc;
  background: #fff;
  cursor: default;
}

/* ============================================
 * ポップアップ（モーダル）
 * ============================================ */

.wd-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.wd-modal[hidden] {
  display: none;
}

.wd-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .6);
}

.wd-modal__panel {
  position: relative;
  background: #fff;
  border-radius: var(--w-radius, 15px);
  max-width: 640px;
  width: 100%;
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  animation: wd-modal-in .25s ease;
}

@keyframes wd-modal-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wd-modal__close,
.wd-zoom__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  cursor: pointer;
  padding: 0;
}

/* ×は擬似要素の線2本で描く（フォントに依存せず常に上下左右中央） */
.wd-modal__close::before,
.wd-modal__close::after,
.wd-zoom__close::before,
.wd-zoom__close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 17px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

.wd-modal__close::before,
.wd-zoom__close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.wd-modal__close::after,
.wd-zoom__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.wd-modal__close:hover,
.wd-zoom__close:hover {
  background: var(--ark-color--main, #fb8603);
}

.wd-modal__img {
  background: #f5f5f5;
  border-radius: var(--w-radius, 15px) var(--w-radius, 15px) 0 0;
  overflow: hidden;
}

.wd-modal__img-main {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: zoom-in;
}

/* 高さを固定し、縦横比の違う写真に切り替えても縦幅が変わらないようにする */
.wd-modal__img-main img {
  width: 100%;
  height: 380px;
  object-fit: contain;
  display: block;
}

@media (max-width: 599px) {
  .wd-modal__img-main img {
    height: 240px;
  }
}

.wd-modal__img.is-empty {
  display: none;
}

/* メイン写真の上に重ねる前後矢印 */
.wd-modal__stage {
  position: relative;
}

.wd-modal__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  width: 38px;
  height: 38px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  cursor: pointer;
}

.wd-modal__nav[hidden] {
  display: none;
}

.wd-modal__nav--prev {
  left: 10px;
}

.wd-modal__nav--next {
  right: 10px;
}

/* 矢印は擬似要素のシェブロンで描く */
.wd-modal__nav::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
}

.wd-modal__nav--prev::before {
  transform: translate(-30%, -50%) rotate(-45deg);
}

.wd-modal__nav--next::before {
  transform: translate(-70%, -50%) rotate(135deg);
}

.wd-modal__nav:hover {
  background: var(--ark-color--main, #fb8603);
}

/* 複数写真のサムネイル切り替え */
.wd-modal__thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
}

.wd-modal__thumbs:empty {
  display: none;
}

.wd-modal__thumb {
  width: 56px;
  height: 56px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  background: none;
  cursor: pointer;
}

.wd-modal__thumb.is-active {
  border-color: var(--ark-color--main, #fb8603);
}

.wd-modal__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wd-modal__content {
  padding: 20px 24px 24px;
}

.wd-modal__title {
  margin: 0;
  font-size: 20px;
  font-weight: bold;
  color: var(--ark-color--text, #333);
}

.wd-modal__spec {
  margin: 16px 0 0;
  border-top: 1px solid #efefef;
}

.wd-modal__spec-row {
  display: flex;
  border-bottom: 1px solid #efefef;
  font-size: 14px;
}

.wd-modal__spec-row[hidden] {
  display: none;
}

.wd-modal__spec-row dt {
  flex: 0 0 7em;
  padding: 10px 8px;
  background: var(--ark-color--pale, #fff4e8);
  font-weight: bold;
}

.wd-modal__spec-row dd {
  margin: 0;
  padding: 10px 12px;
  flex: 1;
  white-space: pre-line; /* オプション等の改行入力を表示に反映 */
}

/* 仕様欄：見出しと表をひとつの枠に見えるようにつなげる */
.wd-modal__spec2[hidden] {
  display: none;
}

.wd-modal__spec-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0 6px;
  font-size: 14px;
  font-weight: bold;
  color: var(--ark-color--text, #333);
}

/* 左にメインカラーの縦棒アクセント */
.wd-modal__spec-heading::before {
  content: "";
  flex: 0 0 auto;
  width: 4px;
  height: 15px;
  border-radius: 2px;
  background: var(--ark-color--main, #fb8603);
}

.wd-modal__spec2 .wd-modal__spec {
  margin-top: 0;
  border-top: none;
}

/* 備考欄：枠付きのボックスで表示 */
.wd-modal__note-box {
  margin-top: 16px;
  padding: 12px 14px;
  background: #f8f8f8;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
}

.wd-modal__note-box[hidden] {
  display: none;
}

.wd-modal__note-heading {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: bold;
  color: var(--ark-color--text, #333);
}

.wd-modal__note {
  margin: 0;
  font-size: 13px;
  color: #555;
  white-space: pre-line;
}

.wd-modal__cta {
  display: block;
  margin-top: 20px;
  padding: 14px;
  text-align: center;
  background: var(--ark-color--main, #fb8603);
  color: #fff;
  font-weight: bold;
  border-radius: 9999px;
  text-decoration: none;
  transition: opacity .25s;
}

.wd-modal__cta:hover {
  opacity: .8;
  color: #fff;
}

/* 価格の共通注記（ポップアップ最下部） */
.wd-modal__price-note {
  margin: 12px 0 0;
  font-size: 11px;
  color: #888;
  line-height: 1.6;
}

.wd-modal__price-note[hidden] {
  display: none;
}

/* ============================================
 * 画像の拡大表示（ポップアップ内の写真クリック）
 * ============================================ */

.wd-zoom {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.wd-zoom[hidden] {
  display: none;
}

.wd-zoom__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .85);
  cursor: zoom-out;
}

.wd-zoom__img {
  position: relative;
  max-width: calc(100% - 96px);
  max-height: calc(100% - 90px); /* 下部のサムネイルスライダー分の余白 */
  object-fit: contain;
  border-radius: 4px;
}

.wd-zoom__close {
  position: fixed;
  top: 16px;
  right: 16px;
}

/* 前へ・次へ矢印 */
.wd-zoom__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  cursor: pointer;
}

.wd-zoom__nav[hidden] {
  display: none;
}

.wd-zoom__nav--prev {
  left: 16px;
}

.wd-zoom__nav--next {
  right: 16px;
}

/* 矢印は擬似要素のシェブロンで描く */
.wd-zoom__nav::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 11px;
  height: 11px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
}

.wd-zoom__nav--prev::before {
  transform: translate(-30%, -50%) rotate(-45deg);
}

.wd-zoom__nav--next::before {
  transform: translate(-70%, -50%) rotate(135deg);
}

.wd-zoom__nav:hover {
  background: var(--ark-color--main, #fb8603);
}

/* 下部のサムネイルスライダー */
.wd-zoom__thumbs {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: 8px;
  max-width: calc(100% - 48px);
  overflow-x: auto;
  padding: 4px;
}

.wd-zoom__thumbs[hidden] {
  display: none;
}

.wd-zoom__thumb {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, .5);
  border-radius: 6px;
  overflow: hidden;
  background: none;
  cursor: pointer;
  opacity: .6;
  transition: opacity .2s, border-color .2s;
}

.wd-zoom__thumb:hover {
  opacity: 1;
}

.wd-zoom__thumb.is-active {
  border-color: var(--ark-color--main, #fb8603);
  opacity: 1;
}

.wd-zoom__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 599px) {
  .wd-zoom__nav {
    width: 38px;
    height: 38px;
  }

  .wd-zoom__nav--prev {
    left: 8px;
  }

  .wd-zoom__nav--next {
    right: 8px;
  }

  .wd-zoom__img {
    max-width: 100%;
  }

  .wd-zoom__thumb {
    width: 44px;
    height: 44px;
  }
}

/* モーダル表示中は背景スクロールを止める */
body.wd-modal-open {
  overflow: hidden;
}
