/* ===========================
   Smapochi - Minimal Design
   業種横断・key_color対応
   =========================== */

:root {
  --smapochi-key-color: #222222;
  --smapochi-card-ratio: 1/1;
}

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

body {
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
  color: #333;
  font-size: 16px;
  line-height: 1.9;
  margin: 0;
  background: #fff;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ===========================
   Header
   =========================== */
.smapochi-header {
  border-bottom: 1px solid #f0f0f0;
  padding: 14px 20px;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}
.smapochi-header__inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.smapochi-header__logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.smapochi-header__logo-img {
  height: 36px;
  width: auto;
}
.smapochi-header__store-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* ===========================
   Archive（記事一覧）
   =========================== */
.smapochi-archive__inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* カテゴリフィルター */
.smapochi-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 40px;
}
.smapochi-filter__btn {
  background: transparent;
  border: 1px solid #e0e0e0;
  padding: 6px 18px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  color: #666;
  transition: all 0.15s;
  font-weight: 500;
}
.smapochi-filter__btn:hover {
  border-color: var(--smapochi-key-color);
  color: var(--smapochi-key-color);
}
.smapochi-filter__btn.is-active {
  background: var(--smapochi-key-color);
  border-color: var(--smapochi-key-color);
  color: #fff;
}

/* 記事グリッド：PC 3カラム / タブレット 2カラム / スマホ 1カラム */
.smapochi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 24px;
}
@media (max-width: 768px) {
  .smapochi-grid { grid-template-columns: repeat(2, 1fr); gap: 24px 16px; }
}
@media (max-width: 480px) {
  .smapochi-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* カード */
.smapochi-card__link { display: block; }
.smapochi-card__thumb {
  position: relative;
  aspect-ratio: var(--smapochi-card-ratio, 1/1);
  overflow: hidden;
  background: #f5f5f5;
  border-radius: 4px;
}
.smapochi-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.smapochi-card__link:hover .smapochi-card__thumb img {
  transform: scale(1.04);
}
.smapochi-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--smapochi-key-color);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 3px;
  letter-spacing: 0.03em;
}
.smapochi-card__body { padding: 12px 2px 0; }
.smapochi-card__date {
  font-size: 11px;
  color: #bbb;
  display: block;
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}
.smapochi-card__title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  margin: 0;
  color: #333;
}
@media (max-width: 480px) {
  .smapochi-card__body { display: flex; gap: 12px; align-items: flex-start; padding: 0; }
  .smapochi-card__thumb { width: 120px; flex-shrink: 0; aspect-ratio: 1/1; border-radius: 4px; }
  .smapochi-card__info { padding-top: 4px; }
  .smapochi-card__date { margin-bottom: 4px; }
  .smapochi-card__title { font-size: 14px; }
}

/* ===========================
   Single（記事詳細）
   =========================== */
.smapochi-single__inner {
  max-width: 740px;
  margin: 0 auto;
  padding: 48px 20px 64px;
}
.smapochi-single__title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.5;
  margin: 0 0 12px;
  letter-spacing: 0.02em;
}
@media (max-width: 480px) {
  .smapochi-single__title { font-size: 20px; }
}
.smapochi-single__date {
  font-size: 12px;
  color: #bbb;
  letter-spacing: 0.05em;
}

/* 画像エリア */
.smapochi-single__thumb {
  margin: 0 auto 40px;
  border-radius: 4px;
  overflow: hidden;
}
.smapochi-single__thumb img {
  width: 100%;
  height: auto;
  display: block;
}
/* ==========================================
   サムネイル付きギャラリービュー
   ========================================== */
.smapochi-gallery-viewer {
  margin: 0 0 32px;
}
.smapochi-gallery-viewer__main {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f0f0f0;
  margin-bottom: 4px;
}
.smapochi-gallery-viewer__main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s ease;
}
.smapochi-gallery-viewer__thumbs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.smapochi-gallery-viewer__thumbs::-webkit-scrollbar {
  display: none;
}
.smapochi-gallery-viewer__thumb {
  flex-shrink: 0;
  width: calc(25% - 3px);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  background: none;
  cursor: pointer;
  transition: border-color 0.15s;
}
.smapochi-gallery-viewer__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.smapochi-gallery-viewer__thumb.is-active {
  border-color: var(--smapochi-key-color);
}
.smapochi-gallery-viewer__thumb:hover:not(.is-active) {
  border-color: var(--smapochi-key-color);
  opacity: 0.85;
}
@media (max-width: 767px) {
  .smapochi-gallery-viewer {
    margin: 0 0 24px;
  }
  /* 4枚以上の時だけ見切れスタイル（4枚目の存在をほのめかす） */
  .smapochi-gallery-viewer__thumbs.has-many .smapochi-gallery-viewer__thumb {
    width: calc(28% - 3px);
  }
}

