@charset "utf-8";

/* ==========================================================
   変数定義
   ========================================================== */
:root {
    --primary-color: #007bff;
    --accent-color: #ff9900;
    --accent-hover: #e68a00;
    --bg-gray: #f9f9f9;
    --text-dark: #333;
    --text-gray: #666;
    --rank-gold: #c5a365;
    --rank-bg: #fffbf0;
}

/* ==========================================================
   ベースレイアウト
   ========================================================== */
h1.title { font-size: 3em; line-height: 1em; }
h2 { font-size: 2.0em; line-height: 1.5em; margin-bottom: 5px; }

.hero_box { display: flex; --height: height; }

.article-content { 
    background-color: #fff; 
    padding: 40px; 
    border-radius: 12px; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); 
    margin-bottom: 40px;
}

/* ==========================================================
   パンくず・バッジ
   ========================================================== */
.breadcrumb-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.list-badge {
    display: inline-block;
    background-color: #fff;
    color: var(--primary-color);
    font-size: 0.85em;
    padding: 4px 15px;
    border-radius: 20px;
    font-weight: bold;
    border: 1px solid #ddd;
    text-decoration: none;
    transition: all 0.2s ease;
}

.list-badge:hover {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.category-badge {
    display: inline-block;
    background-color: var(--bg-gray);
    color: var(--text-gray);
    font-size: 0.85em;
    padding: 4px 15px;
    border-radius: 20px;
    font-weight: bold;
    border: 1px solid #ddd;
    margin-bottom: 0;
}

.breadcrumb-divider {
    font-size: 0.8em;
    color: #bbb;
}

/* ==========================================================
   ランキングバナー
   ========================================================== */
.ranking-banner {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px 20px;
    background-color: var(--rank-bg);
    border: 2px solid #e8cca6;
    border-radius: 8px;
    color: #5d4037;
    box-sizing: border-box;
    max-width: 100%;
    width: fit-content;
}

.rank-date { font-size: 0.85em; color: #888; font-weight: normal; }
.rank-label { font-size: 1.2em; font-weight: bold; color: #d35400; display: flex; align-items: center; }
.rank-crown { font-size: 1.4em; margin-right: 5px; }
.rank-number { font-size: 1.4em; font-weight: 800; margin-left: 5px; color: #ff0000; }

/* ==========================================================
   商品画像・リンク
   ========================================================== */
.product-image-container { text-align: center; margin: 30px 0; background: #fff; }
.product-image { max-width: 100%; height: auto; max-height: 400px; object-fit: contain; border-radius: 8px; border: 1px solid #eee; }

.amazon-link-button {
    display: flex; align-items: center; justify-content: center;
    width: 80%; max-width: 600px; margin: 30px auto; padding: 18px 20px; 
    background: linear-gradient(to bottom, #ff9900, #ff8c00);
    color: white !important; text-decoration: none; border-radius: 50px; 
    font-size: 1.7em; font-weight: bold;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15); transition: all 0.2s ease;
    position: relative; line-height: 1.2; cursor: pointer;
}

.amazon-link-button:hover { background: linear-gradient(to bottom, #ff8c00, #e67e00); transform: translateY(-2px); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); }
.amazon-link-button::after { content: "➔"; margin-left: 10px; font-size: 1.2em; }

/* ==========================================================
   レーティング・テキスト
   ========================================================== */
.rating-box { 
    margin: 30px 0; font-size: 1.7em; padding: 25px; 
    background-color: #fff; border: 2px solid #f0f0f0; border-radius: 12px;
    text-align: center; position: relative; overflow: hidden;
}
.rating-label { font-size: 0.9em; color: var(--text-gray); margin-bottom: 5px; letter-spacing: 0.1em; font-weight: bold; }
.rating-value { font-size: 3.5em; font-weight: 800; color: var(--accent-color); line-height: 1; margin-bottom: 5px; }
.rating-stars { color: #ffd700; font-size: 1.5em; margin-bottom: 10px; }
.review-count { font-size: 1em; color: var(--text-gray); font-weight: normal; }
.date-notice { font-size: 0.75em; color: #aaa; margin-top: 15px; font-style: italic; }

h2.section-title { font-size: 2em; border-bottom: 2px solid var(--primary-color); padding-bottom: 10px; margin-top: 50px; margin-bottom: 25px; color: var(--text-dark); font-weight: 700; }
.text-block { font-size: 1.7em; line-height: 1.9; color: #444; margin-bottom: 20px; }
.summary-box { background-color: #f8fbff; border-left: 5px solid var(--primary-color); padding: 20px; border-radius: 0 8px 8px 0; }

/* ==========================================================
   ユーザーの反応（吹き出し）
   ========================================================== */
.reactions-container { display: grid; gap: 15px; }
.reaction-item-wrapper { display: flex; align-items: flex-start; gap: 10px; }
.reaction-icon { font-size: 2.5em; line-height: 1.2; color: #4a90e2; flex-shrink: 0; margin-top: 10px; }
.reaction-bubble { 
    flex-grow: 1; position: relative; background: #fff; border: 1px solid #e1e1e1; padding: 15px 20px; border-radius: 15px; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.03); font-size: 1.7em; font-weight: bold; line-height: 1.6; color: #555; 
    margin: 0; 
}
.reaction-bubble::before { content: ""; position: absolute; left: -8px; top: 15px; width: 0; height: 0; border-top: 8px solid transparent; border-bottom: 8px solid transparent; border-right: 8px solid #e1e1e1; }
.reaction-bubble::after { content: ""; position: absolute; left: -6px; top: 15px; width: 0; height: 0; border-top: 8px solid transparent; border-bottom: 8px solid transparent; border-right: 8px solid #fff; }

/* ==========================================================
   グラフ・AIセクション
   ========================================================== */
.chart-wrapper {
    width: 95%; height: 350px; margin-bottom: 40px; padding: 20px;
    border: 2px solid #e8cca6; border-radius: 12px; background-color: #fffbf0; box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.ai-section { margin: 40px 0; border: 2px solid #e0eaff; border-radius: 15px; overflow: hidden; background-color: #fff; }
.ai-header {
    background: linear-gradient(135deg, #007bff, #00c6ff); color: white;
    padding: 15px 20px; font-weight: bold; font-size: 1.5em; display: flex; align-items: center;
}
.ai-header::before { content: "🤖"; margin-right: 10px; font-size: 1.4em; }
.ai-body { padding: 10px 25px 25px 25px; }
.ai-description {
    margin-top: 0; font-size: 0.95em; color: #555; background-color: #f9fcff;
    padding: 15px; border-radius: 8px; margin: 0 15px 15px; border: 1px dashed #b0c4de; line-height: 1.6;
}
.ai-description strong { color: #007bff; }
.ai-catch {
    font-size: 1.7em; font-weight: bold; color: #333; margin-bottom: 20px; text-align: center;
    background: linear-gradient(transparent 70%, #fff3cd 0%); display: inline-block; width: 100%; margin-top: 20px;
}
.ai-merits { background-color: #f8fbff; border-radius: 10px; padding: 20px; margin-bottom: 25px; border: 1px solid #eef6ff; }
.ai-merits li { margin-bottom: 8px; font-weight: bold; font-size: 1.7em; color: #555; line-height: 1.5 !important; }
.ai-target { text-align: center; margin-bottom: 30px; background: #fffbf0; padding: 15px; border-radius: 10px; line-height: 1.5 !important; }
.target-badge { background: #ff9900; color: white; padding: 4px 12px; border-radius: 20px; font-size: 1.7em; margin-right: 10px; font-weight: bold; }
.target-text { font-weight: bold; color: #5d4037; font-size: 1.7em; }

/* ==========================================================
   AI提案レシピ
   ========================================================== */
.recipe-box { border-top: 2px dashed #ddd; padding-top: 25px; margin-top: 20px; }
.recipe-title { text-align: center; color: #007bff; font-size: 1.5em; font-weight: bold; margin-bottom: 20px; }
.recipe-grid { display: flex; justify-content: space-around; flex-wrap: wrap; gap: 15px; }
.recipe-item {
    flex: 1; min-width: 140px; text-align: center; background: #fff;
    border: 1px solid #eee; border-radius: 10px; padding: 15px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.05);
}
.recipe-icon { font-size: 2.5em; margin-bottom: 10px; display: block; }
.recipe-label { display: block; font-size: 1.8em; color: #888; margin-bottom: 15px; font-weight: bold; }
.recipe-value { font-weight: bold; color: #333; font-size: 1.8em; }
.ai-footer { text-align: right; font-size: 0.75em; color: #aaa; margin-top: 1px; }

/* ==========================================================
   フッター・その他
   ========================================================== */
.meta-footer { margin-top: 40px; font-size: 0.8em; color: #999; text-align: right; border-top: 1px solid #eee; padding-top: 10px; }
.error-box { padding: 30px; background-color: #fff0f0; border: 1px solid #ffcccc; color: #cc0000; border-radius: 8px; margin: 20px 0; }

.keyword-highlight {
    background-color: #fff9c4;
    padding: 0 2px;
    border-radius: 2px;
    font-weight: bold;
    color: inherit;
    text-decoration: underline;
    transition: background-color 0.2s;
}
.keyword-highlight:hover { background-color: #ffecb3; color: #007bff; }

/* ==========================================================
   レスポンシブ（スマホ対応）
   ========================================================== */
@media (max-width: 768px) {
    .hero_box { flex-direction: column; height: auto; }
    .article-content { padding: 20px; }
    h1.title { font-size: 1.6em; }
    .rating-value { font-size: 2.8em; }
    .ranking-banner { width: 100%; justify-content: center; }
    .chart-wrapper { height: 250px; padding: 10px; }
}

/* お気に入りボタンのスタイル */
.fav-container {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}
.detail-fav-btn {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    padding: 8px 20px;
    font-size: 1rem;
    font-weight: bold;
    color: #9ca3af;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.detail-fav-btn i { font-size: 1.2rem; }
.detail-fav-btn.active {
    color: #ef4444;
    border-color: #fca5a5;
    background: #fff5f5;
}