/* ==========================================================================
   ★ 0. 全站字體強制統一 (強制鎖死為 微軟正黑體 / 現代黑體) ★
   ========================================================================== */
body, p, h1, h2, h3, h4, h5, h6, a, li, button, input, textarea, .textwidget {
    font-family: "Microsoft JhengHei", "PingFang TC", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
}

/* ==========================================================================
   1. 色彩與字體全站統一規範 (品牌深藍：#334d8f | 深藍 Hover：#1e3060)
   ========================================================================== */
a {
    color: #334d8f;
    transition: color 0.3s ease;
}

a:hover {
    color: #1e3060;
}

/* ==========================================================================
   2. 主分類與商品清單頁面 (保持高質感卡片與響應式排版)
   ========================================================================== */
.vibe-main-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.vibe-cat-btn {
    background-color: #f0f0f0;
    border: 2px solid #eaeaea;
    border-radius: 40px;
    padding: 12px 35px;
    font-size: 22px;
    font-weight: bold;
    color: #334d8f;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.vibe-cat-btn:hover, .vibe-cat-btn.active {
    background-color: #334d8f !important;
    color: #ffffff !important; 
    border-color: #334d8f !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15); 
}

.vibe-product-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    padding: 0 10px;
    align-items: stretch;
}

@media (max-width: 1024px) {
    .vibe-product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .vibe-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

.vibe-product-card {
    background: #ffffff !important;
    padding: 20px !important;
    text-align: left !important; 
    border: 1px solid #eaeaea !important;
    border-radius: 10px !important;
    transition: all 0.3s ease !important;
    display: flex !important; 
    flex-direction: column !important; 
    height: 100% !important;
}

.vibe-product-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.08) !important; 
    border-color: #334d8f !important;
}

.vibe-product-image {
    height: 170px !important; 
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 15px !important;
}

.vibe-product-image img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
}

.vibe-product-title {
    font-size: 15px !important; 
    color: #334d8f !important; 
    margin-bottom: 15px !important;
    font-weight: bold !important;
    line-height: 1.5 !important;
    text-align: left !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important; 
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    min-height: 67px !important; 
}

.vibe-view-btn {
    display: block !important;
    width: 100% !important;
    background-color: #334d8f !important;
    color: #ffffff !important;
    padding: 10px 0 !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    font-size: 16px !important;
    font-weight: bold !important;
    margin-top: auto !important;
    text-align: center !important;
    transition: background-color 0.3s ease !important;
}

.vibe-view-btn:hover {
    background-color: #1e3060 !important;
}

.vibe-subnav-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px; 
    margin-bottom: 30px;
}

.vibe-subcat-link {
    color: #334d8f !important; 
    text-decoration: none;
    font-size: 18px; 
    padding-bottom: 5px;
    border-bottom: 2px solid transparent; 
    transition: all 0.3s ease;
}

.vibe-subcat-link:hover, .vibe-subcat-link.active {
    border-bottom: 2px solid #334d8f !important; 
    font-weight: bold;
}

@media (max-width: 768px) {
    .vibe-main-nav {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 10px;
        gap: 10px;
        margin-bottom: 25px;
    }
    .vibe-main-nav::-webkit-scrollbar {
        display: none;
    }
    .vibe-cat-btn {
        font-size: 16px;
        padding: 8px 18px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    .vibe-subnav-list {
        gap: 15px;
        margin-bottom: 25px;
    }
    .vibe-subcat-link {
        font-size: 16px;
    }
}

/* ==========================================================================
   3. 單一商品頁面：文字層級規範與顏色統一
   ========================================================================== */
.single-product .product_title {
    font-size: 30px !important;
    font-weight: bold !important;
    color: #334d8f !important;
    margin-bottom: 20px !important;
}

.woocommerce-product-details__short-description,
.woocommerce-product-details__short-description p,
.woocommerce-product-details__short-description ul,
.woocommerce-product-details__short-description li,
.woocommerce-product-details__short-description span {
    font-size: 18px !important;
    line-height: 1.8 !important;
    color: #334d8f !important; 
}

.woocommerce-product-details__short-description strong,
.woocommerce-product-details__short-description b {
    color: #334d8f !important;
}

.woocommerce-product-details__short-description li {
    margin-bottom: 15px !important; 
}

.product_meta,
.product_meta span {
    font-size: 22px !important; 
    color: #334d8f !important; 
    margin-top: 30px !important;
    padding-top: 15px !important;
    border-top: 1px dashed #eaeaea !important;
}

.product_meta a {
    font-size: 22px !important;
    color: #334d8f !important;
    font-weight: bold !important;
    text-decoration: none !important;
}

.product_meta a:hover {
    color: #1e3060 !important;
    text-decoration: underline !important;
}

/* ==========================================================================
   4. 單一商品頁面：相關商品 (乾淨白框卡片風格)
   ========================================================================== */
.woocommerce .related.products > h2 {
    font-size: 26px !important;
    font-weight: bold !important;
    color: #334d8f !important;
    margin-top: 40px !important;
    margin-bottom: 25px !important;
    border-left: 5px solid #334d8f;
    padding-left: 12px;
}

.woocommerce .related.products ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
    padding: 0 !important;
    margin: 0 !important;
}

