/* ---------------------------------
   Global Reset & Basic Styles
   --------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    /* 使用 Noto Sans TC 作為範例字體，更接近 mockup 的簡潔風格 */
    font-family: 'Noto Sans TC', sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    background-image: url(../images/bg.jpg?v251112);
    background-size: contain;
    color: #333;
    overflow-x: hidden; /* 防止水平滾動條出現 */
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #fff; 
    z-index: 9999;
    /* 使用 Flexbox 來置中 "Loading..." 文字 */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    color: #333;
    /* 確保 loading 畫面會淡出 */
    transition: opacity 0.3s ease-out;
}

/* [新增] 預設隱藏主要內容，並設定淡入效果 */
#page-content {
    visibility: hidden; /* 隱藏內容，但佔據空間 */
    opacity: 0; /* 完全透明 */
    transition: opacity 0.5s ease-in-out; /* 增加淡入效果 */
}

/* ---------------------------------
   KV Section
   --------------------------------- */
.kv-section {
    width: 100%;
    /* [修改] 移除固定的 height: 755px 和 overflow: hidden; */
    height: auto; /* 讓容器高度自動匹配圖片 */
}

.kv-image {
    width: 100%;
    height: auto; /* [修改] 讓圖片高度自動等比縮放 */
    /* [移除] 移除 height: 100%; object-fit: cover; object-position: center; */
}

/* ---------------------------------
   Main Content Wrapper
   --------------------------------- */
/* [刪除] .content-wrapper 規則已不需要 */


/* ---------------------------------
   Full Width Background Sections
   --------------------------------- */
.full-width-bg-section {
    line-height: 1.6;
    width: 100vw; /* 讓區塊佔滿整個視窗寬度 */
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw; /* 往左移一半視窗寬度 */
    margin-right: -50vw; /* 往右移一半視窗寬度，使其置中 */
    /* 上下內距會由 full-width-bg-section 提供，對應原 content-wrapper 的 padding-top/bottom */
    padding-top: 30px; /* 模擬 content-wrapper 原有的頂部間距 */
    padding-bottom: 100px; /* 模擬 content-wrapper 原有的底部間距 */
    margin-bottom: 100px; /* 讓每個 full-width-bg-section 之間有間距 */
}

/* [新增] 確保最後一個區塊有 padding 但沒有 margin */
.full-width-bg-section:last-child {
    margin-bottom: 0;
    padding-bottom: 100px; /* 可調整頁面底部的最終留白 */
}

/* [新增] 移除 bg-color-3 (SERVICE 上方) 的 margin-bottom，讓 SERVICE 區塊緊貼 */
.full-width-bg-section.bg-color-3 {
    margin-bottom: 0;
}

/* 應用背景色 */
.bg-color-1,
.bg-color-3 {
    background-color: rgba(208, 213, 226, 0.65); /* 指定的背景色 */
    position: relative; /* 讓偽元素可以定位 */
}

/* 用偽元素製作柔順黑白漸層線段 */
.bg-color-1::before,
.bg-color-1::after,
.bg-color-3::before,
.bg-color-3::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 1px;
    /* 黑→白→黑 循環漸層，避免邊界突變 */
    background: linear-gradient(
        90deg,
        black 0%,
        white 50%,
        black 100%
    );
    background-size: 50% 100%; /* 每段 50% */
    background-repeat: repeat-x;
    opacity: 0.8; /* 可微調柔和度 */
}

/* 上下邊線分別定位 */
.bg-color-1::before,
.bg-color-3::before {
    top: 0;
}

.bg-color-1::after,
.bg-color-3::after {
    bottom: 0;
}

/* ---------------------------------
   Content Row Layout
   --------------------------------- */
.content-row {
    display: grid;
    /* 桌面版：兩欄等寬 */
    grid-template-columns: 1fr 1fr;
    gap: 80px; /* 欄位間距 */
    align-items: center;
    /* 移除此處的 margin-bottom，因為間距現在由 full-width-bg-section 提供 */
    margin-bottom: 0; 

    /* 確保 content-row 在 full-width-bg-section 內也能被 max-width 限制並置中 */
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 50px; /* 左右內距與 content-wrapper 保持一致 */
}

