/* ==========================================================================
   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;
    padding: 20px;
    text-align: center;
    border: 1px solid #eaeaea;
    border-radius: 10px;
    transition: all 0.3s ease;
    display: flex; 
    flex-direction: column; 
    height: 100%;
}

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

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

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

.vibe-product-title {
    font-size: 18px; 
    color: #334d8f !important; 
    margin-bottom: 15px;
    font-weight: bold;
    min-height: 50px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.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. 單一商品頁面：文字層級規範與顏色統一 (全部強制深藍色)
   ========================================================================== */

/* 麵包屑導覽 (首頁 > 類別 > 商品) */
.woocommerce-breadcrumb,
.woocommerce-breadcrumb a,
.woocommerce-breadcrumb span {
    font-size: 20px !important; 
    color: #334d8f !important;
}

.woocommerce-breadcrumb a:hover {
    color: #1e3060 !important;
}

/* 層級一：商品大標題 */
.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: 24px !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;
    }
}

@media (max-width: 480px) {
    .woocommerce .related.products ul.products {
        grid-template-columns: repeat(1, 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: center !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: 180px !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: 18px !important;
    font-weight: bold !important;
    color: #334d8f !important;
    margin-bottom: 15px !important;
    line-height: 1.4 !important;
    min-height: 50px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !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 {
    display: 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;
}

.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; 
    }
}

/* ★ 針對 Blocksy 等佈景主題，無差別解除所有內部元素的緊身衣限制 ★ */
.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;
};
}