/* 本文 */
.smapochi-single__content {
  font-size: 16px;
  line-height: 1.9;
  color: #333;
}
.smapochi-single__content h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 48px 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--smapochi-key-color);
  line-height: 1.5;
  letter-spacing: 0.02em;
}
.smapochi-single__content h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 36px 0 12px;
  padding-left: 12px;
  border-left: 4px solid var(--smapochi-key-color);
  border-radius: 0;
  line-height: 1.5;
}
.smapochi-single__content p {
  margin: 0 0 24px;
}
.smapochi-single__content ul {
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}
.smapochi-single__content ul li {
  padding: 10px 0 10px 20px;
  border-bottom: 1px solid #f0f0f0;
  position: relative;
  line-height: 1.7;
}
.smapochi-single__content ul li:first-child {
  border-top: 1px solid #f0f0f0;
}
.smapochi-single__content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 19px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--smapochi-key-color);
}
.smapochi-single__content strong {
  font-weight: 700;
}

/* FAQ */
.smapochi-single__content dl {
  margin: 32px 0;
  border: 1px solid #eee;
  border-radius: 6px;
  overflow: hidden;
}
.smapochi-single__content dt {
  position: relative;
  padding: 14px 16px 14px 44px;
  background: #f8f8f8;
  font-weight: 700;
  font-size: 15px;
  border-bottom: 1px solid #eee;
  line-height: 1.6;
}
.smapochi-single__content dt::before {
  content: 'Q.';
  position: absolute;
  left: 16px;
  color: var(--smapochi-key-color);
  font-weight: 700;
}
.smapochi-single__content dd {
  position: relative;
  margin: 0;
  padding: 14px 16px 14px 44px;
  background: #fff;
  font-size: 15px;
  line-height: 1.8;
}
.smapochi-single__content dd::before {
  content: 'A.';
  position: absolute;
  left: 16px;
  color: #bbb;
  font-weight: 700;
}

/* ===========================
   Store Info（店舗情報）
   =========================== */
.smapochi-store-info {
  margin-top: 64px;
  padding: 0 20px 48px;
}
.smapochi-store-info__inner {
  max-width: 740px;
  margin: 0 auto;
  background: #fafafa;
  border-radius: 8px;
  border: 1px solid #eee;
  padding: 28px 32px;
}
@media (max-width: 480px) {
  .smapochi-store-info__inner { padding: 20px 16px; }
}
.smapochi-store-info__name {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 20px;
  letter-spacing: 0.02em;
}
.smapochi-store-info__cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

/* CTAボタン（key_color） */
.smapochi-store-info__cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--smapochi-key-color);
  color: #fff;
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  border: none;
  letter-spacing: 0.03em;
  transition: opacity 0.2s;
  cursor: pointer;
}
.smapochi-store-info__cta-btn:hover { opacity: 0.85; }

/* SNSボタン共通（アイコン+テキスト・角丸6px） */
.smapochi-store-info__sns-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
  background: #f0f0f0;
  color: #333;
}
.smapochi-store-info__sns-btn:hover { opacity: 0.85; }
.smapochi-store-info__sns-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Instagram */
.smapochi-store-info__sns-btn--insta {
  background: #E1306C;
  color: #fff;
}

/* LINE */
.smapochi-store-info__sns-btn--line {
  background: #06C755;
  color: #fff;
}

/* テーブル */
.smapochi-store-info__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-top: 4px;
}
.smapochi-store-info__table th,
.smapochi-store-info__table td {
  padding: 11px 12px;
  border-bottom: 1px solid #eee;
  text-align: left;
  vertical-align: top;
  line-height: 1.7;
}
.smapochi-store-info__table th {
  width: 90px;
  color: #999;
  white-space: nowrap;
  font-weight: 400;
  font-size: 13px;
}

