/*
 Theme Name:   Woodmart Child
 Description:  Woodmart Child Theme
 Author:       XTemos
 Author URI:   http://xtemos.com
 Template:     woodmart
 Version:      1.0.0
 Text Domain:  woodmart
*/

/* 升級 Theme 樣式更改 */
div.page-title.page-title-default {
    background-color: transparent !important;
    text-align: center;
}

body.woocommerce-checkout .wd-checkout-steps.woodmart-checkout-steps {
    text-align: center;
    margin-bottom: 40px;
}

body.woocommerce-checkout .main-page-wrapper {
    padding: 40px;
}
@media (max-width: 576px) {
    body.woocommerce-checkout .main-page-wrapper {
        padding: 15px;
    }
}
body.woocommerce-checkout .cart-actions .coupon {
    width: 100%;
}
body.woocommerce-checkout input[type='text'] {
    border: 2px solid rgba(129, 129, 129, 0.2);
    border-top: none;
    border-left: none;
    border-right: none;
    background-color: transparent;
    width: 230px;
}

body.woocommerce-checkout .coupon label {
    display: none;
}

body.woocommerce-checkout .cart-actions .coupon textarea {
    border-top-style: none;
    border-left-style: none;
    border-right-style: none;
    padding: 0 2px;
    touch-action: manipulation;
    margin-right: 10px;
}

body.woocommerce-checkout .cart-actions .coupon button {
    border: none;
    box-shadow: inset 0 -2px 0 rgb(0 0 0 / 15%);
    transition: color 0.25s ease;
    background-color: #83b735;
    color: #fff;
    width: 175px;
}

@media (max-width: 769px) {
    body.woocommerce-checkout .row.cart-actions div {
        width: 100%;
    }
    body.woocommerce-checkout .cart-actions .coupon {
        width: 100%;
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        justify-content: center;
        margin: 0;
        border: 2px dashed rgba(129, 129, 129, 0.2);
        margin: 30px 0;
        padding: 25px;
    }
}

@media (max-width: 576px) {
    body.woocommerce-checkout button[name='update_cart'] {
        width: 100%;
    }
    body.woocommerce-checkout input[name='coupon_code'] {
        width: 100%;
        margin-bottom: 10px;
    }
    body.woocommerce-checkout .cart-actions .coupon button {
        width: 100%;
    }
}

.woocommerce-info {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1050;
    cursor: pointer;
    margin: 0;
    transform: translate3d(0, 200%, 0);
    -webkit-transform: translate3d(0, 200%, 0);
    -webkit-animation: wd-fadeInUpBig 0.35s ease 0.5s both;
    animation: wd-fadeInUpBig 0.35s ease 0.5s both;
}

.woocommerce-info::after {
    content: '\f126';
    font-family: 'woodmart-font';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 60px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.1);
    transition: background-color 0.25s ease;
    -webkit-transition: background-color 0.25s ease;
}
.woocommerce-info.hidden-notice {
    animation: wd-fadeOutDownBig 0.35s ease both;
}

.woocommerce-form-coupon-toggle .woocommerce-info {
    position: relative;
    top: auto;
    bottom: auto;
    left: auto;
    right: auto;
    width: 100%;
    max-width: 100%;
    -ms-flex-preferred-size: 100%;
    flex-basis: 100%;
    padding-right: 30px;
    z-index: auto;
    cursor: default;
    transform: none;
    -webkit-transform: none;
    animation: none;
    -webkit-animation: none;
}
@media (max-width: 719px) {
    .whb-general-header-inner .whb-mobile-right .wd-header-my-account .wd-tools-text {
        display: none;
    }
    .whb-general-header-inner .whb-mobile-right .wd-header-my-account .wd-tools-icon {
        display: block;
    }
}

.woocommerce-form-coupon-toggle .woocommerce-info::after {
    display: none;
}

.app-footer {
    position: relative !important;
}