/* [刪除] .content-wrapper > .content-row.row-2 規則 */


/* ---------------------------------
   Image Container
   --------------------------------- */
.image-container {
    /* 讓圖片在 grid 欄位中水平置中 */
    margin: 0 auto;
    /* 限制圖片最大寬度為 520px */
    max-width: 520px;
}

.content-row.row-1 .image-container,
.content-row.row-3 .image-container {
    transform: translateY(-80px);
    /* 為了讓偏移在切換 RWD 時更平順，可以加上 transition */
    transition: transform 0.3s ease;
}

.image-container img {
    width: 520px;
    height: 520px;
    background-color: #e0e0e0; /* 圖片 placeholder 顏色 */
}

.image-caption {
    font-family: 'Noto Serif TC', serif; 
    font-size: 20px;
    color: #000;
    letter-spacing: 1px;
    line-height: 1.4;
    text-align: left;
    margin-top: 25px; /* 圖片與下方文字間距 */
    text-transform: uppercase;
}

/* ---------------------------------
   Text / FAQ Container
   --------------------------------- */
.faq-list dl {
    margin: 0;
    padding: 0;
    list-style: none;
}

.faq-list dl > div {
    /* 每個 Q&A 組合的間距 */
    margin-bottom: 40px;
}
.faq-list dl > div:last-child {
    margin-bottom: 0;
}

.faq-list dt {
    font-family: 'Noto Serif TC', serif; /* <-- 新增這一行 */
    font-size: 26px;
    font-weight: 700;
    color: #111;
    margin-bottom: 15px;
    padding-left: 40px; /* 預留 'Q' icon 空間 */
    position: relative; /* 'Q' icon 的定位基準 */
}