/* マップ */
.smapochi-store-info__map {
  margin-top: 24px;
  border-radius: 6px;
  overflow: hidden;
}
.smapochi-store-info__map iframe {
  display: block;
  width: 100%;
  height: 280px;
  border: none;
}
.smapochi-store-info__map-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  color: #777;
  text-decoration: underline;
}

/* ===========================
   Related（おすすめ記事）
   =========================== */
.smapochi-related {
  padding: 48px 20px 64px;
  border-top: 1px solid #f0f0f0;
}
.smapochi-related__inner {
  max-width: 1080px;
  margin: 0 auto;
}
.smapochi-related__heading {
  font-size: 12px;
  font-weight: 700;
  margin: 0 0 24px;
  letter-spacing: 0.15em;
  color: #999;
  text-transform: uppercase;
}
.smapochi-related__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
/* おすすめ記事：PC=3件・スマホ=4件 */
/* PC：4件目を非表示 */
@media (min-width: 769px) {
  .smapochi-related__grid .smapochi-card:nth-child(4) {
    display: none;
  }
}
/* スマホ：2カラムグリッドで4件表示 */
@media (max-width: 768px) {
  .smapochi-related__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* ===========================
   Footer
   =========================== */
.smapochi-footer {
  border-top: 1px solid #f0f0f0;
  padding: 28px 20px;
  text-align: center;
  background: #fff;
}
.smapochi-footer__nav {
  margin-bottom: 12px;
  font-size: 13px;
}
.smapochi-footer__nav a {
  color: #aaa;
  margin: 0 10px;
  transition: color 0.15s;
}
.smapochi-footer__nav a:hover { color: #333; }
.smapochi-footer__copy {
  font-size: 12px;
  color: #ccc;
  margin: 0;
  letter-spacing: 0.05em;
}

/* ===========================
   Page（固定ページ）
   =========================== */
.smapochi-page__inner {
  max-width: 740px;
  margin: 0 auto;
  padding: 48px 20px 64px;
}
.smapochi-page__title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 32px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--smapochi-key-color);
  letter-spacing: 0.02em;
}
.smapochi-page__content {
  font-size: 15px;
  line-height: 1.9;
}
.smapochi-page__content h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 40px 0 12px;
  padding-left: 12px;
  border-left: 4px solid var(--smapochi-key-color);
  border-radius: 0;
  line-height: 1.5;
}
.smapochi-page__content p {
  margin: 0 0 20px;
}

/* プライバシーポリシー店舗情報 */
.smapochi-page__store-contact {
  margin-top: 40px;
  padding: 24px;
  background: #fafafa;
  border-radius: 6px;
  border: 1px solid #eee;
  font-size: 14px;
  line-height: 2;
}
.smapochi-page__store-contact p {
  margin: 0;
}

/* ===========================
   GeneratePress Reset
   =========================== */

/* GP の body 背景 */
body { background: #fff !important; }

/* GP の見出しサイズをリセット */
h1, h2, h3, h4, h5, h6 { font-size: inherit; margin: 0; }

/* GP のリストマージンをリセット */
ul, ol { margin: 0; padding: 0; }

/* GP の table ボーダーをリセット */
table { border: none; }
td, th { border: none; }

/* GP のコンテンツラッパーが万が一レンダリングされた場合に非表示 */
.site-header:not(.smapochi-header),
.site-footer:not(.smapochi-footer),
#main:not([class*="smapochi"]),
.widget-area,
.breadcrumb-trail,
.generate-back-to-top { display: none !important; }

/* ===========================
   Phase7 UX改善
   =========================== */

/* #1 スマホヘッダー：折り返し・CTA崩れ修正 */
@media (max-width: 767px) {
  .smapochi-header { padding: 10px 0; }
  .smapochi-header__inner {
    flex-wrap: nowrap;
    gap: 8px;
    padding: 0 12px;
    overflow: hidden;
  }
  .smapochi-header__logo {
    min-width: 0;
    flex: 1;
    gap: 8px;
  }
  .smapochi-header__store-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px;
  }
}

/* Stickyヘッダー + WP管理バー */
.admin-bar .smapochi-header { top: 32px; }
@media (max-width: 782px) {
  .admin-bar .smapochi-header { top: 46px; }
}

/* #2 ロゴリンク */
.smapochi-header__logo-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  flex: 1;
}
.smapochi-header__logo-link:hover { opacity: 0.8; }

