/*
Theme Name: Hairset Salon Navi
Theme URI: https://hairset.fun
Description: ヘアセットサロンnavi - ヘアセット専門店比較検索サイト用テーマ
Version: 1.1.0
Author: SG Corporation
Text Domain: hairset-salon-navi
*/

/* ===========================================
   Variables
   =========================================== */
:root {
    --primary: #e91e63;
    --primary-dark: #c2185b;
    --primary-light: #f8bbd9;
    --secondary: #9c27b0;
    --accent: #ff4081;
    --orange: #ff6b00;
    --orange-dark: #e65100;
    --star-color: #ffc107;
    --text: #333;
    --text-light: #666;
    --text-muted: #999;
    --bg: #fff;
    --bg-gray: #f8f9fa;
    --bg-dark: #333;
    --border: #e0e0e0;
    --success: #4caf50;
    --error: #f44336;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --radius: 8px;
    --radius-sm: 4px;
    --max-width: 1200px;
    --header-height: 60px;
}

/* ===========================================
   Reset & Base
   =========================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Noto Sans JP', Meiryo, sans-serif;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
}
a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }
ul, ol { list-style: none; }

/* ===========================================
   Utilities
   =========================================== */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }
.mt-2 { margin-top: 16px; }
.mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 32px; }

/* ===========================================
   Header
   =========================================== */
.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}
.site-logo a {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}
.site-logo .highlight { color: var(--secondary); }

.nav-menu { display: flex; gap: 24px; }
.nav-menu a { color: var(--text); font-weight: 500; font-size: 0.9375rem; }
.nav-menu a:hover { color: var(--primary); }

/* ===========================================
   Breadcrumb
   =========================================== */
.breadcrumb { padding: 12px 0; font-size: 0.8125rem; color: var(--text-light); background: var(--bg-gray); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 4px; }
.breadcrumb li:not(:last-child)::after { content: '>'; margin: 0 8px; color: var(--text-muted); }
.breadcrumb a { color: var(--text-light); }

/* ===========================================
   Page Header
   =========================================== */
.page-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    padding: 48px 0;
    margin-bottom: 32px;
}
.page-header h1 { font-size: 1.875rem; margin-bottom: 12px; }
.page-header .lead { font-size: 1rem; opacity: 0.9; }
.page-header .stats { display: flex; gap: 16px; margin-top: 16px; font-size: 0.875rem; }
.page-header .stats span { background: rgba(255,255,255,0.2); padding: 4px 12px; border-radius: 20px; }

/* ===========================================
   Filter Bar
   =========================================== */
.filter-bar {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}
.filter-group { display: flex; align-items: center; gap: 8px; }
.filter-group label { font-weight: 500; font-size: 0.875rem; }
.filter-select {
    padding: 8px 32px 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    background: var(--bg);
    appearance: none;
}
.filter-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    cursor: pointer;
}
.filter-btn:hover { background: var(--primary-dark); }

/* ===========================================
   Layout
   =========================================== */
.main-content { padding: 32px 0 60px; }
.layout-with-sidebar { display: grid; grid-template-columns: 1fr 300px; gap: 40px; }

/* ===========================================
   Shop Card
   =========================================== */
.shop-list { display: grid; gap: 20px; }

.shop-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: grid;
    grid-template-columns: 140px 1fr auto;
    gap: 20px;
    position: relative;
    transition: box-shadow 0.2s, transform 0.2s;
}
.shop-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.shop-card.is-lumina {
    border: 2px solid var(--primary);
    background: linear-gradient(to right, rgba(233, 30, 99, 0.03), var(--bg));
}
.lumina-badge {
    position: absolute;
    top: -1px;
    left: 20px;
    background: var(--primary);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

/* 準備中店舗のスタイル */
.preparing-badge {
    position: absolute;
    top: -1px;
    left: 20px;
    background: #ffc107;
    color: #333;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
.shop-card.is-preparing { opacity: 0.85; }
.shop-card.is-preparing .shop-thumbnail::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.15);
    pointer-events: none;
}

/* Shop Thumbnail with Credit */
.shop-thumbnail {
    width: 140px;
    height: 105px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-gray);
    position: relative;
}
.shop-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.shop-thumbnail-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); font-size: 0.75rem;
}

