/*
Theme Name:  Actzero Cafe
Theme URI:   https://act0.net
Author:      アクトゼロ
Author URI:  https://act0.net
Description: カフェ・コーヒーレビューブログ専用WordPressテーマ。カスタム投稿タイプ「カフェ」「コーヒー」「器具」に対応。
Version:     1.4.0
License:     GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: actzero-cafe
*/

/* =============================================
   CSS Variables
============================================= */
:root {
  --c1:      #626D71;
  --c1d:     #3e474a;
  --c2:      #CDCDC0;
  --c3:      #DDBC95;
  --c4:      #B38867;
  --c4d:     #7a5b3e;
  --bg:      #faf9f7;
  --surface: #ffffff;
  --border:  #d8d5cc;
  --text1:   #2a2825;
  --text2:   #626D71;
  --text3:   #8a8880;
  --radius:  10px;
  --radius-sm: 5px;
  --radius-xs: 3px;
}

/* =============================================
   Reset & Base
============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text1);
  background: var(--bg);
}

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

/* =============================================
   Layout
============================================= */
.site-container {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 16px;
}

/* =============================================
   Header
============================================= */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .header-inner {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

/* ロゴ */
.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.site-logo img {
  height: 36px;
  width: auto;
}

.site-logo-text {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--c1d);
  line-height: 1;
}

.site-logo-text span { color: var(--c4); }

/* グローバルメニュー */
.global-nav {
  display: flex;
  gap: 0;
}

.global-nav a {
  display: flex;
  align-items: center;
  padding: 0 14px;
  height: 56px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  letter-spacing: .02em;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}

.global-nav a:hover,
.global-nav a.current {
  color: var(--c4);
  border-bottom-color: var(--c4);
}

/* ハンバーガー（SP） */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text2);
  font-size: 20px;
}

/* =============================================
   Breadcrumb
============================================= */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  font-size: 11px;
  color: var(--text3);
  padding: 14px 0 0;
  margin-bottom: 16px;
}
.breadcrumb a { color: var(--text3); }
.breadcrumb a:hover { color: var(--text2); }
.breadcrumb .sep { font-size: 8px; }
.breadcrumb .current { color: var(--text2); }

/* =============================================
   TOP: セクション共通
============================================= */
.top-section {
  margin-bottom: 48px;
}

.section-heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.section-heading h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text1);
  letter-spacing: .03em;
}

.section-heading a.more {
  font-size: 12px;
  color: var(--c4);
  margin-left: auto;
  letter-spacing: .02em;
}

.section-heading a.more:hover { text-decoration: underline; }

/* =============================================
   TOP: カード一覧グリッド
============================================= */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.post-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(98,109,113,.12);
}

.post-card-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--c2);
}

.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.post-card:hover .post-card-thumb img { transform: scale(1.04); }

.post-card-no-thumb {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c1);
  opacity: .35;
  font-size: 36px;
}

.post-card-body {
  padding: 12px 14px 14px;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.post-card-area {
  font-size: 10px;
  color: var(--text3);
  letter-spacing: .02em;
}

.post-card-type {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  background: var(--c3);
  color: var(--c4d);
  font-weight: 500;
}

.post-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text1);
  line-height: 1.45;
  letter-spacing: -.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-sub {
  font-size: 12px;
  color: var(--text3);
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =============================================
   TOP: Hero（最新カフェ記事 大バナー）
============================================= */
.hero-latest {
  border-radius: var(--radius);
  overflow: hidden;
  border: 0.5px solid var(--border);
  margin-bottom: 32px;
  background: var(--surface);
  display: block;
}

.hero-latest-thumb {
  aspect-ratio: 2 / 1;
  overflow: hidden;
  background: var(--c2);
  position: relative;
}

.hero-latest-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.hero-latest:hover .hero-latest-thumb img { transform: scale(1.03); }

.hero-latest-body {
  padding: 14px 16px 16px;
}

/* =============================================
   Single Cafe: Hero Block
============================================= */
.hero-block {
  border-radius: var(--radius);
  overflow: hidden;
  border: 0.5px solid var(--border);
  margin-bottom: 16px;
  background: var(--surface);
}

.hero-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--c2);
}

.hero-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-thumb .no-thumb {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c1);
  opacity: .4;
  font-size: 48px;
}

.hero-meta { padding: 14px 16px 16px; }

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.tag-area {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: var(--radius-xs);
  background: var(--c2);
  color: var(--c1d);
  font-weight: 500;
  letter-spacing: .02em;
}

.tag-area i { font-size: 10px; margin-right: 3px; }

.tag-type {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: var(--radius-xs);
  background: var(--c3);
  color: var(--c4d);
  font-weight: 500;
  letter-spacing: .02em;
}

.hero-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text1);
  letter-spacing: -.015em;
  line-height: 1.3;
  margin-bottom: 5px;
}

.hero-sub {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.55;
}

