/* Korehoshi Core: 商品カード（[kh_item] [kh_items] kh/item kh/items）・コラム一覧（[kh_posts]） */
.kh-items {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 20px;
	margin: 24px 0;
}
.kh-items .kh-item { margin: 0; }

.kh-item {
	margin: 24px 0;
}
.kh-item__link {
	display: flex;
	gap: 16px;
	align-items: center;
	padding: 16px;
	background: #fff;
	border: 2px solid #59c2d8;
	border-radius: 12px;
	color: inherit;
	text-decoration: none !important;
	transition: box-shadow .2s;
}
.kh-item__link:hover { box-shadow: 0 4px 14px rgba(89, 194, 216, .35); }
.kh-items .kh-item__link { flex-direction: column; align-items: stretch; height: 100%; }
.kh-item__img {
	flex: 0 0 140px;
	margin: 0;
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: 8px;
}
.kh-item__img img { width: 100%; height: 100%; object-fit: cover; }
.kh-items .kh-item__img { flex: none; }
.kh-item__body { flex: 1; min-width: 0; }
.kh-item__label {
	display: inline-block;
	margin-bottom: 6px;
	padding: 2px 10px;
	background: #ffdf4d;
	border-radius: 100px;
	font-size: 1.2rem;
	font-weight: bold;
}
.kh-item__name { margin: 0 0 6px; font-weight: bold; line-height: 1.5; }
.kh-item__price { margin: 0 0 6px; color: #ff5267; font-weight: bold; }
.kh-item__price small { color: #333; font-weight: normal; }
.kh-item__ship { margin: -2px 0 8px; font-size: .85em; font-weight: bold; color: #333; }
.kh-item__ship small { margin-left: 4px; font-size: .85em; font-weight: normal; color: #777; }
.kh-item__comment { margin: 0 0 8px; font-size: .9em; line-height: 1.6; }
.kh-item__btn {
	display: inline-block;
	padding: 6px 18px;
	background: #59c2d8;
	border-radius: 100px;
	color: #fff;
	font-size: .9em;
	font-weight: bold;
}
@media (max-width: 600px) {
	.kh-item__link { flex-direction: column; align-items: stretch; }
	.kh-item__img { flex: none; }
}

/* コラム一覧（[kh_posts]）。PC は 3 列に固定（以前は auto-fill で、3 本だと左に寄っていた）、
   スマホは画像を左に置いた 1 列のリスト（2 列にすると 3 本のとき 1 本が余るのでしない）（COCORO Pulse. の関連記事と同じ形） */
.kh-posts {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	margin: 24px 0;
}

.kh-posts__item {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 4px 18px rgba(89, 194, 216, 0.14);
	color: inherit;
	display: block;
	overflow: hidden;
	text-decoration: none !important;
	transition: box-shadow .25s, transform .25s;
}
.kh-posts__item:hover {
	box-shadow: 0 8px 26px rgba(89, 194, 216, 0.24);
	opacity: 1;
	transform: translateY(-3px);
}
.kh-posts__img {
	aspect-ratio: 16 / 9;
	margin: 0;
	overflow: hidden;
}
.kh-posts__img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.kh-posts__item:hover .kh-posts__img img { transform: scale(1.04); }
.kh-posts__title {
	color: #333;
	font-size: 1.5rem;
	font-weight: bold;
	line-height: 1.6;
	margin: 0;
	padding: 12px 14px 16px;
}
.kh-posts__item:hover .kh-posts__title { color: #1d4b88; }
@media (max-width: 959px) {
	.kh-posts { gap: 16px; }
	.kh-posts__title { font-size: 1.4rem; padding: 10px 12px 14px; }
}
@media (max-width: 768px) {
	.kh-posts { grid-template-columns: minmax(0, 1fr); gap: 0; margin: 16px 0; }
	.kh-posts + .kh-posts { margin-top: -16px; }
	.kh-posts__item {
		align-items: center;
		background: none;
		border-bottom: 1px solid #e3f2f6;
		border-radius: 0;
		box-shadow: none;
		display: grid;
		gap: 12px;
		grid-template-columns: 112px minmax(0, 1fr);
		padding: 12px 0;
	}
	.kh-posts__item:hover { box-shadow: none; transform: none; }
	.kh-posts__img { border-radius: 8px; }
	.kh-posts__title { font-size: 1.4rem; line-height: 1.55; padding: 0; }
}

/* 横に並べる数の指定（[kh_items columns="3"]・kh/items） */
.kh-items--cols-2 { grid-template-columns: repeat(2, 1fr); }
.kh-items--cols-3 { grid-template-columns: repeat(3, 1fr); }
.kh-items--cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 768px) {
	.kh-items--cols-3,
	.kh-items--cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
	.kh-items--cols-2,
	.kh-items--cols-3,
	.kh-items--cols-4 { grid-template-columns: 1fr; }
}

/* 商品の情報が取れないときの簡易カード（商品ページへのリンクだけ） */
.kh-item--simple .kh-item__link { border-style: dashed; }
.kh-item--simple .kh-item__name { font-weight: normal; }

/* 販売終了・非公開の商品（リンクなし） */
.kh-item--soldout .kh-item__link {
	background: #f6f6f6;
	border-color: #ccc;
	cursor: default;
}
.kh-item--soldout .kh-item__link:hover { box-shadow: none; }
.kh-item--soldout .kh-item__name { color: #777; }
.kh-item--soldout .kh-item__label { background: #e5e5e5; color: #666; }
.kh-item__status {
	margin: 0;
	color: #666;
	font-size: .9em;
	font-weight: bold;
}
