/*
Theme Name: メンエスの口コミ
Theme URI: https://example.com
Author: Your Name
Description: メンズエステ専門の口コミサイト用WordPressテーマ。セラピスト名・店舗名での検索、項目別評価バー、カードタップでポップアップ表示。
Version: 2.0.0
License: GNU General Public License v2 or later
Text Domain: mens-esthe-review
*/

/* =============================================
   リセット & ベース
============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --pink:        #e8417a;
    --pink-dark:   #c43060;
    --pink-light:  #fff5f8;
    --pink-border: #f0e0e8;
    --pink-bar1:   #f0a0b8;
    --text:        #222;
    --text-muted:  #888;
    --text-light:  #aaa;
    --border:      #f0f0f0;
    --bg:          #fafafa;
    --white:       #ffffff;
    --radius-sm:   6px;
    --radius-md:   10px;
    --radius-lg:   14px;
    --radius-xl:   18px;
    --radius-pill: 20px;
    --font: -apple-system, BlinkMacSystemFont, 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
}

html { font-size: 16px; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: var(--pink); text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* =============================================
   ヘッダー
============================================= */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100;
}
.site-header__inner {
    max-width: 1100px; margin: 0 auto; padding: 0 20px;
    height: 54px; display: flex; align-items: center; justify-content: space-between;
}
.site-logo { font-size: 17px; font-weight: 700; color: var(--text); }
.site-logo span { color: var(--pink); }
.site-logo:hover { text-decoration: none; }

.btn-post-header {
    background: var(--pink); color: var(--white); border: none;
    border-radius: var(--radius-pill); padding: 7px 18px;
    font-size: 13px; font-weight: 600; cursor: pointer;
    font-family: var(--font); transition: background 0.2s;
}
.btn-post-header:hover { background: var(--pink-dark); }

