/*
Theme Name: SWELL Custom Child
Theme URI: https://swell-theme.com/
Description: 主婦でもできるAI - SWELLチャイルドテーマ
Author: Hitomi
Template: swell
Version: 1.0.0
License: GPL v2 or later
*/

/* ============================================================
   CSS変数（カラーパレット）
   ============================================================ */
:root {
    --brown-dark:   #2c1f17;
    --brown-mid:    #5c3d2e;
    --accent:       #b8704a;
    --accent-light: #d4956e;
    --cream:        #faf6f2;
    --cream-mid:    #f0e8e0;
    --cream-dark:   #e8ddd4;
    --text-main:    #2c1f17;
    --text-sub:     #7a5c48;
    --white:        #ffffff;
}

/* ============================================================
   ベースリセット
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Noto Sans JP', sans-serif;
    background: var(--cream);
    color: var(--text-main);
    line-height: 1.7;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ============================================================
   お知らせバー（トップバー）
   ============================================================ */
.topbar {
    background: var(--brown-dark);
    color: var(--cream);
    text-align: center;
    padding: 10px 16px;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
}
.topbar a {
    color: var(--accent-light);
    font-weight: 600;
    margin-left: 8px;
}

/* ============================================================
   ヘッダー
   ============================================================ */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--cream-dark);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 8px rgba(44,31,23,.06);
}
.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
}
.site-logo { display: flex; align-items: center; gap: 10px; }
.logo-icon {
    width: 38px; height: 38px;
    background: var(--accent);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 18px;
}
.logo-text .site-name {
    font-size: 1.15rem; font-weight: 700;
    color: var(--brown-dark); letter-spacing: 0.02em;
    display: block;
}
.logo-text .site-tagline {
    font-size: 0.68rem;
    color: var(--text-sub);
    letter-spacing: 0.08em;
    display: block;
}
.site-nav { display: flex; gap: 28px; align-items: center; }
.site-nav a {
    font-size: 0.85rem; color: var(--brown-mid); font-weight: 500;
    padding: 4px 0; border-bottom: 2px solid transparent;
    transition: all .2s;
}
.site-nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.nav-cta {
    background: var(--accent) !important;
    color: white !important;
    padding: 8px 20px !important;
    border-radius: 4px;
    border-bottom: none !important;
    font-weight: 600 !important;
}
.nav-cta:hover { background: var(--brown-mid) !important; }

/* ============================================================
   ヒーローセクション
   ============================================================ */
.hero {
    max-width: 1100px; margin: 0 auto;
    display: grid; grid-template-columns: 1fr 320px;
    gap: 20px; padding: 28px 24px 24px;
}
.hero-main {
    background: var(--cream-mid);
    border-radius: 8px;
    padding: 40px 44px;
    position: relative; overflow: hidden;
    min-height: 320px;
}
.hero-main::after {
    content: '暮';
    position: absolute; right: 30px; top: 50%; transform: translateY(-50%);
    font-size: 200px; font-weight: 900;
    color: rgba(184,112,74,.07);
    line-height: 1;
}
.hero-badge {
    display: inline-block;
    background: var(--accent); color: white;
    font-size: 0.72rem; font-weight: 600;
    padding: 4px 12px; border-radius: 2px;
    letter-spacing: 0.06em; margin-bottom: 18px;
}
.hero-main h2 {
    font-size: 1.9rem; font-weight: 800;
    line-height: 1.4; color: var(--brown-dark);
    margin-bottom: 16px; position: relative; z-index: 1;
}
.hero-main p {
    font-size: 0.88rem; color: var(--text-sub);
    margin-bottom: 28px; position: relative; z-index: 1;
    max-width: 400px; line-height: 1.8;
}
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; position: relative; z-index: 1; }
.btn-primary {
    background: var(--accent); color: white;
    padding: 12px 28px; border-radius: 4px;
    font-size: 0.9rem; font-weight: 700;
    transition: background .2s;
    display: inline-block;
}
.btn-primary:hover { background: var(--brown-mid); color: white; }
.btn-secondary {
    background: transparent; color: var(--accent);
    border: 2px solid var(--accent);
    padding: 10px 24px; border-radius: 4px;
    font-size: 0.9rem; font-weight: 600;
    transition: all .2s;
    display: inline-block;
}
.btn-secondary:hover { background: var(--accent); color: white; }

