/*
 * 通用重置樣式：
 * 移除瀏覽器預設的邊距和內邊距，確保樣式一致性。
 */
html, body, h1, h2, h3, h4 {
    margin: 0;
    padding: 0;
}

/* 確保圖片不帶邊框 */
h1 img {
    display: block;
}

img {
    border: 0;
}

/* 連結基本樣式 */
a {
    color: #464544;
}

/* 連結懸停效果 */
a:hover {
    color: #FFA405;
}

/* 浮動輔助類別 */
.left {
    float: left;
}
.right {
    float: right;
}

/* 文本對齊 */
.more {
    text-align: right;
}

/* 清除浮動 */
.clear {
    clear: both;
}

/*
 * Body 樣式：
 * 背景色、文字對齊、字體設定和底部內邊距。
 * 注意：height: 100% 可能在某些情況下需要調整，取決於內容高度。
 */
body {
    background: #504634;
    text-align: center;
    /* 字體堆疊：優先使用 verdana, arial, sans-serif，然後是微軟正黑體、新細明體、細明體 */
    font: 16px verdana, arial, sans-serif, "微軟正黑體", "新細明體", "細明體";
    color: #4F4533;
    padding-bottom: 10px;
    height: 100%;
}

/** layout **/

/*
 * Wrapper 樣式：
 * 這是整個網站內容的主要容器。
 * 設置最大寬度並居中，確保在不同螢幕尺寸下都有良好的顯示。
 */
#wrapper {
    text-align: left;
    margin: 37px auto; /* 上下邊距 37px，左右自動居中 */
    width: 95%; /* 在小螢幕上佔據大部分寬度 */
    max-width: 1200px; /* 設定最大寬度，避免在超寬螢幕上內容過於分散 */
    background: #ffffff;
    position: relative;
    border-top-right-radius: 10px;
    border-top-left-radius: 10px;
    height: 100%; /* 注意：這可能導致內容溢出，如果內容動態增長 */
}

/*
 * Header 樣式：
 * 頁首背景圖和高度設定。
 */
#header {
    background: #f4eddb url(images/header2.jpg) no-repeat;
    height: 266px;
    border-top-right-radius: 10px;
    border-top-left-radius: 10px;
    position: relative; /* 確保內部絕對定位元素相對於此定位 */
}

/* Logo 樣式：絕對定位 */
#logo {
    position: absolute;
    top: 12px;
    left: 300px; /* 原始固定值，在響應式設計中可能需要調整 */
    width: 270px;
    color: #52616E;
}
#logo h1 {
    font: bold 24px "arial narrow", arial, sans-serif;
}
#logo p {
    margin: 0;
    font-weight: bold;
}

/* Cart 樣式：絕對定位，包含背景圖 */
#cart {
    position: absolute;
    top: 170px;
    left: 334px; /* 原始固定值，在響應式設計中可能需要調整 */
    width: 208px;
    background: #4B5360;
}
#cart-top { background: url(images/cart_top.gif) no-repeat; }
#cart-bot { background: bottom left url(images/cart_bot.png) no-repeat; }
#cart-cart { background: 9px 11px url(images/ntu.png) no-repeat; }
#cart-cart {
    padding: 8px 8px 8px 60px;
    color: white;
}
#cart p {
    margin: 0;
    padding-top: 20px;
    padding-bottom: 20px;
}
#cart .orange {
    color: #FFB400;
    font: 20px "標楷體";
    text-align: center;
}
#cart a {
    color: white;
    font-size: 10px;
}

/* Nav 樣式：絕對定位 (你的 HTML 中沒有這個元素，但 CSS 定義了) */
#nav {
    background: #4B5360;
    position: absolute;
    top: 101px;
    left: 287px; /* 原始固定值，在響應式設計中可能需要調整 */
    width: 385px;
    padding: 9px 0;
    text-align: center;
}
#nav li {
    list-style: none;
    display: inline;
    color: #fff;
}
#nav a {
    text-decoration: none;
    color: #fff;
}

