/*
   KBW desktop v1.0.19 — ≥1024px。（KBW_VERSION 1.0.25→1.0.26，同日续批：搜索框右移一点——wrapp 加
   margin-left:clamp(40px,6vw,120px)（1600 屏约 +96px；1.0.25 批为收短 300/380/460→260/300/340，同日用户批）；
   1.0.19：用户拍板删除卡悬停操作条（纯浏览卡全端统一）；1.0.17：卡悬停操作条 67px 竖双钮→单行小钮（1.0.18 字再小两号：28px/10px）；1.0.16：FiboSearch 图标垂直居中+提交钮硬化
   内容：归档网格 4 列（2026-10-13 用户拍板：商店/类目统一 4 列，撤 ≥1440 五列档）/ 悬停体系（悬停必须包 hover:hover+pointer:fine，
   否则触屏点卡后 hover 态粘住）/ 筛选侧栏粘滞。
   v1.0.9（R2 全页面评审批）：价格贴底三件套下放 kbw.css 全视口；侧栏 top 匿名 16px/admin-bar 32px。
   v1.0.7→1.0.8（用户「太丑了」批）：卡内边距收紧 16/16/24→12/14/16 + 标题内边距归零（单/双行卡等高），
   配合 kbw.css v1.0.7 全视口净化 + 标题两行钳制。1.0.8=纯版本号重发（同版本号重传被 CF 边缘缓存吞掉）。
   网格列数仅归档语境（body.is-shop=商店+类目归档）；首页卡墙/PDP 相关维持 Kadence 自身列配置。
*/
html body.is-shop ul.products{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:24px!important;
  padding:0!important;
}

/* ---- 卡内布局：价格贴底三件套已下放 kbw.css 全视口（R2 评审 P2-2，2026-10-13）----
   平板区间混排行同样需要贴底；此处不再重复声明。 */

/* ---- 卡内边距收紧（v1.0.7）：Kadence 默认 16/16/24 偏松，干净卡要更紧的图文关系 ---- */
html body ul.products li.product .product-details{padding:12px 14px 16px!important}
/* 标题内边距归零（Kadence 默认 8px 0）——单/双行卡标题块严格等高（min-height 2.8em 在 kbw.css），
   上下间距由 .product-details 内边距统一承担 */
html body ul.products li.product .woocommerce-loop-product__title{padding:0!important}

/* ---- 悬停体系（触屏守卫）---- */
@media (hover:hover) and (pointer:fine){
  html body ul.products li.product{
    transition:transform var(--kbw-normal) ease,box-shadow var(--kbw-normal) ease;
  }
  html body ul.products li.product:hover{
    transform:translateY(-4px);
    box-shadow:var(--kbw-shadow-hover);
  }
  html body ul.products li.product a.woocommerce-loop-product__link img,
  html body ul.products li.product .asnp-sale-badge-image-wrapper img{
    transition:transform .35s ease;
  }
  html body ul.products li.product:hover a.woocommerce-loop-product__link img,
  html body ul.products li.product:hover .asnp-sale-badge-image-wrapper img{
    transform:scale(1.04);
  }
  /* 2026-10-13 用户拍板「这一块删掉」：卡悬停操作条（ATC/Select options/Read more + Quick View）整体退役，
     PC 与移动一致=纯浏览卡，点卡进详情页。kbw.css 基础态 display:none 全视口兜底，
     此处不再复现；悬停反馈保留卡上浮+图微缩放。快速加购路径收敛到 PDP 主按钮。 */
}

/* ---- FiboSearch 页头表单 PC 造型（R2 拍板 ②，2026-10-13：接管页头搜索）----
   免费版默认 layout-classic+no-submit（左放大镜无提交钮）——顺应该形态：
   40px 高 / 1.5px 深边框 / 8px 圆角 / 聚焦赤陶描边 / 图标赤陶 / 宽度三档复刻旧搜索（300/380/460）。
   占位文案五语由 qy-header-strip 既有 form[role=search] 机制自动接管；≤1279 适配在 kbw.css。
   特异性注：插件自身 .dgwt-wcas-search-input 为 (0,1,1)，此处 .wrapp 前缀 (0,2,0) + 加载序靠后双保险。 */
