/* css/style.css - 全局样式文件 */

/* ===== 产品卡片（整卡点击） ===== */
.product-card-link {
    display: block;
    text-decoration: none !important;
    color: inherit;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
}

.product-card {
    background: #fff;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s ease;
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

.product-card img {
    height: 250px;
    object-fit: cover;
    transition: transform 0.6s ease;
    -webkit-user-drag: none; /* 防止拖拽图片 */
}

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

/* 标题悬停变色 */
.product-card-link .card-title {
    color: #1A1A2E;
    transition: color 0.3s ease;
}

.product-card-link:hover .card-title {
    color: #8B6914; /* 主色金 */
}

/* 详情按钮的视觉样式 */
.product-card-link .btn-detail {
    display: inline-flex;
    align-items: center;
    background: transparent;
    color: #8B6914;
    border: none;
    padding: 0;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-top: auto; /* 让按钮沉底对齐 */
}

.product-card-link .btn-detail i {
    transition: transform 0.3s ease;
    margin-left: 6px;
}

.product-card-link:hover .btn-detail i {
    transform: translateX(6px);
}

/* ===== 轮播图 ===== */
.carousel-item img {
    height: 500px;
    object-fit: cover;
}

/* ===== 导航栏 ===== */
.navbar-brand img {
    margin-right: 10px;
}

/* ===== 图片懒加载占位效果 ===== */
img[loading="lazy"] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

img.loaded {
    animation: none;
    background: none;
}

img.error {
    background: #f0f0f0;
    animation: none;
}