/*
 * Body 內容區塊樣式：
 * 包含左右兩欄的容器。
 */
#body {
    padding-top: 5px;
    background-color: #D4CAB6;
    height: 100%; /* 注意：這可能導致內容溢出 */
    overflow: hidden; /* 防止浮動元素溢出 */
}

/* 左側分類區塊 */
#categories {
    float: left;
    width: 29%; /* 原始寬度 */
    height: 100%; /* 注意：這可能導致內容溢出 */
    background: #D4CAB6; /* 原始背景色 */
}

/* 右側主要內容區塊 */
#seasonal, #collection {
    float: right;
    width: 70%; /* 原始寬度 */
    background: #D4CAB6;
    height: 100%; /* 注意：這可能導致內容溢出 */
    margin-right: 5px;
    margin-bottom: 2px;
}

/* 內容區塊的內邊距 */
#seasonal .inner, #collection .inner {
    padding: 6px 12px;
    height: 100%; /* 注意：這可能導致內容溢出 */
    padding-bottom: 50px;
}

/* 段落樣式 */
#seasonal p, #collection p {
    margin: 0.9em 0;
    text-align: justify;
    text-indent: 1.5em;
    line-height: 140%;
}

/* 列表項樣式 */
#seasonal li {
    line-height: 200%;
}

/* 段落首字樣式 */
#seasonal p:first-letter {
    font-size: 1.4em;
    letter-spacing: 1px;
}

/* More 連結樣式 */
.more a {
    font-size: 12px;
    color: #000;
    text-decoration: none;
}
.more a:hover {
    text-decoration: underline;
}

/* H3 標題樣式 */
h3 {
    font: bold 20px "arial narrow", arial, sans-serif;
    color: #3B3832;
    text-align: center;
    font-family: "微軟正黑體";
}

/* H2 標題樣式 */
h2 {
    font: 18px "arial narrow", arial, sans-serif;
    color: #695F4C;
    padding-bottom: 10px;
}

/* Categories 區塊的 H2 標題樣式 */
#categories h2 {
    color: #fff;
    padding: 4px 0 5px 39px;
    background: #847A67;
    font-family: "微軟正黑體";
}

/* Categories 列表樣式 */
#categories ul, li {
    margin: 0;
    padding: 0;
}
#categories li {
    background: #D4CAB6 left url(images/bullet.gif) no-repeat;
    border-top: 1px solid #F4EFDF;
    list-style: none;
    font-size: 14px;
    padding: 7px 0 8px 35px;
}

/* Categories 子選單樣式 */
#categories .submenu {
    background: #D4CAB6;
    border-top: 1px solid #F4EFDF;
    list-style: none;
    font-size: 18px;
    padding: 7px 0 8px 15px;
}

/* Categories 連結樣式 */
#categories a {
    text-decoration: none;
    color: #000000;
}
#categories a:hover {
    text-decoration: underline;
}

/* 版權資訊區塊 */
#copyright {
    text-align: center;
    font-size: 10px;
    padding: 3px;
    background-color: #EEEEEE;
}

/*
 * 響應式設計：針對小螢幕 (例如手機) 的調整
 * 當螢幕寬度小於或等於 768px 時，應用以下樣式。
 */
