/********** Template CSS **********/
:root {
    --bs-tertiary: #797E88;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 30px;
    bottom: 30px;
    z-index: 99;
}

.fw-bold {
    font-weight: 700 !important;
}

.fw-medium {
    font-weight: 600 !important;
}

.fw-normal {
    font-weight: 400 !important;
}


/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}


/*** Button ***/
.btn {
    transition: .5s;
}

.btn-square {
    width: 38px;
    height: 38px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
}


/*** Top Bar ***/
.top-bar {
    height: 90px;
    padding: 0 90px;
}

.top-bar h6 {
    letter-spacing: 1px;
}


/*** Nav Bar ***/
.nav-bar {
    padding: 0 90px;
    transition: .5s;
}

.navbar .navbar-nav .nav-link {
    margin-right: 30px;
    padding: 20px 0;
    color: var(--bs-dark);
    font-size: 18px;
    outline: none;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--bs-white);
}

.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 8px;
}

@media (max-width: 991.98px) {
    .navbar .navbar-nav .nav-link {
        margin-right: 0;
        padding: 10px 0;
    }

    .navbar .navbar-nav {
        margin-top: 20px;
        border-top: 1px solid var(--bs-white);
    }
}

@media (min-width: 992px) {
    .navbar .nav-item .dropdown-menu {
        display: block;
        border: none;
        margin-top: 0;
        top: 150%;
        opacity: 0;
        visibility: hidden;
        transition: .5s;
    }

    .navbar .nav-item:hover .dropdown-menu {
        top: 100%;
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }
}


/*** Header Carousel ***/
.header-carousel {
    position: relative;
    background: url(../img/bg.jpg) center center no-repeat;
    background-size: cover;
}

.header-carousel .carousel-img {
    position: relative;
}

.header-carousel .owl-nav {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

.header-carousel .owl-nav .owl-prev,
.header-carousel .owl-nav .owl-next {
    width: 45px;
    height: 45px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--bs-dark);
    background: var(--bs-primary);
}

.page-header {
    background: url(../img/bg.jpg) center center no-repeat;
    background-size: cover;
}

.page-header .breadcrumb-item+.breadcrumb-item::before {
    color: var(--bs-tertiary);
}

.page-header .breadcrumb-item,
.page-header .breadcrumb-item a {
    font-size: 18px;
    color: var(--bs-primary);
}

.page-header .breadcrumb-item.active {
    color: var(--bs-dark);
}


/*** Video ***/
.btn-play {
    position: relative;
    display: block;
    box-sizing: content-box;
    width: 16px;
    height: 26px;
    border: none;
    outline: none !important;
    padding: 18px 20px 20px 28px;
    background: var(--bs-dark);
}

.btn-play:before {
    content: "";
    position: absolute;
    z-index: 0;
    left: 50%;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    display: block;
    width: 60px;
    height: 60px;
    background: var(--bs-dark);
    animation: pulse-border 1500ms ease-out infinite;
}

.btn-play:after {
    content: "";
    position: absolute;
    z-index: 1;
    left: 50%;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    display: block;
    width: 60px;
    height: 60px;
    background: var(--bs-dark);
    transition: all 200ms;
}

.btn-play span {
    display: block;
    position: relative;
    z-index: 3;
    width: 0;
    height: 0;
    left: -1px;
    border-left: 16px solid var(--bs-white);
    border-top: 11px solid transparent;
    border-bottom: 11px solid transparent;
}

@keyframes pulse-border {
    0% {
        transform: translateX(-50%) translateY(-50%) translateZ(0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translateX(-50%) translateY(-50%) translateZ(0) scale(2);
        opacity: 0;
    }
}

#videoModal .modal-dialog {
    position: relative;
    max-width: 800px;
    margin: 60px auto 0 auto;
}

#videoModal .modal-body {
    position: relative;
    padding: 0px;
}

