/* =========================================================
 * 商品カード・関連記事カード
 * 表と同じく、白地・グレーの線・ピンク（#f297ad）の★でブログになじませています。
 * ボタンは style.css の .dtp-btn / .dtp-btn-pink を使います。
 * ======================================================= */

/* ---------- 商品カード ----------
 * 上の段：画像｜ブランド・商品名・★・価格
 * 下の段：コメントとボタンを幅いっぱいに（画像の下が空かないように）
 * .dtp-pcard__body は display: contents で、中身を直接グリッドに並べます。 */
.dtp-pcard {
	display: grid;
	grid-template-columns: 160px minmax(0, 1fr);
	column-gap: 20px;
	align-items: center;
	margin: 24px 0;
	padding: 20px;
	border: var(--dtp-pc-bw, 1px) var(--dtp-pc-bs, solid) var(--dtp-pc-border, #dcdcdc);
	border-radius: var(--dtp-pc-radius, 0);
	background: #fff;
	color: #333;
	line-height: 1.6;
}

.dtp-pcard__body {
	display: contents;
}

.dtp-pcard__img {
	display: block;
	grid-column: 1;
	grid-row: 1;
}

.dtp-pcard__info {
	grid-column: 2;
	grid-row: 1;
	min-width: 0;
}

.dtp-pcard__comment,
.dtp-pcard__action {
	grid-column: 1 / -1;
}

/* 画像がないとき・商品ページが読めなかったとき */
.dtp-pcard:not(:has(.dtp-pcard__img)) .dtp-pcard__info,
.dtp-pcard.is-fallback .dtp-pcard__title {
	grid-column: 1 / -1;
}

.dtp-pcard__img img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	transition: opacity 0.2s;
}

.dtp-pcard__img:hover img {
	opacity: 0.8;
}

.dtp-pcard p {
	margin: 0;
}

