/* 图片占位符样式 - 当图片文件不存在时显示渐变背景 */

/* 轮播图占位符 */
img[src="images/banner1.jpg"],
img[src="images/banner1_bg.jpg"],
img[src="images/banner2.jpg"],
img[src="images/banner2_bg.jpg"],
img[src="images/banner3.jpg"],
img[src="images/banner3_bg.jpg"] {
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
    width: 100%;
    height: 100%;
    min-height: 384px;
    max-height: 384px;
}

/* 供应信息图片占位符 - 供应信息页使用 w-32 h-24 (128x96px) */
img[src="images/supply1.jpg"],
img[src="images/supply2.jpg"],
img[src="images/supply3.jpg"],
img[src="images/supply4.jpg"],
img[src="images/supply5.jpg"],
img[src="images/supply6.jpg"] {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 首页供应信息卡片图片 - h-40 (160px) */
#homeSupplies img[src^="images/supply"] {
    min-height: 160px;
    max-height: 160px;
}

/* 供应信息页列表图片 - h-24 (96px) */
#supplyList img[src^="images/supply"] {
    min-height: 96px;
    max-height: 96px;
}

/* 企业Logo占位符 */
img[src="images/company1.jpg"],
img[src="images/company2.jpg"],
img[src="images/company3.jpg"],
img[src="images/company4.jpg"],
img[src="images/company5.jpg"],
img[src="images/company6.jpg"] {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    width: 80px;
    height: 80px;
    min-width: 80px;
    min-height: 80px;
    max-width: 80px;
    max-height: 80px;
    flex-shrink: 0;
}

/* 通用图片样式 - 防止超框 */
img[src^="images/"] {
    object-fit: cover;
    display: block;
    max-width: 100%;
    height: auto;
    box-sizing: border-box;
}

/* 供应信息图片固定高度 */
img[src^="images/supply"] {
    height: 100%;
    max-height: 160px;
}

/* 企业Logo固定尺寸 */
img[src^="images/company"] {
    width: 100%;
    height: 100%;
    max-width: 80px;
    max-height: 80px;
}

/* 轮播图图片 */
img[src^="images/banner"] {
    width: 100%;
    height: 100%;
}

/* 图片加载失败时的备用样式 */
img[src^="images/"]:before {
    content: attr(alt);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: white;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    padding: 10px;
}
