/*
Theme Name: Cozing Medical
Theme URI: https://www.cozinglaser.com
Author: Cozing Medical
Author URI: https://www.cozinglaser.com
Description: 蓝色外贸 B2B 主题，复刻 www.cozinglaser.com 风格。含 product 产品类型、产品分类、询盘后台、面包屑与 SEO 辅助。面向欧美市场，界面英文。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cozing
Tags: e-commerce, two-columns, custom-menu, featured-images, translation-ready
*/

:root {
    --cozing-blue: #285aeb;
    --cozing-blue-dark: #1a3a9b;
    --cozing-blue-darker: #12276b;
    --cozing-navy: #0f1e45;
    --cozing-text: #222222;
    --cozing-muted: #666666;
    --cozing-border: #e7eeee;
    --cozing-bg: #f5f8f8;
    --cozing-white: #ffffff;
    --cozing-radius: 8px;
    --cozing-shadow: 0 4px 20px rgba(15, 30, 69, 0.08);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--cozing-text);
    background: var(--cozing-white);
}

a { color: var(--cozing-blue); text-decoration: none; }
a:hover { color: var(--cozing-blue-dark); text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 { line-height: 1.25; color: var(--cozing-navy); margin: 0 0 0.6em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ===== 顶部工具条 ===== */
.topbar { background: var(--cozing-navy); color: #cfe0ff; font-size: 13px; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; min-height: 36px; }
.topbar a { color: #cfe0ff; }
.topbar a:hover { color: #fff; }
.topbar .tb-contact span { margin-right: 18px; }

/* ===== 语言切换下拉 ===== */
.tb-lang { position: relative; }
.tb-lang .lang-current {
    background: transparent; border: none; color: #cfe0ff; font-size: 13px;
    cursor: pointer; padding: 6px 8px; font-family: inherit;
}
.tb-lang .lang-current:hover { color: #fff; }
.tb-lang .lang-dropdown {
    display: none; position: absolute; right: 0; top: 100%;
    background: #fff; border: 1px solid var(--cozing-border); border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,.14); min-width: 160px; max-height: 340px;
    overflow-y: auto; z-index: 1000; list-style: none; margin: 0; padding: 6px 0;
}
.tb-lang:hover .lang-dropdown, .tb-lang.open .lang-dropdown { display: block; }
.tb-lang .lang-dropdown li { margin: 0; }
.tb-lang .lang-dropdown a {
    display: block; padding: 8px 16px; color: #333; text-decoration: none; font-size: 13px; line-height: 1.4;
}
.tb-lang .lang-dropdown a:hover { background: #f0f5ff; color: var(--cozing-blue); }

/* ===== 头部 ===== */
.site-header { background: var(--cozing-white); border-bottom: 1px solid var(--cozing-border); position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 0 rgba(0,0,0,0.02); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: 72px; }
.site-branding { display: flex; align-items: center; }
.site-branding img { max-height: 52px; width: auto; }
.site-title { font-size: 1.3rem; font-weight: 800; color: var(--cozing-blue); margin: 0; }
.site-title a { color: inherit; text-decoration: none; }

.main-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center; }
.main-nav > ul > li { position: relative; }
.main-nav > ul > li > a {
    display: block; padding: 26px 14px; color: var(--cozing-text);
    font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap;
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li.current-menu-item > a,
.main-nav > ul > li.current_page_item > a { color: var(--cozing-blue); }

.main-nav li.has-children > a::after { content: "▾"; margin-left: 5px; font-size: 11px; }
.main-nav .sub-menu {
    position: absolute; top: 100%; left: 0; min-width: 260px; background: #fff;
    border: 1px solid var(--cozing-border); border-radius: 0 0 var(--cozing-radius) var(--cozing-radius);
    box-shadow: var(--cozing-shadow); opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: all .18s ease; list-style: none; margin: 0; padding: 8px 0; z-index: 200;
}
.main-nav li:hover > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.main-nav .sub-menu li a { display: block; padding: 9px 20px; color: var(--cozing-text); font-size: 14px; font-weight: 500; text-decoration: none; }
.main-nav .sub-menu li a:hover { background: var(--cozing-bg); color: var(--cozing-blue); }

.nav-toggle { display: none; background: none; border: 0; font-size: 26px; color: var(--cozing-blue); cursor: pointer; }

/* ===== 面包屑 ===== */
.crumbs { background: var(--cozing-bg); border-bottom: 1px solid var(--cozing-border); font-size: 13px; }
.crumbs ol { list-style: none; margin: 0; padding: 10px 0; display: flex; flex-wrap: wrap; gap: 4px; }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: #aaa; }
.crumbs a { color: var(--cozing-muted); }

/* ===== 页头横幅 ===== */
.page-hero { background: linear-gradient(135deg, var(--cozing-blue) 0%, var(--cozing-blue-dark) 100%); color: #fff; padding: 52px 0; }
.page-hero h1 { color: #fff; margin: 0; font-size: 2.2rem; }
.page-hero p { margin: 10px 0 0; opacity: .9; max-width: 760px; }

/* ===== 首页 ===== */
.hero-slider { position: relative; }
.hero-slider .hero-slide { position: relative; }
.hero-slider .hero-slide img { width: 100%; max-height: 520px; object-fit: cover; }
.hero-slider .hero-caption {
    position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(transparent, rgba(15,30,69,.85));
    color: #fff; padding: 60px 20px 30px;
}
.hero-slider .hero-caption h2 { color: #fff; font-size: 1.9rem; margin: 0 0 6px; }
.hero-slider .hero-caption p { margin: 0; opacity: .9; }

.section { padding: 60px 0; }
.section-title { text-align: center; font-size: 2rem; margin-bottom: 10px; }
.section-sub { text-align: center; color: var(--cozing-muted); margin-bottom: 40px; }

.home-product-cate { list-style: none; margin: 0 0 34px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.home-product-cate a {
    display: inline-block; padding: 8px 18px; border: 1px solid var(--cozing-border); border-radius: 40px;
    color: var(--cozing-text); font-weight: 600; font-size: 14px;
}
.home-product-cate a:hover, .home-product-cate a.active { background: var(--cozing-blue); color: #fff; border-color: var(--cozing-blue); }

.home-about { background: var(--cozing-bg); }
.home-about .about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.home-about img { border-radius: var(--cozing-radius); box-shadow: var(--cozing-shadow); }
.home-about h2 { margin-bottom: 14px; }
.home-about p { color: var(--cozing-muted); }

.home-news-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.home-news-list li { background: #fff; border: 1px solid var(--cozing-border); border-radius: var(--cozing-radius); overflow: hidden; }
.home-news-list a { display: block; padding: 22px; text-decoration: none; }
.home-news-list time { font-size: 13px; color: var(--cozing-muted); }
.home-news-list h3 { font-size: 1.05rem; margin: 8px 0; }
.home-news-list h3 a { padding: 0; color: var(--cozing-navy); }

/* ===== 产品网格 ===== */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.product-card {
    background: #fff; border: 1px solid var(--cozing-border); border-radius: var(--cozing-radius);
    overflow: hidden; transition: all .2s ease; display: flex; flex-direction: column;
}
.product-card:hover { box-shadow: var(--cozing-shadow); transform: translateY(-3px); border-color: #d3e0ff; }
.product-card .pc-thumb { aspect-ratio: 1/1; overflow: hidden; background: var(--cozing-bg); }
.product-card .pc-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.product-card:hover .pc-thumb img { transform: scale(1.06); }
.product-card .pc-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-card h3 { font-size: 1rem; margin: 0; }
.product-card h3 a { color: var(--cozing-navy); text-decoration: none; }
.product-card h3 a:hover { color: var(--cozing-blue); }
.product-card .pc-meta { font-size: 13px; color: var(--cozing-muted); line-height: 1.5; }

/* ===== 落地页原站产品列表（pro-list）适配 ===== */
.pro-list {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
    margin: 0; padding: 0; list-style: none;
}
.pro-list .pro-item {
    background: #fff; border: 1px solid var(--cozing-border); border-radius: var(--cozing-radius);
    overflow: hidden; transition: all .2s ease;
}
.pro-list .pro-item:hover { box-shadow: var(--cozing-shadow); transform: translateY(-3px); border-color: #d3e0ff; }
.pro-list .pro-img { position: relative; aspect-ratio: 1/1; overflow: hidden; background: var(--cozing-bg); margin: 0; }
.pro-list .pro-img .img-wrap { display: block; width: 100%; height: 100%; }
.pro-list .pro-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.pro-list .pro-item:hover .pro-img img { transform: scale(1.06); }
.pro-list .pro-info { padding: 14px 16px 16px; margin: 0; }
.pro-list .pro-name {
    display: block; color: var(--cozing-navy); font-size: 1rem; text-decoration: none;
    line-height: 1.4; font-weight: 600;
}
.pro-list .pro-name:hover { color: var(--cozing-blue); }
/* 隐藏原站残留的空元素/图标/价格 */
.pro-list .pro-price, .pro-list .pro-cart, .pro-list .load,
.pro-list .pro-img > p, .pro-list .pro-img i, .pro-list .pro-img em { display: none; }

/* ===== 原站新闻/知识列表（news-list / info-list）适配 ===== */
.news-list, .info-list {
    margin: 0; padding: 0; list-style: none;
    display: flex; flex-direction: column; gap: 20px;
}
.news-list .new-wrap, .info-list .new-wrap {
    display: flex; gap: 20px; background: #fff; border: 1px solid var(--cozing-border);
    border-radius: var(--cozing-radius); padding: 16px; align-items: flex-start;
}
.news-list .new-img, .info-list .new-img {
    flex: 0 0 220px; aspect-ratio: 4/3; overflow: hidden; border-radius: 6px; background: var(--cozing-bg);
}
.news-list .new-img img, .info-list .new-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-list .new-img br, .info-list .new-img br { display: none; }
.news-list .new-info, .info-list .new-info { flex: 1; min-width: 0; }
.news-list .new-title, .info-list .new-title {
    display: block; font-size: 1.12rem; font-weight: 600; color: var(--cozing-navy);
    text-decoration: none; margin-bottom: 8px; line-height: 1.4;
}
.news-list .new-title:hover, .info-list .new-title:hover { color: var(--cozing-blue); }
.news-list .new-con, .info-list .new-con {
    color: var(--cozing-muted); font-size: 14px; margin: 0 0 12px; line-height: 1.6;
}
.news-list .new-more, .info-list .new-more {
    display: inline-block; color: var(--cozing-blue); font-weight: 600; font-size: 14px; text-decoration: none;
}
.news-list .new-more:hover, .info-list .new-more:hover { text-decoration: underline; }
@media (max-width: 640px) {
    .news-list .new-wrap, .info-list .new-wrap { flex-direction: column; }
    .news-list .new-img, .info-list .new-img { flex: none; width: 100%; }
}

/* ===== iconfont 图标 emoji 兜底（原站图标字体未加载） ===== */
.iconfont { font-style: normal; display: inline-block; margin-right: 4px; }
.icon-phone:before, .icon-phone2:before { content: "📞"; }
.icon-whatsapp:before { content: "💬"; }
.icon-mail:before, .icon-mail_fill:before { content: "✉️"; }
.icon-map:before, .icon-map-filling:before { content: "📍"; }
.icon-search:before { content: "🔍"; }

/* ===== 响应式地图/iframe ===== */
.map, .entry-content .map { margin: 20px 0; }
.map iframe, .entry-content iframe { max-width: 100%; width: 100%; border: 0; border-radius: var(--cozing-radius); }

/* 隐藏原站残留的坏分页（page-2/3 链接失效） */
.common-page { display: none; }

/* ===== 侧边栏 + 内容布局 ===== */
.layout-main { display: grid; grid-template-columns: 280px 1fr; gap: 36px; padding: 40px 0; }
.layout-full { padding: 40px 0; }

.sidebar .widget { background: #fff; border: 1px solid var(--cozing-border); border-radius: var(--cozing-radius); margin-bottom: 24px; }
.sidebar .widget-title { background: var(--cozing-blue); color: #fff; margin: 0; padding: 14px 20px; font-size: 1.05rem; border-radius: var(--cozing-radius) var(--cozing-radius) 0 0; }
.sidebar .widget ul { list-style: none; margin: 0; padding: 12px 0; }
.sidebar .widget ul li a { display: block; padding: 8px 20px; color: var(--cozing-text); font-size: 14.5px; text-decoration: none; }
.sidebar .widget ul li a:hover { color: var(--cozing-blue); background: var(--cozing-bg); }
.sidebar .widget ul li.current-cat > a { color: var(--cozing-blue); font-weight: 600; }

/* ===== 产品详情 ===== */
.product-single { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 40px 0; }
.product-gallery .gallery-main { border: 1px solid var(--cozing-border); border-radius: var(--cozing-radius); overflow: hidden; background: #fff; }
.product-gallery .gallery-main img { width: 100%; aspect-ratio: 1/1; object-fit: contain; }
.product-gallery .gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.product-gallery .gallery-thumbs img { width: 76px; height: 76px; object-fit: cover; border: 2px solid transparent; border-radius: 6px; cursor: pointer; }
.product-gallery .gallery-thumbs img.active { border-color: var(--cozing-blue); }

.product-summary h1 { font-size: 1.8rem; }
.product-specs { background: var(--cozing-bg); border-left: 4px solid var(--cozing-blue); padding: 16px 20px; margin: 18px 0; font-size: 15px; white-space: pre-line; }
.product-actions { display: flex; gap: 12px; margin: 20px 0; }
.btn { display: inline-block; padding: 13px 30px; border-radius: 40px; font-weight: 700; font-size: 15px; cursor: pointer; border: 0; text-decoration: none; }
.btn-primary { background: var(--cozing-blue); color: #fff; }
.btn-primary:hover { background: var(--cozing-blue-dark); color: #fff; text-decoration: none; }
.btn-outline { border: 2px solid var(--cozing-blue); color: var(--cozing-blue); background: transparent; }
.btn-outline:hover { background: var(--cozing-blue); color: #fff; text-decoration: none; }

.product-detail-content { padding: 40px 0; border-top: 1px solid var(--cozing-border); }
.product-detail-content table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.product-detail-content table th, .product-detail-content table td { border: 1px solid var(--cozing-border); padding: 10px 14px; text-align: left; }
.product-detail-content table th { background: var(--cozing-bg); }

/* ===== 文章 ===== */
.article-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.article-card { border: 1px solid var(--cozing-border); border-radius: var(--cozing-radius); overflow: hidden; background: #fff; }
.article-card .ac-thumb { aspect-ratio: 16/10; overflow: hidden; }
.article-card .ac-thumb img { width: 100%; height: 100%; object-fit: cover; }
.article-card .ac-body { padding: 18px; }
.article-card time { font-size: 13px; color: var(--cozing-muted); }
.article-card h3 { font-size: 1.05rem; margin: 8px 0; }
.article-card h3 a { color: var(--cozing-navy); text-decoration: none; }
.article-card h3 a:hover { color: var(--cozing-blue); }

.single-content { max-width: 860px; margin: 0 auto; padding: 40px 0 60px; }
.single-content .entry-header { margin-bottom: 26px; }
.single-content .entry-meta { color: var(--cozing-muted); font-size: 14px; }
.single-content .entry-content img { border-radius: var(--cozing-radius); margin: 18px 0; }
.single-content .entry-content table { width: 100%; border-collapse: collapse; }
.single-content .entry-content table th, .single-content .entry-content table td { border: 1px solid var(--cozing-border); padding: 9px 12px; }

/* ===== 询盘表单 ===== */
.inquiry-form { background: var(--cozing-bg); padding: 30px; border-radius: var(--cozing-radius); margin-top: 30px; }
.inquiry-form .form-row { margin-bottom: 16px; }
.inquiry-form label { display: block; font-weight: 600; margin-bottom: 5px; font-size: 14px; }
.inquiry-form input, .inquiry-form textarea {
    width: 100%; padding: 11px 14px; border: 1px solid var(--cozing-border); border-radius: 6px; font: inherit;
}
.inquiry-form input:focus, .inquiry-form textarea:focus { outline: none; border-color: var(--cozing-blue); box-shadow: 0 0 0 3px rgba(40,90,235,.12); }
.inquiry-form .hp-field { position: absolute; left: -9999px; }
.inquiry-success { background: #e6f7ec; color: #1a7f3c; padding: 14px 18px; border-radius: 6px; margin: 14px 0; }
.inquiry-error { background: #fdeaea; color: #c0392b; padding: 14px 18px; border-radius: 6px; margin: 14px 0; }

/* ===== 分页 ===== */
.pagination { display: flex; justify-content: center; gap: 8px; margin: 40px 0; }
.pagination .page-numbers { display: inline-block; min-width: 40px; text-align: center; padding: 9px 14px; border: 1px solid var(--cozing-border); border-radius: 6px; color: var(--cozing-text); }
.pagination .page-numbers.current { background: var(--cozing-blue); color: #fff; border-color: var(--cozing-blue); }
.pagination .page-numbers:hover { border-color: var(--cozing-blue); }

/* ===== 页脚 ===== */
.site-footer { background: var(--cozing-navy); color: #b9c8e8; margin-top: 60px; }
.site-footer a { color: #b9c8e8; }
.site-footer a:hover { color: #fff; }
.site-footer .footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding: 50px 0 30px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer ul li { margin-bottom: 9px; font-size: 14px; }
.site-footer .footer-brand img { max-height: 48px; margin-bottom: 14px; }
.site-footer .footer-brand p { font-size: 14px; line-height: 1.6; }
.site-footer .footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0; font-size: 13px; text-align: center; }

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .product-grid, .pro-list { grid-template-columns: repeat(3, 1fr); }
    .article-list { grid-template-columns: repeat(2, 1fr); }
    .home-news-list { grid-template-columns: repeat(2, 1fr); }
    .site-footer .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
    .layout-main { grid-template-columns: 1fr; }
    .product-single { grid-template-columns: 1fr; }
    .home-about .about-grid { grid-template-columns: 1fr; }
    .product-grid, .pro-list { grid-template-columns: repeat(2, 1fr); }
    .nav-toggle { display: block; }
    .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-top: 1px solid var(--cozing-border); }
    .main-nav.open { display: block; }
    .main-nav > ul { flex-direction: column; padding: 10px 20px; }
    .main-nav > ul > li > a { padding: 13px 0; border-bottom: 1px solid var(--cozing-border); }
    .main-nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding-left: 14px; display: none; }
    .main-nav li.open > .sub-menu { display: block; }
}
@media (max-width: 560px) {
    .product-grid, .pro-list, .article-list, .home-news-list { grid-template-columns: 1fr; }
    .topbar .container { flex-direction: column; padding: 6px 0; }
}


/* === 搜索框（header） === */
.header-search { margin-left: auto; align-self: center; }
.header-search .search-form { display: flex; }
.header-search .search-form input[type="search"] {
    padding: 7px 12px; border: 1px solid #d5d8dd; border-right: 0;
    border-radius: 4px 0 0 4px; font-size: 14px; min-width: 190px; height: 38px;
}
.header-search .search-form button { border-radius: 0 4px 4px 0; height: 38px; }

/* === 联系页表单 === */
.contact-form-section { max-width: 760px; margin-top: 40px; }
.contact-form-section .inquiry-form { margin-top: 16px; }


/* === 首页资质认证板块 === */
.home-certi .certi-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; }
.home-certi .certi-item { width: 220px; text-align: center; }
.home-certi .certi-item .img-wrap { border: 1px solid #eee; border-radius: 6px; overflow: hidden; height: 170px; display: flex; align-items: center; justify-content: center; background: #fff; }
.home-certi .certi-item .img-wrap img { max-width: 100%; max-height: 100%; object-fit: contain; }
.home-certi .certi-name { margin-top: 8px; font-size: 13px; color: #555; }