#videoModal .close {
    position: absolute;
    width: 30px;
    height: 30px;
    right: 0px;
    top: -30px;
    z-index: 999;
    font-size: 30px;
    font-weight: normal;
    color: var(--bs-white);
    background: #000000;
    opacity: 1;
}


/*** Section Title ***/
.section-title {
    position: relative;
    display: inline-block;
    text-transform: uppercase;
}

.section-title::before {
    position: absolute;
    content: "";
    width: calc(100% + 80px);
    height: 0px;
    top: 5px;
    left: -40px;
    border-top: 2px solid var(--bs-primary);
    z-index: -1;
}

.section-title::after {
    position: absolute;
    content: "";
    width: calc(100% + 120px);
    height: 0px;
    bottom: 6px;
    left: -60px;
    border-bottom: 2px solid var(--bs-primary);
    z-index: -1;
}

.section-title.text-start::before {
    width: calc(100% + 40px);
    left: 0;
}

.section-title.text-start::after {
    width: calc(100% + 60px);
    left: 0;
}


/*** About ***/
.about-img {
    position: relative;
}

.about-img::before,
.about-img::after {
    position: absolute;
    content: "";
    width: 33%;
    height: 90px;
    background: var(--bs-white);
}

.about-img::before {
    top: 0px;
    left: 0px;
}

.about-img::after {
    right: 0px;
    bottom: 0px;
}


/*** Service ***/
.service-title {
    height: 100%;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: #595959;
    background-size: cover;
}

.service-item {
    overflow: hidden;
}

.service-item .btn-square {
    width: 65px;
    height: 65px;
}

.service-item a {
    position: relative;
    padding: 0;
    font-size: 14px;
    line-height: 14px;
    text-transform: uppercase;
    transition: .5s;
}

.service-item a::after {
    position: absolute;
    content: "";
    width: 500%;
    height: 0;
    left: 100%;
    bottom: 3px;
    margin-left: 10px;
    border-bottom: 2px solid var(--bs-primary);
}


/*** Donation ***/
.donation-item {
    box-shadow: 0 0 30px rgba(0, 0, 0, .05);
    transition: .5s;
}

.donation-item:hover {
    box-shadow: 0 0 30px rgba(0, 0, 0, .1);
}

.donation-item .donation-progress {
    width: 80px;
}

.donation-item .progress .progress-bar {
    height: 20px;
    overflow: visible;
    transition: 3s;
}


/*** Banner ***/
.banner .banner-inner {
    position: relative;
    background: url(../img/p2.jpg) center center no-repeat;
    background-size: cover;
}

.banner .banner-inner::before,
.banner .banner-inner::after {
    position: absolute;
    content: "";
    width: 0;
    height: 0;
}

.banner .banner-inner::before {
    top: 0;
    left: 0;
    border-top: 150px solid var(--arrow-color);
    border-right: 150px solid transparent;
}

.banner .banner-inner::after {
    right: 0;
    bottom: 0;
    border-bottom: 150px solid var(--accent-color);
    border-left: 150px solid transparent;
}


/*** Event ***/
.event-item {
    box-shadow: 0 0 30px rgba(0, 0, 0, .05);
    transition: .5s;
}

.event-item:hover {
    box-shadow: 0 0 30px rgba(0, 0, 0, .1);
}


/*** Donate ***/
.donate .donate-text {
    position: relative;
    background: url(../img/p0.jpg) center center no-repeat;
    background-size: cover;
}

.donate .donate-text::before,
.donate .donate-text::after {
    position: absolute;
    content: "";
    width: 0;
    height: 0;
}

.donate .donate-text::before {
    top: 0;
    left: 0;
    border-top: 150px solid var(--bs-primary);
    border-right: 150px solid transparent;
}

.donate .donate-text::after {
    right: 0;
    bottom: 0;
    border-bottom: 150px solid var(--bs-secondary);
    border-left: 150px solid transparent;
}

