/*
Theme Name: LOQAL
Theme URI: https://loqal.jp
Author: CR8
Description: 地域の店舗検索サイト用カスタムテーマ
Version: 3.16.0
*/

@import url('https://fonts.googleapis.com/css2?family=Zen+Old+Mincho:wght@400;700&display=swap');

:root {
    --bg: #FDFBF9;
    --card: #FFFFFF;
    --dark: #2D2424;
    --text: #4A3F3F;
    --muted: #8E7D79;
    --accent: #C9A99E;
    --accent-dark: #B08578;
    --accent-bg: #FBF2EF;
    --border: #F3EBE9;
    --border-dark: #E8DAD6;
    --cream: #F0E6E2;
    --shadow: rgba(220,200,195,0.2);
    --shadow-hover: rgba(220,200,195,0.4);
}

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

body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: 'Zen Old Mincho', serif; letter-spacing: 0.05em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ========== Header ========== */
.site-header { background: rgba(253,251,249,0.95); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.site-logo img { height: 40px; width: auto; }
.header-buttons { display: flex; gap: 12px; align-items: center; }
.header-login-btn { padding: 9px 24px !important; border: none !important; border-radius: 30px !important; background: var(--accent) !important; color: #fff !important; font-size: 13px !important; font-weight: 600 !important; cursor: pointer; box-shadow: 0 2px 10px rgba(186,166,161,0.3); font-family: 'Zen Old Mincho', serif !important; }
.header-avatar { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.header-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ========== Hero & Category ========== */
.hero-section { background: linear-gradient(180deg, #F5ECE8 0%, var(--bg) 100%); padding: 72px 24px 56px; text-align: center; }
.hero-title { font-size: 32px; font-weight: 700; color: var(--dark); line-height: 1.6; margin-bottom: 20px; }
.category-section { padding: 0 24px 40px; background: var(--bg); }
.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; max-width: 720px; margin: 0 auto; }
.category-card { position: relative; border-radius: 16px; overflow: hidden; height: 180px; box-shadow: 0 2px 10px var(--shadow); display: block; }
.category-card img { width: 100%; height: 100%; object-fit: cover; }
.category-card-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(61,48,48,0.02) 0%, rgba(61,48,48,0.5) 100%); }
.category-card-text { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; }
.category-card-name { font-size: 18px; font-weight: 700; color: #fff; font-family: 'Zen Old Mincho', serif; }

/* ========== Area Selection ========== */
.area-section { padding: 40px 24px 56px; background: var(--bg); }
.area-section-title { font-size: 20px; font-weight: 700; color: var(--dark); text-align: center; margin-bottom: 24px; }
.selection-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; max-width: 600px; margin: 0 auto; }
.selection-btn { padding: 20px 12px; border: 1px solid var(--border); border-radius: 12px; background: #fff; text-align: center; font-family: 'Zen Old Mincho', serif; box-shadow: 0 4px 15px var(--shadow); display: block; }

/* ========== Shop Card ========== */
.shop-section { padding: 32px 0; }
.shop-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 640px) { .shop-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .shop-grid { grid-template-columns: repeat(3, 1fr); } }

.shop-card-wrap { display: flex; flex-direction: column; }
.shop-card { background: #fff; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); box-shadow: 0 2px 10px var(--shadow); display: block; flex: 1; position: relative; }
.shop-card-body { padding: 16px; }
.shop-card-category { display: inline-block; font-size: 11px; font-weight: 600; color: var(--accent-dark); padding: 3px 10px; background: var(--accent-bg); border-radius: 8px; margin-bottom: 8px; }
.shop-card-name { font-size: 15px; font-weight: 700; color: var(--dark); margin-bottom: 4px; }
.shop-card-address { font-size: 12px; color: var(--muted); }
.btn-check-availability { display: block; text-align: center; padding: 12px 16px; background: linear-gradient(135deg, #C9A99E, #B08578); color: #fff; font-size: 13px; font-weight: 700; border-radius: 0 0 16px 16px; margin-top: -8px; }

/* ========== 画像スライダー設定 ========== */

/* 1. カード画像エリア（親） */
.shop-card-image {
    width: 100%;
    position: relative;
    background: #f9fafb;
    border-bottom: 1px solid var(--border);
    aspect-ratio: 4/3; 
    overflow: hidden;
}

/* 2. スライダーコンテナ */
.slider-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* 3. スライダートラック */
.slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease-in-out;
}

/* 4. スライド1枚ごとの設定 */
.slider-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

/* 5. 画像の設定 */
.slider-slide img, 
.shop-card-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    display: block;
    margin: 0 auto;
}

/* 6. 詳細ページの画像設定 */
.single-shop .shop-hero .slider-container {
    aspect-ratio: 16/9; /* 詳細ページは横長 */
    background: #fff;
}
.single-shop .shop-hero img {
    background: #fff;
}

/* スライダー操作パーツ */
.slider-dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 10; }
.slider-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(0,0,0,0.2); transition: all 0.2s; }
.slider-dot.active { background: var(--accent); transform: scale(1.2); }
.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,0.9); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.2s; z-index: 10; }
.slider-container:hover .slider-btn { opacity: 1; }
.slider-btn-prev { left: 10px; }
.slider-btn-next { right: 10px; }

/* スマホ対応 */
@media (max-width: 768px) {
    .selection-grid, .category-grid { grid-template-columns: repeat(2, 1fr); }
    .slider-btn { display: none !important; }
}

/* バッジ類 */
.availability-badge { position: absolute; top: 10px; left: 10px; background: #06C755; color: #fff; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; z-index: 2; }
.new-badge { position: absolute; top: 10px; left: 10px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; z-index: 2; }
.no-image { display: flex; align-items: center; justify-content: center; color: #ccc; font-size: 12px; height: 100%; width: 100%; background: #f3f4f6; }

/* ========== Footer ========== */
.site-footer { background: var(--cream); padding: 56px 24px 40px; text-align: center; margin-top: 80px; }
.footer-links { margin: 16px 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; font-size: 12px; color: var(--muted); }

/* ========== 【追加】管理者用 固定ボタン ========== */
.admin-floating-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #2D2424; /* サイトのダークカラー */
    color: #fff !important;
    padding: 14px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    z-index: 9999;
    transition: all 0.3s;
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(4px);
}
.admin-floating-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.35);
    background: #000;
}
.admin-floating-btn span {
    font-size: 18px;
}
/* スマホでは少し小さく */
@media (max-width: 768px) {
    .admin-floating-btn {
        bottom: 20px;
        right: 20px;
        padding: 12px 20px;
        font-size: 13px;
    }
}