.hero-sub { display: flex; flex-direction: column; gap: 12px; }
.hero-card {
    background: white;
    border-radius: 8px; padding: 18px 20px;
    border-left: 3px solid var(--accent);
    cursor: pointer; transition: transform .2s, box-shadow .2s;
    flex: 1;
    display: block;
}
.hero-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(44,31,23,.1); }
.hero-card .hc-badge {
    font-size: 0.68rem; font-weight: 700; color: var(--accent);
    letter-spacing: 0.08em; margin-bottom: 8px; display: block;
}
.hero-card h3 { font-size: 0.9rem; font-weight: 700; color: var(--brown-dark); line-height: 1.4; }
.hero-card p { font-size: 0.78rem; color: var(--text-sub); margin-top: 6px; line-height: 1.6; }

/* ============================================================
   スクロールティッカー
   ============================================================ */
.ticker-wrap {
    background: var(--cream-dark);
    overflow: hidden; white-space: nowrap;
}
.ticker {
    display: inline-block;
    animation: ticker 30s linear infinite;
    padding: 10px 0;
    font-size: 0.8rem; color: var(--text-sub);
}
.ticker span { margin: 0 40px; }
.ticker span::before { content: '◆ '; color: var(--accent); }

/* ============================================================
   カテゴリタブ
   ============================================================ */
.cat-tabs {
    display: flex; gap: 8px; flex-wrap: wrap;
    margin-bottom: 28px; border-bottom: 2px solid var(--cream-dark);
}
.cat-tab {
    padding: 8px 20px; font-size: 0.85rem; font-weight: 600;
    color: var(--text-sub); cursor: pointer; border-bottom: 2px solid transparent;
    margin-bottom: -2px; transition: all .2s;
    background: none; border-top: none; border-left: none; border-right: none;
}
.cat-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.cat-tab:hover { color: var(--accent); }

/* ============================================================
   セクション共通
   ============================================================ */
.section { padding: 48px 24px; }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 24px;
}
.section-title {
    font-size: 1.15rem; font-weight: 800; color: var(--brown-dark);
    border-left: 4px solid var(--accent); padding-left: 12px;
}
.section-link { font-size: 0.82rem; color: var(--accent); font-weight: 600; }
.section-link:hover { text-decoration: underline; }

/* ============================================================
   記事カード
   ============================================================ */