@media (max-width: 1024px) {
    .woocommerce .related.products ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

.woocommerce .related.products ul.products li.product {
    background: #ffffff !important;
    border: 1px solid #eaeaea !important;
    border-radius: 10px !important;
    padding: 20px !important;
    margin: 0 !important;
    width: 100% !important;
    text-align: left !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03) !important;
}

.woocommerce .related.products ul.products li.product:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.08) !important;
    border-color: #334d8f !important;
}

.woocommerce .related.products ul.products li.product > a {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    text-decoration: none !important;
}

.woocommerce .related.products ul.products li.product img {
    height: 170px !important; 
    width: 100% !important;
    object-fit: contain !important;
    margin: 0 0 15px 0 !important;
}

.woocommerce .related.products ul.products li.product .woocommerce-loop-product__title {
    font-size: 15px !important; 
    font-weight: bold !important;
    color: #334d8f !important;
    margin-bottom: 15px !important;
    line-height: 1.5 !important;
    text-align: left !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important; 
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    min-height: 67px !important; 
}

/* ！！！終極版：隱藏相關商品底下的多餘文字與所有分類小字！！！ */
.woocommerce .related.products ul.products li.product p,
.woocommerce .related.products ul.products li.product .woocommerce-product-details__short-description,
.woocommerce .related.products ul.products li.product .posted_in,
.woocommerce .related.products ul.products li.product .category,
.woocommerce .related.products ul.products li.product .product-category,
.woocommerce .related.products ul.products li.product .ct-woo-card-extra {
    display: none !important;
    pointer-events: none !important;
}

.woocommerce .related.products ul.products li.product .button {
    display: block !important;
    width: 100% !important;
    background-color: #334d8f !important;
    color: #ffffff !important;
    padding: 10px 0 !important;
    border-radius: 6px !important;
    font-size: 16px !important;
    font-weight: bold !important;
    text-align: center !important;
    margin-top: auto !important;
    border: none !important;
    transition: background-color 0.3s ease !important;
    white-space: nowrap !important; 
}

.woocommerce .related.products ul.products li.product .button:hover {
    background-color: #1e3060 !important;
}

/* ==========================================================================
   5. 清理多餘無用區塊
   ========================================================================== */
#jp-relatedposts {
    display: none !important;
}

/* ==========================================================================
   ★ 6. 單一商品頁面：核彈級破解佈景主題「文字寬度鎖死」限制
   ========================================================================== */
@media (min-width: 992px) {
    .woocommerce div.product div.images,
    .woocommerce-page div.product div.images {
        width: 35% !important; 
    }
    
    .woocommerce div.product div.summary,
    .woocommerce-page div.product div.summary,
    .summary.entry-summary {
        width: 60% !important; 
        max-width: none !important;
        flex: 1 1 60% !important;
        float: right !important; 
    }
}

.single-product .summary.entry-summary,
.single-product .summary.entry-summary .product_title,
.single-product .summary.entry-summary .woocommerce-product-details__short-description,
.single-product .summary.entry-summary .woocommerce-product-details__short-description p,
.single-product .summary.entry-summary .woocommerce-product-details__short-description ul,
.single-product .summary.entry-summary .product_meta {
        max-width: 100% !important; 
        width: 100% !important;
} 

/* ==========================================================================
   ★ 7. 頁尾全區塊：電腦版維持完美原樣 ★
   ========================================================================== */
