/* 重置默認樣式，確保跨瀏覽器一致性 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基礎樣式 */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    color: #474030;
}

/* 導航欄樣式 */
header {
    background: #fff;
    border-bottom: 1px solid #ddd;
    padding: 15px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.navbar-brand {
    font-size: 1.8em;
    font-weight: bold;
    color: #474030;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: #474030;
    text-decoration: none;
    font-size: 1.1em;
    padding: 8px 12px;
    transition: background-color 0.3s;
}

.nav-link:hover {
    background-color: lightgray;
    border-radius: 5px;
}

/* 主內容區域 */
main {
    padding: 40px 20px;
    text-align: center;
}

h1 {
    font-weight: bolder;
    font-size: 2.5em;
    margin-bottom: 30px;
}

/* 聯絡卡片樣式 */
.contact-card {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
}

.contact-card h2 {
    font-size: 1.8em;
    margin-bottom: 20px;
}

.contact-card img {
    max-width: 100%;
    height: auto;
    margin-bottom: 20px;
}



/* 產品卡片樣式 */

.product-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}


.product-card {
    flex: 0 1 calc(50% - 10px);
    max-width: 400px;
    margin: 20px 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
    animation: fadeInUp 1s ease-out;
}

.product-card img {
    max-width: 100%;
    height: auto;
    margin-bottom: 20px;
}

.product-card h2 {
    font-size: 1.8em;
    margin-bottom: 15px;
    color: #474030;
}

.product-card p {
    font-size: 1.1em;
    margin-bottom: 15px;
    color: #666;
}

/* 按鈕樣式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    color: #474030;
    border: 2px solid #474030;
    border-radius: 5px;
    text-decoration: none;
    font-size: 1.1em;
    transition: background-color 0.3s, color 0.3s;
}

.btn:hover {
    color: #fff;
    background-color: #474030;
    border-color: #474030;
}

/* 動畫效果 */


@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.product-card:hover {
    animation: bounce 1.5s infinite;
}

/* 頁腳樣式 */
footer {
    text-align: center;
    padding: 20px;
    background: #f8f8f8;
    border-top: 1px solid #ddd;
    font-size: 0.9em;
    color: #474030;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 10px;
    }

    .nav-links {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    h1 {
        font-size: 2em;
    }

    .contact-card, .product-card {
        padding: 15px;
    }

    .contact-card img, .product-card img {
        max-width: 80%;
    }
}