.donate .donate-form .form-control {
    border: none;
    background: rgba(255, 255, 255, .5);
}

.donate .donate-form .btn-group {
    display: flex;
}

.donate .donate-form .btn-group .btn {
    margin: 0;
    padding: 0;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    color: var(--bs-tertiary);
    background: rgba(255, 255, 255, .5);
}

.donate .donate-form .btn-group .btn-check:checked+.btn {
    border: none;
    background: var(--bs-white);
}



/*** Team ***/
.team-item {
    box-shadow: 0 0 30px rgba(0, 0, 0, .05);
    transition: .5s;
}

.team-item:hover {
    box-shadow: 0 0 30px rgba(0, 0, 0, .1);
}

.team-item .team-detail span {
    letter-spacing: 2px;
}



/*** Testimonial ***/
.testimonial-title {
    height: 100%;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: url(../img/bg.jpg) center center no-repeat;
    background-size: cover;
}

.testimonial-img {
    position: relative;
    padding: 45px 0 45px 90px;
}

.testimonial-img::before {
    position: absolute;
    content: "";
    top: 0;
    left: 0;
    width: calc(50% + 45px);
    height: 100%;
    background: var(--accent-color);
    z-index: -1;
}

.testimonial-carousel .owl-nav {
    position: absolute;
    top: 50%;
    left: 1.5rem;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
}

.testimonial-carousel .owl-prev,
.testimonial-carousel .owl-next {
    width: 45px;
    height: 45px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--bs-white);
    background: var(--arrow-color);
    transition: .5s;
}

.testimonial-carousel .owl-prev:hover,
.testimonial-carousel .owl-next:hover {
    color: var(--bs-secondary);
    background: var(--bs-white);
}

@media (max-width: 768px) {
    .testimonial-carousel .owl-nav {
        top: 6.3rem;
    }
}



/*** Footer ***/
.footer {
    color: var(--bs-tertiary);
    background: linear-gradient(rgba(5, 19, 17, .95), rgba(5, 19, 17, .95)), url(../img/bg-footer1.jpg) center center no-repeat;
    background-size: cover;
}

.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    color: var(--bs-tertiary);
    font-weight: normal;
    text-transform: capitalize;
    transition: .3s;
}

.footer .btn.btn-link::before {
    position: relative;
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 10px;
}

.footer .btn.btn-link:hover {
    color: var(--bs-light);
    letter-spacing: 1px;
    box-shadow: none;
}

.footer .copyright {
    border-top: 1px solid rgba(255, 255, 255, .1);
}
/* 浮動聯繫按鈕組 */
.floating-contact {
    position: fixed;
    bottom: 90px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000; /* 確保不被其他元素覆蓋 */
}

/* 共用按鈕樣式 */
.contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: #384341; /* 深綠 */
    color: #ffffff; /* 白色圖標 */
    border-radius: 50%; /* 圓形按鈕 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* 陰影 */
    transition: background-color 0.3s ease, transform 0.3s ease;
    font-size: 24px; /* 圖標大小 */
    text-decoration: none;
    font-family: 'Microsoft JhengHei', Arial, sans-serif;
}

/* Hover 效果 */
.contact-btn:hover {
    background-color: #dcc38d; /* 金色 */
    transform: scale(1.1); /* 放大 10% */
}

/* 個別按鈕樣式（可選） */
.line-btn {
    background-color: #00c300; /* LINE 綠色 */
}
.line-btn:hover {
    background-color: #00a300; /* 稍深的 LINE 綠色 */
}
.email-btn {
    background-color: #384341; /* 深綠 */
}
.email-btn:hover {
    background-color: #dcc38d; /* 金色 */
}
.phone-btn {
    background-color: #384341; /* 深綠 */
}
.phone-btn:hover {
    background-color: #dcc38d; /* 金色 */
}

