/*
Theme Name: 買取店舗比較サイト
Theme URI: https://example.com
Author: BANRI LLC
Author URI: https://banri.example.com
Description: 郡山市の買取店舗を比較するための専用WordPressテーマ。管理画面から店舗情報を簡単登録可能。
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kaitori-theme
Tags: responsive, mobile-first, shop-comparison
*/

/* 基本リセット */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
    height: 100%;
}

body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
    min-height: 100vh;
}

/* ヘッダー固定（重要） */
.site-header {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    background: white !important;
    width: 100% !important;
}

/* コンテナ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    overflow-x: hidden;
}

/* ヘッダー */
.site-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.site-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

/* メインコンテンツ */
.main-content {
    padding: 40px 0;
    min-height: calc(100vh - 200px);
}

/* 広告エリア */
.ad-banner {
    background: #fff;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.ad-banner img {
    max-width: 100%;
    height: auto;
}

/* 店舗カードグリッド */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin: 30px 0;
}

.shop-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.shop-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.shop-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.shop-content {
    padding: 20px;
}

.shop-logo {
    width: 80px;
    height: 80px;
    margin: -50px auto 15px;
    border-radius: 50%;
    border: 4px solid white;
    object-fit: cover;
    display: block;
    background: white;
}

.shop-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
}

.shop-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.stars {
    color: #ffc107;
    font-size: 18px;
}

.rating-text {
    color: #666;
    font-size: 14px;
}

.shop-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
}

.feature-tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
}

.shop-description {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin: 15px 0;
}

.shop-details {
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 15px;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #555;
}

.detail-label {
    font-weight: 600;
    min-width: 60px;
}

.btn-detail {
    display: block;
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    margin-top: 15px;
    transition: opacity 0.3s ease;
}

.btn-detail:hover {
    opacity: 0.9;
}

/* 記事一覧（テキストのみ） */
.article-list {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin: 30px 0;
}

.article-item {
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.article-item:last-child {
    border-bottom: none;
}

.article-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.article-title a {
    color: #333;
    text-decoration: none;
}

.article-title a:hover {
    color: #667eea;
}

.article-meta {
    color: #999;
    font-size: 13px;
}

/* フッター */
.site-footer {
    background: #2c3e50;
    color: white;
    padding: 30px 0;
    text-align: center;
    margin-top: 60px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .shop-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .site-title {
        font-size: 20px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .main-content {
        padding: 20px 0;
    }
}

@media (max-width: 480px) {
    .shop-content {
        padding: 15px;
    }
    
    .shop-title {
        font-size: 18px;
    }
}

/* PC表示用の追加スタイル */
@media (min-width: 769px) {
    /* 店舗カードをグリッド表示 */
    .shop-cards-mobile {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
    
    .shop-card {
        display: flex;
        flex-direction: column;
    }
    
    /* コンテナの最大幅を設定 */
    .container {
        max-width: 1200px;
        margin: 0 auto;
    }
    
    /* 記事グリッドをPC用に調整 */
    .article-grid-section .grid-container {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    
    /* カルーセルをPC用に調整 */
    .article-carousel-section {
        padding: 0 !important;
    }
}

@media (min-width: 1024px) {
    /* 店舗カードを4列表示 */
    .shop-cards-mobile {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }
}

/* 店舗カードのホバーエフェクト（PC用） */
@media (hover: hover) {
    .shop-card {
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    
    .shop-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    }
}