/**
 * JOSE956 商品頁面佈局
 * Version: 3.4.0 - P1/P3/PAZZO + 英文 Tabs + 隱藏標籤
 * 
 * 使用 CSS Grid + order 控制視覺順序
 * summary 容器在 DOM 中位於 wrapper 後，但視覺上在第一張圖片後
 * 
 * P1 設計特點：
 * - 標題: PingFang TC Semibold, 14px, #242424
 * - 顏色色塊: 28×28px, 選中邊框 #656565
 * - 尺寸按鈕: 28×27px, 選中邊框 #2a2b2c
 * - 數量選擇器: 全寬邊框 #646565
 * - 按鈕: 黑底 #242424, "ADD TO BAG"
 */

/* ===============================================
   手機版佈局
   =============================================== */

@media (max-width: 991px) {

    /* 圖庫外層容器使用 Grid */
    body.jose956-layout-active .woocommerce-product-gallery>.col-sm-12 {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    /* 圖庫 wrapper 展開為 Grid 子元素 */
    body.jose956-layout-active .woocommerce-product-gallery__wrapper {
        display: contents !important;
    }

    /* 第一張圖片排序 */
    body.jose956-layout-active .woocommerce-product-gallery__wrapper>.woocommerce-product-gallery__image:first-child {
        order: 1 !important;
        width: 100% !important;
    }

    /* summary 容器排序（在第一張圖片後） */
    body.jose956-layout-active .jose956-summary-container {
        order: 2 !important;
        display: block !important;
    }

    /* 其他圖片排序 */
    body.jose956-layout-active .woocommerce-product-gallery__wrapper>.woocommerce-product-gallery__image:not(:first-child) {
        order: 10 !important;
        width: 100% !important;
    }

    /* 隱藏原始 summary 位置 */
    body.jose956-layout-active .product-image-summary>.row>.summary.entry-summary:not(.mobile-moved-summary) {
        display: none !important;
    }

    /* 移動後的商品資訊樣式 */
    .mobile-moved-summary {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: calc(100% - 30px) !important;
        padding: 15px !important;
        margin-left: 15px !important;
        margin-right: 15px !important;
        background: #fff !important;
        position: relative !important;
        z-index: 100 !important;
        box-sizing: border-box !important;
        overflow: visible !important;
    }

    /* 重置 Basel sticky 設計的特殊樣式 */
    .mobile-moved-summary .summary-inner {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        right: auto !important;
        left: 0 !important;
        position: relative !important;
        transform: none !important;
    }

    .mobile-moved-summary .basel-scroll-content {
        padding: 0 15px !important;
        margin: 0 !important;
        transform: none !important;
    }

    .mobile-moved-summary .basel-scroll {
        overflow: visible !important;
        height: auto !important;
        position: relative !important;
        transform: none !important;
    }

    /* 確保 summary 區塊正確顯示 */
    .jose956-summary-container {
        overflow: visible !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* 商品標題靠左 */
    .mobile-moved-summary .product_title {
        text-align: left;
        font-size: 18px;
        margin-bottom: 10px;
    }

    /* 價格靠左 */
    .mobile-moved-summary .price {
        text-align: left;
        display: flex;
        justify-content: flex-start;
        margin-bottom: 15px;
    }

    /* 變體選項區塊 */
    .mobile-moved-summary .variations {
        width: 100% !important;
        margin-top: 20px !important;
        padding: 0 !important;
    }
    
    .mobile-moved-summary .variations tr {
        display: block !important;
        width: 100% !important;
        margin-bottom: 15px !important;
    }

    /* 隱藏 COLOR: 和 SIZE: 標籤 */
    .mobile-moved-summary .variations .label,
    .mobile-moved-summary .variations th,
    .mobile-moved-summary .variations td.label,
    .mobile-moved-summary .variations tr td:first-child,
    .mobile-moved-summary .swatches-select > .swatch-label,
    .mobile-moved-summary .variations_form .label,
    .mobile-moved-summary .variations tbody tr td:first-child {
        display: none !important;
    }
    
    /* 讓色塊區域佔滿整行 */
    .mobile-moved-summary .variations td,
    .mobile-moved-summary .variations tr td:last-child,
    .mobile-moved-summary .variations tr .value {
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
    }

    .mobile-moved-summary .variations .value {
        display: flex !important;
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
        width: 100% !important;
    }
    
    /* Basel swatches 容器 */
    .mobile-moved-summary .basel-swatches {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
        gap: 0 !important;
        width: 100% !important;
    }

    /* 數量和按鈕靠左 */
    .mobile-moved-summary .quantity-wrap,
    .mobile-moved-summary .quantity {
        display: flex;
        justify-content: flex-start;
    }

    .mobile-moved-summary .single_variation_wrap {
        text-align: left;
    }

    .mobile-moved-summary .woocommerce-variation-add-to-cart {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .mobile-moved-summary .single_add_to_cart_button {
        display: block;
        width: 100%;
        max-width: 300px;
        margin: 15px 0;
        text-align: center;
    }
}

/* ===============================================
   底部固定加入購物車按鈕
   =============================================== */

#jose956-bottom-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 52px;
    z-index: 9998;
    background-color: #ffffff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.jose956-add-to-cart-btn {
    display: block;
    width: 100%;
    height: 52px;
    padding: 0;
    background-color: #000000;
    color: #ffffff !important;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    text-decoration: none !important;
    border: none;
    border-radius: 0;
    line-height: 52px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.jose956-add-to-cart-btn:hover,
.jose956-add-to-cart-btn:active,
.jose956-add-to-cart-btn:focus {
    background-color: #1a1a1a;
    color: #ffffff !important;
}

.jose956-add-to-cart-btn.added {
    background-color: #4CAF50;
}

/* ===============================================
   滑出面板 - daji956 風格
   =============================================== */

.jose956-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.jose956-overlay.open {
    display: block;
    opacity: 1;
}

.jose956-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    max-height: 75vh;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.12);
}

.jose956-panel.open {
    transform: translateY(0);
}

/* 標題區域 - 簡化 */
.jose956-panel-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 12px 16px 0;
    border-bottom: none;
}