/* 模擬 'Q' 圓形 icon */
.faq-list dt::before {
    content: 'Q';
    position: absolute;
    left: -20px;
    top: 0;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: #333;
    color: white;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.faq-list dd {
    letter-spacing: 1px;
    font-weight: 500;
    font-size: 18px;
    color: #666;
    line-height: 2;
    margin-left: 40px; /* 與 Q 的文字對齊 */
    padding-bottom: 10px;

}

.faq-list dd a {
    color: #333;
    text-decoration: underline;
    margin-left: 2px;
}

/* 最後一個 dd 不需要分隔線 */
.faq-list dl > div:last-child dd {
    border-bottom: none;
    padding-bottom: 0;
}

/* ---------------------------------
   Service Banner Section (原 Footer)
   --------------------------------- */
.service-banner-section {
    background-color: #1a1a1a;
    color: #eee;
    padding: 80px 0;
    margin-bottom: 0; /* 確保這個 "腰封" 區塊下方沒有 margin */
}

.service-banner-content {
    /* PC 版最大寬度 1440px */
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 50px; /* 左右內距 */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.service-banner-logo {
    font-family: 'Noto Serif TC', serif; 
    font-size: 48px;
    font-weight: 300; /* 細字體 */
    letter-spacing: 5px;
    color: #fff;
    margin: 0;
}

.service-banner-text {
    font-size: 16px;
    line-height: 1.8;
    text-align: right;
}

.service-banner-text p {
    margin: 4px 0;
}

/* ==================================
   [新增] Product Showcase Sections
==================================
*/
/* [刪除] .product-showcase-container 規則 */


/* [修改] 重新命名為 .product-grid-content */
.product-grid-content {
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 50px; /* 左右內距與 content-wrapper 保持一致 */
}

/* 區塊標題 (e.g., 免稅熱銷保養) */
.section-title {
    font-family: 'Noto Serif TC', serif;
    font-size: 56px;
    font-weight: bold;
    color: #333;
    text-align: center;
    margin: 60px 0 40px;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.section-title span {
    padding: 0 30px; /* 文字與線條的間距 */
}

/* 標題兩側的線條 */
.section-title::before,
.section-title::after {
    content: '';
    display: block;
    width: 100%; /* 寬度由 flex-grow 自動分配 */
    height: 1px;
    background-color: #999; /* 線條顏色 */
}

/* 商品格線 (4 欄) */
.product-grid {
    display: grid;
    gap: 20px; /* 商品間距 */
}

.product-grid.grid-4-col {
    grid-template-columns: repeat(4, 1fr);
}

/* 商品卡片 (共用) */
.product-item,
.promo-item {
    background-color: #fff;
    text-align: center;
    padding: 0 0 20px 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* 讓內容垂直分布 */
    height: 100%; /* 確保同一行的卡片等高 */
}

.product-item-main-link,
.promo-item-main-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* 讓此連結填滿空間 (按鈕除外) */
}

/* 商品卡片 (商品) */
.product-image-container {
    margin-bottom: 20px;
}
.product-image-container img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1; /* 保持 1:1 正方形 */
    object-fit: contain; /* 圖片縮放以完整顯示 */
}
.product-info {
    flex-grow: 1; /* 讓文字區塊填滿空間，把按鈕推到底部 */
    margin: 0 20px 20px 20px;
}
.product-brand {
    font-family: 'Noto Serif TC', serif;
    font-size: 19px;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
}
.product-name {
    font-size: 16px;
    color: #666;
    margin: 5px 0 0;
}

/* "SHOP NOW" / "了解更多" 按鈕 */
.btn-shop-now {
    font-family: 'Noto Serif TC', serif;
    display: inline-block;
    background-color: #333;
    color: #fff;
    text-decoration: none;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    margin: 0 auto; /* 水平置中 */
    transition: background-color 0.3s ease;
}
.btn-shop-now:hover {
    background-color: #555;
}

/* "SHOP MORE" 按鈕 */
.section-footer-link {
    text-align: center;
    margin-top: 40px;
}
.btn-shop-more {
    font-family: 'Noto Serif TC', serif;
    display: inline-block;
    background-color: #333;
    color: #fff;
    text-decoration: none;
    padding: 15px 30px; /* 按鈕比較大 */
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    transition: background-color 0.3s ease;
}
.btn-shop-more:hover {
    background-color: #555;
}

/* 商品卡片 (活動) */
.promo-item-main-link {
    flex-grow: 0; /* 活動卡片不需要填滿，讓按鈕緊跟在後 */
}
.promo-image-container {
    margin-bottom: 20px;
}
.promo-image-container img {
    width: 100%;
    height: auto;
    /* 不設 aspect-ratio, 讓圖片自由高度 */
}
.promo-info {
    flex-grow: 1; /* 讓文字區塊填滿空間，把按鈕推到底部 */
    margin-bottom: 20px;
}
.promo-title {
    font-family: 'Noto Serif TC', serif;
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin: 0 0 5px;
}
.promo-subtitle {
    font-size: 14px;
    color: #666;
    margin: 0;
}


/* ---------------------------------
   [新增] CTA Banner Section
   --------------------------------- */
.cta-banner-section {
    background-color: #1a1a1a; /* Dark background */
    color: #fff;
    padding-top: 30px;    /* Override default padding-top */
    padding-bottom: 30px; /* Override :last-child padding-bottom */
    margin-bottom: 0;     /* It is the last child */
}

.cta-banner-content {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 50px; /* Consistent with other content blocks */
    display: flex;
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
}

.cta-banner-text {
    font-family: 'Noto Serif TC', serif;
    letter-spacing: 0.5px;
    font-size: 30px;
    font-weight: 600;
    position: relative;
    padding-left: 25px; /* Space for the red bar */
    margin-right: 20px;
    color: #fff; /* Ensure text is white */
}

.cta-banner-text::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 32px; /* Match font size */
    background-color: #E60012; /* A standard bright red */
}

.btn-cta-more {
    font-family: 'Noto Serif TC', serif;
    font-size: 18px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 25%, #dcdcdc 50%, #ffffff 75%, #f5f5f5 100%);
    color: #000;
    padding: 6px 20px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.btn-cta-more::before {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        120deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.6) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    transition: all 0.8s ease;
}

.btn-cta-more:hover::before {
    left: 125%;
}

.btn-cta-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}