/* 響應式設計 */
@media (max-width: 576px) {
    .contact-btn {
        width: 40px;
        height: 40px;
        font-size: 20px; /* 手機上縮小圖標 */
    }
    .floating-contact {
        bottom: 15px;
        right: 15px;
        gap: 8px;
    }
}

/* ==================== 1. 根變數定義 ==================== */
:root {
    --primary-color: #333;
    --second-color: #666;
    --accent-color: #595959;
    --link-color: #595959;
    --text-color: #ffffff;
    --bg-light: #f5f5f5;
    --arrow-color: #C4A665;
}

/* ==================== 強制滿版 + 分離背景 ==================== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0 !important; padding: 0 !important; width: 100vw !important; overflow-x: hidden; }

/* 專給 Navbar 用的滿版深灰背景 */
.navbar-fullwidth-bg {
    background: #595959 !important;
}

/* ==================== 2. 背景漸層與自訂類別 ==================== */
.bg-secondary {background: #595959; background: linear-gradient(90deg,rgba(255, 255, 255, 1) 17%, rgba(255, 255, 255, 1) 65%, rgba(255, 255, 255, 1) 100%);}
.bg-myprimary { background: #595959; color: #ffffff; }
.myprimary-text { background: #595959; color: #ffffff; }
.bg-primary { background-color: #595959 !important; }
.text-primary { color: #333 !important; }
.bg-servic { background-color: #595959 !important; color:#fff; }

/* ==================== 3. 主要按鈕樣式 ==================== */
.btn-primary {
    background-color: #595959 !important;
    color: var(--text-color) !important;
    border: none;
    padding: 12px 30px;
    font-weight: bold;
    border-radius: 50px;
    transition: all 0.3s ease;
}
.btn-primary:hover {
    background-color: #d4b676 !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(196,166,101,0.4);
}
.btn-secondary {
    background-color: #d4b676 !important;
    color: var(--text-color) !important;
    border: none;
    padding: 12px 30px;
    font-weight: bold;
    border-radius: 50px;
    transition: all 0.3s ease;
}
.btn-secondary:hover {
    background-color: #595959 !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(196,166,101,0.4);
}
.btn-gold {
    background-color: #d4b676 !important;
    color: var(--text-color) !important;
    border: none;
    padding: 12px 30px;
    font-weight: bold;
    border-radius: 50px;
    transition: all 0.3s ease;
}
.btn-gold:hover {
    background-color: #595959 !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(196,166,101,0.4);
}

/* 讓 Navbar 真正滿版 */
.navbar-fullwidth {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.navbar-fullwidth .navbar-collapse {
    padding-left: 0rem; /* 減少間距，或設為 0 */
    padding-right: 0rem;
}

@media (max-width: 991.98px) {
    .navbar-fullwidth .navbar-collapse {
        padding-left: 0rem; /* 手機版調整 */
        padding-right: 0rem;
    }
}

/* ==================== 4. 導覽列文字樣式 ==================== */
.navbar-nav .nav-link {
    color: #ffffff !important; font-weight: 700 !important;
}
.navbar-nav .nav-link:hover,
.dropdown-item:hover {
    color: #dcc38d !important;
}
.dropdown-item {
    color: #384341 !important; font-weight: 700 !important;
}

/* ==================== 5. 固定導覽列 + Logo 控制 ==================== */
/* 初始狀態：Topbar Logo 顯示 */
.topbar-logo {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* 初始狀態：Navbar Logo 隱藏 */
#fixed-logo,
#mobile-logo {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

/* 固定時：Topbar Logo 淡出 */
.nav-bar.fixed-top ~ .top-bar .topbar-logo,
body.nav-padding .topbar-logo {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* 固定時：Navbar Logo 淡入 */
.nav-bar.fixed-top #fixed-logo,
.nav-bar.fixed-top #mobile-logo {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Logo 顯眼效果：白底框 + 金邊 */
#fixed-logo,
#mobile-logo {
   /* background: rgba(255,255,255,0.95);*/
    padding: 6px 10px;
    border-radius: 8px;
   /* box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    border: 1px solid #d4b676;*/
}

/* 固定導覽列樣式 */
.nav-bar.fixed-top {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1030 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    animation: slideDown 0.4s ease-out;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    background: #595959 !important;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.nav-bar.fixed-top .navbar {
    padding: 0.4rem 1rem !important;
}

/* 防止內容跳動 */
body.nav-padding {
    padding-top: 70px !important;
}

/* ==================== 6. 首頁輪播圖 (Slider) 樣式 ==================== */
#header-carousel {
    position: relative;
    width: 100%;
    height: 70vh;
    overflow: hidden;
}
#header-carousel .carousel-item {
    width: 100%;
    height: 70vh;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}
#header-carousel .carousel-item::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1;
}
#header-carousel .carousel-caption {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    text-align: center;
    width: 100%;
    padding: 0 15px;
}
#header-carousel .carousel-caption h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    margin-bottom: 1.5rem;
}
#header-carousel .carousel-caption p {
    font-size: 1.2rem;
    color: #eee;
    max-width: 700px;
    margin: 0 auto 2rem;
    line-height: 1.8;
}

/* ==================== 7. 輪播左右箭頭按鈕 ==================== */
#header-carousel .carousel-control-prev,
#header-carousel .carousel-control-next {
    width: 60px; height: 60px;
    background:#595959;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.9;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}
#header-carousel .carousel-control-prev { left: 30px; }
#header-carousel .carousel-control-next { right: 30px; }
#header-carousel .carousel-control-prev:hover,
#header-carousel .carousel-control-next:hover {
    background: rgba(196,166,101,0.8);
    transform: translateY(-50%) scale(1.1);
}
#header-carousel .carousel-control-prev i,
#header-carousel .carousel-control-next i {
    font-size: 2rem;
    color: #fff;
    font-weight: bold;
}

