/* ============================================
   海西聚匠图片卡片样式（图片+标题）
   文件：/css/artisan-card.css
   布局：2列3行
   ============================================ */

/* ----- 卡片网格容器：2列 ----- */
.artisan-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
	margin-top: 10px;
}

/* ----- 单个卡片 ----- */
.artisan-card {
	background: #fff;
	border-radius: 10px;
	overflow: hidden;
	border: 1px solid #f0f0f0;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.artisan-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 6px 24px rgba(0,0,0,0.10);
}
.artisan-link {
	display: block;
	text-decoration: none;
	color: inherit;
}

/* ----- 图片（3:2比例） ----- */
.artisan-img {
	position: relative;
	width: 100%;
	padding-bottom: 66.67%;
	overflow: hidden;
	background: #f5f5f5;
}
.artisan-img img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}
.artisan-card:hover .artisan-img img {
	transform: scale(1.06);
}

/* ----- 标题 ----- */
.artisan-title {
	padding: 12px 14px 14px 14px;
	font-size: 15px;
	font-weight: 600;
	color: #333;
	line-height: 1.5;
	text-align: center;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	max-height: 3em;
	min-height: 3em;
}
.artisan-card:hover .artisan-title {
	color: #DB6731;
}

/* ===== 响应式适配 ===== */

/* 平板：一行2列 */
@media (max-width: 768px) {
	.artisan-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 16px;
	}
}

/* 手机：一行1列 */
@media (max-width: 480px) {
	.artisan-grid {
		grid-template-columns: 1fr;
		gap: 14px;
		max-width: 380px;
		margin-left: auto;
		margin-right: auto;
	}
	.artisan-img {
		padding-bottom: 56.25%; /* 16:9 */
	}
	.artisan-title {
		font-size: 14px;
		padding: 10px 12px 12px 12px;
		min-height: auto;
	}
}