/* 引用元表記 */
.image-credit {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 0.5625rem;
    padding: 2px 4px;
    text-align: center;
}
.image-credit a { color: #fff; }
.shop-thumbnail-wrap {
    display: flex;
    flex-direction: column;
}
.image-source {
    color: #aaa;
    font-size: 0.5625rem;
    text-align: right;
    margin-top: 2px;
}
.shop-gallery-wrap {
    display: flex;
    flex-direction: column;
}
.image-credit-below {
    color: #aaa;
    font-size: 0.75rem;
    text-align: right;
    margin: 6px 0 0 0;
}
.image-credit-below a {
    color: #999;
}

/* Shop Info */
.shop-info { min-width: 0; }
.shop-info h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: 6px; }
.shop-info h3 a { color: var(--text); }
.shop-info h3 a:hover { color: var(--primary); }

.shop-rating { margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.rating-text { font-size: 0.75rem; color: var(--text-light); }

.shop-meta { font-size: 0.8125rem; color: var(--text-light); margin-bottom: 8px; }
.shop-meta-item { display: inline-flex; align-items: center; gap: 4px; margin-right: 12px; }

.shop-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.shop-tag {
    background: var(--bg-gray);
    color: var(--text-light);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.6875rem;
}
.shop-tag.tag-early { background: #e3f2fd; color: #1565c0; }
.shop-tag.tag-specialty { background: #fce4ec; color: #c2185b; font-weight: bold; }
.shop-tag.tag-salon { background: #f5f5f5; color: #757575; }

/* Price & Action */
.shop-action { text-align: right; min-width: 130px; }
.shop-price { margin-bottom: 10px; }
.shop-price .price-label { font-size: 0.6875rem; color: var(--text-muted); display: block; }
.shop-price .price { font-size: 1.25rem; font-weight: 700; color: var(--primary); }
.shop-price .price-suffix { font-size: 0.875rem; font-weight: 400; }

.btn-reserve {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--orange);
    color: #fff;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.8125rem;
}
.btn-reserve:hover { background: var(--orange-dark); color: #fff; }

/* ===========================================
   Star Rating
   =========================================== */
.star-rating { color: var(--star-color); font-size: 0.875rem; }
.star-rating .star.empty { color: #ddd; }
.star-rating .star.half {
    background: linear-gradient(90deg, var(--star-color) 50%, #ddd 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ===========================================
   Reviews Section
   =========================================== */
.reviews-section {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-top: 32px;
}
.reviews-section h2 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}

/* Rating Summary */
.rating-summary {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg-gray);
    border-radius: var(--radius);
}
.rating-average { display: flex; align-items: center; gap: 8px; }
.rating-number { font-size: 2rem; font-weight: 700; color: var(--primary); }
.rating-count { font-size: 0.875rem; color: var(--text-light); }

/* Reviews List */
.reviews-list { margin-bottom: 32px; }
.review-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}
.review-item:last-child { border-bottom: none; }

.review-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.review-meta { font-size: 0.8125rem; color: var(--text-light); }
.review-nickname { font-weight: 500; margin-right: 12px; }

.review-content { font-size: 0.9375rem; line-height: 1.8; color: var(--text); }
.review-content p { margin-bottom: 8px; }

.review-footer { margin-top: 10px; font-size: 0.75rem; color: var(--text-muted); }

.no-reviews { text-align: center; padding: 32px; color: var(--text-light); }

/* Review Form */
.review-form-wrapper {
    background: var(--bg-gray);
    padding: 24px;
    border-radius: var(--radius);
    margin-top: 24px;
}
.review-form-wrapper h3 { font-size: 1rem; margin-bottom: 8px; }
.form-notice { font-size: 0.8125rem; color: var(--text-light); margin-bottom: 20px; }

.review-form .form-group { margin-bottom: 16px; }
.review-form label { display: block; font-weight: 500; margin-bottom: 6px; font-size: 0.875rem; }
.review-form .required { color: var(--error); }

.review-form input[type="text"],
.review-form input[type="month"],
.review-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
}
.review-form textarea { resize: vertical; min-height: 100px; }
.review-form input:focus, .review-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.char-count { font-size: 0.75rem; color: var(--text-muted); text-align: right; margin-top: 4px; }

/* Rating Input */
.rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px;
}
.rating-input input { display: none; }
.rating-input label {
    font-size: 1.5rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.1s;
}
.rating-input input:checked ~ label,
.rating-input label:hover,
.rating-input label:hover ~ label {
    color: var(--star-color);
}

.form-agree { font-size: 0.8125rem; }
.form-agree input { margin-right: 6px; }

.btn-submit-review {
    display: block;
    width: 100%;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-submit-review:hover { background: var(--primary-dark); }
.btn-submit-review:disabled { background: var(--text-muted); cursor: not-allowed; }

.form-message {
    margin-top: 16px;
    padding: 12px;
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 0.875rem;
}
.form-message.success { background: #e8f5e9; color: var(--success); }
.form-message.error { background: #ffebee; color: var(--error); }

/* ===========================================
   Sidebar
   =========================================== */
.sidebar { position: sticky; top: calc(var(--header-height) + 20px); }
.sidebar-widget {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}
.sidebar-widget h4 {
    font-size: 0.9375rem;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}

.area-links li { border-bottom: 1px solid var(--bg-gray); }
.area-links a {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    color: var(--text);
    font-size: 0.875rem;
}
.area-links .count {
    background: var(--bg-gray);
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 10px;
}

/* LUMINA Banner */
.lumina-banner {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    text-align: center;
}
.lumina-banner h4 { border: none; color: #fff; }
.lumina-banner p { font-size: 0.8125rem; opacity: 0.9; margin-bottom: 12px; }
.lumina-banner .btn {
    display: inline-block;
    background: #fff;
    color: var(--primary);
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
}
.lumina-banner .ad-label {
    display: inline-block;
    background: rgba(255,255,255,0.3);
    color: #fff;
    font-size: 0.625rem;
    padding: 2px 8px;
    border-radius: 3px;
    margin-bottom: 8px;
}

/* ===========================================
   Shop Detail Page
   =========================================== */
.shop-detail-header { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.shop-gallery { border-radius: var(--radius); overflow: hidden; position: relative; }
.shop-gallery img { width: 100%; height: 350px; object-fit: cover; }
.shop-gallery .image-credit {
    font-size: 0.6875rem;
    padding: 4px 8px;
}

.shop-detail-main h1 { font-size: 1.75rem; margin-bottom: 12px; }
.shop-detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.shop-detail-rating { margin-bottom: 16px; }
.shop-detail-rating .star-rating { font-size: 1.25rem; }

.shop-detail-price { margin-bottom: 20px; }
.shop-detail-price .label { font-size: 0.8125rem; color: var(--text-light); }
.shop-detail-price .price { font-size: 2.25rem; font-weight: 700; color: var(--primary); }

.btn-reserve-large {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: var(--orange);
    color: #fff;
    padding: 16px;
    border-radius: var(--radius);
    font-size: 1.125rem;
    font-weight: 700;
}
.btn-reserve-large:hover { background: var(--orange-dark); color: #fff; }

/* Info Table */
.shop-info-section { margin-bottom: 32px; }
.shop-info-section h2 {
    font-size: 1.125rem;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
}
.shop-info-table { width: 100%; border-collapse: collapse; }
.shop-info-table th, .shop-info-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    font-size: 0.9375rem;
}
.shop-info-table th { width: 140px; background: var(--bg-gray); font-weight: 500; }

/* Source Credit */
.source-credit {
    background: #fff3e0;
    border: 1px solid #ffe0b2;
    border-radius: var(--radius);
    padding: 12px 16px;
    margin: 24px 0;
    font-size: 0.8125rem;
    color: #e65100;
}
.source-credit a { color: #e65100; text-decoration: underline; }

/* Site Credit (Footer) */
.site-credit {
    background: var(--bg-gray);
    border-radius: var(--radius);
    padding: 16px;
    margin: 32px 0;
    font-size: 0.8125rem;
    color: var(--text-light);
    text-align: center;
}

/* ===========================================
   Footer
   =========================================== */
.site-footer { background: var(--bg-dark); color: #fff; padding: 48px 0 24px; margin-top: 60px; }
.footer-inner { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 40px; margin-bottom: 40px; }
.footer-about .site-logo { margin-bottom: 12px; }
.footer-about .site-logo a { color: #fff; }
.footer-about p { font-size: 0.8125rem; color: #aaa; }
.footer-section h5 { font-size: 0.9375rem; margin-bottom: 16px; }
.footer-section a { color: #aaa; font-size: 0.8125rem; }
.footer-section a:hover { color: #fff; }
.footer-section li { margin-bottom: 8px; }
.footer-bottom { text-align: center; padding-top: 24px; border-top: 1px solid #444; font-size: 0.75rem; color: #888; }

/* ===========================================
   Pagination
   =========================================== */
.pagination { display: flex; justify-content: center; gap: 6px; margin: 40px 0; }
.pagination a, .pagination span {
    display: flex; align-items: center; justify-content: center;
    min-width: 40px; height: 40px; padding: 0 12px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.pagination a:hover { background: var(--bg-gray); border-color: var(--primary); }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===========================================
   Responsive
   =========================================== */
@media (max-width: 1024px) {
    .layout-with-sidebar { grid-template-columns: 1fr; }
    .sidebar { position: static; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .sidebar-widget.lumina-banner { grid-column: span 2; }
}

@media (max-width: 768px) {
    .header-inner { flex-wrap: wrap; padding: 12px 0; }
    .nav-menu { gap: 12px; font-size: 0.875rem; flex-wrap: wrap; justify-content: center; }
    
    .page-header { padding: 32px 0; }
    .page-header h1 { font-size: 1.5rem; }
    
    .shop-card { grid-template-columns: 1fr; gap: 16px; }
    .shop-thumbnail-wrap { width: 100%; }
    .shop-thumbnail { width: 100%; height: 180px; }
    .shop-action { text-align: left; display: flex; align-items: center; justify-content: space-between; }
    
    .shop-detail-header { grid-template-columns: 1fr; gap: 24px; }
    .shop-gallery img { height: 250px; }
    
    .sidebar { grid-template-columns: 1fr; }
    .sidebar-widget.lumina-banner { grid-column: auto; }
    
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .footer-about { grid-column: span 2; }
    
    .rating-summary { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .filter-bar { flex-direction: column; }
    .footer-inner { grid-template-columns: 1fr; }
    .footer-about { grid-column: auto; }
}

/* ===========================================
   Official Site Styles (Hybrid Mode)
   =========================================== */

/* 公式サイトボタン（緑系） */
.btn-reserve-large.btn-official {
    background: #2e7d32;
}
.btn-reserve-large.btn-official:hover {
    background: #1b5e20;
}

/* サブ予約リンク */
.btn-reserve-sub {
    display: block;
    text-align: center;
    margin-top: 10px;
    padding: 8px 16px;
    font-size: 0.8125rem;
    color: var(--text-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}
.btn-reserve-sub:hover {
    background: var(--bg-gray);
    color: var(--text);
}

/* 店舗カードの公式ボタン */
.shop-card .btn-reserve.btn-official {
    background: #2e7d32;
}
.shop-card .btn-reserve.btn-official:hover {
    background: #1b5e20;
}

/* 公式サイト情報ソース表示（緑背景） */
.source-credit.source-official {
    background: #e8f5e9;
    border-color: #c8e6c9;
    color: #2e7d32;
}
.source-credit.source-official a {
    color: #1b5e20;
}

/* 公式サイト画像クレジット */
.image-credit.image-credit-official {
    background: rgba(46, 125, 50, 0.85);
}
.image-credit.image-credit-official a {
    color: #fff;
}

/* Instagram埋め込み */
.shop-instagram-embed {
    margin-bottom: 24px;
}
.shop-instagram-embed .instagram-media {
    margin: 0 auto !important;
    max-width: 100% !important;
}
.instagram-credit {
    display: block;
    text-align: center;
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.instagram-credit a {
    color: #c13584;
}

/* Instagram情報ソース表示 */
.source-credit.source-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    background: #fce4ec;
    border-color: #f8bbd0;
    color: #c2185b;
}
.source-credit.source-instagram a {
    color: #ad1457;
}

/* 一覧ページのInstagramバッジ */
.shop-thumbnail {
    position: relative;
}
.instagram-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 600;
}

/* No Image プレースホルダー with Instagram indicator */
.no-image-placeholder {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
}
.instagram-indicator {
    position: absolute;
    bottom: 6px;
    left: 6px;
    right: 6px;
    background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.625rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: center;
}
.instagram-indicator svg {
    flex-shrink: 0;
}

/* 詳細ページ No Image Box */
.no-image-box {
    position: relative;
    background: var(--bg-gray);
    border-radius: var(--radius);
    overflow: hidden;
}
.no-image-box img {
    width: 100%;
    height: 250px;
    object-fit: contain;
}
.instagram-notice {
    text-align: center;
    padding: 12px;
    background: linear-gradient(135deg, rgba(131,58,180,0.1), rgba(253,29,29,0.1), rgba(252,176,69,0.1));
    color: var(--text);
    font-size: 0.875rem;
    margin: 0;
}

/* 詳細ページ Instagram埋め込みセクション */
.shop-instagram-section {
    background: var(--bg-gray);
    padding: 24px;
    border-radius: var(--radius);
}
.instagram-embed-wrapper {
    max-width: 540px;
    margin: 0 auto;
}
.instagram-link-bottom {
    text-align: center;
    margin-top: 16px;
    font-size: 0.875rem;
}
.instagram-link-bottom a {
    color: #833ab4;
    font-weight: 600;
}