.jose956-panel-title {
    display: none;
    /* 隱藏「選擇商品」標題 */
}

.jose956-panel-close {
    font-size: 24px;
    color: #999;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.jose956-panel-close:hover {
    color: #333;
}

/* 內容區域 */
.jose956-panel-content {
    padding: 0 20px 20px;
    max-height: calc(75vh - 50px);
    overflow-y: auto;
}

/* 商品名稱 - P1 風格 */
.jose956-panel-content .panel-product-title {
    font-family: 'PingFang TC', 'Noto Sans TC', -apple-system, sans-serif;
    font-size: 13px;
    font-weight: 400;
    text-align: left;
    margin: 0 0 8px 0;
    color: #242424;
    line-height: 1.4;
}
/*.jose956-panel-content .panel-product-title-OLD {
    font-family: 'PingFang TC', 'Noto Sans TC', -apple-system, sans-serif;
    font-size: 13px;
    font-weight: 400;
    text-align: left;
    margin: 0 0 8px 0;
    color: #242424;
    line-height: 1.4;
}

/* 價格區域 - P1 風格：原價刪除線 + 折扣標籤 */
.jose956-panel-content .panel-price {
    text-align: left;
    margin-bottom: 20px;
    font-size: 13px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.jose956-panel-content .panel-price del {
    font-family: 'Helvetica', Arial, sans-serif;
    color: #c7c7c7;
    font-size: 13px;
    font-weight: 400;
}

.jose956-panel-content .panel-price ins {
    text-decoration: none;
    font-family: 'Helvetica', Arial, sans-serif;
    color: #c7c7c7;
    font-size: 13px;
    font-weight: 400;
}

.jose956-panel-content .panel-price .woocommerce-Price-amount {
    font-family: 'Helvetica', Arial, sans-serif;
    font-weight: 400;
}

/* P1 折扣標籤 */
.jose956-panel-content .panel-discount-label {
    font-family: 'PingFang TC', 'Noto Sans TC', sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: #a1b7ce;
    text-align: right;
    margin-left: auto;
}

/* ===============================================
   變體選項區域 - daji956 精緻風格
   =============================================== */

.jose956-panel-content .panel-variations .variations {
    border: none !important;
    border-collapse: collapse;
    width: 100%;
}

.jose956-panel-content .panel-variations .variations tr {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: none;
}

.jose956-panel-content .panel-variations .variations tr:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* 標籤區域 - daji956 風格 */
.jose956-panel-content .panel-variations .variations .label {
    display: none !important;
    /* 隱藏原始標籤，改用 CSS 偽元素 */
}

.jose956-panel-content .panel-variations .variations td.value {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
    padding: 0;
    gap: 12px;
}

/* 色塊選項容器 - 橫向排列 */
.jose956-panel-content .panel-variations .swatches-select {
    display: flex !important;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-start;
    align-items: center;
}

/* ===============================================
   顏色色塊 - P1 風格 (28×28px)
   =============================================== */

.jose956-panel-content .panel-variations .basel-swatch {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    border-radius: 0 !important;
    border: 1px solid transparent !important;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: relative;
    box-sizing: border-box !important;
    overflow: hidden;
}

/* 顏色色塊圖片 - P1 風格 (20×20px 內部圖片) */
.jose956-panel-content .panel-variations .basel-swatch img {
    width: 20px !important;
    height: 20px !important;
    object-fit: cover;
}

/* 顏色色塊 hover 效果 */
.jose956-panel-content .panel-variations .basel-swatch:hover {
    border-color: #999 !important;
}

/* 顏色色塊選中狀態 - P1 風格邊框 #656565 */
.jose956-panel-content .panel-variations .basel-swatch.active-swatch,
.jose956-panel-content .panel-variations .basel-swatch.active,
.jose956-panel-content .panel-variations .basel-swatch.selected,
.jose956-panel-content .panel-variations .basel-swatch[selected] {
    border: 1px solid #656565 !important;
}

/* 選中顏色名稱顯示 - P1 風格 */
.jose956-panel-content .panel-selected-color {
    font-family: 'PingFang TC', 'Noto Sans TC', sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: #242424;
    margin-left: auto;
}

/* 隱藏色塊上的所有文字 */
.jose956-panel-content .panel-variations .basel-swatch .basel-tooltip-label,
.jose956-panel-content .panel-variations .basel-swatch span {
    display: none !important;
}

/* 隱藏色塊內的文字 */
.jose956-panel-content .panel-variations .basel-swatch.colored-swatch {
    font-size: 0 !important;
    color: transparent !important;
    text-indent: -9999px !important;
    overflow: hidden !important;
}

/* 確保色塊文字完全隱藏 */
.jose956-panel-content .panel-variations .swatches-select .basel-swatch:not(.basel-swatch-text) {
    font-size: 0 !important;
    line-height: 0 !important;
}

/* ===============================================
   尺寸選項 - P1 風格 (28×27px 按鈕)
   =============================================== */

.jose956-panel-content .panel-variations .basel-swatch-text,
.jose956-panel-content .panel-variations .basel-swatch.text-swatch,
.jose956-panel-content .panel-variations .basel-swatch.text-only {
    width: auto !important;
    min-width: 28px !important;
    height: 27px !important;
    padding: 0 8px !important;
    font-family: 'Helvetica', Arial, sans-serif !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid transparent !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #242424 !important;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 27px !important;
}

.jose956-panel-content .panel-variations .basel-swatch-text:hover,
.jose956-panel-content .panel-variations .basel-swatch.text-swatch:hover,
.jose956-panel-content .panel-variations .basel-swatch.text-only:hover {
    border-color: #999 !important;
}

/* 尺寸選中狀態 - P1 風格邊框 #2a2b2c */
.jose956-panel-content .panel-variations .basel-swatch-text.active-swatch,
.jose956-panel-content .panel-variations .basel-swatch-text.active,
.jose956-panel-content .panel-variations .basel-swatch-text.selected,
.jose956-panel-content .panel-variations .basel-swatch.text-swatch.active-swatch,
.jose956-panel-content .panel-variations .basel-swatch.text-swatch.active,
.jose956-panel-content .panel-variations .basel-swatch.text-swatch.selected,
.jose956-panel-content .panel-variations .basel-swatch.text-only.active-swatch,
.jose956-panel-content .panel-variations .basel-swatch.text-only.active,
.jose956-panel-content .panel-variations .basel-swatch.text-only.selected {
    border: 1px solid #2a2b2c !important;
    font-weight: 400 !important;
}

/* ===============================================
   清除連結
   =============================================== */

.jose956-panel-content .panel-variations .reset_variations {
    font-size: 13px;
    color: #999;
    text-decoration: underline;
    margin-left: auto;
    padding: 8px 0;
}

.jose956-panel-content .panel-variations .reset_variations:hover {
    color: #333;
}

/* ===============================================
   數量選擇器 - P1 風格 (全寬邊框)
   =============================================== */

.jose956-panel-content .panel-quantity {
    display: flex;
    justify-content: flex-start;
    margin: 20px 0 12px;
}

/* 自定義數量控制 - P1 風格 */
.jose956-qty-control {
    display: flex;
    align-items: center;
    border: 1px solid #646565;
    border-radius: 0;
    overflow: hidden;
    width: 100%;
    height: 38px;
}

.jose956-qty-minus,
.jose956-qty-plus {
    width: 35px;
    height: 33px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Arial', sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: #242424;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    background: transparent;
    transition: background 0.2s;
    position: relative;
}

/* P1 風格的減號 (橫線) */
.jose956-qty-minus::after {
    content: '';
    width: 7px;
    height: 1px;
    background: #646565;
    
}

/* P1 風格的加號 (十字) */
.jose956-qty-plus::after {
    content: '';
    width: 7px;
    height: 1px;
    background: #646565;
    
}

.jose956-qty-plus::before {
    content: '';
    width: 1px;
    height: 7px;
    background: #646565;
    
}

.jose956-qty-minus:hover,
.jose956-qty-plus:hover {
    background: #f5f5f5;
}

.jose956-qty-minus:active,
.jose956-qty-plus:active {
    background: #eee;
}

.jose956-qty-input {
    flex: 1;
    height: 33px;
    border: none;
    text-align: center;
    font-family: 'Khula', 'Helvetica', sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: #242424;
    letter-spacing: 1.3px;
    -moz-appearance: textfield;
    -webkit-appearance: none;
    appearance: none;
}

.jose956-qty-input::-webkit-outer-spin-button,
.jose956-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* 舊版 WooCommerce 數量選擇器樣式（備用） */
.jose956-panel-content .panel-quantity .quantity {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 0;
    overflow: hidden;
    width: 140px;
}

.jose956-panel-content .panel-quantity .quantity button,
.jose956-panel-content .panel-quantity .quantity .minus,
.jose956-panel-content .panel-quantity .quantity .plus {
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    font-size: 16px;
    font-weight: 300;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: background 0.2s;
}

.jose956-panel-content .panel-quantity .quantity button:hover,
.jose956-panel-content .panel-quantity .quantity .minus:hover,
.jose956-panel-content .panel-quantity .quantity .plus:hover {
    background: #f5f5f5;
}

.jose956-panel-content .panel-quantity .quantity input.qty {
    width: 52px;
    height: 44px;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    text-align: center;
    font-size: 15px;
    -moz-appearance: textfield;
}

.jose956-panel-content .panel-quantity .quantity input.qty::-webkit-outer-spin-button,
.jose956-panel-content .panel-quantity .quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* 加入購物車按鈕 - P1 風格 */
.jose956-panel-content .panel-add-to-cart-btn {
    display: block;
    width: 100%;
    height: 39px;
    padding: 0 20px;
    background: #242424;
    color: #fff;
    border: 1px solid #dedede;
    font-family: 'Helvetica', Arial, sans-serif;
    font-size: 12.8px;
    font-weight: 400;
    letter-spacing: 0;
    text-align: center;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 0;
    border-radius: 0;
    transition: background 0.2s;
    line-height: 39px;
}

.jose956-panel-content .panel-add-to-cart-btn:hover {
    background: #333;
}

.jose956-panel-content .panel-add-to-cart-btn:disabled,
.jose956-panel-content .panel-add-to-cart-btn.disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* 面板打開時允許背景滾動 */
body.jose956-panel-open {
    /* overflow: hidden; - 移除此規則，允許背景滾動 */
}

/* 隱藏原始下拉選單 */
.jose956-panel-content .panel-variations select {
    display: none !important;
}

/* ===============================================
   庫存狀態顯示
   =============================================== */

.jose956-panel-content .panel-stock-status {
    margin: 12px 0 16px;
    font-size: 13px;
    text-align: left;
}

.jose956-panel-content .panel-stock-status .stock {
    padding: 6px 0;
}

/* 有庫存 */
.jose956-panel-content .panel-stock-status .in-stock {
    color: #333;
}

/* 無庫存 */
.jose956-panel-content .panel-stock-status .out-of-stock {
    color: #e74c3c;
}

/* 可預購 */
.jose956-panel-content .panel-stock-status .available-on-backorder {
    color: #f39c12;
}

/* ===============================================
   WooCommerce 成功訊息樣式覆蓋
   =============================================== */

/* 修改成功加入購物車的訊息顏色 - 改成跟加入購物車按鈕同色（黑色） */
.woocommerce-message {
    background-color: #000 !important;
    color: #fff !important;
    border-top-color: #000 !important;
}

.woocommerce-message::before {
    color: #fff !important;
}

.woocommerce-message a {
    color: #fff !important;
    text-decoration: underline !important;
}

.woocommerce-message a:hover {
    color: #ccc !important;
}

/* Basel 主題的成功訊息覆蓋 */
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-cart .woocommerce-message,
.woocommerce .woocommerce-message {
    background-color: #000 !important;
    color: #fff !important;
    border-color: #000 !important;
}

/* 底部加入購物車按鈕成功狀態 - 與按鈕同色 */
.jose956-add-to-cart-btn.added {
    background-color: #000 !important;
}

/* ===============================================
   P3 風格 C1, C2, C3 - 手機版 basel-scroll-content
   =============================================== */

@media (max-width: 991px) {
    
    /* === C1: 商品標題 (恢復原始 13px) === */
    .mobile-moved-summary .product_title,
    .mobile-moved-summary h1.product_title {
        font-family: 'PingFang TC', 'Noto Sans TC', -apple-system, sans-serif !important;
        font-size: 13px !important;
        font-weight: 400 !important;
        color: #242424 !important;
        line-height: 1.4 !important;
        margin-bottom: 10px !important;
        padding-left: 4px !important;
    }
    
    /* === C1: 價格區塊 === */
    .mobile-moved-summary .price {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 8px !important;
        margin-bottom: 10px !important;
    }
    
    .mobile-moved-summary .price del {
        font-family: 'Helvetica', Arial, sans-serif !important;
        font-size: 13px !important;
        font-weight: 400 !important;
        color: #c7c7c7 !important;
        text-decoration: line-through !important;
        order: 1 !important;
    }
    
    .mobile-moved-summary .price ins,
    .mobile-moved-summary .price > .woocommerce-Price-amount {
        font-family: 'Helvetica', Arial, sans-serif !important;
        font-size: 13px !important;
        font-weight: 400 !important;
        color: #242424 !important;
        text-decoration: none !important;
        background: transparent !important;
        order: 2 !important;
    }
    
    /* === C1: 折扣標籤 === */
    .mobile-moved-summary .onsale,
    .mobile-moved-summary .discount-percentage {
        font-family: 'PingFang TC', 'Noto Sans TC', -apple-system, sans-serif !important;
        font-size: 12px !important;
        font-weight: 400 !important;
        color: #a1b7ce !important;
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        margin-left: auto !important;
        order: 3 !important;
    }
    
    /* === C2: 顏色行佈局 (C2 List 風格 - 色塊左邊，顏色名稱右邊) === */
    .mobile-moved-summary .variations tr:first-child td,
    .mobile-moved-summary .variations .attribute_pa_color,
    .mobile-moved-summary .color-row {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
    
    .mobile-moved-summary .variations tr:first-child .basel-swatches,
    .mobile-moved-summary .swatches-on-single {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        flex: 0 1 auto !important;
    }
    
    /* === C2: 顏色色塊 (20px + C2 間距) === */
    .mobile-moved-summary .basel-swatch,
    .mobile-moved-summary .color-swatch {
        width: 20px !important;
        height: 20px !important;
        min-width: 20px !important;
        min-height: 20px !important;
        border: 1px solid transparent !important;
        border-radius: 0 !important;
        margin: 0 20px 20px 5px !important;
        padding: 0 !important;
        box-sizing: content-box !important;
        position: relative !important;
        cursor: pointer !important;
        -webkit-tap-highlight-color: transparent !important;
    }
    
    /* 擴大點擊區域 - 透明偽元素（視覺不變，點擊區域加大） */
    .mobile-moved-summary .basel-swatch::before,
    .mobile-moved-summary .color-swatch::before {
        content: '' !important;
        position: absolute !important;
        top: -12px !important;
        left: -12px !important;
        right: -12px !important;
        bottom: -12px !important;
        z-index: 0 !important;
    }
    
    /* 白色色塊需要灰色邊框 */
    .mobile-moved-summary .basel-swatch.colored-swatch[data-value="white"],
    .mobile-moved-summary .basel-swatch[style*="background-color:#ffffff"],
    .mobile-moved-summary .basel-swatch[style*="background-color: #ffffff"],
    .mobile-moved-summary .basel-swatch[style*="background-color:#fff"],
    .mobile-moved-summary .basel-swatch[style*="background-color: #fff"],
    .mobile-moved-summary .color-swatch[data-value="white"] {
        border-color: #e0e0e0 !important;
    }
    
    .mobile-moved-summary .basel-swatch.basel-active,
    .mobile-moved-summary .basel-swatch.active,
    .mobile-moved-summary .basel-swatch.active-swatch,
    .mobile-moved-summary .color-swatch.active {
        border-color: #323232 !important;
    }
    
    .mobile-moved-summary .basel-swatch img,
    .mobile-moved-summary .color-swatch img {
        width: 20px !important;
        height: 20px !important;
    }
    
    /* === C2: 隱藏色塊上方的 tooltip === */
    .mobile-moved-summary .basel-swatch .basel-tooltip-label,
    .mobile-moved-summary .basel-swatch .basel-tooltip {
        display: none !important;
    }
    
    /* === C2: 顏色名稱標籤 (右對齊，同一行顯示) === */
    .mobile-moved-summary .swatch-name,
    .mobile-moved-summary .color-name,
    .mobile-moved-summary .basel-attr-after,
    .mobile-moved-summary .selected-color-name {
        font-family: 'PingFang TC', 'Noto Sans TC', -apple-system, sans-serif !important;
        font-size: 12px !important;
        font-weight: 400 !important;
        color: #242424 !important;
        letter-spacing: 1.2px !important;
        margin-left: auto !important;
        text-align: right !important;
        position: static !important;
        display: inline-block !important;
        background: transparent !important;
        padding: 0 !important;
    }
    
    /* === C2: 顏色行容器 - Flex 讓色塊和標籤同一行 === */
    .mobile-moved-summary .variations tr:first-child td.value,
    .mobile-moved-summary .variations .attribute_pa_color td.value,
    .mobile-moved-summary .variations tr:first-child td:last-child,
    .mobile-moved-summary .variations td.value.with-swatches {
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        width: 100% !important;
    }
    
    /* 顏色色塊容器保持在左邊 */
    .mobile-moved-summary .swatches-select[data-id="pa_color"] {
        display: flex !important;
        flex-wrap: wrap !important;
        flex: 1 1 auto !important;
        align-items: center !important;
    }
    
    /* === C2: 動態顏色名稱標籤 (JS 生成，顯示在右邊同一行) === */
    .mobile-moved-summary .jose956-color-label {
        font-family: 'PingFang TC', 'Noto Sans TC', -apple-system, sans-serif !important;
        font-size: 12px !important;
        font-weight: 400 !important;
        color: #242424 !important;
        letter-spacing: 1.2px !important;
        text-align: right !important;
        display: inline-block !important;
        flex-shrink: 0 !important;
        margin-left: auto !important;
        padding-top: 2px !important;
        white-space: nowrap !important;
    }
    
    /* === C3: 尺寸行佈局 (C2 List 風格) === */
    .mobile-moved-summary .variations tr:last-child td,
    .mobile-moved-summary .variations .attribute_pa_size,
    .mobile-moved-summary .size-row {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: flex-start !important;
    }
    
    .mobile-moved-summary .variations tr:last-child .basel-swatches {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        flex: 1 1 auto !important;
    }
    
    /* === C3: 尺寸選項 (同 C2 間距) === */
    .mobile-moved-summary .basel-swatch-text,
    .mobile-moved-summary .size-swatch {
        width: 28px !important;
        min-width: 28px !important;
        height: 28px !important;
        border: 1px solid #e0e0e0 !important;
        border-radius: 0 !important;
        font-family: 'Helvetica', Arial, sans-serif !important;
        font-size: 12px !important;
        font-weight: 400 !important;
        color: #000 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 8px 8px 0 !important;
        line-height: 28px !important;
        box-sizing: border-box !important;
    }
    
    .mobile-moved-summary .basel-swatch-text.basel-active,
    .mobile-moved-summary .basel-swatch-text.active,
    .mobile-moved-summary .size-swatch.active {
        border-color: #323232 !important;
    }
    
    /* === C3: 門市庫存連結 (右對齊) === */
    .mobile-moved-summary .store-inventory,
    .mobile-moved-summary .shop-stock,
    .mobile-moved-summary .reset_variations {
        font-family: 'PingFang TC', 'Noto Sans TC', -apple-system, sans-serif !important;
        font-size: 15px !important;
        font-weight: 400 !important;
        color: #242424 !important;
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
        margin-left: auto !important;
    }
    
    /* === 數量選擇器 (B1/PAZZO 全寬風格) === */
    .mobile-moved-summary .quantity,
    .mobile-moved-summary .woocommerce-variation-add-to-cart .quantity {
        width: 100% !important;
        max-width: 100% !important;
        height: 49px !important;
        border: 1px solid #323232 !important;
        display: flex !important;
        align-items: center !important;
        margin-bottom: 15px !important;
        box-sizing: border-box !important;
    }
    
    .mobile-moved-summary .quantity input,
    .mobile-moved-summary .quantity .qty {
        font-family: 'Khula', sans-serif !important;
        font-size: 13px !important;
        font-weight: 400 !important;
        color: #242424 !important;
        letter-spacing: 1.3px !important;
        text-align: center !important;
        border: none !important;
        flex: 1 !important;
        height: 47px !important;
        background: transparent !important;
        -moz-appearance: textfield !important;
    }
    
    .mobile-moved-summary .quantity input::-webkit-outer-spin-button,
    .mobile-moved-summary .quantity input::-webkit-inner-spin-button {
        -webkit-appearance: none !important;
        margin: 0 !important;
    }
    
    .mobile-moved-summary .quantity .minus,
    .mobile-moved-summary .quantity .plus,
    .mobile-moved-summary .quantity button {
        width: 48px !important;
        height: 47px !important;
        min-width: 48px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: transparent !important;
        border: none !important;
        font-size: 18px !important;
        color: #242424 !important;
        cursor: pointer !important;
    }
    
    /* === 隱藏商品資訊區的加入購物車按鈕 (使用底部按鈕) === */
    .mobile-moved-summary .single_add_to_cart_button,
    .mobile-moved-summary .woocommerce-variation-add-to-cart button.single_add_to_cart_button,
    .mobile-moved-summary form.cart button[type="submit"] {
        display: none !important;
    }
    
    /* 確保數量選擇器和變體區塊全寬顯示 */
    .mobile-moved-summary .woocommerce-variation-add-to-cart {
        width: 100% !important;
        display: block !important;
    }
    
    .mobile-moved-summary form.cart {
        width: 100% !important;
    }
    
    /* === ADD TO BAG 按鈕 (恢復原始 13px) === */
    .mobile-moved-summary .single_add_to_cart_button,
    .mobile-moved-summary .add_to_cart_button {
        width: 100% !important;
        height: 48px !important;
        background: #323232 !important;
        color: #fff !important;
        font-family: 'Helvetica', Arial, sans-serif !important;
        font-size: 13px !important;
        font-weight: 400 !important;
        text-transform: uppercase !important;
        letter-spacing: 0 !important;
        border: none !important;
        border-radius: 0 !important;
    }
    
    .mobile-moved-summary .single_add_to_cart_button:hover,
    .mobile-moved-summary .add_to_cart_button:hover {
        background: #1a1a1a !important;
    }
}

/* ===============================================
   P3 風格 Tabs - 手機版 basel-scroll-content
   =============================================== */

@media (max-width: 991px) {
    
    /* P3/PAZZO Tabs 容器 */
    .mobile-moved-summary .jose956-p3-tabs,
    .basel-scroll-content .jose956-p3-tabs {
        margin-top: 20px;
        border-top: none;
    }
    
    /* P3/PAZZO Tabs 導航列 (無底線分隔) */
    .mobile-moved-summary .jose956-p3-tabs-nav,
    .basel-scroll-content .jose956-p3-tabs-nav,
    ul.jose956-p3-tabs-nav {
        display: flex;
        justify-content: flex-start;
        border-bottom: none;
        margin: 0;
        padding: 0px !important;
        list-style: none;
        gap: 0;
    }
    
    .mobile-moved-summary .jose956-p3-tabs-nav li,
    .basel-scroll-content .jose956-p3-tabs-nav li {
        flex: 1;
        margin: 0;
        padding: 0;
        list-style: none;
        text-align: center;
    }
    
    /* 隱藏箭頭圖標 */
    .mobile-moved-summary .jose956-p3-tabs-nav li::before,
    .mobile-moved-summary .jose956-p3-tabs-nav li::marker,
    .basel-scroll-content .jose956-p3-tabs-nav li::before,
    .basel-scroll-content .jose956-p3-tabs-nav li::marker {
        display: none !important;
        content: none !important;
    }
    
    .mobile-moved-summary .jose956-p3-tabs-nav li a,
    .basel-scroll-content .jose956-p3-tabs-nav li a {
        display: block;
        padding: 15px 8px;
        font-family: 'PingFang TC', 'Noto Sans TC', -apple-system, sans-serif;
        font-size: 13px;
        font-weight: 400;
        color: #242424;
        text-align: center;
        text-decoration: none;
        border-bottom: none;
        transition: all 0.2s ease;
    }
    
    .mobile-moved-summary .jose956-p3-tabs-nav li a:hover,
    .basel-scroll-content .jose956-p3-tabs-nav li a:hover {
        color: #000;
    }
    
    /* P3/PAZZO 選中的 Tab - 粗體，無底線 */
    .mobile-moved-summary .jose956-p3-tabs-nav li.active a,
    .mobile-moved-summary .jose956-p3-tabs-nav li a.active,
    .basel-scroll-content .jose956-p3-tabs-nav li.active a,
    .basel-scroll-content .jose956-p3-tabs-nav li a.active {
        font-weight: 700;
        color: #242424;
    }
    
    /* P3 Tabs 內容區 */
    .mobile-moved-summary .jose956-p3-tabs-content,
    .basel-scroll-content .jose956-p3-tabs-content {
        padding: 0;
    }
    
    /* Tab 內容面板 - 預設隱藏 */
    .mobile-moved-summary .jose956-p3-tab-panel,
    .basel-scroll-content .jose956-p3-tab-panel {
        display: none;
        overflow: hidden;
    }
    
    /* Tab 內容面板 - 開啟時顯示 */
    .mobile-moved-summary .jose956-p3-tab-panel.active,
    .basel-scroll-content .jose956-p3-tab-panel.active {
        display: block;
    }
    
    /* Tab 內容 padding (左右 15px) */
    div#jose956-mobile-tab-0,
    div#jose956-mobile-tab-1,
    div#jose956-mobile-tab-2 {
        padding: 0 15px !important;
    }
    
    /* Tab 內容區域 - 防止跳動 */
    .mobile-moved-summary .jose956-p3-tabs-content,
    .basel-scroll-content .jose956-p3-tabs-content {
        min-height: 0;
        overflow: hidden;
    }
    
    /* P3 內容文字樣式 */
    .mobile-moved-summary .jose956-p3-tabs-content p,
    .mobile-moved-summary .jose956-p3-tabs-content li,
    .mobile-moved-summary .jose956-p3-tabs-content span,
    .basel-scroll-content .jose956-p3-tabs-content p,
    .basel-scroll-content .jose956-p3-tabs-content li,
    .basel-scroll-content .jose956-p3-tabs-content span {
        font-family: 'PingFang TC', 'Noto Sans TC', -apple-system, sans-serif;
        font-size: 13px;
        font-weight: 400;
        color: #242424;
        line-height: 24px;
    }
    
    .mobile-moved-summary .jose956-p3-tabs-content ul,
    .basel-scroll-content .jose956-p3-tabs-content ul {
        margin: 0;
        padding: 0 0 0 16px;
        list-style: disc;
    }
    
    .mobile-moved-summary .jose956-p3-tabs-content ul li,
    .basel-scroll-content .jose956-p3-tabs-content ul li {
        margin-bottom: 4px;
    }
    
    /* Tab description ul 移除 margin-bottom */
    .single-product-content #tab-description ul {
        margin-bottom: 0 !important;
    }
    
    /* 隱藏原有的 h4 accordion 標題 */
    body.jose956-p3-tabs-active .mobile-moved-summary h4,
    body.jose956-p3-tabs-active .basel-scroll-content h4 {
        display: none !important;
    }
    
    /* 隱藏原有內容（被 tabs 取代的部分） */
    body.jose956-p3-tabs-active .mobile-moved-summary .jose956-original-content,
    body.jose956-p3-tabs-active .basel-scroll-content .jose956-original-content {
        display: none !important;
    }
    
    /* TablePress 表格在 tabs 內的樣式 */
    .jose956-p3-tabs-content .tablepress {
        width: 100%;
        font-size: 13px;
    }
    
    .jose956-p3-tabs-content .tablepress th,
    .jose956-p3-tabs-content .tablepress td {
        padding: 8px 6px;
        font-family: 'PingFang TC', 'Noto Sans TC', -apple-system, sans-serif;
        font-size: 13px;
        color: #242424;
    }
    
    /* ===============================================
       ACFW 優惠券通知按鈕樣式 (手機版)
       覆蓋 Basel 主題的 display:none
       =============================================== */
    
    /* 通知框整體佈局 */
    .woocommerce-error,
    .woocommerce-info {
        display: flex !important;
        flex-direction: column !important;
        padding: 15px !important;
    }
    
    .woocommerce-error li,
    .woocommerce-info li {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
    }
    
    /* 顯示 ACFW 優惠券按鈕，覆蓋 Basel 主題的隱藏 */
    .woocommerce-error .button.acfw_apply_notification,
    .woocommerce-info .button.acfw_apply_notification,
    .woocommerce-error .acfw_apply_notification.button,
    .woocommerce-info .acfw_apply_notification.button {
        display: block !important;
        width: 100% !important;
        margin-top: 15px !important;
        padding: 18px 20px !important;
        background-color: #000 !important;
        color: #fff !important;
        border: none !important;
        border-radius: 0 !important;
        font-family: 'PingFang TC', 'Noto Sans TC', -apple-system, sans-serif !important;
        font-size: 14px !important;
        font-weight: 500 !important;
        letter-spacing: 1px !important;
        text-align: center !important;
        cursor: pointer !important;
        text-transform: none !important;
        box-sizing: border-box !important;
        float: none !important;
        text-decoration: none !important;
    }
    
    .woocommerce-error .button.acfw_apply_notification:hover,
    .woocommerce-info .button.acfw_apply_notification:hover {
        background-color: #333 !important;
        color: #fff !important;
    }
    
    /* 通知訊息文字樣式 */
    .woocommerce-error li,
    .woocommerce-info li {
        font-family: 'PingFang TC', 'Noto Sans TC', -apple-system, sans-serif !important;
        font-size: 14px !important;
        line-height: 1.5 !important;
    }
}

