/**
 * archive-pages.css
 * kawaremake — Monotone 2026
 *
 * 目的:
 *   Astra親テーマ・WooCommerce・Elementorグローバルが当ててしまう
 *   見出し書体/色を、kawaremakeブランド方針(Yu Mincho/モノトーン)に揃える。
 *
 * 適用対象:
 *   - 各種アーカイブ (case-study, category, brand, woocommerce shop)
 *   - 商品シングル
 *   - case-study シングルの隠れH1問題
 *   - フッターCTA見出し(全ページ共通でElementorグローバルh2に負けている問題)
 *
 * 詳細度の戦略:
 *   Astra/WooCommerce/Elementor の詳細度・既存!important指定に勝つため、
 *   font-family/font-size/font-weight/color/text-transform に !important を
 *   付与する。代替として詳細度を上げる方針も検討したが、Astra側の!important
 *   指定(WooCommerce関連)を完全に超えるのは冗長になるため、本ファイル限定で
 *   許容する。
 *
 * バージョン履歴:
 *   1.0.0 (2026-04-30) 初版
 *   1.0.1 (2026-04-30) 微調整: font-weight/size を確実に効かせる、
 *                       text-transform: none、リンク色、区切り線レイアウト
 *   1.0.2 (2026-04-30) entry-title リンク色問題修正: セクション9の曖昧な
 *                       :not(.entry-title) 指定を削除、セクション11で
 *                       entry-title 内リンクを濃い色(#2C2826)に強制。
 *                       タイトル=主役、メタ=サブ情報の階層を明確化。
 */

/* =============================================================
 * 1. アーカイブ系 H1 (ミナ ペルホネン的・静謐な見出し)
 *    対象: /case-study/, /category/.../
 * ============================================================= */