@media (max-width: 768px) {
    #header-carousel .carousel-caption h1 { font-size: 2.2rem; }
    #header-carousel .carousel-caption p { font-size: 1rem; }
    #header-carousel .carousel-control-prev,
    #header-carousel .carousel-control-next { width: 50px; height: 50px; }
    #header-carousel .carousel-control-prev i,
    #header-carousel .carousel-control-next i { font-size: 1.5rem; }
    #header-carousel .carousel-control-prev { left: 15px; }
    #header-carousel .carousel-control-next { right: 15px; }
}

/* ==================== 8. 產品展示輪播區塊 ==================== */
.product-showcase-section {
    padding-left: 0 !important;
    padding-right: 0 !important;
    z-index:3;
    background: rgba(255, 255, 255, 0.4);
}
.product-showcase-wrapper {
    position: relative;
    margin: 0 auto;
    max-width: 100% !important;
    padding: 0 80px !important;
    overflow: visible !important;
}
.product-showcase-carousel {
    padding: 0 !important;
    overflow: hidden;
}
.product-showcase-carousel .owl-stage-outer {
    overflow: visible !important;
}
.product-showcase-carousel .owl-item {
    opacity: 0.3;
    transition: opacity 0.5s ease;
}
.product-showcase-carousel .owl-item.active {
    opacity: 1;
}
.product-showcase-carousel .owl-nav { display: none !important; }

.carousel-prev-btn,
.carousel-next-btn {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 60px !important;
    height: 60px !important;
    background: #595959 !important;
    color: #fff !important;
    border: 3px solid #fff !important;
    border-radius: 50% !important;
    font-size: 2rem !important;
    font-weight: bold !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.35) !important;
    z-index: 1000 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}
.carousel-prev-btn { left: 20px !important; }
.carousel-next-btn { right: 20px !important; }
.carousel-prev-btn:hover,
.carousel-next-btn:hover {
    background: rgba(196,166,101,0.8) !important;
    transform: translateY(-50%) scale(1.15) !important;
}

