/* ==========================================================================
   plugins-hub.css — 開発プラグイン一覧ページ専用スタイル
   ph- プレフィックス BEM記法
   ========================================================================== */

/* ------------------------------------------------------------------
   デザイントークン
   ------------------------------------------------------------------ */
.ph-hero,
.ph-body,
.ph-notice,
.ph-grid,
.ph-card {
  --ph-brand:      #2563eb;
  --ph-brand-dark: #1d4ed8;
  --ph-text:       #182640;
  --ph-text-mid:   #475569;
  --ph-text-muted: #64748b;
  --ph-bg:         #f8fafc;
  --ph-surface:    #ffffff;
  --ph-stroke:     #e2e8f0;
  --ph-radius:     12px;
  --ph-shadow:     0 2px 12px rgba(15, 23, 42, 0.08);
  --ph-shadow-hover: 0 8px 28px rgba(15, 23, 42, 0.14);
}

/* ------------------------------------------------------------------
   ヒーローセクション
   ------------------------------------------------------------------ */
.ph-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  padding: 72px 0 60px;
  position: relative;
  overflow: hidden;
}

.ph-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 5px 5px;
  pointer-events: none;
}

.ph-hero__inner {
  position: relative;
  z-index: 1;
}

.ph-hero__eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #7dd3fc;
  margin-bottom: 1rem;
}

.ph-hero__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.02em;
  line-height: 1.3;
  margin: 0 0 1rem;
}

.ph-hero__lead {
  font-size: clamp(0.9rem, 2vw, 1rem);
  color: #94a3b8;
  line-height: 1.9;
  margin: 0;
  max-width: 52ch;
}

/* ------------------------------------------------------------------
   ボディラッパー
   ------------------------------------------------------------------ */
.ph-body {
  padding: 56px 0 80px;
}

/* ------------------------------------------------------------------
   購入案内ノーティス
   ------------------------------------------------------------------ */
.ph-notice {
  background: var(--ph-surface);
  border: 1px solid var(--ph-stroke);
  border-radius: var(--ph-radius);
  padding: 32px 36px;
  margin-bottom: 52px;
}

.ph-notice__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ph-text);
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--ph-brand);
  display: inline-block;
}

.ph-notice p,
.ph-notice ul,
.ph-notice h3 {
  font-size: 0.9rem;
  color: var(--ph-text-mid);
  margin: 0.5rem 0;
  line-height: 1.8;
}

.ph-notice h3 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ph-text);
  margin-top: 1rem;
}

.ph-notice ul {
  padding-left: 1.4em;
}

.ph-notice ul li {
  margin-bottom: 0.3em;
}

.ph-notice strong {
  color: var(--ph-text);
  font-weight: 700;
}

.ph-notice__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 1rem;
}

.ph-notice__col {
  background: var(--ph-bg);
  border-radius: 8px;
  padding: 20px 22px;
}

/* ------------------------------------------------------------------
   プラグイングリッド
   ------------------------------------------------------------------ */
.ph-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* ------------------------------------------------------------------
   プラグインカード
   ------------------------------------------------------------------ */
.ph-card {
  background: var(--ph-surface);
  border: 1px solid var(--ph-stroke);
  border-radius: var(--ph-radius);
  overflow: hidden;
  box-shadow: var(--ph-shadow);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.ph-card:hover {
  box-shadow: var(--ph-shadow-hover);
  transform: translateY(-3px);
}

/* サムネイルラッパー */
.ph-card__thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e2e8f0;
}

.ph-card__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.ph-card:hover .ph-card__thumb {
  transform: scale(1.04);
}

/* プラグイン名バッジ */
.ph-card__name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, transparent 100%);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 28px 14px 10px;
  letter-spacing: 0.03em;
}

/* カードボディ */
.ph-card__body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ph-card__desc {
  font-size: 0.82rem;
  color: var(--ph-text-mid);
  line-height: 1.8;
  margin: 0;
  flex: 1;
}

/* メタ情報 */
.ph-card__meta {
  border-top: 1px solid var(--ph-stroke);
  padding-top: 12px;
  margin: 0;
}

.ph-card__meta-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}

.ph-card__meta-row:last-child {
  margin-bottom: 0;
}

.ph-card__meta-row dt {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ph-text-muted);
  white-space: nowrap;
  min-width: 4em;
}

.ph-card__meta-row dd {
  font-size: 0.82rem;
  color: var(--ph-text-mid);
  margin: 0;
}

/* 価格表示 */
.ph-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ph-text);
  white-space: nowrap;
}

.ph-price small {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--ph-text-muted);
  display: inline-block;
}

.ph-free {
  font-size: 0.9rem;
  font-weight: 700;
  color: #16a34a;
}

/* アクションボタン行 */
.ph-card__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------------
   ボタン
   ------------------------------------------------------------------ */
.ph-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
  flex: 1;
}

/* アウトライン（詳しく見る） */
.ph-btn--outline {
  border: 1.5px solid var(--ph-brand);
  color: var(--ph-brand);
  background: transparent;
}

.ph-btn--outline:hover {
  background: var(--ph-brand);
  color: #ffffff;
}

/* 購入ボタン（STORES） */
.ph-btn--buy {
  background: #ff6b35;
  color: #ffffff;
  border: 1.5px solid #ff6b35;
}

.ph-btn--buy:hover {
  background: #e55a27;
  border-color: #e55a27;
}

/* 公式ディレクトリボタン（WordPress.org） */
.ph-btn--wp {
  background: #3858e9;
  color: #ffffff;
  border: 1.5px solid #3858e9;
}

.ph-btn--wp:hover {
  background: #2d46c9;
  border-color: #2d46c9;
}

/* ------------------------------------------------------------------
   レスポンシブ
   ------------------------------------------------------------------ */
@media (max-width: 1024px) {
  .ph-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .ph-hero {
    padding: 52px 0 44px;
  }

  .ph-body {
    padding: 40px 0 60px;
  }

  .ph-notice {
    padding: 24px 20px;
  }

  .ph-notice__cols {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .ph-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .ph-card__body {
    padding: 16px;
  }

  .ph-btn {
    font-size: 0.75rem;
    padding: 7px 10px;
  }
}
