/**
 * 商品カード共通スタイル — product-card / product-grid 両ブロックで使用
 * 読み込み: product-card.php から wp_enqueue_scripts + enqueue_block_editor_assets
 */

/* ============================================
   SWELLスタイルリセット（カード内）
   ============================================ */
.product-card h2,
.product-card .product-card__title,
.product-card .product-card__body h3 {
	background: none !important;
	border: none !important;
	padding: 0 !important;
	margin: 0 0 8px !important;
	position: static !important;
}

.product-card h2::before,
.product-card h2::after,
.product-card .product-card__title::before,
.product-card .product-card__title::after,
.product-card .product-card__body h3::before,
.product-card .product-card__body h3::after {
	display: none !important;
	content: none !important;
	width: 0 !important;
	height: 0 !important;
	background: none !important;
}

.product-card .product-card__description,
.product-card .product-card__body p {
	margin-top: 0 !important;
	margin-bottom: 12px !important;
}

.product-card .product-card__footer p,
.product-card .product-card__price {
	margin: 0 !important;
}

/* ============================================
   カード
   ============================================ */
.product-card {
	display: flex;
	flex-direction: column;
	background: rgba(240, 249, 255, 0.5);
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
	text-decoration: none;
	color: inherit;
	position: relative;
	height: 100%;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
	transform: scale(1.03);
	box-shadow: 0 20px 40px rgba(0, 119, 182, 0.2);
}

/* ============================================
   画像
   ============================================ */
.product-card__image {
	position: relative;
	overflow: hidden;
}

.product-card__image img {
	width: 100%;
	height: auto;
	display: block;
	object-fit: cover;
	transition: transform 0.5s ease;
}

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

.product-card--featured .product-card__image img {
	aspect-ratio: 4 / 3;
}

/* グリッド内画像アスペクト比 */
.product-grid-items .product-card__image img {
	aspect-ratio: 4 / 3;
}

/* ============================================
   バッジ
   ============================================ */
.product-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	display: inline-block;
	padding: 4px 12px;
	border-radius: 4px;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.05em;
	color: #ffffff;
	z-index: 1;
	margin: 0;
}

.product-card--featured .product-badge {
	top: 16px;
	left: 16px;
}

.product-badge--accent {
	background-color: #22d3ee;
}

.product-badge--primary {
	background-color: #026aa2;
}

/* ============================================
   テキスト
   ============================================ */
.product-card__body {
	padding: 16px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.product-card--featured .product-card__body {
	padding: 24px;
}

.product-card__title {
	font-size: 1.125rem;
	font-weight: 700;
	margin: 0 0 8px;
	line-height: 1.4;
	color: #065986;
	letter-spacing: 0.025em;
}

.product-card--featured .product-card__title {
	font-size: 1.5rem;
}

.product-card__description {
	font-size: 0.875rem;
	color: #4b5563;
	line-height: 1.6;
	margin: 0 0 12px;
	flex: 1;
	min-height: 0;
	overflow: hidden;
}

/* ============================================
   フッター（価格 + ボタン）
   ============================================ */
.product-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: auto;
	gap: 12px;
}

.product-card__price {
	margin: 0;
}

.product-card__price-value {
	font-size: 1.125rem;
	font-weight: 700;
	color: #0086c9;
}

.product-card--featured .product-card__price-value {
	font-size: 1.5rem;
}

.product-card__price-tax {
	font-size: 0.75rem;
	font-weight: 400;
	color: #6b7280;
	margin-left: 2px;
}

/* ============================================
   ボタン（テキストリンク + 矢印）
   ============================================ */
.product-card__button {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: #0ba5ec;
	font-size: 0.875rem;
	font-weight: 500;
	white-space: nowrap;
	transition: transform 0.2s ease;
}

.product-card__button-arrow {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	transition: transform 0.2s ease;
}

.product-card:hover .product-card__button {
	color: #0086c9;
}

.product-card:hover .product-card__button-arrow {
	transform: translateX(4px);
}

/* ============================================
   単体カードブロック用ラッパー
   ============================================ */
.flavor-product-card {
	max-width: 400px;
}
