/* css/style.css */

/* =========================================================================
   1. 基礎設定 (Global Styles)
   ========================================================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: "Georgia", "Microsoft JhengHei", "PMingLiU", sans-serif;
    line-height: 1.6;
    color: #2b2b2b;
    background-color: #faf8f5; /* 溫暖的淺米色底 */
}
a {
    text-decoration: none;
    color: #c02c2c; /* 經典廟宇紅色 */
    transition: color 0.3s ease;
}
a:hover {
    color: #8c0000;
}
img {
    max-width: 100%;
    height: auto;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}
.section-title {
    text-align: center;
    font-size: 2.2rem;
    color: #580f0a; /* 莊嚴深紅 */
    margin-bottom: 50px;
    position: relative;
    font-weight: bold;
}
.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: #e5a93b; /* 尊貴金黃 */
    margin: 15px auto 0;
    border-radius: 2px;
}

/* =========================================================================
   2. 頁首與精緻導覽列 (Header & Navigation)
   ========================================================================= */
.site-header {
    background-color: #ffffff;
    border-bottom: 3px solid #8a1c14; /* 廟宇紅邊線 */
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}
.logo img {
    height: 70px;
    width: auto;
    display: block;
}
.navigation-menu {
    display: flex;
    gap: 10px;
}
.navigation-menu a {
    display: block;
    padding: 12px 20px;
    color: #580f0a;
    font-size: 1.05rem;
    font-weight: bold;
    border-radius: 4px;
    transition: all 0.3s ease;
}
.navigation-menu a:hover, .navigation-menu a.active {
    background-color: #8a1c14;
    color: #ffffff;
}

/* 行動版漢堡選單按鈕 */
.menu_btn {
    display: none;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    color: #8a1c14;
    border: 2px solid #8a1c14;
    padding: 8px 15px;
    border-radius: 4px;
    transition: background-color 0.3s;
}
.menu_btn:hover {
    background-color: #fceeed;
}

/* =========================================================================
   3. 大橫幅 (Hero Banner)
   ========================================================================= */
.banner-wrapper {
    width: 100%;
    overflow: hidden;
    border-bottom: 4px solid #e5a93b; /* 金黃邊界 */
}
.banner-wrapper img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: cover;
}

/* =========================================================================
   4. 通用按鈕與精緻元件 (Buttons & Cards)
   ========================================================================= */
.btn-primary {
    background-color: #8a1c14 !important;
    border-color: #8a1c14 !important;
    color: #fff !important;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(138,28,20,0.2);
    transition: all 0.3s !important;
}
.btn-primary:hover {
    background-color: #580f0a !important;
    border-color: #580f0a !important;
    transform: translateY(-1px);
}
.btn-info {
    background-color: #e5a93b !important;
    border-color: #e5a93b !important;
    color: #2b2b2b !important;
    font-weight: bold;
}
.btn-info:hover {
    background-color: #d1952a !important;
    border-color: #d1952a !important;
}

/* =========================================================================
   5. 公告欄表格美化 (Index Table)
   ========================================================================= */
.notice-table {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    border-collapse: collapse;
    background-color: #ffffff;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border-radius: 8px;
    overflow: hidden;
}
.notice-table th {
    background-color: #8a1c14;
    color: #ffffff;
    font-weight: bold;
    padding: 15px;
    font-size: 1.1rem;
    border: none;
}
.notice-table td {
    padding: 15px;
    border-bottom: 1px solid #f0e6df;
    color: #4a4440;
}
.notice-table tr:last-child td {
    border-bottom: none;
}
.notice-table tr:hover {
    background-color: #fffaf5;
}

/* =========================================================================
   6. 關於普慈宮介紹美化 (Introduce)
   ========================================================================= */
.about-section {
    background-color: #ffffff;
    padding: 50px 30px;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.04);
    max-width: 900px;
    margin: 0 auto;
    border-top: 5px solid #8a1c14;
}
.about-section p {
    font-size: 1.15rem;
    color: #4a4440;
    line-height: 1.8;
    margin-bottom: 20px;
}

/* =========================================================================
   7. 周邊商品展示卡片美化 (Products)
   ========================================================================= */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.product-card {
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    border-top: 4px solid #e5a93b;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.product-img {
    height: 250px;
    background-color: #f7f3ed;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-info {
    padding: 20px;
    text-align: center;
}
.product-title {
    font-size: 1.25rem;
    color: #580f0a;
    margin-bottom: 10px;
    font-weight: bold;
}
.product-price {
    font-size: 1.1rem;
    color: #8a1c14;
    font-weight: bold;
    margin-bottom: 15px;
}

/* =========================================================================
   8. 頁尾樣式 (Footer)
   ========================================================================= */
.site-footer {
    background-color: #381512; /* 深沉赭紅色 */
    color: #ecd9d6;
    padding: 40px 0;
    text-align: center;
    border-top: 4px solid #e5a93b;
}
.site-footer p {
    font-size: 1rem;
    margin-bottom: 15px;
}
.footer-address p {
    display: inline-block;
    margin: 0 15px;
    font-size: 0.95rem;
}

/* =========================================================================
   9. 響應式手機版 RWD 控制
   ========================================================================= */
@media (max-width: 991px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 767px) {
    .header-container {
        position: relative;
    }
    .menu_btn {
        display: block; /* 手機版顯示漢堡按鈕 */
    }
    .navigation-menu {
        display: none; /* 預設收合選單 */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #ffffff;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        border-top: 2px solid #8a1c14;
        padding: 10px 0;
    }
    .navigation-menu a {
        border-radius: 0;
        padding: 12px 30px;
    }
    
    /* 點擊漢堡按鈕展開選單 */
    #menu_control:checked ~ .site-header .navigation-menu {
        display: flex;
    }
    .product-grid {
        grid-template-columns: 1fr;
    }
    .footer-address p {
        display: block;
        margin: 10px 0;
    }
}