/* 
 Theme Name:   blocksy-child
 Theme URI:    http://modishplay.com
 Description:  built on 26 03
 Author:       GlemChen
 Author URI:   http://modishplay.com
 Template:     blocksy
 Version:      1.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html

 /* == Add your own styles below this line ==
--------------------------------------------*/

function modishplay_product_page_styles() {
    if (is_product()) { // 仅在商品详情页加载
        ?>
        <style>
            /* 从您提供的HTML中复制所有样式到这里 */
            body {
                background-color: #f0f0f0;
                background-image: radial-gradient(#ccc 1px, transparent 0);
                background-size: 20px 20px;
            }
            
            .skew-fix {
                transform: skew(-2deg);
            }

            .panel-border {
                border: 4px solid #1A1A1A;
            }

            .comic-button:hover {
                transform: translate(-2px, -2px);
                box-shadow: 12px 12px 0px 0px rgba(26, 26, 26, 1);
            }
            
            .comic-button:active {
                transform: translate(4px, 4px);
                box-shadow: 2px 2px 0px 0px rgba(26, 26, 26, 1);
            }

            /* KAPOW burst效果 */
            .burst-wrap {
                position: absolute;
                top: -40px;
                right: -30px;
                z-index: 20;
            }
            
            .burst {
                background: #FFD700;
                width: 100px;
                height: 100px;
                clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
                display: flex;
                align-items: center;
                justify-content: center;
                border: 2px solid #000;
                animation: pulse 2s infinite;
            }
            
            @keyframes pulse {
                0% { transform: scale(1) rotate(0deg); }
                50% { transform: scale(1.1) rotate(10deg); }
                100% { transform: scale(1) rotate(0deg); }
            }
            
            /* 字体定义 */
            .font-comic {
                font-family: 'Bangers', cursive;
            }
        </style>
        <?php
    }
}
add_action('wp_head', 'modishplay_product_page_styles');

// 加载Google字体
function modishplay_product_page_fonts() {
    if (is_product()) {
        wp_enqueue_style('google-fonts', 'https://fonts.googleapis.com/css2?family=Bangers&family=Inter:wght@400;700;900&display=swap');
    }
}
add_action('wp_enqueue_scripts', 'modishplay_product_page_fonts');

