/*商品頁*/
.wc-tabs{display:none;}
.HeaderText{display:none;}
.related li{position:relative;}
.woocommerce-single-product {
    max-width: 1200px;
    margin: 1vw auto 7vw;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 特價標籤 */
.onsale {
    display: inline-block;
    background: #f5c05c;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 50px;
    margin-bottom: 10px;
    position: absolute;
    top: 1.5vw;
    left: 9vw;
}

/* 圖片展示 */
.woocommerce-product-gallery {
    margin-bottom: 20px;
}

.woocommerce-product-gallery__image {
    text-align: center;
    margin-bottom: 10px;
}

.woocommerce-product-gallery__image img {
    max-width: 100%;
    border-radius: 8px;
    border: 1px solid #ddd;
}

/* 產品詳細資訊 */
.summary.entry-summary {
    margin-top: 20px;
}

.product_title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.price {
    font-size: 20px;
    color: #e67e22;
    margin-bottom: 20px;
}

.price del {
    color: #999;
    margin-right: 10px;
    text-decoration: line-through;
}

.price ins {
    color: #e74c3c;
    font-weight: bold;
}

/* 購物車按鈕 */
.cart .quantity {
    display: inline-block;
    margin-right: 10px;
}

.cart .input-text.qty {
    width: 60px;
    text-align: center;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.single_add_to_cart_button {
    display: inline-block;
    background: #27ae60;
    color: #fff;
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
}

.single_add_to_cart_button:hover {
    background: #2ecc71;
}

/* 元數據 */
.product_meta {
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

.product_meta a {
    color: #3498db;
    text-decoration: none;
}

.product_meta a:hover {
    text-decoration: underline;
}

/* 評價區域 */
.woocommerce-tabs {
    margin-top: 30px;
    border-top: 1px solid #ddd;
    padding-top: 20px;
}

.woocommerce-tabs h2 {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
}

.woocommerce-Reviews-title {
    font-size: 18px;
    margin-bottom: 10px;
}

.comment-form-rating label {
    font-size: 16px;
}

.comment-form-comment textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
}

/* 相關產品 */
.related.products {
    margin-top: 40px;
}

.related.products h2 {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
}

.related.products ul {
        display: flex
;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
    left: -1.2vw;
}

.related.products li {
    flex: 1 1 calc(25% - 20px);
    list-style: none;
    text-align: center;
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related.products li:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.related.products img {
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 10px;
}

.related.products .woocommerce-loop-product__title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.related.products .price {
    font-size: 14px;
    color: #e74c3c;
}

.related.products .button {
    background: var(--primary-color);
    color: #fff;
    padding: 8px 15px;
    font-size: 14px;
    border: none;
    border-radius: 4px;
    text-transform: uppercase;
    cursor: pointer;
}

.related.products .button:hover {
    background: #2980b9;
}

@media (max-width: 900px) {
    /* 主容器調整 */
    .woocommerce-single-product {
        padding: 15px;
    }

    /* 圖片區域 */
    .woocommerce-product-gallery__image img {
        width: 100%;
        height: auto; /* 保持比例防止變形 */
        border-radius: 8px;
        border: 1px solid #ddd;
    }

    /* 產品詳細資訊 */
    .summary.entry-summary {
        margin-top: 20px;
    }

    .product_title {
        font-size: 20px;
    }

    .price {
        font-size: 18px;
    }

    .cart .input-text.qty {
        width: 50px; /* 縮小數量輸入框 */
    }

    .single_add_to_cart_button {
        font-size: 14px;
        padding: 8px 15px;
    }

    /* 評價區域調整 */
    .woocommerce-tabs {
        padding-top: 15px;
    }

    .woocommerce-tabs h2 {
        font-size: 18px;
    }

    .comment-form-comment textarea {
        height: 120px; /* 增加輸入框高度 */
    }

    /* 相關產品 */
    .related.products ul {
       flex-direction: column;
        gap: 15px;
        padding: 15px;
        box-sizing: border-box;
        position: relative;
        left: -2vw;
    }

    .related.products li {
        flex: 1 1 auto;
        margin: 0 auto;
        width: 100%; /* 相關產品寬度全屏 */
    }

    .related.products img {
        width: 100%; /* 確保圖片不變形 */
        height: auto;
    }

    .related.products .woocommerce-loop-product__title {
        font-size: 14px;
    }

    .related.products .price {
        font-size: 14px;
    }

    .related.products .button {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .onsale {
    display: inline-block;
    background: #f5c05c;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 50px;
    margin-bottom: 10px;
    position: absolute;
    top: 5.5vw;
    left: 6vw;
}
    
    
}