@media (max-width: 992px) {
    .product-showcase-wrapper { padding: 0 60px !important; }
    .carousel-prev-btn, .carousel-next-btn {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.6rem !important;
    }
}
@media (max-width: 576px) {
    .product-showcase-wrapper { padding: 0 15px !important; }
    .carousel-prev-btn, .carousel-next-btn { display: none !important; }
}

.product-card {
    height: 580px;
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    background-size: cover !important;
    background-position: center !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    margin: 0 12px;
    transition: transform 0.3s ease;
}
.product-card:hover {
    transform: translateY(-8px);
}
.product-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.52);
    z-index: 1;
}
.product-card .donation-item {
    position: relative;
    z-index: 2;
    height: 100%;
    padding: 2rem;
    color: #fff;
    display: flex;
    flex-direction: column;
}

.product-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.fixed-bg-section {
    position: relative;
    top: 0; left: 0; width: 100%; height: 100%;
    /* background: url('../img/hero-bg.jpg') center center / cover no-repeat fixed; */  /* 這行註解掉 */

    /* opacity: 0.3; */  /* 這行也註解，讓 PHP 控制 */
}
.fixed-bg-section::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.2);
    z-index: 1;
}
.fixed-bg-section > .container {
    position: relative;
    z-index: 2;
}
@media (max-width: 768px) {
    .fixed-bg-section { background-attachment: scroll !important; }
}

.section-wrapper {
    background: #fff;
    padding: 5rem 0;
    position: relative;
}
.section-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #ddd, transparent);
    margin: 3rem 0;
}