@media (max-width: 768px) {
    /* 調整 wrapper 的邊距，讓內容更靠近邊緣 */
    #wrapper {
        margin: 10px auto;
        width: 100%; /* 在小螢幕上佔滿全部寬度 */
        border-radius: 0; /* 移除圓角，讓邊緣更貼合螢幕 */
    }

    /* 調整 header 高度，並嘗試居中 logo 和 cart */
    #header {
        height: auto; /* 讓高度根據內容自動調整 */
        padding-bottom: 10px; /* 增加底部內邊距 */
        border-radius: 0;
        background-size: cover; /* 讓背景圖覆蓋整個區域 */
        background-position: center; /* 居中背景圖 */
        display: flex; /* 使用 Flexbox 輔助佈局 */
        flex-direction: column; /* 垂直堆疊 */
        align-items: center; /* 水平居中 */
        justify-content: center; /* 垂直居中 */
    }

    /* 調整 logo 和 cart 的定位，讓它們在小螢幕上居中 */
    #logo, #cart, #nav {
        position: static; /* 取消絕對定位，讓它們在流動佈局中 */
        width: auto; /* 寬度自動調整 */
        left: auto;
        top: auto;
        margin: 10px 0; /* 增加上下間距 */
        text-align: center;
    }
    #logo {
        order: 1; /* 調整順序，讓 logo 在前面 */
    }
    #cart {
        order: 3; /* cart 在後面 */
    }
    /* 語言切換連結在 HTML 中是行內樣式，需要額外處理或在 HTML 中調整其位置 */
    /* 這裡假設 #language 是一個獨立的元素，可以通過其 ID 調整 */
    a#language {
        position: absolute; /* 保持絕對定位，但調整位置 */
        top: 10px;
        right: 10px;
        padding-top: 0 !important; /* 覆寫行內樣式 */
        padding-left: 0 !important; /* 覆寫行內樣式 */
        color: #fff !important; /* 讓它在深色背景下可見 */
        font-weight: bold;
        z-index: 10; /* 確保在最上層 */
    }


    /* 調整主要內容區塊，讓左右兩欄垂直堆疊 */
    #body {
        flex-direction: column; /* 垂直堆疊 */
        padding: 10px; /* 調整內邊距 */
        height: auto; /* 讓高度自動適應內容 */
    }
    #categories, #seasonal, #collection {
        float: none; /* 取消浮動 */
        width: 100%; /* 佔滿整個寬度 */
        margin-right: 0; /* 移除右邊距 */
        margin-bottom: 15px; /* 增加底部間距 */
        height: auto; /* 讓高度自動適應內容 */
    }

    /* 調整分類標題的內邊距 */
    #categories h2 {
        padding: 8px 0 8px 15px;
        text-align: left; /* 左對齊 */
    }

    /* 調整分類列表項的內邊距 */
    #categories li, #categories .submenu {
        padding: 7px 15px; /* 調整內邊距 */
        background-position: 5px center; /* 調整 bullet 圖片位置 */
    }

    /* 版權資訊調整 */
    #copyright {
        padding: 10px;
        font-size: 12px;
        display: flex; /* 使用 Flexbox */
        flex-direction: column; /* 垂直堆疊 */
        align-items: center; /* 水平居中 */
    }
    #copyright p {
        float: none !important; /* 取消浮動 */
        margin-bottom: 5px; /* 增加間距 */
    }
}

/*
 * 舊的 border-image 屬性前綴已移除，只保留標準寫法。
 * 如果 images/frame.png 存在且需要此效果，則保留。
 */
.imageborder {
    border-width: 10px;
    border-image: url(images/frame.png) 10 stretch; /* 標準版本 */
    margin-right: 10px;
}

/* 在 style.css 中新增這些樣式20250711 */
.float-left {
    float: left;
    width: 100px;
}
.mr-4 { /* 假設你需要右邊距 */
    margin-right: 1rem; /* 或其他你需要的數值 */
}
.icon-pdf, .icon-mail, .icon-website {
    width: 18px; /* 設置圖片寬度 */
    height: 16px; /* 設置圖片高度 */
    border: 0; /* 確保沒有邊框 */
    vertical-align: middle; /* 讓圖示與文字對齊 */
    margin-right: 5px; /* 增加圖示與文字間的間距 */
    float: right; /* 如果需要浮動 */
    padding-right: 30px; /* 如果需要右邊距 */
}
/* 你可以根據實際需求調整或新增更多樣式 */
