/*
Theme Name: TIANYISILICONE Blocksy
Template: blocksy
Description: Editable native block layouts for TIANYISILICONE. Requires the Blocksy parent theme.
Version: 2.1.1
Text Domain: tianyi-blocksy
*/

/* ==========================================================================
   1. 基础版块
   ========================================================================== */
.tb-section{padding:64px 28px;margin-block:0;box-sizing:border-box}
.tb-section>*,.tb-section>.wp-block-columns{max-width:1200px;margin-inline:auto}
.tb-section h1{font-size:clamp(32px,4vw,58px);line-height:1.15;letter-spacing:-.03em}
.tb-section h2{font-size:clamp(27px,3vw,40px);line-height:1.2}
.tb-section h3{font-size:23px;line-height:1.35}
.tb-section .wp-block-columns{gap:32px;margin-bottom:0;align-items:center}
.tb-section .wp-block-image{margin:0 0 22px}
.tb-section .wp-block-image img{display:block;width:100%;height:auto;border-radius:8px}
.tb-tint{background:var(--theme-palette-color-6,#f0f6f3)}
.tb-dark,.tb-hero{background:var(--theme-palette-color-4,#153a34);color:white}
.tb-dark h1,.tb-dark h2,.tb-dark h3,.tb-hero h1,.tb-hero h2,.tb-hero p{color:inherit}
.tb-hero{min-height:550px;display:flex;align-items:center}
.tb-hero>.wp-block-columns{width:100%;max-width:1200px}
.tb-hero h1,.tb-hero h2{font-size:clamp(30px,3.6vw,52px)}
.tb-hero .wp-block-image img{aspect-ratio:1.4;object-fit:cover}

/* 版块内对齐：左文右图等版块不应垂直居中于过长内容 */
.tb-section.tb-top .wp-block-columns{align-items:flex-start}

/* ==========================================================================
   2. 首页轮播
   ========================================================================== */
.tb-slides{margin:0 auto!important;max-width:none!important;width:100%!important;position:relative}
.tb-slides>.tb-hero{max-width:none!important}
.tb-slides[data-ready]>.tb-hero:not(.tb-active){display:none}
.tb-slide-controls{position:absolute;bottom:15px;left:max(28px,calc((100% - 1200px)/2));display:flex;gap:10px;align-items:center;color:white}
.tb-slide-controls button{background:transparent;border:1px solid #ffffff90;border-radius:4px;color:white;padding:7px 14px;cursor:pointer}

/* ==========================================================================
   3. 按钮
   ========================================================================== */
.tb-section .wp-block-button__link,
.tb-section .wp-block-button .wp-element-button,
.tb-inquiry button,
.tb-button-preview{
  background:var(--theme-palette-color-1,#2eb5a7);
  color:#fff;
  border-radius:5px;
  padding:13px 24px;
  font-weight:600;
  border:0;
  cursor:pointer;
  text-decoration:none;
  display:inline-block
}
.tb-section .wp-block-button__link:hover,
.tb-section .wp-block-button .wp-element-button:hover{background:var(--theme-palette-color-2,#219c8e);color:#fff}
.tb-section .wp-block-button.is-style-outline .wp-block-button__link,
.tb-btn-ghost .wp-block-button__link{background:transparent!important;border:1px solid currentColor!important;color:inherit!important}
.tb-hero .wp-block-button.is-style-outline .wp-block-button__link,
.tb-dark .wp-block-button.is-style-outline .wp-block-button__link{color:#fff!important}

/* ==========================================================================
   4. 卡片
   ========================================================================== */
.tb-card{padding:24px;border:1px solid var(--theme-palette-color-5,#dfece8);border-radius:9px;background:var(--theme-palette-color-8,#fff);height:100%}
.tb-card h3{font-size:23px}.tb-card p{font-size:16px;line-height:1.7}
.tb-card-grid{align-items:stretch!important;margin-bottom:32px!important}
.tb-card-grid>.wp-block-column{display:flex;flex-direction:column}
.tb-card-grid .tb-card{flex:1}
.tb-card img{aspect-ratio:4/3;object-fit:cover}
.tb-card-grid:last-child{margin-bottom:0!important}
.tb-feature{padding:14px 8px;text-align:center;border-bottom:2px solid var(--theme-palette-color-1,#2eb5a7)}
.tb-feature h3{font-size:16px;overflow-wrap:anywhere}

/* ==========================================================================
   5. 正文阅读版块
   ========================================================================== */
.tb-readable>*{max-width:880px!important}
.tb-readable p,.tb-readable li{font-size:18px;line-height:1.9}

/* ==========================================================================
   6. 页面头部（内页 hero）+ 面包屑
   ========================================================================== */
.tb-page-heading{background:var(--theme-palette-color-4,#153a34);color:#fff;padding:56px 28px 48px}
.tb-page-heading h1{color:inherit;margin-block:0 14px}
.tb-page-heading p{max-width:800px;margin-left:0;color:#ffffffd9}
.tb-page-heading .tb-eyebrow{color:var(--theme-palette-color-1,#2eb5a7)}
.tb-crumbs{
  max-width:1200px;margin:0 auto 18px;font-size:13px;line-height:1.6;
  color:#ffffffa6;letter-spacing:.01em
}
.tb-crumbs a{color:#ffffffcc;text-decoration:none;border-bottom:1px solid transparent}
.tb-crumbs a:hover{color:#fff;border-bottom-color:var(--theme-palette-color-1,#2eb5a7)}
.tb-crumb-sep{margin:0 8px;opacity:.5}
.tb-crumb-current{color:#fff}
.tb-eyebrow{
  font-size:13px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;
  color:var(--theme-palette-color-1,#2eb5a7);margin:0 0 12px
}

/* ==========================================================================
   7. B2B 组件：规格表、要点清单、流程、标签、提示
   ========================================================================== */
.tb-section .wp-block-table{margin:0;width:100%;overflow-x:auto}
.tb-section .wp-block-table table{
  width:100%;border-collapse:collapse;font-size:16px;line-height:1.6;
  border:1px solid var(--theme-palette-color-5,#dfece8);border-radius:9px;overflow:hidden
}
.tb-section .wp-block-table th,
.tb-section .wp-block-table td{
  padding:14px 18px;text-align:left;vertical-align:top;
  border-bottom:1px solid var(--theme-palette-color-5,#dfece8)
}
.tb-section .wp-block-table thead th{
  background:var(--theme-palette-color-6,#f0f6f3);
  font-size:14px;font-weight:700;letter-spacing:.02em;white-space:nowrap
}
.tb-section .wp-block-table tbody tr:last-child th,
.tb-section .wp-block-table tbody tr:last-child td{border-bottom:0}
.tb-section .wp-block-table tbody th{font-weight:600;width:38%;color:var(--theme-palette-color-3,#334641)}
.tb-dark .wp-block-table table,.tb-dark .wp-block-table th,.tb-dark .wp-block-table td{border-color:#ffffff33}
.tb-dark .wp-block-table thead th{background:#ffffff1a}

/* 要点清单（类名直接加在 core/list 上） */
ul.tb-check{list-style:none;padding-left:0;margin:0}
ul.tb-check li{
  position:relative;padding-left:30px;margin-bottom:12px;
  font-size:17px;line-height:1.75
}
ul.tb-check li::before{
  content:"";position:absolute;left:0;top:.55em;width:14px;height:8px;
  border-left:2px solid var(--theme-palette-color-1,#2eb5a7);
  border-bottom:2px solid var(--theme-palette-color-1,#2eb5a7);
  transform:rotate(-45deg)
}
.tb-dark ul.tb-check li::before,.tb-hero ul.tb-check li::before{border-color:#fff}

/* 流程 / 步骤 */
.tb-steps .wp-block-column{
  border-top:3px solid var(--theme-palette-color-1,#2eb5a7);
  padding-top:18px
}
.tb-steps h3{font-size:18px;margin-block:0 8px}
.tb-steps p{font-size:15px;line-height:1.7;margin:0}
.tb-steps .tb-step-num{
  display:block;font-size:13px;font-weight:700;letter-spacing:.1em;
  color:var(--theme-palette-color-1,#2eb5a7);margin-bottom:8px
}

/* 信任标签 */
.tb-pills{display:flex;flex-wrap:wrap;gap:10px;padding:0;margin:0;list-style:none}
.tb-pills li{
  border:1px solid var(--theme-palette-color-5,#dfece8);
  background:#fff;border-radius:999px;padding:8px 16px;
  font-size:14px;font-weight:600;color:var(--theme-palette-color-3,#334641)
}
.tb-dark .tb-pills li,.tb-hero .tb-pills li{background:#ffffff14;border-color:#ffffff33;color:#fff}

/* 提示块 */
.tb-note{
  border-left:4px solid var(--theme-palette-color-1,#2eb5a7);
  background:var(--theme-palette-color-6,#f0f6f3);
  padding:18px 22px;border-radius:0 8px 8px 0;
  font-size:16px;line-height:1.75;margin:0
}
.tb-note p{margin:0}
.tb-note p+p{margin-top:10px}

/* 快捷链接网格 */
.tb-linkgrid{list-style:none;padding:0;margin:0;display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}
.tb-linkgrid li{margin:0}
.tb-linkgrid a{
  display:block;padding:16px 18px;border:1px solid var(--theme-palette-color-5,#dfece8);
  border-radius:8px;text-decoration:none;font-weight:600;
  color:var(--theme-palette-color-4,#153a34);background:#fff;transition:.15s
}
.tb-linkgrid a:hover{border-color:var(--theme-palette-color-1,#2eb5a7);background:var(--theme-palette-color-6,#f0f6f3)}
.tb-linkgrid .tb-link-desc{display:block;font-weight:400;font-size:14px;line-height:1.6;color:#5b6b66;margin-top:6px}

/* 联系方式列表（页脚 / 联系页） */
.tb-contact-list{list-style:none;padding:0;margin:0}
.tb-contact-list li{display:flex;gap:10px;margin-bottom:12px;font-size:15px;line-height:1.65}
.tb-contact-list .tb-contact-label{font-weight:700;min-width:78px;flex:none}
.tb-contact-list a{text-decoration:none;border-bottom:1px solid transparent}
.tb-contact-list a:hover{border-bottom-color:currentColor}

/* CTA 横幅 */
.tb-cta{background:var(--theme-palette-color-4,#153a34);color:#fff;padding:56px 28px}
.tb-cta>*{max-width:1200px;margin-inline:auto}
.tb-cta h2{color:#fff;margin-top:0}
.tb-cta p{color:#ffffffd9;max-width:760px}

/* ==========================================================================
   8. 产品版块
   ========================================================================== */
.tb-product-intro .wp-block-columns{align-items:center}
.tb-product-intro h1{margin-block:0 16px}
.tb-section .tb-spec-title{font-size:20px;margin:0 0 16px}
.tb-section .tb-spec-note{font-size:14px;line-height:1.7;color:#5b6b66;margin:14px 0 0}

/* ==========================================================================
   9. 询盘表单
   ========================================================================== */
.tb-inquiry{padding:28px;background:var(--theme-palette-color-6,#f0f6f3);border-radius:8px}
.tb-inquiry form,.tb-form-preview{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.tb-inquiry label{display:flex;flex-direction:column;gap:8px;font-size:15px}
.tb-inquiry input,.tb-inquiry textarea,.tb-field-preview{border:1px solid #bdcec8;background:white;padding:12px;width:100%;box-sizing:border-box;border-radius:4px}
.tb-form-wide,.tb-form-preview>div:last-child{grid-column:1/-1}
.tb-success{padding:14px;border-left:4px solid var(--theme-palette-color-1,#2eb5a7);background:white}
.tb-button-preview{display:inline-block;margin-top:20px}

/* ==========================================================================
   10. 页头：顶部信息条
   注意：Blocksy 动态 CSS 用 [data-header*="type-1"] .ct-header [data-row*="top"]
   设置行背景，权重为 (0,3,0)。这里用 #header 前缀（含 ID）确保覆盖生效。
   ========================================================================== */
#header [data-row*="top"]{
  background:var(--theme-palette-color-4,#153a34);
  color:#ffffffd9;
  font-size:14px
}
#header [data-row*="top"] .ct-container{min-height:44px;align-items:center}
#header [data-row*="top"] .ct-header-text{color:inherit;display:flex;align-items:center}
#header [data-row*="top"] a{color:#fff;text-decoration:none}
#header [data-row*="top"] a:hover{color:var(--theme-palette-color-1,#2eb5a7)}
#header [data-row*="top"] p{margin:0}
#header [data-row*="top"] .ct-header-text + .ct-header-text{margin-left:auto}
.tb-topbar-info{display:flex;flex-wrap:wrap;align-items:center;gap:22px}
.tb-topbar-info>span{display:inline-flex;align-items:center;gap:7px;white-space:nowrap}
.tb-topbar-info svg{width:15px;height:15px;flex:none;fill:var(--theme-palette-color-1,#2eb5a7)}
.tb-topbar-note{opacity:.88;white-space:nowrap}

/* ==========================================================================
   11. 页脚
   同样使用 #footer 前缀，确保覆盖 Blocksy 动态 CSS 的行级规则。
   ========================================================================== */
#footer{font-size:15px;line-height:1.7}
#footer .ct-container{align-items:flex-start}
#footer .ct-widget{margin-bottom:0}
#footer .widget-title,#footer .ct-widget h3{
  font-size:15px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;
  margin:0 0 18px
}
#footer .ct-widget p{margin:0 0 10px}
#footer .ct-widget a{text-decoration:none;color:inherit}
#footer .ct-widget a:hover{color:var(--theme-palette-color-1,#2eb5a7)}
#footer .ct-footer-copyright{font-size:14px;color:#5b6b66}
#footer .tb-footer-brand{font-size:22px;font-weight:700;letter-spacing:-.01em;margin:0 0 12px;text-transform:none}
#footer .tb-footer-about{max-width:340px;margin-bottom:20px}
#footer .tb-contact-list li{color:#3d4a46}
#footer .tb-footer-cta .wp-block-button__link{
  background:var(--theme-palette-color-1,#2eb5a7);color:#fff;border-radius:5px;
  padding:12px 22px;font-weight:600;text-decoration:none;display:inline-block;font-size:15px
}
#footer .tb-footer-cta .wp-block-button__link:hover{background:var(--theme-palette-color-2,#219c8e)}
#footer [data-row*="bottom"] .ct-container{padding-block:18px}

/* ==========================================================================
   12. 编辑器预览
   ========================================================================== */
.editor-styles-wrapper .tb-slides>.tb-hero{display:block!important}
.editor-styles-wrapper .tb-hero{min-height:0;padding:36px}
.editor-styles-wrapper .tb-slides>.tb-hero{border:2px dashed #98cfc7;margin-block:16px}
.editor-styles-wrapper .tb-crumbs{display:none}

/* ==========================================================================
   13. 响应式
   ========================================================================== */
@media(max-width:999px){
  .tb-section{padding:48px 22px}
  .tb-page-heading{padding:44px 22px 38px}
  .tb-topbar-info{gap:16px;font-size:13px}
}
@media(max-width:781px){
  .tb-section{padding:36px 20px}
  .tb-hero{min-height:auto;padding-bottom:75px}
  .tb-section .wp-block-columns{gap:24px}
  .tb-inquiry form,.tb-form-preview{grid-template-columns:1fr}
  .tb-inquiry{padding:20px}
  .tb-feature h3{font-size:18px}
  .tb-page-heading{padding:36px 20px 32px}
  .tb-section .wp-block-table tbody th{width:auto}
  .tb-section .wp-block-table th,.tb-section .wp-block-table td{padding:12px 14px;font-size:15px}
  #footer .tb-footer-about{max-width:none}
  .tb-crumbs{font-size:12px}
}