.dgwt-wcas-search-wrapp{width:260px;max-width:100%;margin:0 auto;margin-left:clamp(40px,6vw,120px)}
@media (min-width:1201px){.dgwt-wcas-search-wrapp{width:300px}}
@media (min-width:1441px){.dgwt-wcas-search-wrapp{width:340px}}
/* 插件自身规则 .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input = (0,3,1)——
   html body 前缀压过；下拉展开态(.dgwt-wcas-open)镜像插件「下圆角归零」让面板贴住输入框 */
html body .dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input{
  height:40px;border:1.5px solid #3a362f;border-radius:8px;
  font-size:13.5px;color:#26201b;background:#fff;
}
html body .dgwt-wcas-search-wrapp.dgwt-wcas-open .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input{
  border-radius:8px 8px 0 0;
}
html body .dgwt-wcas-search-wrapp:focus-within .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input{
  border-color:var(--kbw-brand,#a8533c);box-shadow:0 0 0 1px var(--kbw-brand,#a8533c) inset;
}
.dgwt-wcas-search-wrapp .dgwt-wcas-ico-magnifier{fill:var(--kbw-brand,#a8533c)}
/* 2026-10-13 用户报障「图标位置错位」：插件样式变体（pirx 等）自算 icon top 偏移，
   与本层 40px 定高几何不合——强制垂直居中，任何变体下不错位 */
html body .dgwt-wcas-search-wrapp .dgwt-wcas-ico-magnifier{top:50%!important;transform:translateY(-50%)!important}
/* 2026-10-13 用户报障「颜色和背景脱离」：设置写入曾触发 search_style 默认回落 pirx（带提交钮），
   按钮无造型=裸奔。此处按旧页头设计补提交钮造型（深底方角衔接），无论变体如何切换不破相 */
html body .dgwt-wcas-search-wrapp.dgwt-wcas-has-submit .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input{
  border-right:0;border-radius:8px 0 0 8px;
}
html body .dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit,
html body .dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit{
  height:40px;min-height:0;width:52px;background:#3a362f;border:1.5px solid #3a362f;
  border-radius:0 8px 8px 0;color:#f0ede6;
}
html body .dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:hover{
  background:#2a241d;border-color:#2a241d;
}

/* ---- 筛选侧栏粘滞（≥1280，Filter Everything 在 aside#secondary）----
   top 值：管理栏在场 32px 让位，匿名访客 16px（R2 评审 P3-6：原一律 32 空吊） ---- */
@media (min-width:1280px){
  body.is-shop aside#secondary{
    position:sticky;top:16px;
    max-height:calc(100vh - 48px);
    overflow-y:auto;
  }
  body.admin-bar.is-shop aside#secondary{top:32px}
}

/* ---- PC PDP 主图高度封顶（2026-10-13 用户批「主图几乎占满一个半屏幕」）----
   doll-img-cards 的 2:3 固定框在 668px 列宽下高 ~1000px>视口。改为高度上限
   calc(100vh - 280px)（扣页头/缩略图余量），img contain 居中——白底画廊无带痕。
   特异性：加 body.is-product 前缀 (0,4,x) 压过 mu-plugin 内联的 (0,3,x) 同 !important 组。 */
html body.is-product .woocommerce-product-gallery .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image > a{
  aspect-ratio:auto!important;height:calc(100vh - 170px)!important;max-height:820px;
}
html body.is-product .woocommerce-product-gallery .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image > a > img{
  width:auto!important;height:100%!important;max-width:100%;margin:0 auto!important;object-fit:contain!important;
}
