/*
Theme Name: Kartnic Child
Theme URI: https://flashgate.top
Description: Kartnic 子主题，基于 Kartnic 主题定制
Author: Your Name
Author URI: https://flashgate.top
Template: kartnic
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kartnic-child
Tags: custom-background, custom-logo, featured-images, threaded-comments
*/

/* 导入父主题样式 */
@import url("../kartnic/style.css");

/* 在这里添加你的自定义样式 */

/* Logo 大小控制 - 使用!important 强制覆盖 */
.custom-logo,
.site-branding-container .custom-logo,
.site-branding-container img.custom-logo,
img.custom-logo {
    max-width: 200px !important;
    max-height: 80px !important;
    width: auto !important;
    height: auto !important;
}

/* 如果使用的是 kartnic_logo 选项而不是 custom_logo */
.site-logo {
    max-width: 200px !important;
    max-height: 80px !important;
    width: auto !important;
    height: auto !important;
}

/* 隐藏站点标题和描述 */
.site-branding .main-title,
.site-branding .site-description {
    display: none !important;
}

/* ========================================
   WooCommerce 产品目录页布局（与首页一致）
   ======================================== */

/* 产品容器 - 强制使用 block 布局 */
.woocommerce-page .site-cont.main-area {
    display: block !important;
    width: 100% !important;
}

/* 产品标题区域 */
.woocommerce-page .woocommerce-products-header {
    display: block !important;
    width: 100% !important;
    padding: 30px 20px !important;
    margin-bottom: 40px !important;
    background: #fff !important;
    border-radius: 8px !important;
    text-align: center !important;
    clear: both !important;
}

.woocommerce-page .woocommerce-products-header h1 {
    font-size: 32px !important;
    margin-bottom: 15px !important;
    color: #333 !important;
}

/* 产品网格容器 */
.woocommerce-page ul.products {
    display: block !important;
    width: 100% !important;
    clear: both !important;
    margin-bottom: 40px !important;
}

.woocommerce-page ul.products::after {
    content: "";
    display: table;
    clear: both;
}

/* 单个产品项 */
.woocommerce-page ul.products li.product {
    float: left !important;
    width: 25% !important;
    padding: 15px !important;
    box-sizing: border-box !important;
    background: #fff !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05) !important;
    margin: 0 !important;
}

.woocommerce-page ul.products li.product:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important;
}

/* 产品图片 */
.woocommerce-page ul.products li.product a img {
    width: 100%;
    height: auto;
}

/* 产品信息 */
.woocommerce-page ul.products li.product .woocommerce-loop-product__title {
    font-size: 16px !important;
    margin: 10px 0 !important;
    line-height: 1.4 !important;
    min-height: 44px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    color: #333 !important;
}

/* 产品价格 */
.woocommerce-page ul.products li.product .price {
    margin: 15px 0 !important;
    font-size: 18px !important;
    color: #e74c3c !important;
}

.woocommerce-page ul.products li.product .price del {
    color: #999 !important;
    font-size: 14px !important;
    margin-right: 8px !important;
}

.woocommerce-page ul.products li.product .price ins {
    text-decoration: none !important;
    color: #e74c3c !important;
}

/* 产品按钮 */
.woocommerce-page ul.products li.product .button,
.woocommerce-page ul.products li.product .add_to_cart_button {
    background-color: #000 !important;
    color: #fff !important;
    border: 1px solid #000 !important;
    padding: 10px 20px !important;
    border-radius: 0 !important;
    text-decoration: none !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    display: inline-block !important;
    width: 100% !important;
    text-align: center !important;
    margin-top: 15px !important;
}

.woocommerce-page ul.products li.product .button:hover,
.woocommerce-page ul.products li.product .add_to_cart_button:hover {
    background-color: #333 !important;
    border-color: #333 !important;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .woocommerce-page ul.products li.product {
        width: 33.333% !important;
    }
}

@media (max-width: 900px) {
    .woocommerce-page ul.products li.product {
        width: 50% !important;
    }
}

@media (max-width: 600px) {
    .woocommerce-page ul.products li.product {
        width: 100% !important;
    }
    
    .woocommerce-page .woocommerce-products-header h1 {
        font-size: 24px !important;
    }
}

/* ========================================
   搜索结果页单列布局
   ======================================== */

.search-results .site-cont.main-area {
    display: block !important;
    width: 100% !important;
}

.search-results .page-title {
    display: block !important;
    width: 100% !important;
    padding: 30px 20px !important;
    margin-bottom: 40px !important;
    background: #fff !important;
    border-radius: 8px !important;
    text-align: center !important;
    clear: both !important;
    font-size: 32px !important;
    color: #333 !important;
}

.search-results article {
    float: left !important;
    width: 100% !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    background: #fff !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 8px !important;
    margin-bottom: 30px !important;
    clear: both !important;
}

.search-results article::after {
    content: "";
    display: table;
    clear: both;
}

.search-results article .main-entry-title {
    font-size: 24px !important;
    margin-bottom: 15px !important;
    color: #333 !important;
}

.search-results article .entry-summary {
    margin: 20px 0 !important;
    line-height: 1.8 !important;
    color: #666 !important;
}

.search-results article .read-btn input[type="button"] {
    background-color: #000 !important;
    color: #fff !important;
    border: 1px solid #000 !important;
    padding: 10px 20px !important;
    border-radius: 0 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
}

.search-results article .read-btn input[type="button"]:hover {
    background-color: #333 !important;
    border-color: #333 !important;
}

.search-results .pagination {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    margin: 40px 0 !important;
    clear: both !important;
}

.search-results .post-categories-tags {
    margin-top: 20px !important;
}