/* =============================================
   一言コメント（吹き出し）
============================================= */
.comment-bubble-wrap {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.comment-bubble-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--c3);
  background: var(--c2);
}

.comment-bubble-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comment-bubble-avatar .avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c1);
  font-size: 22px;
}

.comment-bubble-right {
  flex: 1;
  min-width: 0;
}

.comment-bubble-name {
  font-size: 11px;
  color: var(--text3);
  margin-bottom: 4px;
  letter-spacing: .03em;
}

.comment-bubble-box {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 0 var(--radius) var(--radius) var(--radius);
  padding: 10px 14px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--text1);
  position: relative;
}

.comment-bubble-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: -8px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 8px 8px 0;
  border-color: transparent var(--border) transparent transparent;
}

.comment-bubble-box::after {
  content: '';
  position: absolute;
  top: 1px;
  left: -6px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 7px 7px 0;
  border-color: transparent var(--surface) transparent transparent;
}

/* =============================================
   Section Cards（記事詳細内）
============================================= */
.sec {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

.sec-title {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  color: var(--c1);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--c2);
  text-transform: uppercase;
}

/* =============================================
   Feature Tags
============================================= */
.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.feature-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: var(--radius-xs);
  border: 0.5px solid var(--c3);
  color: var(--text1);
  background: var(--bg);
  letter-spacing: .01em;
  line-height: 1;
}

.feature-tag i {
  font-size: 11px;
  color: var(--c4);
  width: 12px;
  text-align: center;
}

/* =============================================
   Intro Text
============================================= */
.intro-text {
  font-size: 14px;
  line-height: 1.9;
  color: var(--text1);
}

/* =============================================
   WordPress ブロックエディター ギャラリー
   （感想エリア内のギャラリーブロック用スタイル）
============================================= */

/* ギャラリーブロック全体 */
.review-body .wp-block-gallery {
  margin: 1.5em 0;
  gap: 6px !important;
}

/* 各画像セル：アスペクト比を統一してクロップ */
.review-body .wp-block-gallery .wp-block-image,
.review-body .wp-block-gallery figure {
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

/* ホバーオーバーレイ */
.review-body .wp-block-gallery .wp-block-image::after {
  content: '\f00e'; /* fa-magnifying-glass-plus */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  background: rgba(98,109,113,0);
  transition: background .25s ease;
  pointer-events: none;
}

.review-body .wp-block-gallery .wp-block-image:hover::after {
  background: rgba(98,109,113,0.45);
}

.review-body .wp-block-gallery .wp-block-image img,
.review-body .wp-block-gallery figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}

.review-body .wp-block-gallery .wp-block-image:hover img {
  transform: scale(1.04);
}

/* キャプション */
.review-body .wp-block-gallery figcaption,
.review-body .wp-block-gallery .wp-element-caption {
  font-size: 11px;
  color: var(--text3);
  text-align: center;
  margin-top: 5px;
  line-height: 1.5;
}

/* 単独画像ブロック */
.review-body .wp-block-image {
  margin: 1em 0;
  cursor: pointer;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.review-body .wp-block-image img {
  border-radius: var(--radius-sm);
  max-width: 100%;
  height: auto;
  transition: transform .35s ease;
  display: block;
}

.review-body .wp-block-image:hover img { transform: scale(1.02); }

.review-body .wp-block-image figcaption {
  font-size: 11px;
  color: var(--text3);
  text-align: center;
  margin-top: 5px;
}

/* =============================================
   ライトボックス
============================================= */
.az-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(22, 18, 14, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  opacity: 0;
  transition: opacity .25s ease;
  backdrop-filter: blur(6px);
}

.az-lightbox:not([hidden]) { opacity: 1; }

.az-lightbox[hidden] { display: none; }

/* 画像エリア */
.az-lightbox__stage {
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.az-lightbox__stage img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 32px 80px rgba(0,0,0,.5);
  transition: opacity .2s ease;
}

/* 閉じるボタン */
.az-lightbox__close {
  position: fixed;
  top: 16px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  z-index: 9001;
}

.az-lightbox__close:hover { background: rgba(255,255,255,.25); }

/* 前後ボタン */
.az-lightbox__prev,
.az-lightbox__next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  z-index: 9001;
}

.az-lightbox__prev { left: 12px; }
.az-lightbox__next { right: 12px; }
.az-lightbox__prev:hover,
.az-lightbox__next:hover { background: rgba(255,255,255,.25); }

/* キャプション */
.az-lightbox__caption {
  font-size: 12px;
  color: rgba(255,255,255,.6);
  text-align: center;
  max-width: 600px;
  line-height: 1.6;
  margin: 0;
}

/* SP */
@media (max-width: 480px) {
  .az-lightbox__prev { left: 4px; }
  .az-lightbox__next { right: 4px; }
  .az-lightbox__prev,
  .az-lightbox__next { width: 36px; height: 36px; font-size: 15px; }
}

/* =============================================
   Review Body（WordPress本文）
============================================= */
.review-body {
  font-size: 14px;
  line-height: 1.9;
  color: var(--text1);
}

