/*
Theme Name: GTRM
Theme URI: https://gtrmh.com/theme
Author: 国泰瑞密技术部
Author URI: https://gtrmh.com
Description: GTRM (国泰瑞密) 密封系统官方B2B企业通用WordPress主题。高仿精密工业网站设计风格，完美契合机械、密封、轴承、传动、液压及高端制造业的官网展示。支持多级菜单、移动端自适应、特色图片、自定义徽标及高性能B2B询盘功能，纯净安全，无广告。
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: gtrmh
Tags: translation-ready, custom-menu, featured-images, one-column, grid-layout, flexible-header, theme-options, blog, e-commerce
Requires at least: 5.6
Tested up to: 6.4
Requires PHP: 7.2

This theme is released under the GPL, see license.txt.
*/

/* 1. CRITICAL IMAGE CONSTRAINTS (Prevents humongous images from overflowing columns) */
img, 
.wp-block-image img, 
.post-thumbnail img,
figure img,
iframe,
video {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    box-sizing: border-box;
}

/* Base WordPress block styles */
.aligncenter {
    display: block;
    margin: 1.5em auto;
}
.alignleft {
    float: left;
    margin: 0 1.5em 1.5em 0;
}
.alignright {
    float: right;
    margin: 0 0 1.5em 1.5em;
}
.wp-block-image {
    margin: 0 0 1.5em;
}
.wp-block-image.aligncenter {
    text-align: center;
}
.wp-block-image.alignleft {
    float: left;
    margin-right: 1.5em;
}
.wp-block-image.alignright {
    float: right;
    margin-left: 1.5em;
}

/* 2. BASE RESET & FALLBACK LAYOUT RULES (If Tailwind CDN is blocked, layout remains perfect) */
html {
    box-sizing: border-box;
    scroll-behavior: smooth;
}
*, *:before, *:after {
    box-sizing: inherit;
}
body {
    font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.625;
    color: #1e293b;
    background-color: #f8fafc;
    margin: 0;
    padding: 0;
}
a {
    color: #0c4a6e;
    text-decoration: none;
    transition: color 0.2s;
}
a:hover {
    color: #0284c7;
}

/* Custom Grid Constraints to assure look is correct even in subpages */
.container {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Post loops responsive containment */
.wp-post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}
.wp-post-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}
.wp-post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}
.wp-post-card .thumbnail-wrapper {
    height: 180px;
    overflow: hidden;
    background: #f1f5f9;
}
.wp-post-card .thumbnail-wrapper img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
}
.wp-post-card .card-body {
    padding: 1.25rem;
}

/* 404 page & comments layout rules */
.comments-area, .no-results {
    background: #ffffff;
    padding: 2rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    margin-top: 2rem;
}
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.comment-body {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-b: 1px solid #f1f5f9;
}
.comment-meta {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}
.comment-content {
    font-size: 0.875rem;
    color: #334155;
}
