/* 科技感風格樣式 */
:root {
    --primary-color: #00d4ff;
    --secondary-color: #0099cc;
    --dark-bg: #0a0a0a;
    --card-bg: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --border-color: #333333;
    --glow-color: #00d4ff;
}

.product-grid-container {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    min-height: 100vh;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
}

.product-grid-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(135deg, #1a1a2e, #16213e);
    pointer-events: none;
}

.page-title {
    text-align: center;
    color: var(--text-primary);
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 50px;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
    letter-spacing: 2px;
    position: relative;
    z-index: 1;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    box-shadow: 0 0 10px var(--glow-color);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.product-card {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.product-card:hover::before {
    left: 100%;
}

.product-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(0, 212, 255, 0.2);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
}

.product-card:hover .product-image {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 212, 255, 0.3);
}

.product-title {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.3;
}

.product-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    height: 80px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

.product-meta {
    display: flex;
    justify-content: flex-end; /* 僅保留分類，靠右對齊 */
    align-items: center;
    margin-bottom: 25px;
    padding: 15px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

/* 價格整段已移除，不再顯示 */
/* .product-price { ... } */

.product-category {
    color: var(--text-secondary);
    font-size: 0.9rem;
    background: rgba(0, 212, 255, 0.1);
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

/* 按鈕樣式：改為洽詢 */
a.button.consult-btn {
    width: 100%;
    display: inline-block;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-primary);
    border: none;
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

a.button.consult-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

a.button.consult-btn:hover::before {
    left: 100%;
}

a.button.consult-btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 10px 25px rgba(0, 212, 255, 0.4),
        0 0 30px rgba(0, 212, 255, 0.3);
    background: linear-gradient(135deg, #00f0ff, #00d4ff);
}

.no-products {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.2rem;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin: 20px auto;
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-link:hover .product-title {
    color: var(--primary-color);
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 相關購物車浮動按鈕、數量、提示等全部移除，不再需要 */

/* 響應式設計 */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 10px;
    }
    
    .page-title {
        font-size: 2rem;
        margin-bottom: 30px;
    }
    
    .product-card {
        padding: 20px;
    }
    
    .product-image {
        height: 200px;
    }
}

@media (max-width: 1200px) and (min-width: 769px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1201px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}