/* 置頂按鈕 */
.toTop-arrow {
	width: 50px;
    height: 50px;
    border: 0;
    border-radius: 50%;
    opacity: 0.9;
    background: #000;
    color: #ffffff;
    cursor: pointer;
    position: fixed;
    right: 10px;
    bottom: 10px;
    padding-top: 10px;
    z-index: 999;
}
.toTop-arrow::before, .toTop-arrow::after {
	width: 8px;
	height: 2px;
	border-radius: 5px;
	top: 12px;
	background: #ffffff;
	position: absolute;
	content: "";
}
.toTop-arrow::before {
	transform: rotate(-45deg) translate(0, -50%);
	left: 1.2rem;
}
.toTop-arrow::after {
	transform: rotate(45deg) translate(0, -50%);
	right: 1.2rem;
}
.toTop-arrow:focus {
	outline: none;
}


/* 活動卡片的按鈕，在 info 下方，使用 .btn-shop-now 即可 */

/* ==================================
   RWD (Responsive Web Design) 
==================================
*/

/* Breakpoint 1: 1400px 
   (當視窗 < 1400px 時, 圖片開始縮放)
*/
@media (max-width: 1400px) {

    .full-width-bg-section {
        padding-top: 80px;
        padding-bottom: 80px;
    }
    .full-width-bg-section:last-child {
        margin-bottom: 0;
        padding-bottom: 80px;
    }
    .full-width-bg-section.bg-color-3 {
        margin-bottom: 0; /* [新增] RWD 調整 */
    }
    .content-row {
        gap: 50px; /* 縮小欄位間距 */
        padding: 0 40px; /* [新增] RWD 修正 */
    }
    /* [刪除] .content-wrapper > .content-row.row-2 */
    
    .image-container img {
        width: 100%; /* 讓圖片滿版 (100% of 520px max) */
        height: auto;
        aspect-ratio: 1 / 1; /* 保持正方形 */
    }

    /* [修改] RWD for inner wrapper */
    .product-grid-content {
        padding: 0 40px;
    }

    /* [新增] CTA RWD */
    .cta-banner-section {
        padding-top: 30px;
        padding-bottom: 30px;
    }
    .cta-banner-content {
        padding: 0 40px;
    }
}

/* Breakpoint 2: 1024px (平板)
   (縮小 KV 高度, 縮小字體和間距)
*/
@media (max-width: 1024px) {

    .full-width-bg-section {
        padding-top: 60px;
        padding-bottom: 60px;
    }
    .full-width-bg-section:last-child {
        margin-bottom: 0;
        padding-bottom: 60px;
    }
    .full-width-bg-section.bg-color-3 {
        margin-bottom: 0; /* [新增] RWD 調整 */
    }
    .content-row {
        gap: 40px;
        padding: 0 40px; /* [新增] RWD 修正 */
    }
    /* [刪除] .content-wrapper > .content-row.row-2 */
    
    .faq-list dt {
        font-size: 18px;
    }
    .faq-list dd {
        font-size: 15px;
    }
    .service-banner-content { /* [修改] .footer-content -> .service-banner-content */
        padding: 0 40px;
    }

    /* [新增] 商品區塊 RWD (1024px) */
    .section-title {
        font-size: 26px;
    }

    /* [修改] RWD for inner wrapper */
    .product-grid-content {
        padding: 0 40px;
    }

    /* [新增] CTA RWD */
    .cta-banner-section {
        padding-top: 25px;
        padding-bottom: 25px;
    }
    .cta-banner-content {
        padding: 0 40px;
    }
    .cta-banner-text {
        font-size: 22px;
    }
}

