
/* TUMAZE Product Optimizer v1.0.0 */

body.tpo-hide-additional-information .additional_information_tab,
body.tpo-hide-additional-information .woocommerce-Tabs-panel--additional_information,
body.tpo-hide-additional-information #tab-additional_information{
    display:none!important;
}

body.tpo-hide-attributes-table table.shop_attributes,
body.tpo-hide-attributes-table .woocommerce-product-attributes,
body.tpo-hide-attributes-table .woocommerce-product-attributes-item{
    display:none!important;
}

body.tpo-hide-sku .product_meta .sku_wrapper,
body.tpo-hide-categories .product_meta .posted_in,
body.tpo-hide-tags .product_meta .tagged_as{
    display:none!important;
}

body.tpo-hide-related-products .related.products,
body.tpo-hide-related-products section.related{
    display:none!important;
}

body.tpo-hide-upsells .upsells.products,
body.tpo-hide-upsells section.upsells{
    display:none!important;
}

body.tpo-hide-share-buttons .product-share-box,
body.tpo-hide-share-buttons .woocommerce-product-details__share,
body.tpo-hide-share-buttons .ct-share-box,
body.tpo-hide-share-buttons .share-box,
body.tpo-hide-share-buttons .social-share{
    display:none!important;
}

@media(max-width:782px){
    body.tpo-mobile-spacing-optimization.single-product .product{
        --theme-content-spacing:18px;
    }

    body.tpo-mobile-spacing-optimization.single-product .summary,
    body.tpo-mobile-spacing-optimization.single-product .woocommerce-tabs,
    body.tpo-mobile-spacing-optimization.single-product .product-entry-wrapper{
        margin-top:18px!important;
        margin-bottom:18px!important;
    }

    body.tpo-mobile-spacing-optimization.single-product .woocommerce-tabs,
    body.tpo-mobile-spacing-optimization.single-product .woocommerce-Tabs-panel{
        padding-top:0!important;
    }
}


/* 頁尾同步購買區 */
.tpo-bottom-purchase-box{
    max-width:1180px;
    margin:34px auto 24px;
    padding:28px;
    border:1px solid #e5e7eb;
    border-radius:16px;
    background:#fff;
    box-shadow:0 8px 28px rgba(15,23,42,.06);
}

.tpo-bottom-heading{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:20px;
    margin-bottom:10px;
}

.tpo-bottom-eyebrow{
    display:block;
    margin-bottom:5px;
    color:#d98664;
    font-size:12px;
    font-weight:700;
    letter-spacing:.08em;
}

.tpo-bottom-heading h2{
    margin:0;
    color:#1f2937;
    font-size:25px;
}

.tpo-bottom-price{
    color:#1f2937;
    font-size:22px;
    font-weight:800;
}

.tpo-bottom-product-name{
    margin-bottom:20px;
    color:#6b7280;
    font-size:14px;
}

.tpo-bottom-controls{
    display:grid;
    grid-template-columns:minmax(220px,1fr) auto minmax(220px,300px);
    align-items:end;
    gap:16px;
}

.tpo-bottom-variations{
    display:grid;
    gap:12px;
}

.tpo-bottom-field label,
.tpo-bottom-quantity-wrap>label{
    display:block;
    margin-bottom:7px;
    color:#374151;
    font-size:13px;
    font-weight:700;
}

.tpo-bottom-select{
    width:100%;
    min-height:48px;
    padding:0 14px;
    border:1px solid #d8dde4;
    border-radius:8px;
    background:#fff;
    color:#374151;
}

.tpo-bottom-quantity{
    display:grid;
    grid-template-columns:42px 58px 42px;
    min-height:48px;
    border:1px solid #d8dde4;
    border-radius:8px;
    overflow:hidden;
}

.tpo-bottom-quantity button,
.tpo-bottom-quantity input{
    min-width:0;
    border:0!important;
    border-radius:0!important;
    background:#fff;
    text-align:center;
}