/* #3 ホバー時の文字色を白字で維持 */
.smapochi-store-info__cta-btn:hover {
  color: #fff !important;
  filter: brightness(0.82);
  opacity: 1;
}
.smapochi-store-info__sns-btn--insta:hover {
  color: #fff !important;
  filter: brightness(0.85);
  opacity: 1;
}
.smapochi-store-info__sns-btn--line:hover {
  color: #fff !important;
  filter: brightness(0.85);
  opacity: 1;
}

/* #4 フィルターボタン：ホバー視認性改善 */
.smapochi-filter__btn:hover {
  background: var(--smapochi-key-color);
  border-color: var(--smapochi-key-color);
  color: #fff;
}

/* #5 スマホアーカイブ：1カラム縦積み・画像100%幅（Instagram風） */
@media (max-width: 767px) {
  .smapochi-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  /* 480pxの横並びレイアウトをリセットして縦積みに */
  .smapochi-card__body {
    display: block;
    padding: 10px 0 0;
  }
  .smapochi-card__thumb {
    width: 100%;
    flex-shrink: initial;
    aspect-ratio: var(--smapochi-card-ratio, 1/1);
  }
}

/* #5.5 カードアニメーション */
@keyframes smapochiCardIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.smapochi-card--animate {
  animation: smapochiCardIn 0.3s ease both;
}
.smapochi-grid--loading {
  opacity: 0.3;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

/* #6 もっとみるボタン */
.smapochi-loadmore__wrap {
  text-align: center;
  margin: 40px 0 8px;
}
.smapochi-loadmore__button {
  display: inline-block;
  padding: 14px 48px;
  background-color: transparent;
  color: var(--smapochi-key-color);
  border: 2px solid var(--smapochi-key-color);
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.smapochi-loadmore__button:hover {
  background-color: var(--smapochi-key-color);
  color: #fff;
}
.smapochi-loadmore__button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
@media (max-width: 767px) {
  .smapochi-loadmore__button {
    width: 100%;
    padding: 14px 20px;
  }
}

/* #7 店舗情報ブロック：スマホ幅拡張・CTAボタン100% */
@media (max-width: 767px) {
  .smapochi-store-info {
    padding: 0 0 40px;
  }
  .smapochi-store-info__inner {
    border-radius: 0;
    padding: 20px 16px;
  }
  .smapochi-store-info__cta-btn {
    display: block;
    width: 100%;
    text-align: center;
    white-space: nowrap;
    padding: 14px 16px;
    box-sizing: border-box;
  }
}

/* #8 おすすめ記事：スマホ画像4:3 */
@media (max-width: 767px) {
  .smapochi-related__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .smapochi-related .smapochi-card__thumb {
    aspect-ratio: 4/3;
  }
  .smapochi-related .smapochi-card__title {
    font-size: 12px;
    line-height: 1.4;
  }
}

/* ==========================================
   フローティングCTAボタン
   ========================================== */
.smapochi-float-cta {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 9999;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
}
.smapochi-float-cta.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
}
.smapochi-float-cta__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  background-color: var(--smapochi-key-color);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-decoration: none;
  border-radius: 2px;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.smapochi-float-cta__button:hover {
  color: #fff;
  background-color: color-mix(in srgb, var(--smapochi-key-color) 80%, black);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.24);
}
@media (max-width: 767px) {
  .smapochi-float-cta {
    bottom: 20px;
    right: 16px;
  }
  .smapochi-float-cta__button {
    font-size: 13px;
    padding: 12px 20px;
  }
}

/* ==========================================
   ページアニメーション
   ========================================== */
/* ① ページ読み込みフェードイン */
@keyframes smapo-fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}
/* ③ スクロール時差フェードアップ */
@keyframes smapo-fadeup {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* ① ページ読み込みフェードイン：記事全体に適用 */
.smapochi-single__inner {
  animation: smapo-fadein 0.5s ease both;
}
/* ③ スクロールフェードアップ：JS でクラス付与 */
.smapo-hidden {
  opacity: 0;
  transform: translateY(16px);
}
.smapo-visible {
  animation: smapo-fadeup 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
/* アニメーション無効化設定を尊重（アクセシビリティ） */
@media (prefers-reduced-motion: reduce) {
  .smapochi-single__inner,
  .smapo-visible {
    animation: none;
  }
  .smapo-hidden {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================
   投稿者（スタイリスト）表示
   ========================================== */

.smapochi-single__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.smapochi-single__writer {
  font-size: 13px;
  color: var(--color-text-secondary, #666);
}