/* =============================================
   ヒーロー（検索エリア）
============================================= */
.hero {
    background: var(--pink-light); padding: 36px 20px;
    text-align: center; border-bottom: 1px solid var(--pink-border);
}
.hero__title { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.hero__sub   { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }

.search-form { display: flex; gap: 8px; max-width: 540px; margin: 0 auto; flex-wrap: wrap; }
.search-form__input {
    flex: 1; min-width: 140px; height: 40px;
    border: 1px solid #e0e0e0; border-radius: var(--radius-pill);
    padding: 0 16px; font-size: 13px; font-family: var(--font);
    color: var(--text); background: var(--white); outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.search-form__input:focus { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(232,65,122,0.1); }
.search-form__input::placeholder { color: #bbb; }
.search-form__btn {
    background: var(--pink); color: var(--white); border: none;
    border-radius: var(--radius-pill); padding: 0 22px; height: 40px;
    font-size: 13px; font-weight: 600; cursor: pointer; font-family: var(--font);
    transition: background 0.2s;
}
.search-form__btn:hover { background: var(--pink-dark); }

/* =============================================
   メイン
============================================= */
.site-main { max-width: 1100px; margin: 0 auto; padding: 24px 20px 60px; }

.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.section-title  { font-size: 15px; font-weight: 700; color: var(--text); }

.filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-tab {
    font-size: 12px; padding: 4px 14px; border-radius: var(--radius-pill);
    border: 1px solid #ddd; color: var(--text-muted); background: var(--white);
    cursor: pointer; font-family: var(--font); transition: all 0.15s;
}
.filter-tab:hover { border-color: var(--pink); color: var(--pink); }
.filter-tab.is-active { background: var(--pink); color: var(--white); border-color: var(--pink); }

/* =============================================
   口コミカードグリッド
============================================= */
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }

/* =============================================
   カード
============================================= */
.review-card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.15s;
    display: flex; flex-direction: column;
}
.review-card:hover { box-shadow: 0 6px 20px rgba(232,65,122,0.15); transform: translateY(-2px); }
.review-card:active { transform: translateY(0); }

/* プロフィール */
.card-profile { display: flex; gap: 12px; padding: 16px 16px 12px; }
.profile-img {
    width: 72px; height: 72px; border-radius: var(--radius-md);
    background: linear-gradient(135deg, #f5d0e0, #e8b4c8);
    flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: #c0607a; font-weight: 700; overflow: hidden;
}
.profile-img img { width: 100%; height: 100%; object-fit: cover; }

.profile-info { flex: 1; min-width: 0; }
.profile-tags { display: flex; gap: 5px; margin-bottom: 6px; flex-wrap: wrap; }
.tag-area {
    font-size: 10px; padding: 2px 8px; border-radius: var(--radius-pill);
    border: 1px solid var(--pink); color: var(--pink); font-weight: 500;
}
.tag-new {
    font-size: 10px; padding: 2px 8px; border-radius: var(--radius-pill);
    background: var(--pink); color: var(--white); font-weight: 700;
}
.profile-name  { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.profile-shop  { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-specs { font-size: 11px; color: var(--text-light); margin-bottom: 6px; }
.profile-rating { display: flex; align-items: center; gap: 5px; }
.stars-pink    { color: var(--pink); font-size: 14px; letter-spacing: 1px; }
.rating-score  { font-size: 15px; font-weight: 700; color: var(--text); }
.rating-count  { font-size: 11px; color: var(--text-light); }

/* 評価スコアエリア */
.score-section { padding: 12px 16px; border-top: 1px solid var(--border); }
.score-section__title {
    font-size: 12px; font-weight: 700; color: #333;
    border-left: 3px solid var(--pink); padding-left: 8px; margin-bottom: 10px;
}
.score-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
.score-row   { display: flex; align-items: center; gap: 6px; }
.score-label { font-size: 11px; color: #666; width: 52px; flex-shrink: 0; line-height: 1.3; }
.score-bar-wrap { flex: 1; height: 6px; background: #f0f0f0; border-radius: 3px; overflow: hidden; }
.score-bar   { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--pink-bar1), var(--pink)); }
.score-val   { font-size: 11px; font-weight: 600; color: var(--pink); width: 22px; text-align: right; flex-shrink: 0; }

/* 口コミ本文 */
.review-body-section { padding: 12px 16px; border-top: 1px solid var(--border); }
.review-body {
    font-size: 12px; color: #555; line-height: 1.7;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* カードフッター */
.card-footer {
    padding: 10px 16px 12px; border-top: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.card-date { font-size: 11px; color: var(--text-light); }
.btn-helpful {
    display: flex; align-items: center; gap: 4px;
    font-size: 11px; color: var(--text-muted);
    background: #f7f7f7; border: 1px solid #e8e8e8;
    border-radius: var(--radius-pill); padding: 4px 10px;
    cursor: pointer; font-family: var(--font); transition: all 0.15s;
}
.btn-helpful:hover { border-color: var(--pink); color: var(--pink); }
.btn-helpful.is-voted { background: var(--pink-light); border-color: var(--pink); color: var(--pink); }

/* タップヒント */
.tap-hint {
    display: flex; align-items: center; justify-content: center;
    padding: 7px; background: var(--pink-light);
    border-top: 1px solid var(--pink-border);
    font-size: 11px; color: var(--pink);
}

/* 検索なし */
.no-results { grid-column: 1/-1; text-align: center; padding: 60px 20px; color: var(--text-muted); font-size: 14px; }

/* =============================================
   詳細ポップアップ
============================================= */
.popup-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    z-index: 300; display: flex; align-items: center; justify-content: center;
    padding: 20px; opacity: 0; visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}
.popup-overlay.is-open { opacity: 1; visibility: visible; }

.popup {
    background: var(--white); border-radius: var(--radius-xl);
    width: 100%; max-width: 460px; overflow: hidden;
    transform: scale(0.94) translateY(12px);
    transition: transform 0.22s cubic-bezier(.34,1.3,.7,1);
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    max-height: 90vh; overflow-y: auto;
}
.popup-overlay.is-open .popup { transform: scale(1) translateY(0); }

.popup__head {
    background: linear-gradient(135deg, #f7a8c0, var(--pink));
    padding: 20px; position: relative;
}
.popup__profile { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.popup__avatar {
    width: 56px; height: 56px; border-radius: var(--radius-md);
    background: rgba(255,255,255,0.25); display: flex; align-items: center;
    justify-content: center; font-size: 18px; color: var(--white); font-weight: 700;
    flex-shrink: 0; overflow: hidden;
}
.popup__avatar img { width: 100%; height: 100%; object-fit: cover; }
.popup__area  { font-size: 11px; color: rgba(255,255,255,0.7); margin-bottom: 3px; }
.popup__name  { font-size: 20px; font-weight: 700; color: var(--white); }
.popup__shop  { font-size: 12px; color: rgba(255,255,255,0.8); margin-top: 2px; }
.popup__specs { font-size: 11px; color: rgba(255,255,255,0.65); margin-top: 2px; }

.popup__overall { display: flex; align-items: baseline; gap: 6px; }
.popup__overall-stars { font-size: 18px; color: var(--white); letter-spacing: 2px; }
.popup__overall-score { font-size: 28px; font-weight: 700; color: var(--white); }
.popup__overall-label { font-size: 11px; color: rgba(255,255,255,0.75); }

.popup__close {
    position: absolute; top: 14px; right: 14px;
    background: rgba(255,255,255,0.25); border: none; border-radius: 50%;
    width: 30px; height: 30px; color: var(--white); font-size: 15px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
}
.popup__close:hover { background: rgba(255,255,255,0.4); }

.popup__body { padding: 18px; }
.popup__section-title {
    font-size: 12px; font-weight: 700; color: #333;
    border-left: 3px solid var(--pink); padding-left: 8px; margin-bottom: 12px;
}
.popup__score-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; margin-bottom: 16px; }
.popup__score-row  { display: flex; align-items: center; gap: 7px; }
.popup__score-label { font-size: 11px; color: #666; width: 72px; flex-shrink: 0; line-height: 1.3; }
.popup__bar-wrap   { flex: 1; height: 7px; background: #f0f0f0; border-radius: 4px; overflow: hidden; }
.popup__bar        { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--pink-bar1), var(--pink)); }
.popup__score-val  { font-size: 12px; font-weight: 700; color: var(--pink); width: 24px; text-align: right; flex-shrink: 0; }

.popup__divider { height: 1px; background: #f5f5f5; margin-bottom: 14px; }
.popup__review-title {
    font-size: 12px; font-weight: 700; color: #333;
    border-left: 3px solid var(--pink); padding-left: 8px; margin-bottom: 8px;
}
.popup__review-text { font-size: 13px; color: #555; line-height: 1.75; }
.popup__review-date { font-size: 11px; color: var(--text-light); margin-top: 10px; text-align: right; }

/* =============================================
   口コミ投稿モーダル
============================================= */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.45);
    z-index: 200; display: none; align-items: flex-start;
    justify-content: center; padding: 30px 16px; overflow-y: auto;
}
.modal-overlay.is-open { display: flex; }

.modal { background: var(--white); border-radius: 16px; padding: 24px; width: 100%; max-width: 500px; margin: auto; }
.modal__title { font-size: 16px; font-weight: 700; margin-bottom: 16px; color: var(--text); }

.form-group { margin-bottom: 13px; }
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 5px; }
.form-input, .form-textarea {
    width: 100%; border: 1px solid #e8e8e8; border-radius: var(--radius-md);
    padding: 9px 14px; font-size: 13px; font-family: var(--font);
    color: var(--text); background: var(--bg); outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus, .form-textarea:focus {
    border-color: var(--pink); box-shadow: 0 0 0 3px rgba(232,65,122,0.1); background: var(--white);
}
.form-textarea { min-height: 90px; resize: vertical; line-height: 1.7; }

/* 総合評価スター */
.overall-star-input { display: flex; gap: 5px; font-size: 26px; cursor: pointer; }
.overall-star-input .star { color: #e0e0e0; transition: color 0.1s; line-height: 1; }
.overall-star-input .star.is-lit { color: var(--pink); }

/* 項目別評価グリッド */
.detail-section-label { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }
.detail-rating-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    background: var(--bg); border-radius: var(--radius-md);
    padding: 14px; border: 1px solid #f0f0f0;
}
.detail-rating-row { display: flex; flex-direction: column; gap: 4px; }
.detail-rating-row .form-label { font-size: 11px; margin-bottom: 3px; }
.mini-star-input { display: flex; gap: 2px; font-size: 17px; cursor: pointer; }
.mini-star-input .star { color: #e0e0e0; transition: color 0.1s; line-height: 1; }
.mini-star-input .star.is-lit { color: var(--pink); }

/* モーダルボタン */
.modal__actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.btn-cancel {
    background: transparent; border: 1px solid #e0e0e0; border-radius: var(--radius-pill);
    padding: 8px 18px; font-size: 13px; font-family: var(--font);
    color: var(--text-muted); cursor: pointer; transition: all 0.15s;
}
.btn-cancel:hover { border-color: #bbb; color: var(--text); }
.btn-submit {
    background: var(--pink); color: var(--white); border: none;
    border-radius: var(--radius-pill); padding: 8px 24px;
    font-size: 13px; font-weight: 600; font-family: var(--font);
    cursor: pointer; transition: background 0.2s;
}
.btn-submit:hover { background: var(--pink-dark); }

/* フォームメッセージ */
.form-message {
    display: none; font-size: 13px; padding: 10px 14px;
    border-radius: var(--radius-md); margin-bottom: 8px;
}
.form-message.is-success { background: #e8f8f1; color: #0a6640; }
.form-message.is-error   { background: #fdecea; color: #991b1b; }

/* =============================================
   フッター
============================================= */
.site-footer {
    background: var(--white); border-top: 1px solid var(--border);
    padding: 24px 20px; text-align: center;
    font-size: 13px; color: var(--text-light);
}

/* =============================================
   レスポンシブ
============================================= */
@media (max-width: 600px) {
    .hero__title { font-size: 18px; }
    .search-form { flex-direction: column; }
    .search-form__input { min-width: 100%; }
    .reviews-grid { grid-template-columns: 1fr; }
    .detail-rating-grid { grid-template-columns: 1fr; }
    .popup__score-grid { grid-template-columns: 1fr; }
    .modal { padding: 18px 14px; }
    .modal-overlay { padding: 20px 10px; }
}