.article-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.article-card {
    background: white; border-radius: 8px;
    overflow: hidden; transition: transform .2s, box-shadow .2s;
    display: block;
}
.article-card:hover { transform: translateY(-3px); box-shadow: 0 6px 24px rgba(44,31,23,.1); }
.card-img {
    background: var(--cream-mid);
    height: 160px; display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    position: relative;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-badge-wrap { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; }
.badge {
    font-size: 0.68rem; font-weight: 700; padding: 3px 8px; border-radius: 2px;
}
.badge-hot  { background: #e53e3e; color: white; }
.badge-new  { background: #2d6a4f; color: white; }
.badge-rank { background: var(--accent); color: white; }

.card-body { padding: 16px 18px 20px; }
.card-cat {
    font-size: 0.7rem; font-weight: 700;
    color: var(--accent); margin-bottom: 8px;
    display: flex; align-items: center; gap: 6px;
}
.cat-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: inline-block; }
.card-body h3 {
    font-size: 0.92rem; font-weight: 700;
    line-height: 1.45; color: var(--brown-dark); margin-bottom: 8px;
}
.card-meta { display: flex; justify-content: space-between; }
.card-date { font-size: 0.72rem; color: var(--text-sub); }
.card-time { font-size: 0.72rem; color: var(--text-sub); }

/* ============================================================
   メイン＋サイドバーレイアウト
   ============================================================ */
.main-with-sidebar {
    display: grid; grid-template-columns: 1fr 300px; gap: 32px;
    align-items: start;
}
.sidebar-card {
    background: white; border-radius: 8px; padding: 24px;
    margin-bottom: 20px;
}
.sidebar-card h3 {
    font-size: 0.92rem; font-weight: 800;
    color: var(--brown-dark); margin-bottom: 16px;
    padding-bottom: 10px; border-bottom: 2px solid var(--cream-dark);
    display: flex; align-items: center; gap: 8px;
}
.sidebar-card h3::before { content: '■'; color: var(--accent); font-size: 0.7rem; }
.rank-list { list-style: none; padding: 0; }
.rank-list li {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 10px 0; border-bottom: 1px solid var(--cream-mid);
}
.rank-list li:last-child { border-bottom: none; }
.rank-num {
    font-size: 1.4rem; font-weight: 900; color: var(--cream-dark);
    line-height: 1; min-width: 28px; text-align: center;
    font-style: italic;
}
.rank-list li:nth-child(1) .rank-num { color: #c89b3c; }
.rank-list li:nth-child(2) .rank-num { color: #9aa0a6; }
.rank-list li:nth-child(3) .rank-num { color: #b87333; }
.rank-text { font-size: 0.82rem; font-weight: 600; line-height: 1.4; color: var(--brown-dark); }

/* ============================================================
   プロフィールカード
   ============================================================ */
.profile-card {
    background: white; border-radius: 8px; padding: 24px;
    text-align: center; margin-bottom: 20px;
}
.profile-avatar {
    width: 72px; height: 72px; border-radius: 50%;
    background: var(--cream-mid);
    margin: 0 auto 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 32px; color: var(--accent);
    border: 3px solid var(--cream-dark);
    overflow: hidden;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-card h3 { font-size: 0.95rem; font-weight: 800; color: var(--brown-dark); margin-bottom: 6px; }
.profile-card p { font-size: 0.78rem; color: var(--text-sub); line-height: 1.6; margin-bottom: 14px; }
.follow-btn {
    display: block; background: var(--accent); color: white;
    border-radius: 4px; padding: 10px; font-size: 0.85rem; font-weight: 700;
    margin-top: 14px; text-align: center; transition: background .2s;
}
.follow-btn:hover { background: var(--brown-mid); }

/* ============================================================
   商品カード（アフィリエイト）
   ============================================================ */
.section-white { background: white; }
.product-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.product-card {
    background: var(--cream); border-radius: 8px;
    overflow: hidden; transition: transform .2s, box-shadow .2s;
    display: block; border: 1px solid var(--cream-dark);
}
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(44,31,23,.1); }
.product-img {
    background: var(--cream-mid); height: 160px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; position: relative;
}
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-badge {
    position: absolute; top: 8px; left: 8px;
    font-size: 0.65rem; font-weight: 700; padding: 3px 8px;
    border-radius: 2px;
}
.pb-no1  { background: var(--accent); color: white; }
.pb-cp   { background: #2d6a4f; color: white; }
.pb-new  { background: #744210; color: white; }
.pb-save { background: #2b6cb0; color: white; }
.product-body { padding: 14px 16px 16px; }
.product-cat { font-size: 0.68rem; font-weight: 700; color: var(--text-sub); margin-bottom: 6px; letter-spacing: 0.06em; }
.product-body h3 { font-size: 0.9rem; font-weight: 700; color: var(--brown-dark); line-height: 1.4; margin-bottom: 6px; }
.product-body p { font-size: 0.78rem; color: var(--text-sub); line-height: 1.5; margin-bottom: 10px; }
.product-price { font-size: 1.1rem; font-weight: 800; color: var(--accent); margin-bottom: 12px; }
.buy-btn {
    display: block; background: var(--accent); color: white;
    text-align: center; padding: 9px; border-radius: 4px;
    font-size: 0.82rem; font-weight: 700; transition: background .2s;
}
.buy-btn:hover { background: var(--brown-mid); }

/* ============================================================
   特集セクション
   ============================================================ */
.feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 16px;
}
.feature-main {
    grid-row: span 2;
    background: var(--cream-mid); border-radius: 8px;
    padding: 32px;
    display: flex; flex-direction: column; justify-content: center;
    position: relative; overflow: hidden;
    cursor: pointer; transition: box-shadow .2s;
    min-height: 280px;
}
.feature-main:hover { box-shadow: 0 6px 24px rgba(44,31,23,.12); }
.feature-main::after {
    content: '暮';
    position: absolute; right: 10px; bottom: -10px;
    font-size: 130px; font-weight: 900;
    color: rgba(184,112,74,.08); line-height: 1;
}
.feature-badge {
    display: inline-block; background: var(--accent); color: white;
    font-size: 0.7rem; font-weight: 700; padding: 3px 10px;
    border-radius: 2px; margin-bottom: 14px;
}
.feature-main h3 {
    font-size: 1.5rem; font-weight: 800; line-height: 1.4;
    color: var(--brown-dark); position: relative; z-index: 1;
}
.feature-main p {
    font-size: 0.82rem; color: var(--text-sub);
    margin-top: 12px; line-height: 1.7; position: relative; z-index: 1;
}
.feature-sub {
    background: white; border-radius: 8px; padding: 20px;
    display: flex; align-items: center; gap: 14px;
    cursor: pointer; transition: box-shadow .2s;
    border-left: 3px solid var(--accent);
    text-decoration: none;
}
.feature-sub:hover { box-shadow: 0 4px 16px rgba(44,31,23,.1); }
.fs-badge {
    font-size: 0.68rem; font-weight: 700; padding: 3px 8px;
    border-radius: 2px; white-space: nowrap;
}
.fs-hot     { background: #e53e3e; color: white; }
.fs-ranking { background: var(--accent); color: white; }
.fs-new     { background: #2d6a4f; color: white; }
.fs-guide   { background: #2b6cb0; color: white; }
.feature-sub h3 { font-size: 0.88rem; font-weight: 700; line-height: 1.4; color: var(--brown-dark); }

/* ============================================================
   フッター
   ============================================================ */
.site-footer { background: var(--brown-dark); color: rgba(250,246,242,.8); }
.footer-top {
    max-width: 1100px; 
    margin: 0 auto;
    display: grid !important; 
    /* 4カラムを厳密に指定 */
    grid-template-columns: 280px repeat(3, 1fr); 
    gap: 32px; 
    padding: 48px 24px 36px;
    /* 要素を左から順に強制的に並べる設定 */
    grid-auto-flow: row; 
}

/* INFO（おそらく4番目の.footer-col）を明示的に4列目に指定 */
.footer-col:last-of-type {
    grid-column: 4;
    grid-row: 1; /* 1行目をキープ */
}
.footer-brand .footer-tagline {
    font-size: 0.72rem; color: var(--accent-light); margin-bottom: 12px; display: block;
}
.footer-brand .footer-desc {
    font-size: 0.78rem; color: rgba(250,246,242,.6); line-height: 1.7; display: block;
}
.footer-col h3 {
    font-size: 0.8rem; font-weight: 700;
    color: var(--cream); margin-bottom: 12px; letter-spacing: 0.06em;
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { font-size: 0.78rem; color: rgba(250,246,242,.6); transition: color .2s; }
.footer-col a:hover { color: var(--accent-light); }
.footer-bottom {
    border-top: 1px solid rgba(250,246,242,.1);
    padding: 18px 24px; text-align: center;
}
.footer-links {
    display: flex; justify-content: center; gap: 20px;
    margin-bottom: 10px; flex-wrap: wrap; padding: 0; list-style: none;
}
.footer-links a { font-size: 0.75rem; color: rgba(250,246,242,.5); }
.footer-links a:hover { color: var(--accent-light); }
.footer-bottom p { font-size: 0.75rem; color: rgba(250,246,242,.4); }

/* ============================================================
   パンくずリスト
   ============================================================ */
.breadcrumb {
    max-width: 1100px; margin: 0 auto;
    padding: 12px 24px;
    font-size: 0.78rem; color: var(--text-sub);
    display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
}
.breadcrumb a { color: var(--accent); }
.breadcrumb span { color: var(--text-sub); }

/* ============================================================
   個別記事ページ
   ============================================================ */
.article-header { padding: 32px 24px 24px; max-width: 1100px; margin: 0 auto; }
.article-cat-label {
    font-size: 0.75rem; font-weight: 700;
    color: var(--accent); letter-spacing: 0.06em;
    margin-bottom: 12px; display: block;
}
.article-title {
    font-size: 1.8rem; font-weight: 800;
    line-height: 1.4; color: var(--brown-dark); margin-bottom: 16px;
}
.article-meta {
    display: flex; gap: 16px; align-items: center;
    font-size: 0.78rem; color: var(--text-sub); flex-wrap: wrap;
}
.article-eyecatch {
    max-width: 1100px; margin: 0 auto 32px;
    padding: 0 24px;
}
.article-eyecatch img { border-radius: 8px; width: 100%; }
.article-body {
    font-size: 1rem; line-height: 1.85;
    color: var(--text-main);
}
.article-body h2 {
    font-size: 1.3rem; font-weight: 800;
    color: var(--brown-dark);
    margin: 2em 0 1em;
    padding: 12px 16px;
    border-left: 4px solid var(--accent);
    background: var(--cream-mid);
    border-radius: 0 4px 4px 0;
}
.article-body h3 {
    font-size: 1.1rem; font-weight: 700;
    color: var(--brown-dark);
    margin: 1.5em 0 0.8em;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--cream-dark);
}
.article-body p { margin-bottom: 1.2em; }
.article-body ul, .article-body ol { margin: 1em 0 1.2em 1.5em; }
.article-body li { margin-bottom: 0.5em; }

/* 関連記事 */
.related-posts { padding: 40px 24px; background: var(--cream-mid); }
.related-posts .section-inner { max-width: 1100px; margin: 0 auto; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }

/* ============================================================
   アーカイブページ
   ============================================================ */
.archive-header {
    background: var(--brown-dark); color: white;
    padding: 40px 24px;
    text-align: center;
}
.archive-header h1 { font-size: 1.6rem; font-weight: 800; }
.archive-header p { font-size: 0.88rem; color: var(--accent-light); margin-top: 8px; }
.archive-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* ページネーション */
.pagination {
    display: flex; justify-content: center; gap: 8px;
    margin-top: 40px; flex-wrap: wrap;
}
.pagination a, .pagination span {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    border-radius: 4px; font-size: 0.9rem; font-weight: 600;
    border: 1px solid var(--cream-dark);
    background: white; color: var(--text-sub);
    transition: all .2s;
}
.pagination .current {
    background: var(--accent); color: white; border-color: var(--accent);
}
.pagination a:hover { background: var(--cream-mid); }

/* ============================================================
   検索ページ
   ============================================================ */
.search-header {
    background: var(--cream-mid);
    padding: 40px 24px; text-align: center;
}
.search-header h1 { font-size: 1.4rem; font-weight: 800; color: var(--brown-dark); }
.search-header p { font-size: 0.88rem; color: var(--text-sub); margin-top: 8px; }
.search-form-wrap {
    max-width: 500px; margin: 20px auto 0;
    display: flex; gap: 8px;
}
.search-form-wrap input {
    flex: 1; padding: 10px 16px;
    border: 1px solid var(--cream-dark);
    border-radius: 4px; font-size: 0.9rem;
    outline: none;
}
.search-form-wrap button {
    background: var(--accent); color: white;
    border: none; border-radius: 4px;
    padding: 10px 20px; font-size: 0.9rem;
    cursor: pointer; font-weight: 600;
}

/* ============================================================
   レスポンシブ対応
   ============================================================ */
@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; }
    .hero-sub { flex-direction: row; }
    .article-grid { grid-template-columns: repeat(2, 1fr); }
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .main-with-sidebar { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .footer-top { grid-template-columns: 1fr 1fr; }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
    .archive-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .header-inner { padding: 12px 16px; }
    .site-nav { display: none; }
    .hero-main { padding: 24px 20px; }
    .hero-main h2 { font-size: 1.4rem; }
    .hero-sub { flex-direction: column; }
    .section { padding: 32px 16px; }
    .article-grid { grid-template-columns: 1fr; }
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .feature-grid { grid-template-columns: 1fr; }
    .footer-top { grid-template-columns: 1fr; gap: 20px; padding: 32px 16px; }
    .article-title { font-size: 1.3rem; }
    .related-grid { grid-template-columns: 1fr; }
    .archive-grid { grid-template-columns: 1fr; }
}