footer h2, footer h3, footer .widget-title, footer .wp-block-heading { display: none !important; }
footer .widget { border-left: 4px solid #334d8f !important; padding: 0 0 0 15px !important; margin-top: 0 !important; margin-bottom: 12px !important; }
footer .widget .wp-block-group, footer .widget section, footer .widget .ct-widget { border-left: none !important; padding-left: 0 !important; margin-top: 0 !important; margin-bottom: 0 !important; }
footer .widget::before, footer .widget::after, footer .ct-widget::before { display: none !important; }
footer p, footer .wp-block-paragraph, footer .textwidget, footer .textwidget span, footer .widget_text, footer .widget_text span, footer .widget_custom_html { color: #000000 !important; font-size: 16px !important; font-weight: bold !important; margin: 0 !important; padding: 0 !important; line-height: 1.3 !important; }
footer .widget_nav_menu ul, footer .wp-block-navigation__container, footer .menu, footer .wp-block-page-list { display: flex !important; flex-direction: row !important; flex-wrap: wrap !important; align-items: center !important; list-style: none !important; padding: 0 !important; margin: 0 !important; gap: 8px !important; }
footer .widget_nav_menu li, footer .wp-block-navigation-item, footer .menu li, footer .wp-block-pages-list__item { display: inline-block !important; margin: 0 !important; padding: 0 !important; list-style: none !important; }
footer .widget_nav_menu li:not(:last-child)::after, footer .wp-block-navigation-item:not(:last-child)::after, footer .menu li:not(:last-child)::after, footer .wp-block-pages-list__item:not(:last-child)::after { display: none !important; content: none !important; }
footer .widget_nav_menu a, footer .wp-block-navigation-item__content, footer .menu a, footer .wp-block-pages-list__item a { color: #334d8f !important; background-color: #ffffff !important; border: 1px solid #dcdcdc !important; padding: 5px 12px !important; border-radius: 4px !important; text-decoration: none !important; font-size: 14px !important; font-weight: bold !important; display: inline-block !important; transition: all 0.3s ease !important; }
footer .widget_nav_menu a:hover, footer .wp-block-navigation-item__content:hover, footer .menu a:hover, footer .wp-block-pages-list__item a:hover { background-color: #334d8f !important; color: #ffffff !important; border-color: #334d8f !important; }

/* ==========================================================================
   ★ 8. 修復隱形文字與強制顯示推薦商品 ★
   ========================================================================== */
.woocommerce div.product .woocommerce-tabs ul.tabs li a { color: #334d8f !important; font-weight: bold !important; font-size: 18px !important; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: #1e3060 !important; border-bottom: 3px solid #334d8f !important; }
.woocommerce .related.products { display: block !important; visibility: visible !important; opacity: 1 !important; height: auto !important; }

/* ==========================================================================
   ★ 9. 手機版專屬優化 (精緻小巧可愛的標籤按鈕風格) ★
   ========================================================================== */
@media (max-width: 768px) {
    .single-product .product_title { font-size: 24px !important; margin-bottom: 10px !important; }
    .product_meta, .product_meta span, .product_meta a { font-size: 16px !important; margin-top: 15px !important; }
    .woocommerce-breadcrumb, .woocommerce-breadcrumb a, .woocommerce-breadcrumb span { font-size: 14px !important; }
    .woocommerce-product-details__short-description ul { margin-top: 10px !important; margin-bottom: 10px !important; }
    .woocommerce-product-details__short-description li, .woocommerce-product-details__short-description li p { margin-bottom: 5px !important; padding-bottom: 0 !important; line-height: 1.4 !important; }
    .vibe-product-card { padding: 10px !important; }
    .vibe-product-image { height: 120px !important; margin-bottom: 8px !important; }
    .vibe-product-title { font-size: 14px !important; line-height: 1.4 !important; min-height: 59px !important; margin-bottom: 8px !important; padding: 0 5px !important; }
    .vibe-view-btn { font-size: 13px !important; padding: 6px 0 !important; border-radius: 4px !important; min-height: unset !important; height: auto !important; }
    .woocommerce .related.products ul.products { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
    .woocommerce .related.products ul.products li.product { padding: 10px !important; min-height: unset !important; }
    .woocommerce .related.products ul.products li.product img { height: 120px !important; margin-bottom: 8px !important; }
    .woocommerce .related.products ul.products li.product .woocommerce-loop-product__title { font-size: 14px !important; line-height: 1.4 !important; min-height: 59px !important; margin-bottom: 8px !important; padding: 0 5px !important; }
    .woocommerce .related.products ul.products li.product > a[rel="tag"], .woocommerce .related.products ul.products li.product > span, .woocommerce .related.products ul.products li.product .ast-woo-product-category, .woocommerce .related.products ul.products li.product .category, .woocommerce .related.products ul.products li.product .product-category, .woocommerce .related.products ul.products li.product .posted_in { display: none !important; }
    .woocommerce .related.products ul.products li.product .button { font-size: 13px !important; padding: 6px 0 !important; width: 100% !important; display: block !important; text-align: center !important; line-height: normal !important; min-height: unset !important; height: auto !important; border-radius: 4px !important; margin-top: auto !important; white-space: nowrap !important; }
    footer .widget_nav_menu ul, footer .wp-block-navigation__container, footer .menu, footer .wp-block-page-list { gap: 5px !important; }
    footer .widget_nav_menu a, footer .wp-block-navigation-item__content, footer .menu a, footer .wp-block-pages-list__item a { font-size: 11px !important; padding: 2px 8px !important; border-radius: 3px !important; }
    footer p, footer .wp-block-paragraph, footer .textwidget, footer .widget_text, footer .widget_custom_html { font-size: 12px !important; line-height: 1.3 !important; margin-bottom: 8px !important; }
}

/* ==========================================================================
   ★ 10. 右下角「回到頂部」浮動氣泡按鈕規範 ★
   ========================================================================== */
#vibe-back-to-top { position: fixed !important; right: 20px !important; bottom: 20px !important; z-index: 9999 !important; background-color: #334d8f !important; color: #ffffff !important; width: 45px !important; height: 45px !important; border-radius: 50% !important; display: flex !important; align-items: center !important; justify-content: center !important; text-decoration: none !important; font-size: 20px !important; font-weight: bold !important; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2) !important; transition: all 0.3s ease !important; }
#vibe-back-to-top:hover { background-color: #1e3060 !important; transform: translateY(-3px) !important; box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3) !important; }
@media (max-width: 768px) { #vibe-back-to-top { right: 15px !important; bottom: 15px !important; width: 35px !important; height: 35px !important; font-size: 14px !important; } }

/* ==========================================================================
   ★ 11. 聯絡我們表單 ★
   ========================================================================== */
form label, .wpforms-form label, .wpforms-field-label, .wpcf7 form label { font-family: "Microsoft JhengHei", "PingFang TC", "Helvetica Neue", Helvetica, Arial, sans-serif !important; font-size: 18px !important; font-weight: bold !important; color: #334d8f !important; margin-bottom: 8px !important; display: inline-block !important; }
form input[type="text"], form input[type="email"], form input[type="tel"], form textarea, .wpforms-form input[type="text"], .wpforms-form input[type="email"], .wpforms-form input[type="tel"], .wpforms-form textarea { font-family: "Microsoft JhengHei", "PingFang TC", "Helvetica Neue", Helvetica, Arial, sans-serif !important; font-size: 16px !important; border: 1px solid #dcdcdc !important; border-radius: 6px !important; padding: 10px 14px !important; color: #333333 !important; box-sizing: border-box !important; }
form input[type="submit"], form button[type="submit"], .wpforms-submit, .wpforms-form button[type="submit"] { background-color: #334d8f !important; color: #ffffff !important; font-family: "Microsoft JhengHei", "PingFang TC", "Helvetica Neue", Helvetica, Arial, sans-serif !important; font-size: 16px !important; font-weight: bold !important; padding: 10px 30px !important; border-radius: 6px !important; border: none !important; cursor: pointer !important; transition: background-color 0.3s ease !important; }
form input[type="submit"]:hover, form button[type="submit"]:hover, .wpforms-submit:hover, .wpforms-form button[type="submit"]:hover { background-color: #1e3060 !important; }

/* ==========================================================================
   ★ 12. 自訂 Ajax 分頁導航列樣式 ★
   ========================================================================== */
.vibe-ajax-pagination { display: flex !important; justify-content: center !important; align-items: center !important; gap: 10px !important; margin: 45px 0 25px 0 !important; width: 100% !important; }
.vibe-page-btn { display: inline-flex !important; align-items: center !important; justify-content: center !important; min-width: 42px !important; height: 42px !important; padding: 0 12px !important; font-size: 16px !important; font-weight: bold !important; color: #334d8f !important; background-color: #ffffff !important; border: 2px solid #eaeaea !important; border-radius: 8px !important; cursor: pointer !important; transition: all 0.3s ease !important; }
.vibe-page-btn:hover { background-color: #1e3060 !important; color: #ffffff !important; border-color: #1e3060 !important; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12) !important; }
.vibe-page-btn.active { background-color: #334d8f !important; color: #ffffff !important; border-color: #334d8f !important; box-shadow: 0 4px 12px rgba(51, 77, 143, 0.3) !important; }

/* ==========================================================================
   ★ 13. 終極防護網：強制隱藏所有會露餡的標題、麵包屑與分類小字 ★
   ========================================================================== */
/* 1. 隱藏商品卡片、相關商品、單一商品頁底下的分類名稱與 Blocksy 專屬標籤 */
.single-product .product_meta .posted_in,
.ast-woo-product-category,
.ast-woo-shop-product-category,
.product-category,
.category,
.posted_in,
.wc-block-grid__product-categories,
.ct-woo-card-extra {
    display: none !important;
    pointer-events: none !important;
}

/* 2. 隱藏上方導覽麵包屑與預設大標題 */
.woocommerce-breadcrumb,
.ast-breadcrumbs-wrapper,
.elementor-widget-woocommerce-breadcrumb,
nav.woocommerce-breadcrumb,
.woocommerce-products-header__title,
.page-title,
.ast-archive-title {
    display: none !important;
    pointer-events: none !important;
}