@charset "utf-8";

/**
 * 投稿一覧、投稿詳細、検索結果の投稿領域。
 */

/* --------------------------------------------------------------------------
 * 「小知识」トップとカテゴリー
 * ----------------------------------------------------------------------- */

.category h1 {
	margin-bottom: 1em;
	font-size: 1.5em;
	text-align: center;
}

.page-tips .entry-title {
	display: none;
}

.page-tips .entry-content a:focus {
	outline-offset: 0;
}

/* タクソノミー一覧ブロックをPC4列、モバイル2列で表示する */
.page-tips .tips-cat-grid ul.zci-taxonomy-list.zci-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 18px;
}

.page-tips .wp-block-post-featured-image img {
	margin-bottom: 1em;
}

.page-tips .entry-content a.zci-link {
	text-decoration: none;
}

.page-tips .zci-term-name {
	margin-bottom: 20px;
	font-weight: 400;
}

.page-tips .zci-term-count {
	margin-left: 0;
	padding: 0;
	border-radius: 0;
	background: var(--jy-color-surface);
	font-size: 1em;
	vertical-align: baseline;
}

@media (max-width: 767px) {
	.page-tips .tips-cat-grid ul.zci-taxonomy-list.zci-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}
}

/* Storefrontが表示する投稿者情報はサイト上で使用しない */
.blog .post-author,
.single-post .post-author {
	display: none;
}

/* 縦長・横長の動画を本文幅からはみ出さず表示する */
body.blog .site-main .entry-content figure.wp-block-video,
body.single-post .site-main .entry-content figure.wp-block-video {
	display: flex;
	justify-content: center;
	width: 100%;
	max-width: clamp(280px, 92vw, 960px);
	margin: 16px auto;
}

body.blog .site-main .entry-content figure.wp-block-video video,
body.single-post .site-main .entry-content figure.wp-block-video video {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 78vh;
	border-radius: 12px;
	background: #000;
}

@media (min-width: 1024px) {
	body.blog .site-main .entry-content,
	body.single-post .site-main .entry-content,
	body.single-post .site-main header.entry-header,
	body.single-post .site-main .comments-area {
		max-width: 960px;
		margin-right: auto;
		margin-left: auto;
	}
}

/* --------------------------------------------------------------------------
 * 投稿一覧グリッド
 * 「全部笔记」、カテゴリー、検索結果で共用する。
 * ----------------------------------------------------------------------- */

.jy-posts-archive-meta {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	flex-wrap: wrap;
	gap: 1em;
	margin-bottom: 24px;
}

.jy-posts-archive-meta .jy-posts-sort-wrap {
	margin: 0;
}

.jy-posts-count {
	margin: 0;
	color: #6d6d6d;
	font-size: 14px;
	line-height: 1.4;
}

.jy-post-archive-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 32px 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.jy-post-archive-card {
	margin: 0;
	padding: 0;
	list-style: none;
}

.jy-post-archive-thumb {
	display: block;
	margin-bottom: 0.75em;
	overflow: hidden;
	aspect-ratio: 3 / 4;
	background: #f7f7f7;
}

.jy-post-archive-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.jy-post-archive-noimage {
	display: block;
	width: 100%;
	height: 100%;
}

.jy-post-archive-title {
	margin: 0 0 6px;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.5;
}

.jy-post-archive-title a {
	color: inherit;
	text-decoration: none;
}

/* Storefrontの本文リンク指定より詳細度を上げ、小知识トップの下線を解除する */
.page-tips .entry-content .jy-post-archive-title a {
	text-decoration: none;
}

.jy-post-archive-date {
	color: var(--jy-color-muted);
	font-size: 14px;
	line-height: 1.4;
}

/* 投稿一覧の並び替え */
.jy-posts-sort-wrap {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 8px;
}

.jy-posts-sort {
	min-width: 130px;
	padding: 10px 34px 10px 14px;
	border: 1px solid rgba(0, 0, 0, 0.14);
	border-radius: var(--jy-control-radius);
	background-color: var(--jy-color-surface);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%23666' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 12px 12px;
	color: var(--jy-color-text);
	font-size: 14px;
	line-height: 1.4;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
}

.jy-posts-sort:disabled {
	cursor: default;
	opacity: 0.6;
}

/* 投稿の追加読込ボタン */
.jy-posts-load-more-wrap {
	margin-top: 40px;
	text-align: center;
}

.jy-posts-load-more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 160px;
	min-height: 44px;
	padding: 10px 28px;
	border: 1px solid var(--jy-color-border);
	border-radius: 999px;
	background: var(--jy-color-surface);
	color: var(--jy-color-text);
	cursor: pointer;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.4;
	transition: opacity 0.2s ease;
}