.archive .ast-archive-title,
.archive.post-type-archive .page-title,
.archive.category .page-title,
body.archive header.page-header .page-title {
    font-family: var(--font-heading-ja, "Yu Mincho", YuMincho, "Hiragino Mincho ProN", serif) !important;
    font-size: 32px !important;
    font-weight: 400 !important;
    color: var(--color-text-primary, #2C2826) !important;
    letter-spacing: 0.08em !important;
    line-height: 1.5 !important;
    text-align: center !important;
    text-transform: none !important;
    margin: 0 0 24px 0 !important;
    padding: 0 !important;
    position: relative;
}

/* H1の上下に細い区切り線 (ロゴと同じ装飾) */
.archive .ast-archive-title::before,
.archive .ast-archive-title::after,
.archive.post-type-archive .page-title::before,
.archive.post-type-archive .page-title::after,
.archive.category .page-title::before,
.archive.category .page-title::after {
    content: "";
    display: block;
    width: 30px;
    height: 0;
    border-top: 0.5px solid var(--color-border-mid, #D4D0C7);
    margin-left: auto;
    margin-right: auto;
}

.archive .ast-archive-title::before,
.archive.post-type-archive .page-title::before,
.archive.category .page-title::before {
    margin-bottom: 28px;
}

.archive .ast-archive-title::after,
.archive.post-type-archive .page-title::after,
.archive.category .page-title::after {
    margin-top: 28px;
}

/* アーカイブ全体の上下余白(ヘッダーから見出しまで広めに、見出しから記事までは適度に) */
.archive header.page-header,
.archive .ast-archive-description {
    text-align: center;
    margin: 64px 0 40px 0;
    padding: 0;
}

/* description テキスト (もしあれば) */
.archive .ast-archive-description p {
    font-family: var(--font-body-ja, "Yu Gothic", YuGothic, sans-serif);
    font-size: 14px;
    color: var(--color-text-secondary, #6B6760);
    letter-spacing: 0.04em;
    line-height: 1.9;
    max-width: 540px;
    margin: 0 auto;
}


/* =============================================================
 * 2. WooCommerce アーカイブ系 H1
 *    対象: /shop/, /case-study/brand/.../
 *    body class: .ast-woo-shop-archive
 * ============================================================= */

.ast-woo-shop-archive .woocommerce-products-header__title,
.ast-woo-shop-archive .woocommerce-products-header .page-title,
body.archive .woocommerce-products-header__title,
body.woocommerce .woocommerce-products-header__title {
    font-family: var(--font-heading-ja, "Yu Mincho", YuMincho, "Hiragino Mincho ProN", serif) !important;
    font-size: 32px !important;
    font-weight: 400 !important;
    color: var(--color-text-primary, #2C2826) !important;
    letter-spacing: 0.08em !important;
    line-height: 1.5 !important;
    text-align: center !important;
    text-transform: none !important;
    margin: 0 0 24px 0 !important;
    padding: 0 !important;
    position: relative;
    width: 100%;
    display: block;
}

.ast-woo-shop-archive .woocommerce-products-header,
body.archive .woocommerce-products-header,
body.woocommerce .woocommerce-products-header {
    text-align: center;
    margin: 64px 0 40px 0;
    padding: 0;
    display: block;
    background: transparent;
}

/* WooCommerce H1の上下区切り線 */
.ast-woo-shop-archive .woocommerce-products-header__title::before,
.ast-woo-shop-archive .woocommerce-products-header__title::after,
body.woocommerce .woocommerce-products-header__title::before,
body.woocommerce .woocommerce-products-header__title::after {
    content: "";
    display: block;
    width: 30px;
    height: 0;
    border-top: 0.5px solid var(--color-border-mid, #D4D0C7);
    margin-left: auto;
    margin-right: auto;
}

.ast-woo-shop-archive .woocommerce-products-header__title::before,
body.woocommerce .woocommerce-products-header__title::before {
    margin-bottom: 28px;
}

.ast-woo-shop-archive .woocommerce-products-header__title::after,
body.woocommerce .woocommerce-products-header__title::after {
    margin-top: 28px;
}


/* =============================================================
 * 3. アーカイブ内の記事カード見出し (.entry-title)
 *    対象: /case-study/, /category/.../ の各記事タイトル
 * ============================================================= */

.archive .entry-title,
.archive .entry-title a,
.archive .ast-blog-single-element.entry-title,
.archive .ast-blog-single-element.entry-title a {
    font-family: var(--font-heading-ja, "Yu Mincho", YuMincho, "Hiragino Mincho ProN", serif) !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    color: var(--color-text-primary, #2C2826) !important;
    letter-spacing: 0.04em !important;
    line-height: 1.7 !important;
    text-decoration: none !important;
    text-transform: none !important;
}

.archive .entry-title a:hover,
.archive .ast-blog-single-element.entry-title a:hover {
    color: var(--color-text-secondary, #6B6760) !important;
    text-decoration: none !important;
}


/* =============================================================
 * 4. WooCommerce 商品カード H3
 *    対象: /shop/, ブランド別アーカイブの商品リスト
 * ============================================================= */

.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product h3,
.woocommerce ul.products li.product h2,
.woocommerce-page ul.products li.product .woocommerce-loop-product__title,
.archive .jet-listing-dynamic-field h3,
.archive h3.jet-listing-dynamic-field__content,
body.woocommerce h3.jet-listing-dynamic-field__content {
    font-family: var(--font-heading-ja, "Yu Mincho", YuMincho, "Hiragino Mincho ProN", serif) !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    color: var(--color-text-primary, #2C2826) !important;
    letter-spacing: 0.04em !important;
    line-height: 1.6 !important;
    text-transform: none !important;
}


/* =============================================================
 * 5. 商品シングルページ H1 (.product_title)
 *    対象: /product/.../
 * ============================================================= */

.single-product .product_title,
.single-product .product_title.entry-title,
body.single-product .product_title,
body.single-product h1.product_title {
    font-family: var(--font-heading-ja, "Yu Mincho", YuMincho, "Hiragino Mincho ProN", serif) !important;
    font-size: 28px !important;
    font-weight: 400 !important;
    color: var(--color-text-primary, #2C2826) !important;
    letter-spacing: 0.06em !important;
    line-height: 1.5 !important;
    text-transform: none !important;
    margin: 0 0 24px 0 !important;
}


/* =============================================================
 * 6. 商品シングル内 Elementor 見出し (H2/H3)
 *    対象: 「この作業の施工事例」「よくある質問」「関連サービス」など
 * ============================================================= */

body.single-product .elementor-widget-heading h2.elementor-heading-title,
body.single-product .elementor-widget-heading h3.elementor-heading-title {
    font-family: var(--font-heading-ja, "Yu Mincho", YuMincho, "Hiragino Mincho ProN", serif) !important;
    font-weight: 400 !important;
    color: var(--color-text-primary, #2C2826) !important;
    letter-spacing: 0.06em !important;
    text-transform: none !important;
}

body.single-product .elementor-widget-heading h2.elementor-heading-title {
    font-size: 24px !important;
    line-height: 1.7 !important;
}

body.single-product .elementor-widget-heading h3.elementor-heading-title {
    font-size: 18px !important;
    line-height: 1.7 !important;
}


/* =============================================================
 * 7. case-study シングルの「隠れH1」問題対策
 *    SEO上、H1が2つあるのは良くない。Astra標準の.entry-titleは非表示にし、
 *    .kwrm-case-hero__title (Cormorant) を主役にする。
 * ============================================================= */

.single-case-study .entry-title,
.case-study-template-default .entry-title {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}


/* =============================================================
 * 8. フッターCTA見出し (.kwrm-footer-cta__heading)
 *    対象: 全ページ共通
 * ============================================================= */

body.kwrm-business-set .kwrm-footer-cta__heading,
body .kwrm-footer-cta .kwrm-footer-cta__heading {
    font-family: "Yu Mincho", YuMincho, "Hiragino Mincho ProN", serif;
    font-size: 28px;
    font-weight: 400;
    color: var(--color-text-primary, #2C2826);
    letter-spacing: 0.06em;
    line-height: 1.6;
    text-transform: none;
}


/* =============================================================
 * 9. アーカイブ・ショップ系のリンク色 + メタ情報
 *    Astra の青色 (#0170B9) / 紺 (#3C4B71) を完全モノトーンに
 *    NOTE: entry-title 内のリンクは対象外。タイトル=主役なので
 *          セクション3 / セクション11で濃い色を強制する。
 * ============================================================= */

/* 投稿者リンク・続きを読む等のメタ情報リンク */
.archive .post-meta a,
.archive .post-meta a:visited,
.archive .ast-author-name a,
.archive .ast-author-details a,
.archive a.read-more,
.archive .read-more,
.archive .read-more a,
.archive p.ast-blog-single-element.ast-read-more-co a,
.archive .post-thumb-img-content.post-thumb a {
    color: var(--color-text-tertiary, #888780) !important;
    text-decoration: none !important;
}

.archive .post-meta a:hover,
.archive .ast-author-details a:hover,
.archive a.read-more:hover,
.archive p.ast-blog-single-element.ast-read-more-co a:hover {
    color: var(--color-text-primary, #2C2826) !important;
    text-decoration: underline !important;
}

/* 投稿者名・日付・カテゴリのテキスト全般 */
.archive .post-meta,
.archive .ast-author-details,
.archive .ast-blog-meta-container {
    font-family: var(--font-body-ja, "Yu Gothic", YuGothic, sans-serif);
    font-size: 12px !important;
    color: var(--color-text-tertiary, #888780) !important;
    letter-spacing: 0.04em;
}


/* =============================================================
 * 11. entry-title 内のリンクを再強制(セクション9以後の上書き対策)
 *     アーカイブの記事タイトル = 主役なので、必ず #2C2826(濃い色)に。
 *     ファイル末尾(セクション10より後)に置くことで CSS 後勝ちを利用。
 * ============================================================= */

body.archive h2.entry-title a,
body.archive h2.entry-title a:link,
body.archive h2.entry-title a:visited,
body.archive .entry-title a {
    color: var(--color-text-primary, #2C2826) !important;
    text-decoration: none !important;
}

body.archive h2.entry-title a:hover,
body.archive .entry-title a:hover {
    color: var(--color-text-secondary, #6B6760) !important;
    text-decoration: none !important;
}


/* =============================================================
 * 10. レスポンシブ調整 (スマホ)
 * ============================================================= */

@media (max-width: 768px) {
    .archive .ast-archive-title,
    .archive.post-type-archive .page-title,
    .archive.category .page-title,
    body.archive header.page-header .page-title,
    .ast-woo-shop-archive .woocommerce-products-header__title,
    body.woocommerce .woocommerce-products-header__title {
        font-size: 22px !important;
        letter-spacing: 0.06em !important;
    }

    .archive header.page-header,
    .archive .ast-archive-description,
    .ast-woo-shop-archive .woocommerce-products-header,
    body.archive .woocommerce-products-header,
    body.woocommerce .woocommerce-products-header {
        margin: 40px 0 24px 0;
    }

    .archive .ast-archive-title::before,
    .archive.post-type-archive .page-title::before,
    .archive.category .page-title::before,
    .ast-woo-shop-archive .woocommerce-products-header__title::before,
    body.woocommerce .woocommerce-products-header__title::before {
        margin-bottom: 20px;
    }

    .archive .ast-archive-title::after,
    .archive.post-type-archive .page-title::after,
    .archive.category .page-title::after,
    .ast-woo-shop-archive .woocommerce-products-header__title::after,
    body.woocommerce .woocommerce-products-header__title::after {
        margin-top: 20px;
    }

    .archive .entry-title,
    .archive .entry-title a {
        font-size: 16px !important;
    }

    .single-product .product_title,
    body.single-product h1.product_title {
        font-size: 22px !important;
    }

    body.kwrm-business-set .kwrm-footer-cta__heading {
        font-size: 22px;
    }

    body.single-product .elementor-widget-heading h2.elementor-heading-title {
        font-size: 20px !important;
    }
}