.review-body p { margin-bottom: 1em; }
.review-body p:last-child { margin-bottom: 0; }

.review-body h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text1);
  margin: 1.5em 0 .6em;
  padding-left: 10px;
  border-left: 3px solid var(--c4);
}

.review-body h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text2);
  margin: 1.2em 0 .5em;
}

.review-body img {
  border-radius: var(--radius-sm);
  margin: .75em 0;
}

/* =============================================
   Score Card（10段階レーティング）
   参考デザイン：star_rating_design_preview.html
============================================= */
.score-card {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 20px;
  align-items: stretch;
  background: #fffdf8;
  border: 1px solid #e4ddd0;
  border-radius: 20px;
  padding: 20px;
}

/* 左：総評スコア大表示 */
.score-card__main {
  display: grid;
  place-items: center;
  min-height: 200px;
  border-radius: 14px;
  background: #f2eadc;
  border: 1px solid #ded3c1;
}

.score-card__main-inner { text-align: center; }

.score-card__number {
  display: block;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(64px, 14vw, 100px);
  line-height: .86;
  letter-spacing: -.09em;
  color: var(--text1);
}

.score-card__label {
  display: block;
  margin-top: 14px;
  font-size: 10px;
  color: var(--text3);
  letter-spacing: .22em;
  text-transform: uppercase;
}

/* 右：コメント＋内訳 */
.score-card__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.score-card__text {
  margin: 0;
  color: var(--text2);
  line-height: 1.85;
  font-size: 13px;
}

/* バーグラフ内訳 */
.score-breakdown { display: grid; gap: 10px; }

.score-row {
  display: grid;
  grid-template-columns: 80px 1fr 38px;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text3);
}

.score-row__name {
  letter-spacing: .06em;
  font-size: 11px;
}

.score-row__bar {
  height: 5px;
  border-radius: 999px;
  background: #ebe4d8;
  overflow: hidden;
}

.score-row__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--c4);
  transition: width .6s ease;
}

.score-row__value {
  text-align: right;
  font-weight: 600;
  color: var(--text1);
  font-size: 12px;
}

/* SP対応 */
@media (max-width: 520px) {
  .score-card {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 16px;
  }
  .score-card__main { min-height: 160px; }
  .score-row {
    grid-template-columns: 1fr 38px;
    gap: 6px 10px;
  }
  .score-row__bar { grid-column: 1 / -1; order: 3; }
}

/* =============================================
   Shop Info
============================================= */
.map-embed {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 0.5px solid var(--border);
  margin-bottom: 10px;
  line-height: 0;
}

.map-embed iframe {
  width: 100%;
  height: 220px;
  border: none;
  display: block;
}

.map-open-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 11px;
  background: var(--c1);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 13px;
  letter-spacing: .03em;
  border: none;
  cursor: pointer;
  text-decoration: none;
  margin-bottom: 14px;
  transition: background .2s;
}

.map-open-btn:hover { background: var(--c1d); color: #fff; }
.map-open-btn i { font-size: 14px; }

.info-table { width: 100%; border-collapse: collapse; }

.info-table tr td {
  padding: 7px 0;
  font-size: 13px;
  vertical-align: top;
  border-bottom: 0.5px solid var(--border);
}

.info-table tr:last-child td { border-bottom: none; }

.info-table .info-key {
  color: var(--text2);
  font-size: 12px;
  width: 76px;
  padding-right: 10px;
  white-space: nowrap;
}

.info-table .info-val { color: var(--text1); line-height: 1.65; }

.sns-links { display: flex; flex-wrap: wrap; gap: 6px; }

.sns-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--c4d);
  background: #fff7ee;
  padding: 3px 9px;
  border-radius: var(--radius-xs);
  border: 0.5px solid var(--c3);
  text-decoration: none;
}

.sns-link:hover { background: var(--c3); color: var(--c4d); }

/* =============================================
   Footer
============================================= */
.site-footer {
  margin-top: 56px;
  padding: 24px 16px;
  text-align: center;
  font-size: 12px;
  color: var(--text3);
  border-top: 1px solid var(--border);
}

/* =============================================
   Responsive
============================================= */
@media (max-width: 600px) {
  .header-inner { padding: 0 12px; }

  .global-nav { display: none; position: absolute; top: 56px; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--border); flex-direction: column; gap: 0; }
  .global-nav.open { display: flex; }
  .global-nav a { height: 48px; padding: 0 20px; border-bottom: 0.5px solid var(--border); border-bottom-width: 0.5px; }

  .nav-toggle { display: flex; }

  .card-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .post-card-title { font-size: 13px; }

  .hero-title { font-size: 18px; }
  .photo-gallery { grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .sec { padding: 14px 12px; }
  .map-embed iframe { height: 180px; }

  .rating-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
}

@media (max-width: 400px) {
  .card-grid { grid-template-columns: 1fr; }
}