.jy-posts-load-more:hover {
	opacity: 0.7;
}

.jy-posts-load-more:disabled {
	cursor: default;
	opacity: 0.5;
}

.jy-posts-load-more[hidden] {
	display: none;
}

@media (max-width: 767px) {
	.jy-posts-archive-meta {
		gap: 10px 1em;
	}

	.jy-post-archive-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px 14px;
	}

	.jy-posts-sort {
		min-width: 100px;
	}
}

/* --------------------------------------------------------------------------
 * 投稿詳細
 * ----------------------------------------------------------------------- */

.single-post .storefront-breadcrumb,
.single-post .entry-header {
	margin-bottom: 0;
}

/*
 * Storefrontが空の画像サイズ名で出力するアイキャッチだけを非表示にする。
 * 本文へ挿入した画像や関連記事のサムネイルは対象にしない。
 */
.single-post .entry-content > img.attachment-.wp-post-image {
	display: none;
}

.single-post h1 {
	font-size: 1.5em;
}

.single-post .entry-content p {
	max-width: 767px;
	margin: 0 auto;
}

@media (max-width: 767px) {
	.single-post h1,
	.single-post h2 {
		font-size: 1.2em;
	}
}

/* --------------------------------------------------------------------------
 * 関連投稿ショートコード
 * 商品詳細を含む任意の本文で使用できる投稿カード。
 * ----------------------------------------------------------------------- */

.jy-related-posts {
	margin-top: 40px;
	margin-bottom: 40px;
}

.jy-related-posts-title {
	margin-bottom: 0.5em;
	color: var(--jy-color-text);
	line-height: 1.4;
}

/* WooCommerceの商品説明タブ見出しより詳細度を上げ、従来の0.5emを維持する */
.woocommerce-tabs .panel h2.jy-related-posts-title:first-of-type {
	margin-bottom: 0.5em;
}

.jy-related-posts-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.jy-related-post-card {
	margin: 0;
	padding: 0;
}

.jy-related-post-card-inner {
	padding: 20px;
	background: var(--jy-color-surface);
}

@media (min-width: 768px) {
	.jy-related-posts-grid > .jy-related-post-card:nth-child(3n + 1) .jy-related-post-card-inner {
		padding-left: 0;
	}

	.jy-related-posts-grid > .jy-related-post-card:nth-child(3n) .jy-related-post-card-inner {
		padding-right: 0;
	}
}

.jy-related-post-featured-image {
	margin: 0 0 1em;
}

.jy-related-post-featured-image a,
.jy-related-post-featured-image img {
	display: block;
}

.jy-related-post-featured-image img {
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 4;
	object-fit: cover;
}

.jy-related-post-title {
	margin-top: 6px;
	margin-bottom: 0;
	font-size: 16px;
	line-height: 1.45;
}

.jy-related-post-title a {
	color: var(--jy-color-text);
	text-decoration: none;
}

.jy-related-post-date {
	margin-top: 0.3em;
	color: var(--jy-color-muted);
	font-size: 14px;
	line-height: 1.5;
}

@media (max-width: 767px) {
	.jy-related-posts {
		margin-top: 32px;
		margin-bottom: 32px;
	}

	.jy-related-posts-title {
		margin-bottom: 16px;
		font-size: 20px;
	}

	.jy-related-posts-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}

	.jy-related-post-card-inner {
		padding: 10px;
	}

	.jy-related-posts-grid > .jy-related-post-card:nth-child(odd) .jy-related-post-card-inner {
		padding-left: 0;
	}

	.jy-related-posts-grid > .jy-related-post-card:nth-child(even) .jy-related-post-card-inner {
		padding-right: 0;
	}
}

/* --------------------------------------------------------------------------
 * 商品と投稿の共通検索結果
 * ----------------------------------------------------------------------- */

.search .jy-search-header {
	margin-bottom: 32px;
	text-align: center;
}

.search .jy-search-header .page-title {
	font-size: 1.5em;
}

.search .jy-search-section {
	margin-top: 48px;
}

.search .jy-search-section:first-of-type {
	margin-top: 0;
}

.search .jy-search-section-title {
	margin-bottom: 1em;
	text-align: center;
}

.search .jy-search-products .storefront-sorting {
	margin-bottom: 24px;
}

.search .jy-search-posts-sort-form,
.search .jy-search-posts-count {
	margin: 0;
}

.search .jy-post-archive-grid {
	margin-left: 0;
	padding-left: 0;
	list-style: none;
}