/* Breakpoint 3: 768px (手機/小平板)
   (所有內容堆疊成單欄)
*/
@media (max-width: 768px) {
    
    .full-width-bg-section {
        padding-top: 50px;
        padding-bottom: 50px;
    }
    .full-width-bg-section:last-child {
        margin-bottom: 0;
        padding-bottom: 50px;
    }
    .full-width-bg-section.bg-color-3 {
        margin-bottom: 0; /* [新增] RWD 調整 */
    }
    .content-row {
        /* 變更為單欄 */
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 0 20px; /* [新增] RWD 修正 */
    }
    /* [刪除] .content-wrapper > .content-row.row-2 */

    /* [新增] 在 RWD 堆疊時，移除圖片的向上偏移 */
    .content-row.row-1 .image-container,
    .content-row.row-3 .image-container {
        transform: none; /* 或 transform: translateY(0); */
    }

    /* RWD Row 2: 
      原本: 文(order 1), 圖(order 2)
      手機版改為: 圖(order 1), 文(order 2), 以求統一
    */
    .content-row.row-2 .text-container {
        order: 2;
    }
    .content-row.row-2 .image-container {
        order: 1;
    }

    .image-container {
        /* 在單欄中, 圖片可以再次使用 520px 最大寬度 (若螢幕夠寬) */
        max-width: 520px;
    }

    .faq-list dt::before {
        left: 0;
    }
    .faq-list dt {
        font-size: 20px;
        padding-left: 55px;
    }
    .faq-list dd {
        margin-left: 55px;
    }

    /* Service Banner 堆疊 */
    .service-banner-content { /* [修改] .footer-content -> .service-banner-content */
        flex-direction: column;
        gap: 30px;
        padding: 0 20px;
    }
    .service-banner-text { /* [修改] .footer-text -> .service-banner-text */
        text-align: center;
    }

    /* [新增] 商品區塊 RWD (768px) */
    .product-grid.grid-4-col {
        grid-template-columns: repeat(2, 1fr); /* 4 欄變 2 欄 */
        gap: 15px;
    }
    .section-title {
        font-size: 24px;
        margin: 40px 0 30px;
    }
    .section-title span {
        padding: 0 15px;
    }

    /* [修改] RWD for inner wrapper */
    .product-grid-content {
        padding: 0 20px;
    }

    /* [新增] CTA RWD */
    .cta-banner-section {
        padding-top: 20px;
        padding-bottom: 20px;
    }
    .cta-banner-content {
        padding: 0 20px;
    }
    .cta-banner-text {
        font-size: 18px;
        padding-left: 15px;
        margin-right: 15px;
    }
    .cta-banner-text::before{
        height: 18px;
        width: 3px;
    }
    .btn-cta-more {
        font-size: 15px;
        padding: 6px 12px;
    }
}

/* Breakpoint 4: 500px (小手機)
   (進一步縮小字體與間距)
*/
@media (max-width: 500px) {

    .full-width-bg-section {
        padding-top: 40px;
        padding-bottom: 40px;
        margin-bottom: 0;
    }
    .full-width-bg-section:last-child {
        margin-bottom: 0;
        padding-bottom: 40px;
    }
    .full-width-bg-section.bg-color-3 {
        margin-bottom: 0; /* [新增] RWD 調整 */
    }
    .content-row {
        padding: 0 15px; /* [新增] RWD 修正 */
    }
    /* [刪除] .content-wrapper > .content-row.row-2 */
    
    .faq-list dt {
        font-size: 18px;
        padding-left: 35px;
    }
    .faq-list dt::before {
        width: 24px;
        height: 24px;
        font-size: 15px;
    }
    .faq-list dd {
        margin-left: 35px;
        font-size: 14px;
        padding-bottom: 25px;
    }

    .service-banner-logo { /* [修改] .footer-logo -> .service-banner-logo */
        font-size: 36px;
    }
    .service-banner-text { /* [修改] .footer-text -> .service-banner-text */
        font-size: 13px;
    }

    /* [新增] 商品區塊 RWD (500px) */
    .product-grid.grid-4-col {
        grid-template-columns: 1fr; /* 2 欄變 1 欄 */
        gap: 15px;
    }
    .section-title {
        font-size: 20px;
        margin: 30px 0 20px;
    }

    /* [修改] RWD for inner wrapper */
    .product-grid-content {
        padding: 0 15px;
    }

    /* [新增] CTA RWD */
    .cta-banner-section {
        padding-top: 20px;
        padding-bottom: 20px;
    }
    .cta-banner-content {
        padding: 0 15px;
        /* 在 500px 堆疊 */
        flex-direction: column;
        gap: 15px;
    }
    .cta-banner-text {
        font-size: 18px;
        margin-right: 0; /* 移除堆疊時的 margin */
    }
    .btn-cta-more {
        font-size: 15px;
        padding: 8px 16px;
    }
}