/* ==========================================================
   商品カードコンポーネント
   ========================================================== */

.ucs-product-card {
	background: #fff;
	border: 1px solid var(--wp--preset--color--border, #e5e7eb);
	border-radius: 12px;
	overflow: hidden;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
	position: relative;
	display: flex;
	flex-direction: column;
}

.ucs-product-card:hover {
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
}

/* ── ランクバッジ ── */
.ucs-product-card__rank {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 1;
}

.ucs-product-card__rank-badge {
	display: inline-block;
	font-size: 0.6875rem;
	font-weight: 700;
	padding: 3px 10px;
	border-radius: 20px;
	background: var(--wp--preset--color--primary, #4a7c6f);
	color: #fff;
}

.ucs-product-card--rank-1 .ucs-product-card__rank-badge {
	background: #e8a87c; /* アクセントオレンジ */
	color: #fff;
}
.ucs-product-card--rank-2 .ucs-product-card__rank-badge {
	background: #9ca3af;
	color: #fff;
}
.ucs-product-card--rank-3 .ucs-product-card__rank-badge {
	background: #b45309;
	color: #fff;
}

/* ── 画像エリア ── */
.ucs-product-card__image {
	aspect-ratio: 1;
	overflow: hidden;
	background: var(--wp--preset--color--bg-light, #f9fafb);
}

.ucs-product-card__image a {
	display: block;
	width: 100%;
	height: 100%;
}

.ucs-product-card__image img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: transform 0.2s ease;
}

.ucs-product-card:hover .ucs-product-card__image img {
	transform: scale(1.03);
}

.ucs-product-card__no-image {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--wp--preset--color--text-light, #9ca3af);
	font-size: 0.75rem;
}

/* ── ボディ ── */
.ucs-product-card__body {
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
}

/* ── ブランド ── */
.ucs-product-card__brand {
	font-size: 0.75rem;
	color: var(--wp--preset--color--text-muted, #6b7280);
	margin: 0;
}

/* ── タイトル ── */
.ucs-product-card__title {
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.5;
	margin: 0;
}

.ucs-product-card__title a {
	color: inherit;
	text-decoration: none;
}

.ucs-product-card__title a:hover {
	color: var(--wp--preset--color--primary, #4a7c6f);
}

/* ── スコア ── */
.ucs-product-card__score {
	display: flex;
	align-items: center;
}

/* ── 価格 ── */
.ucs-product-card__price {
	display: flex;
	align-items: baseline;
	gap: 6px;
	margin: 0;
}

.ucs-product-card__price-label {
	font-size: 0.75rem;
	color: var(--wp--preset--color--text-muted, #6b7280);
}

.ucs-product-card__price-value {
	font-size: 0.9375rem;
	font-weight: 700;
	color: var(--wp--preset--color--text-base, #374151);
}

/* ── 特徴リスト ── */
.ucs-product-card__features {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.ucs-product-card__features li {
	font-size: 0.8125rem;
	color: var(--wp--preset--color--text-muted, #6b7280);
	padding-left: 1em;
	position: relative;
}

.ucs-product-card__features li::before {
	content: '✓';
	position: absolute;
	left: 0;
	color: var(--wp--preset--color--primary, #4a7c6f);
	font-weight: 700;
}

/* ── おすすめ ── */
.ucs-product-card__recommended {
	font-size: 0.8125rem;
	color: var(--wp--preset--color--text-muted, #6b7280);
	margin: 0;
	border-left: 3px solid var(--wp--preset--color--primary-light, #6fa897);
	padding-left: 10px;
}

.ucs-product-card__recommended-label {
	font-weight: 600;
	color: var(--wp--preset--color--primary, #4a7c6f);
}

/* ── CTA ── */
.ucs-product-card__cta {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: auto;
	padding-top: 8px;
}

/* ── グリッドレイアウト ── */
.ucs-product-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 24px;
}

@media (max-width: 640px) {
	.ucs-product-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}

	.ucs-product-card__body {
		padding: 12px;
	}
}