.tpo-bottom-quantity button{
    cursor:pointer;
    font-size:18px;
}

.tpo-bottom-quantity input{
    width:58px;
    padding:0;
    appearance:textfield;
    -moz-appearance:textfield;
}

.tpo-bottom-quantity input::-webkit-inner-spin-button,
.tpo-bottom-quantity input::-webkit-outer-spin-button{
    margin:0;
    -webkit-appearance:none;
}

.tpo-bottom-add-button{
    min-height:48px;
    padding:0 22px;
    border:0;
    border-radius:8px;
    background:#d98664;
    color:#fff;
    font-size:15px;
    font-weight:800;
    cursor:pointer;
}

.tpo-bottom-add-button:disabled{
    background:#e8c1b1;
    cursor:not-allowed;
    opacity:1;
}

.tpo-bottom-message{
    min-height:0;
    margin-bottom:8px;
    color:#b42318;
    font-size:13px;
}

@media(max-width:782px){
    .tpo-bottom-purchase-box{
        margin:26px 16px 20px;
        padding:20px 16px;
        border-radius:14px;
    }

    .tpo-bottom-heading{
        display:block;
    }

    .tpo-bottom-price{
        margin-top:8px;
        font-size:20px;
    }

    .tpo-bottom-controls{
        grid-template-columns:1fr;
    }

    .tpo-bottom-quantity{
        width:142px;
    }

    .tpo-bottom-add-button{
        width:100%;
        min-height:52px;
    }
}


/* 加入購物車成功提示 */
.tpo-added-toast{
    position:fixed;
    z-index:2147483000;
    right:22px;
    bottom:22px;
    display:grid;
    grid-template-columns:42px minmax(0,1fr) auto 32px;
    align-items:center;
    gap:12px;
    width:min(440px,calc(100vw - 32px));
    padding:14px 14px 14px 16px;
    border:1px solid #d9e8dd;
    border-radius:14px;
    background:#fff;
    box-shadow:0 16px 42px rgba(15,23,42,.18);
    opacity:0;
    visibility:hidden;
    transform:translateY(18px);
    transition:opacity .2s ease,transform .2s ease,visibility .2s ease;
}

.tpo-added-toast.is-visible{
    opacity:1;
    visibility:visible;
    transform:translateY(0);
}

.tpo-added-toast-icon{
    display:flex;
    align-items:center;
    justify-content:center;
    width:42px;
    height:42px;
    border-radius:50%;
    background:#eaf8ee;
    color:#238b45;
    font-size:22px;
    font-weight:900;
}

.tpo-added-toast-copy strong,
.tpo-added-toast-copy span{
    display:block;
}

.tpo-added-toast-copy strong{
    color:#1f2937;
    font-size:15px;
}

.tpo-added-toast-copy span{
    margin-top:3px;
    color:#6b7280;
    font-size:12px;
}

.tpo-added-toast-link{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:38px;
    padding:0 14px;
    border-radius:8px;
    background:#d98664;
    color:#fff!important;
    text-decoration:none!important;
    font-size:13px;
    font-weight:800;
    white-space:nowrap;
}

.tpo-added-toast-close{
    width:32px;
    height:32px;
    padding:0;
    border:0;
    border-radius:50%;
    background:transparent;
    color:#8a8f98;
    font-size:22px;
    line-height:1;
    cursor:pointer;
}

@media(max-width:600px){
    .tpo-added-toast{
        right:16px;
        bottom:18px;
        left:16px;
        width:auto;
        grid-template-columns:38px minmax(0,1fr) 30px;
        gap:10px;
    }

    .tpo-added-toast-icon{
        width:38px;
        height:38px;
    }

    .tpo-added-toast-link{
        grid-column:1/-1;
        width:100%;
        min-height:42px;
    }

    .tpo-added-toast-close{
        grid-column:3;
        grid-row:1;
    }
}

@media(prefers-reduced-motion:reduce){
    .tpo-added-toast{
        transition:none;
    }
}