/* 縮短 menu 與 title 間距*/
.wd-header-overlap .title-size-default {
    padding-top: 60px;
}

/* Footer 排列位置 */
.footer-column-1 {
    text-align: end;
}
.footer-column-1 h5 {
    right: 0.5rem;
    position: relative;
}
.footer-column-2 {
    text-align: center;
}
.footer-column-3 {
    text-align: start;
}

@media (max-width: 576px) {
    .footer-column-1 {
        text-align: center;
    }
    .footer-column-1 h5 {
        right: 0;
    }
    .footer-column-3 {
        text-align: center;
    }
}

/* sumo外掛調整 ，強制購物金欄位出現 且樣式同折價卷*/
.woocommerce-checkout form.checkout_redeeming {
    display: block !important;
}
.woocommerce-checkout form.checkout_redeeming #mainsubmi {
    width: 175px;
    background-color: #83b735;
    color: #fff;
    box-shadow: inset 0 -2px 0 rgb(0 0 0 / 15%);
}
@media (max-width: 768px) {
    .woocommerce-checkout form.checkout_redeeming {
        margin: 30px 0;
        padding: 25px;
        border: 2px dashed rgba(129, 129, 129, 0.2);
    }
    #rs_apply_coupon_code_field {
        margin-bottom: 10px;
        width: 100%;
    }
    .woocommerce-checkout form.checkout_redeeming #mainsubmi {
        width: 100%;
    }
}

/* 隱藏更新購物車按鈕 */
.woocommerce-checkout button[name='update_cart'] {
    display: none;
}

.woocommerce-checkout #gender_field label {
    margin-bottom: 0;
}

/* ----------新版首頁樣式設定---------- */

/* 商品類別區塊樣式 */
#product-cat .category-grid-item img {
    width: 100%;
    aspect-ratio: 1.5;
    object-fit: cover;
}
#product-cat .wd-spacing-30 > [class*='col'] {
    padding-left: 2px;
    padding-right: 2px;
}
#product-cat .category-grid-item:hover > .wrapp-category::before {
    opacity: 0;
}
#product-cat .more-products {
    display: none;
}
#product-cat .hover-mask {
    transform: none;
    top: calc(50% - 20px);
}

/* 人氣商品區樣式 */
#product-top .woodmart-add-btn {
    position: absolute;
    bottom: -36px;
    width: 100%;
}
#product-top .product-grid-item .product-element-top:hover .woodmart-add-btn {
    transform: translateY(-36px) translateZ(0);
}
#product-top .woodmart-add-btn > a {
    width: 100%;
    background-color: #83b735c0;
}
#product-top .price {
    color: #83b735;
}
#product-top .price span {
    color: #83b735;
}
@media (max-width: 768px) {
    #product-top .woodmart-add-btn {
        position: absolute;
        bottom: 0;
        width: unset;
    }
    #product-top .product-grid-item .product-element-top:hover .woodmart-add-btn {
        transform: unset;
    }
    #product-top .woodmart-add-btn > a {
        width: unset;
        background-color: #83b735;
    }
}

/* 網友推薦區樣式 */
#product-suggest .product-grid-item:hover .product-image-link img {
    transition: all 0.5s ease;
    transform: scale(1.1);
}
#product-suggest .product-labels {
    display: none;
}
#product-suggest .hover-img {
    display: none;
}
#product-suggest .top-information h3 {
    margin-bottom: 0;
}
#product-suggest .top-information .wd-product-cats {
    display: none;
}
#product-suggest .top-information .price {
    display: none;
}
#product-suggest .top-information .wd-add-btn {
    display: none;
}
#product-suggest .wd-buttons {
    display: none;
}
#product-suggest .quick-shop-wrapper {
    display: none;
}