.dtp-pcard__brand {
	margin-bottom: 2px !important;
	font-size: 12px;
	color: var(--dtp-pc-brand, #888);
	letter-spacing: 0.05em;
}

.dtp-pcard__title {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.5;
}

.dtp-pcard__title a {
	color: var(--dtp-pc-title, #333);
	text-decoration: none;
}

.dtp-pcard__title a:hover {
	text-decoration: underline;
}

/* 評価：★を0.1刻みで塗る */
.dtp-pcard__rating {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 6px;
	font-size: 13px;
}

.dtp-stars {
	--dtp-star: var(--dtp-pc-star, #f297ad);
	position: relative;
	display: inline-block;
	font-size: 15px;
	line-height: 1;
	letter-spacing: 1px;
	color: #ddd;
}

.dtp-stars::before {
	content: "★★★★★";
}

.dtp-stars::after {
	content: "★★★★★";
	position: absolute;
	top: 0;
	left: 0;
	width: calc(var(--dtp-rate, 0) / 5 * 100%);
	overflow: hidden;
	white-space: nowrap;
	color: var(--dtp-star);
}

.dtp-pcard__rating-num {
	font-weight: 700;
}

.dtp-pcard__rating-count {
	color: #888;
	font-size: 12px;
}

.dtp-pcard__price {
	margin-top: 6px !important;
	color: var(--dtp-pc-price, inherit);
	font-size: 20px;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.dtp-pcard__yen {
	margin-left: 1px;
	font-size: 13px;
}

.dtp-pcard__tax {
	margin-left: 4px;
	font-size: 11px;
	font-weight: 400;
	color: #888;
}

.dtp-pcard__comment {
	margin-top: 16px !important;
	padding: 8px 12px;
	background: var(--dtp-pc-comment-bg, #f7f7f7);
	font-size: 13px;
	line-height: 1.7;
}

.dtp-pcard__action {
	margin-top: 16px !important;
	text-align: center;
}

/* ボタンの色：サイドバーで選んだ色 → なければ「黒／ピンク」の設定どおり */
.dtp-pcard__action .dtp-btn {
	background: var(--dtp-btn-bg, #333);
}

.dtp-pcard__action .dtp-btn-pink {
	background: var(--dtp-btn-bg, var(--dtp-em, #f297ad));
}

.dtp-pcard__action .dtp-btn,
.dtp-pcard__action .dtp-btn-pink {
	color: var(--dtp-btn-fg, #fff);
	border-radius: var(--dtp-pc-btn-radius, 6px);
	min-width: 12em;
	padding: 10px 24px;
	font-size: 13px;
}

/* 商品ページが読めなかったとき */
.dtp-pcard.is-fallback {
	padding: 16px 20px;
}

@media (max-width: 600px) {
	.dtp-pcard {
		grid-template-columns: 100px minmax(0, 1fr);
		column-gap: 14px;
		padding: 14px;
	}

	.dtp-pcard__title {
		font-size: 14px;
	}

	.dtp-pcard__price {
		font-size: 17px;
	}

	.dtp-pcard__action .dtp-btn,
	.dtp-pcard__action .dtp-btn-pink {
		display: block;
		min-width: 0;
	}
}

/* ---------- 関連記事カード ---------- */
.dtp-postcards {
	margin: 24px 0;
}

.dtp-postcards__label {
	display: inline-block;
	margin: 0 0 8px !important;
	padding: 2px 12px;
	border-radius: var(--dtp-post-label-radius, 0);
	background: var(--dtp-post-label-bg, #333);
	color: var(--dtp-post-label-fg, #fff);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.05em;
}

.dtp-postcards__items {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.dtp-postcard {
	display: flex;
	gap: 16px;
	align-items: center;
	padding: 14px;
	border: var(--dtp-post-bw, 1px) var(--dtp-post-bs, solid) var(--dtp-post-border, #dcdcdc);
	border-radius: var(--dtp-post-radius, 0);
	overflow: hidden;
	background: #fff;
	color: var(--dtp-post-title, #333);
	text-decoration: none !important;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.dtp-postcard:hover {
	border-color: #aaa;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.dtp-postcard__img {
	flex: 0 0 180px;
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #f2f2f2;
}

.dtp-postcard__img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s;
}

.dtp-postcard:hover .dtp-postcard__img img {
	transform: scale(1.04);
}

.dtp-postcard__noimg {
	display: block;
	width: 100%;
	height: 100%;
}

.dtp-postcard__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.dtp-postcard__cat {
	align-self: flex-start;
	padding: 0 8px;
	border: 1px solid var(--dtp-post-cat, #ccc);
	font-size: 11px;
	line-height: 1.7;
	color: var(--dtp-post-cat, #666);
}

.dtp-postcard__title {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.5;
}

.dtp-postcard__excerpt {
	font-size: 12px;
	line-height: 1.7;
	color: #666;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.dtp-postcard__date {
	font-size: 11px;
	color: #999;
}

/* タイル（2〜3列） */
.dtp-postcards.is-grid .dtp-postcards__items {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 16px;
}

.dtp-postcards.is-grid .dtp-postcard {
	flex-direction: column;
	align-items: stretch;
	gap: 10px;
	padding: 0 0 12px;
}

.dtp-postcards.is-grid .dtp-postcard__img {
	flex-basis: auto;
	width: 100%;
}

.dtp-postcards.is-grid .dtp-postcard__body {
	padding: 0 12px;
}

.dtp-postcards.is-grid .dtp-postcard__title {
	font-size: 14px;
}

@media (max-width: 600px) {
	.dtp-postcard {
		gap: 12px;
		padding: 10px;
		align-items: flex-start;
	}

	.dtp-postcard__img {
		flex-basis: 120px;
	}

	.dtp-postcard__title {
		font-size: 14px;
	}

	.dtp-postcards.is-grid .dtp-postcards__items {
		grid-template-columns: 1fr 1fr;
		gap: 10px;
	}
}
