/* ============================================================
   目錄 Table of Contents
   ============================================================
   1. Header / 主選單版面對齊
   2. 主選單下拉選單 (create_menu 輸出)
   3. 商品側邊分類選單 (category_list)
   4. 商品列表卡片 (PC)
   5. 商品詳情頁 - 圖片區 / 放大鏡 / 縮圖
   6. 商品詳情頁 - 標題 / 價格 / 促銷標籤
   7. 商品詳情頁 - 數量選擇器 / 加入購物車
   8. 商品詳情頁 - 標題列與內文排版
   9. 商品詳情頁 - 後台編輯器內容美化
   10. 購物車右側吸頂懸浮
   11. 個人資料編輯區塊
   12. 連結顏色
   ============================================================ */



/* ============================================================
   1. Header / 主選單版面對齊
   ============================================================ */

/* 讓右側欄整體用同一個 flex 容器對齊基準線，垂直置中 */
.col-xl-5.header-icon .header-icon-block {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    width: 100%;
}

.mainmenu-content {
    display: flex;
    align-items: center;
    margin-right: 40px;
}

.mainmenu-content .menu-ul {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.mainmenu-content .menu-li,
.mainmenu-content .nav-item {
    display: flex;
    align-items: center;
    position: relative;
    list-style: none;
}

.mainmenu-content .menu-link,
.mainmenu-content .nav-item>.nav-link {
    display: flex;
    align-items: center;
    height: 100%;
    line-height: 1;
    padding: 0 15px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}

.mainmenu-content .nav-item .drp_btn {
    display: inline-flex;
    align-items: center;
    margin-left: 2px;
    font-size: 14px;
    cursor: pointer;
    font-weight: normal;
}

/* active 狀態（目前所在頁面） */
.mainmenu-content .nav-item.active>.nav-link {
    font-weight: 700;
}

/* 右側會員 + 購物車那組，確保垂直置中 */
.header-icon-element {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.header-icon-wrap {
    display: flex;
    align-items: center;
    padding: 0 10px;
}

.header-icon-wrapper {
    display: flex;
    align-items: center;
    height: 100%;
}

.header-icon-wrapper a {
    display: flex;
    align-items: center;
}

/* 手機版：漢堡選單 + 搜尋 icon 那個欄位 */
@media (max-width: 1199.98px) {
    .header-area {
        display: flex;
        align-items: center;
    }

    .header-icon-block {
        display: flex;
        align-items: center;
        height: 100%;
    }

    .header-icon-wrapper a,
    .toggler-btn {
        display: flex;
        align-items: center;
    }
}


/* ============================================================
   2. 主選單下拉選單 (create_menu() 輸出)
   ============================================================ */

/* 下拉容器：對應 menu-dropdown menu-sub position-absolute extra-bg z-2 box-shadow */
.mainmenu-content .nav-item .sub_menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background-color: var(--extra-bgcolor, #fff);
    z-index: 2;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 25px 0;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

.mainmenu-content .nav-item:hover .sub_menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* 內層 ul：對應 .menudrop-ul */
.mainmenu-content .nav-item .sub_menu>ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* 每個子項目：對應 .menudrop-li */
.mainmenu-content .nav-item .sub_menu>ul>li {
    position: relative;
}

/* 子項目連結：對應 .menu-sublink 樣式 (padding: 5px 30px) */
.mainmenu-content .nav-item .sub_menu>ul>li>a {
    display: block;
    padding: 5px 30px;
    font-size: 15px;
    color: var(--body-dominant-color, #333);
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.mainmenu-content .nav-item .sub_menu>ul>li>a:hover {
    background-color: #E1E1D6;
}

.mainmenu-content .nav-item.active .sub_menu>ul>li>a.active {
    background-color: #E1E1D6;
    font-weight: 600;
}

/* 強制下拉選單往下展開，蓋掉 top-auto 這個工具 class */
.mainmenu-content .menu-li .menu-dropdown.menu-sub {
    top: 100% !important;
    bottom: auto !important;
    left: 0;
}

/* ============================================================
   3. 商品側邊分類選單 (category_list)
   ============================================================ */

.category_list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.category_list .cat-item {
    margin-bottom: 4px;
}

/* 連結與切換開關，共用基礎樣式 */
.category_list .cat-link,
.category_list .cat-toggle {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px !important;
    font-size: 15px;
    font-weight: 600;
    color: #000 !important;
    border-radius: 6px;
    text-decoration: none !important;
    background-color: transparent !important;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.category_list .cat-link:hover,
.category_list .cat-toggle:hover {
    background-color: #8D8E63 !important;
    color: #fff !important;
}

.category_list .cat-link.active,
.category_list .cat-toggle.active {
    background-color: #8D8E63 !important;
    color: #fff !important;
    font-weight: 700;
}

.category_list .cat-toggle:hover .cat-arrow,
.category_list .cat-toggle.active .cat-arrow {
    border-color: #fff;
}

/* 箭頭圖示 */
.category_list .cat-arrow {
    width: 8px;
    height: 8px;
    border-right: 2px solid #000;
    border-bottom: 2px solid #000;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    opacity: 0.5;
    flex-shrink: 0;
}

/* 收合狀態的箭頭方向 */
.category_list .cat-item:not(.open) .cat-arrow {
    transform: rotate(-45deg);
}

/* 次分類 */
.sub_menu {
    list-style: none;
    margin: 4px 0 8px;
    padding: 0 0 0 20px;
    border-left: 2px solid #E1E1D6;
}

.sub_menu li {
    margin-bottom: 2px;
}

.sub_menu li a {
    display: block !important;
    padding: 8px 15px !important;
    font-size: 14px;
    color: #000 !important;
    border-radius: 6px;
    text-decoration: none !important;
    background-color: transparent !important;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.sub_menu li a:hover {
    background-color: #8D8E63 !important;
    color: #fff !important;
}

.sub_menu li a.active {
    background-color: #8D8E63 !important;
    color: #fff !important;
    font-weight: 600;
}


/* ============================================================
   4. 商品列表卡片 (PC)
   ============================================================ */

/* 限制標題最多顯示兩行，超過顯示 ... */
.text-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 按鈕過渡效果，提升點擊體驗 */
.pro-bottom-actions .wishlist:hover {
    background-color: #e9ecef !important;
    color: #ff6b6b !important;
    transition: 0.2s ease-in-out;
}

.pro-bottom-actions .add-to-cart:hover {
    /* 讓原本的 #DCDCCE 稍微變深一點點作為 hover 效果 */
    background-color: rgb(148, 149, 102) !important;
    transition: 0.2s ease-in-out;
}

/* 針對極小螢幕的微調 */
@media (max-width: 576px) {
    .pro-bottom-actions .add-to-cart {
        padding: 0.3rem 0.5rem !important;
    }

    .pro-bottom-actions .add-to-cart span.small {
        font-size: 0.75rem;
    }
}


/* ============================================================
   5. 商品詳情頁 - 圖片區 / 放大鏡 / 縮圖
   ============================================================ */

.product-img-big.bg-white {
    background-color: #FFFFFF;
    border-radius: 2px;
    /* 極小的圓角 */
}

/* 放大按鈕：低調的半透明背景，hover 時套用主色調 */
.jade-full-view {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-top: 10px;
    margin-right: 10px;
    background-color: rgba(255, 255, 255, 0.7);
    /* 半透明白底 */
    color: #555555;
    border-radius: 2px;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.jade-full-view:hover {
    background-color: #8D8E63;
    color: #FFFFFF;
}

/* 左右切換箭頭 (極簡線條風) */
.jade-swiper-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 60px;
    /* 改成長方形，更像時尚雜誌或藝廊 */
    background-color: rgba(255, 255, 255, 0.6);
    border: none;
    color: #333333;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.jade-swiper-nav:hover {
    background-color: rgba(255, 255, 255, 0.95);
    /* hover 時箭頭變成主色調 */
    color: #8D8E63;
}

/* 縮圖區塊 (高級聚焦感) */
/* 預設縮圖稍微變暗，讓視覺集中在大圖上 */
.jade-thumb-img {
    padding-bottom: 4px;
    /* 預留底線空間，避免跳動 */
    opacity: 0.5;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.jade-thumb-img:hover {
    opacity: 0.8;
}

/* Swiper 通常會給目前啟用的縮圖加上 .swiper-slide-thumb-active 或 .swiper-slide-active 這個 class */
/* 啟用狀態：全彩，並在下方加上主色調的底線 */
.swiper-slide-thumb-active .jade-thumb-img,
.swiper-slide-active .jade-thumb-img {
    opacity: 1;
    border-bottom: 2px solid #8D8E63;
}


/* ============================================================
   6. 商品詳情頁 - 標題 / 價格 / 促銷標籤
   ============================================================ */

/* 文字與主色調 */
.jade-primary-color {
    color: #8D8E63 !important;
}

.letter-spacing-1 {
    letter-spacing: 1px;
}

/* 商品標題 */
.jade-product-title {
    color: #222222;
    font-weight: 500;
    letter-spacing: 2px;
    line-height: 1.4;
}

/* 價格標籤 (如：-15% off) */
.discount-badge {
    background-color: #8D8E63;
    color: #FFFFFF;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 2px;
    letter-spacing: 1px;
    vertical-align: middle;
}

/* 促銷活動清單 - 採用極簡低調的風格 */
.jade-promo-list {
    /* 非常淺的灰白色 */
    background-color: #FAFAFA !important;
    border: 1px solid #EAEAEA;
    /* 左側用主色調點綴 */
    border-left: 3px solid #8D8E63;
}

.jade-promo-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 14px;
    color: #555555;
    border-bottom: 1px dashed #E5E5E5;
}

.jade-promo-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.promo-title {
    font-weight: 500;
}

.promo-date {
    font-size: 12px;
    color: #999999;
}

/* 優雅的分隔線 */
hr.jade-divider {
    margin: 1.5rem 0;
    border: 0;
    border-top: 1px solid rgba(141, 142, 99, 0.2);
}


/* ============================================================
   7. 商品詳情頁 - 數量選擇器 / 加入購物車
   ============================================================ */

/* 數量選擇器 (拿掉粗重的圓角與底色) */
.jade-qty-wrap {
    height: 48px;
    overflow: hidden;
    border-color: #DCDCDC !important;
    border-radius: 2px;
}

.jade-qty-wrap input {
    height: 100%;
    background-color: transparent !important;
    color: #333333;
    font-weight: 500;
}

.jade-qty-wrap button {
    height: 100%;
}

/* 加入購物車按鈕 */
.jade-btn-addcart {
    height: 48px;
    background-color: #8D8E63;
    color: #FFFFFF;
    border: none;
    border-radius: 2px;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.jade-btn-addcart:hover {
    background-color: #72734C;
    color: #FFFFFF;
}

/* 底部附屬規格字體 */
.jade-meta-text {
    padding-left: 15px;
    border-left: 1px solid #DCDCDC;
}


/* ============================================================
   8. 商品詳情頁 - 標題列與內文排版
   ============================================================ */

/* 標題樣式 (套用主色調 #8D8E63) */
.jade-title {
    color: #8D8E63;
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: 2px;
    padding-bottom: 12px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(141, 142, 99, 0.3);
}

/* 獨立出來的左側標題 */
.jade-title-elegant {
    margin: 0;
    color: #8D8E63;
    font-size: 1.1rem;
    font-weight: 500;
    /* 拉大字距，精品質感倍增 */
    letter-spacing: 3px;
}

/* 右側內文區塊的優化 */
.elegant-text-layout {
    /* 使用深灰而非純黑 */
    color: #4A4A4A;
    font-size: 0.95rem;
    /* ★ 關鍵：大幅增加行距，讓文字有呼吸空間 */
    line-height: 2.2;
    letter-spacing: 0.5px;
    /* ★ 關鍵：限制最大寬度，避免文字一行拉得太長，破壞版面 */
    max-width: 800px;
}

/* 針對後台純文字吐出的段落處理 */
.elegant-text-layout p {
    /* 段落之間留出大空白 */
    margin-bottom: 2rem;
}

/* 滿版分隔線 */
hr.jade-divider-full {
    margin-top: 2rem;
    border: 0;
    /* 極淡的茶綠色 */
    border-top: 1px solid rgba(141, 142, 99, 0.2);
}


/* ============================================================
   9. 商品詳情頁 - 後台編輯器內容美化
   ============================================================ */

.jade-editor-content {
    /* 將純黑改為深灰，降低銳利感 */
    color: #555555;
    font-size: 1rem;
    /* 加大行距，營造呼吸感 */
    line-height: 1.8;
    letter-spacing: 0.5px;
}

/* 美化段落 */
.jade-editor-content p {
    /* 段落之間留白多一點 */
    margin-bottom: 1.5rem;
}

/* 當後台人員將文字設為「粗體」時，自動變成主色調 */
.jade-editor-content strong,
.jade-editor-content b {
    color: #8D8E63;
    font-weight: 600;
}

/* 美化項目符號清單 (Bullet points) */
.jade-editor-content ul {
    /* 隱藏預設的黑點 */
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 1.5rem;
}

.jade-editor-content ul li {
    position: relative;
    padding-left: 1.5rem;
    padding-bottom: 8px;
    margin-bottom: 0.8rem;
    /* 加上極淡的底線，像規格表一樣 */
    border-bottom: 1px dashed #EAEAEA;
}

.jade-editor-content ul li::before {
    /* 使用小方塊或小圓點，項目符號使用主色調 */
    content: "▪";
    position: absolute;
    left: 0;
    top: 0;
    color: #8D8E63;
    font-size: 1.2rem;
    line-height: 1.5;
}

.jade-editor-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.jade-editor-content table td,
.jade-editor-content table th {
    padding: 12px;
    vertical-align: top;
    border-bottom: 1px solid #EAEAEA;
}


/* ============================================================
   10. 購物車右側，吸頂懸浮
   ============================================================ */
@media (min-width: 992px) {
    .cart-summaryview {
        position: -webkit-sticky;
        /* 支援 Safari */
        position: sticky;

        /* 距離頂部的距離。如果你網站上方有「固定的導覽列(Navbar)」，
           這個數值必須大於你的 Navbar 高度 (例如改為 80px 或 100px) */
        top: 30px;

        /* 確保浮動時不會被左側其他元素蓋住 */
        z-index: 10;

        /* 加上一點過渡動畫讓視覺更平滑 (非必須) */
        transition: top 0.3s ease;
    }
}

/* ============================================================
    11. 個人資料編輯區塊
   ============================================================ */

.ap-menu-item {
    border-left: 3px solid transparent;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.ap-menu-item:hover {
    background-color: #F7F7F1;
}

.ap-menu-item.ap-menu-active {
    background-color: #F0F1E8;
    border-left: 3px solid #8D8E63;
    font-weight: 600;
}

/* ============================================================
    12. footer 連結顏色
   ============================================================ */
.ft-link .ftlink-li a,
.ft-link .ftlink-li span {
    color: #fff;
    transition: color 0.2s ease;
}

.ft-link .ftlink-li a:hover {
    color: var(--body-font-color);
}