/* 最新文章區塊樣式 */
#new-posts .vc_grid-item .vc_gitem-zone-img {
    aspect-ratio: 0.9;
}
#new-posts .vc_grid-item .vc_gitem-zone {
    background-color: transparent !important;
}
#new-posts .vc_grid-item h4 {
    font-size: 16px;
}
#new-posts .vc_btn3-container .vc_btn3 {
    width: 100%;
    color: #83b735;
    background-color: transparent;
}

/* 結帳頁面付款/寄送區塊 *因無法作用，有另外寫在 WP 後台 > 外觀 > 自訂裡 */
ul.fake_shipping_method {
    list-style: none;
    margin-bottom: 0;
}
ul.fake_shipping_method input {
    position: relative;
    top: 4px;
    float: right;
    margin-right: 0;
    margin-left: 7px;
}

/*購物車數量按鈕修正*/
.product-quantity .quantity {
    display: flex;
}
.product-quantity .quantity > input[type='number'] {
    width: 30%;
}
.product-quantity .quantity .minus,
.product-quantity .quantity .plus {
    background-color: white;
    border: var(--wd-form-brd-width) solid var(--wd-form-brd-color);
    padding-left: 10px;
    padding-right: 10px;
    width: 30px;
}
.product-quantity .quantity .minus {
    border-right: 0;
}
.product-quantity .quantity .plus {
    border-left: 0;
}
@media (max-width: 768px) {
    .product-quantity .quantity > input[type='number'] {
        height: 42px !important;
    }
}

/* Chrome, Safari, Edge, Opera */
.product-quantity .quantity input::-webkit-outer-spin-button,
.product-quantity .quantity input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
.product-quantity .quantity input[type='number'] {
    -moz-appearance: textfield;
}

@media (max-width: 768px) {
    .post-single-page .post-title {
        font-size: 24px !important;
    }
    .single-post .wpb_wrapper p,
    .single-post .wpb_wrapper li {
        font-size: 18px;
        line-height: 28px;
    }
}

/* 手機選單漢堡調整 */
.mobile-nav .wd-search-form form {
    margin-right: 50px;
}
.mobile-nav .whb-column.whb-mobile-left.whb-hidden-lg {
    position: absolute;
    top: 15px;
    right: 5px;
}

/* Header 調整 */
.whb-top-bar a {
    color: #fff;
}
.ctk-sumo {
    display: none;
}
.whb-general-header .ctk-sumo {
    display: block;
}
.social-icons {
    display: flex;
    gap: 20px;
}
.social-icons i {
    font-size: 20px;
    color: #fff;
}
.social-icons a {
    display: flex;
    align-items: center;
}
.social-icons svg {
    width: 20px;
}

/* HARU AI 科學小助手 */
.gpt-question-button-wrapper {
    flex: 0 1 calc(33.33% - 13.33px);
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .gpt-question-button-wrapper {
        flex: 0 1 100%;
        box-sizing: border-box;
    }
}

.gpt-question-button {
    display: flex;
    border: none;
    background-color: #f7f7f7;
    padding: 10px;
    cursor: pointer;
    font-size: 16px;
}

.gpt-question-icon {
    margin: 3px 10px 0 0;
    width: 20px;
    height: 20px;
}

/* GPT Popup */
.gpt-popup {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.gpt-popup-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 40px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    position: relative;
}

.popup-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 0;
    right: 0;
    width: 30px;
}

.popup-close:hover,
.popup-close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

#gpt-questions {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.popup-answer-container {
    display: flex;
    gap: 20px;
}

.gpt-icon {
    width: 20px;
    height: 20px;
}

.woocommerce-checkout .order_details + p {
    display: none;
}

@media (max-width: 768px) {
    .woobt-products .woobt-product .woobt-title {
        flex: 1;
    }
    .woobt-products .woobt-product .variations_form .variations .variation {
        min-width: unset;
    }
}
/* 隱藏「我的帳戶」檢視訂單頁面的付款按鈕，防止顧客切換付款方式 */
.woocommerce-order-details .pay {
    display: none !important;
}