/* product.css - 產品頁專用樣式 */

/* 產品頁面橫幅 */
.product-banner {
    height: 380px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.product-banner:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to bottom, transparent, var(--primary-color));
}

.banner-content {
    max-width: 800px;
    padding: 30px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 2;
}

.banner-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--text-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.banner-content p {
    font-size: 20px;
    margin-bottom: 30px;
}

/* 產品展示網格 - 4欄布局，寬度固定400px，高度自適應 */
.products-grid-four {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

.product-item {
    background: linear-gradient(145deg, rgba(52, 73, 94, 0.9), rgba(44, 62, 80, 0.9));
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
}

.product-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    border-color: var(--accent-color);
}

.product-item-img-container {
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #34495e;
}

.product-item-img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 585px; /* 最大高度限制 */
    object-fit: contain; /* 保持圖片比例 */
    transition: transform 0.5s ease;
}

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

.product-item-info {
    padding: 20px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 120px; /* 最小資訊區域高度 */
}

.product-item-info h4 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-color);
}

.product-item-info p {
    font-size: 14px;
    color: var(--light-metal);
    margin-bottom: 5px;
}

/* 客戶實績瀑布流布局 */
.customer-showcase {
    margin-bottom: 60px;
}

.masonry-grid {
    column-count: 4; /* 4欄瀑布流 */
    column-gap: 20px;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    background: linear-gradient(145deg, rgba(52, 73, 94, 0.9), rgba(44, 62, 80, 0.9));
}

.masonry-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.masonry-img {
    width: 100%;
    height: auto;
    display: block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.masonry-info {
    padding: 15px;
    text-align: center;
}

.masonry-info h4 {
    font-size: 16px;
    margin-bottom: 5px;
    color: var(--text-color);
}

.masonry-info p {
    font-size: 14px;
    color: var(--light-metal);
}

/* 產品頁面移動端適配 */
@media (max-width: 1400px) {
    .products-grid-four {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .masonry-grid {
        column-count: 3;
    }
}

@media (max-width: 1100px) {
    .products-grid-four {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .masonry-grid {
        column-count: 2;
    }
}

@media (max-width: 768px) {
    .products-grid-four {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .banner-content h1 {
        font-size: 36px;
    }
    
    .banner-content p {
        font-size: 16px;
    }
    
    .masonry-grid {
        column-count: 1;
    }
}

@media (max-width: 576px) {
    .product-item-img-container {
        height: auto;
    }
    
    .product-item-info {
        min-height: 100px;
        padding: 15px;
    }
}