/* ===============================================
   響應式
   =============================================== */

@media (max-width: 991px) {
    #jose956-bottom-bar {
        display: flex;
    }

    body.single-product {
        padding-bottom: 52px;
    }

    .mxp-rignt-button.mobile {
        display: none !important;
    }
}

@media (min-width: 992px) {

    .jose956-panel,
    .jose956-search-overlay,
    .jose956-overlay {
        display: none !important;
    }

    .jose956-summary-container {
        display: none !important;
    }
}
/* 完售商品按鈕樣式 */
.jose956-add-to-cart-btn.sold-out {
    background-color: #cccccc !important;
    color: #666666 !important;
    cursor: not-allowed !important;
    pointer-events: none;
}
.jose956-add-to-cart-btn.sold-out:hover {
    background-color: #cccccc !important;
}

/* 移除彈出視窗中 td 的 border-bottom */
.jose956-panel-content td.label,
.jose956-panel-content td.value,
.jose956-panel-content td.value.with-swatches,
.jose956-panel-content .variations td {
    border-bottom: none !important;
}


/* 庫存限制錯誤訊息樣式 */
.jose956-stock-error {
    background-color: #f5f5f5;
    color: #666;
    font-size: 13px;
    padding: 10px 15px;
    margin: 0 0 15px 0;
    text-align: center;
    border-radius: 4px;
}

