/* 产品卡片布局覆盖样式 */
/* 将产品每行显示为3张卡片 */
.product-item {
    width: 33.333% !important;
    max-width: 33.333% !important;
    flex: 0 0 33.333% !important;
}

/* 在移动设备上保持原有的响应式布局 */
@media (max-width: 992px) {
    .product-item {
        width: 50% !important;
        max-width: 50% !important;
        flex: 0 0 50% !important;
    }
}

@media (max-width: 576px) {
    .product-item {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
}

/* 确保产品卡片在布局更改后依然居中显示 */
.product-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.product-row {
    justify-content: center;
    width: 100%;
}

/* 修改createProductCard函数创建的卡片类 */
.col-md-6.col-lg-4.mb-4 {
    width: 33.333% !important;
    max-width: 33.333% !important;
    flex: 0 0 33.333% !important;
    padding: 0 15px;
}

@media (max-width: 992px) {
    .col-md-6.col-lg-4.mb-4 {
        width: 50% !important;
        max-width: 50% !important;
        flex: 0 0 50% !important;
    }
}

@media (max-width: 576px) {
    .col-md-6.col-lg-4.mb-4 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
}

/* 欧瑞博风格产品卡片样式增强 */
.product-card {
    border: none;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    min-height: 350px;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.product-image {
    position: relative;
    background-color: #f8f9fa;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image img {
    max-width: 100%;
    transition: transform 0.3s;
}

.product-image img[src="./image/products/control/central-system.jpg"]::before,
.product-image img[src="./image/products/control/smart-hub.jpg"]::before,
.product-image img[src="./image/products/control/smart-remote.jpg"]::before,
.product-image img[src="./image/products/control/mixpad-ultra.jpg"]::before,
.product-image img[src="./image/products/control/mixpad-7.jpg"]::before,
.product-image img[src="./image/products/control/mixpad-x.jpg"]::before,
.product-image img[src="./image/products/control/mixpad-m2.jpg"]::before,
.product-image img[src="./image/products/control/mixpad-s.jpg"]::before {
    content: attr(alt);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f1f3f5;
    color: #495057;
    font-size: 14px;
    text-align: center;
    padding: 10px;
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    z-index: 2;
    background: linear-gradient(135deg, #3f87ff, #0052cc);
    color: white;
    box-shadow: 0 3px 10px rgba(63,135,255,0.2);
}

.product-badge.new {
    background: linear-gradient(135deg, #ff5e62, #ff9966);
}

.product-info {
    padding: 20px;
    background: white;
}

.product-info h4 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.product-info p {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.product-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 15px;
}

.product-keyword {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 15px;
    background-color: rgba(63,135,255,0.1);
    color: #3f87ff;
    display: inline-block;
}

.btn-outline-primary {
    border-color: #3f87ff;
    color: #3f87ff;
    border-radius: 20px;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    color: white;
    background-color: #3f87ff;
}