/* =============================================================================
 * 湖北凰唬科技有限公司 · 分类卡片高级设计层 (Category Cards · Obsidian & Gold)
 * -----------------------------------------------------------------------------
 * 设计语言：曜石黑 × 古铜金，极简、留白、精致编号体系。
 * 作用域：仅首页 .cat-grid .cat-card；在 home.css / brand-refresh.css 之后加载。
 * 布局：大屏 6 列一排（对应 6 个大类），中屏 3 列，小屏 2 列，杜绝孤行。
 * ========================================================================== */

/* 区块标题：与高级风格统一的金色短线标识 */
.xph-front .cat-section .section-head h2::before {
  background: linear-gradient(180deg, #D4A96B, #A67C3D) !important;
  box-shadow: 0 0 12px rgba(201,160,99,.45) !important;
  width: 4px !important;
  height: 22px !important;
}
.xph-front .cat-section .section-more {
  color: var(--nx-gold-2, #A67C3D) !important;
  font-weight: 600 !important;
}
.xph-front .cat-section .section-more:hover { gap: 9px !important; }

/* ---------------------------------------------------------------------------
 * 网格：6 列一排，正好容纳 6 个大类，不再出现 5+1 孤行
 * ------------------------------------------------------------------------ */
.xph-front .cat-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

/* ---------------------------------------------------------------------------
 * 卡片主体：白底 + 暖灰描边 + 精致圆角 + 序号装饰
 * ------------------------------------------------------------------------ */
.xph-front .cat-grid .cat-card {
  --cat-color: #C9A063 !important;
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  padding: 22px 14px 18px !important;
  background: #FFFFFF !important;
  border: 1px solid #EDE7DB !important;
  border-radius: 16px !important;
  box-shadow: 0 2px 10px rgba(26,25,23,.035) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  overflow: hidden !important;
  transition: transform .28s cubic-bezier(.2,.8,.2,1), box-shadow .28s ease, border-color .28s ease !important;
}

/* 移除序号装饰：隐藏 ::before（同时屏蔽旧版顶部色条）与辉光层 */
.xph-front .cat-grid .cat-card::before,
.xph-front .cat-grid .cat-card::after { display: none !important; }

/* 悬停：整体上浮 + 金色描边 + 柔和金影 */
.xph-front .cat-grid .cat-card:hover {
  transform: translateY(-4px) !important;
  border-color: rgba(201,160,99,.62) !important;
  box-shadow: 0 14px 30px rgba(26,25,23,.08), 0 6px 18px rgba(201,160,99,.15) !important;
  text-decoration: none !important;
}

/* ---------------------------------------------------------------------------
 * 图标：古铜金柔底圆角方形 + 曜石金线条
 * ------------------------------------------------------------------------ */
.xph-front .cat-grid .cat-icon {
  position: relative !important;
  width: 48px !important;
  height: 48px !important;
  border-radius: 13px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-bottom: 16px !important;
  color: var(--nx-gold-2, #A67C3D) !important;
  background: linear-gradient(145deg, #FBF7EE, #F5EFE2) !important;
  border: 1px solid rgba(201,160,99,.28) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9) !important;
  transition: transform .28s cubic-bezier(.2,.8,.2,1), box-shadow .28s ease !important;
}
.xph-front .cat-grid .cat-card:hover .cat-icon {
  transform: scale(1.06) !important;
  box-shadow: 0 7px 16px rgba(201,160,99,.24) !important;
}
.xph-front .cat-grid .cat-icon svg {
  width: 25px !important;
  height: 25px !important;
  stroke-width: 1.8 !important;
}

/* ---------------------------------------------------------------------------
 * 文字：名称沉稳、数量弱化、箭头右下轻微浮现
 * ------------------------------------------------------------------------ */
.xph-front .cat-grid .cat-name {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #1F1D1A !important;
  margin: 0 0 4px !important;
  letter-spacing: .2px !important;
  white-space: nowrap !important;
}
.xph-front .cat-grid .cat-count {
  font-size: 11px !important;
  color: #9A948A !important;
}
.xph-front .cat-grid .cat-arrow {
  position: absolute !important;
  right: 14px !important;
  bottom: 14px !important;
  top: auto !important;
  font-size: 14px !important;
  color: var(--nx-gold, #C9A063) !important;
  opacity: 0 !important;
  transform: translateX(-5px) !important;
  transition: opacity .22s ease, transform .22s ease !important;
}
.xph-front .cat-grid .cat-card:hover .cat-arrow {
  opacity: 1 !important;
  transform: translateX(0) !important;
}

/* 第 6 个卡片补齐入场动画延时（brand-refresh.css 原本只定义到 5） */
.xph-front .cat-grid .cat-card:nth-child(6) { animation-delay: .24s !important; }

/* ---------------------------------------------------------------------------
 * 响应式：中屏 3 列两行、小屏 2 列三行，始终整齐无孤行
 * ------------------------------------------------------------------------ */
@media (max-width: 1180px) {
  .xph-front .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 14px !important; }
}
@media (max-width: 720px) {
  .xph-front .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
  .xph-front .cat-grid .cat-card { padding: 18px 14px 15px !important; }
  .xph-front .cat-grid .cat-icon { width: 42px !important; height: 42px !important; margin-bottom: 12px !important; border-radius: 11px !important; }
  .xph-front .cat-grid .cat-icon svg { width: 22px !important; height: 22px !important; }
  .xph-front .cat-grid .cat-name { font-size: 13px !important; }
}