/* 隱藏原始 WooCommerce 庫存錯誤訊息 */
.woocommerce-error {
    display: none !important;
}

/* ===============================================
   ALD 風格全螢幕選單 - Aimé Leon Dore Style
   =============================================== */

@media (max-width: 991px) {

    /* 選單容器 - 全螢幕覆蓋 */
    body.act-mobile-menu .mobile-nav {
        width: 100% !important;
        max-width: 100% !important;
        height: 100vh !important;
        background-color: rgba(24, 24, 24, 0.92) !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
        transform: translateX(0) !important;
        left: 0 !important;
        right: 0 !important;
        top: 0 !important;
        padding: 60px 30px 30px !important;
        box-sizing: border-box !important;
        overflow-y: auto !important;
    }

    /* 選單未開啟時隱藏 */
    .mobile-nav {
        transform: translateX(-100%) !important;
        transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                    background-color 0.3s ease !important;
    }

    /* 關閉按鈕區域 - 覆蓋層點擊關閉 */
    body.act-mobile-menu .close-side-widget {
        display: none !important;
    }

    /* 選單項目容器 */
    .mobile-nav .menu-mobile-menu-container,
    .mobile-nav .site-mobile-menu {
        background: transparent !important;
        padding: 0 !important;
    }

    /* 選單項目 - 白色文字 */
    .mobile-nav .site-mobile-menu > li > a,
    .mobile-nav .menu-item > a {
        color: #ffffff !important;
        font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
        font-size: 14px !important;
        font-weight: 400 !important;
        letter-spacing: 0.5px !important;
        text-transform: uppercase !important;
        padding: 12px 0 !important;
        border-bottom: none !important;
        display: block !important;
        transition: opacity 0.2s ease !important;
    }

    .mobile-nav .site-mobile-menu > li > a:hover,
    .mobile-nav .menu-item > a:hover {
        opacity: 0.7 !important;
        color: #ffffff !important;
    }

    /* 子選單箭頭 - 白色 */
    .mobile-nav .menu-item-has-children > a::after,
    .mobile-nav .opener {
        color: #ffffff !important;
        border-color: #ffffff !important;
    }

    .mobile-nav .opener::before,
    .mobile-nav .opener::after {
        background-color: #ffffff !important;
    }

    /* 子選單展開樣式 */
    .mobile-nav .sub-menu,
    .mobile-nav .sub-menu-dropdown {
        background: transparent !important;
        padding-left: 15px !important;
    }

    .mobile-nav .sub-menu li a,
    .mobile-nav .sub-menu-dropdown li a {
        color: rgba(255, 255, 255, 0.8) !important;
        font-size: 13px !important;
        padding: 10px 0 !important;
    }

    .mobile-nav .sub-menu li a:hover,
    .mobile-nav .sub-menu-dropdown li a:hover {
        color: #ffffff !important;
    }

    /* 搜尋欄位 - ALD 風格 */
    .mobile-nav .searchform {
        margin-bottom: 30px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
        background: transparent !important;
    }

    .mobile-nav .searchform input[type="text"],
    .mobile-nav .searchform .s {
        background: transparent !important;
        border: none !important;
        color: #ffffff !important;
        font-size: 14px !important;
        padding: 12px 0 !important;
    }

    .mobile-nav .searchform input[type="text"]::placeholder,
    .mobile-nav .searchform .s::placeholder {
        color: rgba(255, 255, 255, 0.5) !important;
    }

    .mobile-nav .searchform button,
    .mobile-nav .searchform .searchsubmit {
        color: #ffffff !important;
        background: transparent !important;
    }

    /* 搜尋圖示 SVG 白色 */
    .mobile-nav .searchform svg,
    .mobile-nav .searchform svg path {
        fill: #ffffff !important;
        stroke: #ffffff !important;
    }

    /* 右上角關閉按鈕 (X) */
    .mobile-nav::before {
        content: '×' !important;
        position: fixed !important;
        top: 15px !important;
        right: 20px !important;
        font-size: 28px !important;
        color: #ffffff !important;
        cursor: pointer !important;
        z-index: 10001 !important;
        width: 40px !important;
        height: 40px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        pointer-events: none !important;
    }

    /* 底部 Email 訂閱區 (可選) */
    .mobile-nav .widget_mc4wp_form_widget,
    .mobile-nav .newsletter-widget {
        position: absolute !important;
        bottom: 30px !important;
        left: 30px !important;
        right: 30px !important;
    }

    .mobile-nav .widget_mc4wp_form_widget input[type="email"],
    .mobile-nav .newsletter-widget input[type="email"] {
        background: transparent !important;
        border: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
        color: #ffffff !important;
        padding: 10px 0 !important;
        width: 70% !important;
    }

    .mobile-nav .widget_mc4wp_form_widget input[type="submit"],
    .mobile-nav .newsletter-widget input[type="submit"] {
        background: transparent !important;
        border: none !important;
        color: #ffffff !important;
        text-transform: uppercase !important;
        cursor: pointer !important;
    }

    /* 隱藏不需要的元素 */
    .mobile-nav .search-results-wrapper:empty {
        display: none !important;
    }
}