/* ==================== 11. Category Banner ==================== */
.category-banner {
    position: relative;
    background: url('../img/web_pg1.jpg') center center / cover no-repeat;
    color: #ffffff;
    padding: 2.625rem 0;
    overflow: hidden;
}
.category-banner .container { position: relative; z-index: 2; }
.category-banner-content { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.category-banner-text h1 { font-size: 3rem; font-weight: 700; margin-bottom: 1rem; color: #fff; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
.category-banner-text p { font-size: 1.2rem; margin-bottom: 1.5rem; opacity: 0.9; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
.category-go-btn { background: #C4A665; color: #fff; border: none; padding: 12px 30px; font-weight: bold; border-radius: 50px; font-size: 1.1rem; transition: all 0.3s ease; text-decoration: none; display: inline-block; }
.category-go-btn:hover { background: #595959; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(196,166,101,0.4); }

/* ==================== 12. Product Highlight ==================== */
.product-highlight { position: relative; padding: 2.65rem 0; overflow: hidden; border-radius: 10px; margin: 3rem 0; }
.product-highlight::before { content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.3); border-radius: 10px; z-index: 1; }
.product-highlight .container { position: relative; z-index: 2; }
.highlight-card { background: rgba(255,255,255,0.8); border-radius: 10px;margin: 0 1.5rem; padding: 2.5rem; box-shadow: 0 15px 35px rgba(0,0,0,0.2); backdrop-filter: blur(5px); }
.highlight-content h3 { font-size: 1.8rem; font-weight: 700; color: #000; margin-bottom: 1rem; text-shadow: 2px 2px 4px rgba(255,255,255,0.5); }
.highlight-content p { font-size: 1.1rem; color: #000; margin-bottom: 1.5rem; text-shadow: 2px 2px 4px rgba(255,255,255,0.5); }
.go-btn { background: #C4A665; color: #fff; padding: 12px 36px; font-weight: bold; font-size: 1.1rem; border-radius: 50px; text-decoration: none; box-shadow: 0 4px 15px rgba(196,166,101,0.3); transition: all 0.3s ease; }
.go-btn:hover { background: #d4b676; transform: translateY(-3px); box-shadow: 0 8px 25px rgba(196,166,101,0.5); }
.highlight-image { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-height: 180px; padding: 15px; background: rgba(255,255,255,0.8); border-radius: 20px; box-shadow: 0 8px 25px rgba(0,0,0,0.15); overflow: hidden; }
.highlight-image img { max-width: 90%; max-height: 90%; width: auto; height: auto; object-fit: contain; object-position: center; transition: transform 0.3s ease; }
.highlight-image img:hover { transform: scale(1.08); }

@media (max-width: 992px) {
    .row.align-items-center { flex-direction: column; text-align: center; }
    .col-lg-8, .col-lg-4 { width: 100%; max-width: 100%; flex: none; }
    .highlight-content { margin-bottom: 1.5rem; }
    .highlight-image { order: -1; min-height: 160px; margin-bottom: 1rem; }
}
@media (max-width: 576px) {
    .product-highlight { padding: 3rem 0; margin: 2rem 0; border-radius: 20px; }
    .highlight-card { padding: 1.5rem; border-radius: 20px; }
    .highlight-content h3 { font-size: 1.5rem; }
    .go-btn { padding: 10px 28px; font-size: 1rem; }
    .highlight-image { min-height: 130px; }
}

/* ==================== 產品列表頁面 ==================== */
.pd-sidebar {
    position: sticky;
    top: 120px;               /* 跟固定 navbar 留點距離 */
    max-height: calc(100vh - 140px);
    overflow-y: auto;
}
.pd-cat-item {
    padding: 0.5rem 0;
    border-left: 3px solid transparent;
    transition: all .3s ease;
}
.pd-cat-item:hover,
.pd-cat-item.active {
    color: var(--arrow-color) !important;
    border-left-color: var(--arrow-color);
    font-weight: 700;
}

/* 商品卡片 */
.pd-card {
    transition: transform .3s ease, box-shadow .3s ease;
}
.pd-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0,0,0,.12);
}
.pd-img-wrapper {
    width: 100%;
    max-width: 280px;         /* 電腦版圖片固定寬度 */
    overflow: hidden;
}
.pd-img-wrapper img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform .4s ease;
}
.pd-img-wrapper img:hover {
    transform: scale(1.06);
}

/* 行動版調整 */
@media (max-width: 767.98px) {
    .pd-img-wrapper {
        max-width: 100%;
        margin-bottom: 1rem;
    }
    .pd-card {
        flex-direction: column;
    }
}/* ==================== 手機版選單 + Accordion 優化 ==================== */

/* 手機版選單按鈕 */
@media (max-width: 991.98px) {
    #mobileSidebar {
        border: 1px solid #dcc38d;
        border-radius: 0.75rem;
        margin-top: 0.5rem;
    }
}
/* ==================== Accordion 修正版（解決標題消失） ==================== */
/* ==================== Accordion 最終修正版（標題右移 + 淺米底） ==================== */
/* ==================== Accordion 互斥高亮（點哪個亮哪個） ==================== */
.accordion-button {
    font-size: 1rem !important;
    color: #333;
    padding: 0.75rem 1.25rem !important;
    border: none !important;
    background: #FCF7EB !important;
    box-shadow: none !important;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 5px !important;
    margin-top: 0.5rem !important;
    transition: all 0.3s ease;
}
.accordion-button::after {
    display: none !important;
}

/* 符號 */
.accordion-icon {
    font-size: 1.6rem;
    font-weight: 300;
    line-height: 1;
    transition: transform 0.3s ease;
    color: inherit;
}
.accordion-button:not(.collapsed) .accordion-icon {
    transform: rotate(45deg);
}

/* 當前展開的項目：深灰底 + 白字 */
.accordion-item:has(> .accordion-collapse.show) .accordion-button {
    background: #595959 !important;
    color: #ffffff !important;
    border-radius: 5px 5px 0 0 !important;
    margin-top: 0 !important;
}

/* 展開項目的內容區 */
.accordion-item:has(> .accordion-collapse.show) .accordion-body {
    background: #f8f9fa !important;
    border-radius: 0 0 5px 5px;
    margin-top: -8px;
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
}
/* ==================== 手機版產品目錄按鈕展開高亮 ==================== */
.mobile-sidebar-toggle .btn {
    transition: all 0.3s ease;
    border-radius: 0.75rem !important;
}

/* 當 collapse 展開時：改變按鈕樣式 */
.mobile-sidebar-toggle .collapse.show ~ .btn,
.mobile-sidebar-toggle .btn[aria-expanded="true"] {
    background-color: #dcc38d !important;
    color: #5d4037 !important; /* 深咖啡字 */
    border-color: #dcc38d !important;
    font-weight: 600;
}

/* 箭頭旋轉動畫 */
.toggle-icon {
    transition: transform 0.3s ease;
}
.mobile-sidebar-toggle .btn[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}
/* ==================== pd_detail.php 專用樣式 ==================== */
.pd-detail-img img {
    transition: transform 0.4s ease;
}
.pd-detail-img:hover img {
    transform: scale(1.03);
}

/* ==================== pd_detail.php 專用樣式 ==================== */
.pd-gallery-carousel .item img {
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.pd-gallery-carousel .owl-nav button {
    background: #595959 !important;
    color: white !important;
    width: 50px;
    height: 50px;
    border-radius: 50% !important;
    font-size: 1.5rem;
}
.pd-gallery-carousel .owl-nav button:hover {
    background: #dcc38d !important;
}

.testimonial-img img {
    height: 250px;
    object-fit: cover;
    border-radius: 12px;
}
.testimonial-text h4 {
    color: #0d6efd;
    font-weight: 600;
}
/* 桌機版箭頭樣式 */
.owl-nav {
  position: absolute;
  top: 40%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  pointer-events: none; /* 讓點擊只作用在箭頭圖示上 */
}
.owl-nav button {
  background: rgba(255,255,255,0.8) !important;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  pointer-events: all;
  transition: 0.3s;
}
.owl-nav button:hover {
  background: rgba(255,255,255,1) !important;
}
.owl-nav i {
  line-height: 45px;
}
/* ==================== 產品實拍輪播 UI 質感升級 ==================== */
.product-gallery {
    padding: 0 15px;
}

.product-img-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    transition: all 0.4s ease;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.product-img-wrapper img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    display: block;
}

.product-img-wrapper:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.18);
}

.product-img-wrapper:hover img {
    transform: scale(1.08);
}

/* 箭頭美化 */
.product-carousel .owl-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    padding: 0 10px;
}

.product-carousel .owl-nav button {
    background: rgba(255, 255, 255, 0.95) !important;
    border: none !important;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    pointer-events: all;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.product-carousel .owl-nav button:hover {
    background: #fff !important;
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.product-carousel .owl-nav i {
    font-size: 1.5rem;
    color: #0d6efd;
    line-height: 1;
}

/* 圓點導航 */
.product-carousel .owl-dots {
    text-align: center;
    margin-top: 20px;
}

.product-carousel .owl-dots .owl-dot span {
    width: 12px;
    height: 12px;
    background: #ddd;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.product-carousel .owl-dots .owl-dot.active span,
.product-carousel .owl-dots .owl-dot:hover span {
    background: #0d6efd;
    transform: scale(1.2);
}

/* 手機優化 */
@media (max-width: 767px) {
    .product-img-wrapper img {
        height: 200px;
    }
    .product-carousel .owl-nav button {
        width: 40px;
        height: 40px;
    }
    .product-carousel .owl-nav i {
        font-size: 1.2rem;
    }
}
/* 固定高度聯絡卡片 */
.contact-card {
    min-height: 280px;
    max-height: 280px;
    height: 280px !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2) !important;
}

/* 手機版調整高度 */
@media (max-width: 767px) {
    .contact-card {
        height: 220px !important;
        min-height: 220px;
        max-height: 220px;
    }
    .contact-card p {
        font-size: 1rem !important;
        margin-bottom: 1rem !important;
    }
}
