/* ============================================================
   首页 /index - Hero + AI工具导航 + 精选好物 + 最新资讯
   配色沿用站点：主蓝 #2563eb / 价格红 #e60012 / 页面底 #f5f6f8
   ============================================================ */

/* ---------- 广告位容器（内容由 /ad/<标识> 返回的 JS 注入） ---------- */
/* 说明：Ad.php 给 .myxskillad 写的 inline style 是
     box-sizing:border-box; width:100%; max-width:<后台广告位width>; height:<后台height>; overflow:hidden;
   - max-width = 后台「宽度」配置 → 后台可控上限，所以这里【绝对不要】用 max-width:none 覆盖它
   - height = 后台「高度」配置 + object-fit:cover 按比例裁切，也【不要】用 height:auto 覆盖
   我们只需要：让外层 .hp-ad 反向出血到 1200px，内层 width:100% 自然填满 */
.hp-ad{padding:0;margin-top:10px;box-sizing:border-box;}
.hp-ad .myxskillad{width:100%;margin:0 auto;border-radius:6px;overflow:hidden;}
.hp-ad .myxskillad a{display:block;}
.hp-ad .myxskillad img{width:100%;}

/* ---------- Hero ---------- */
.hp-hero{padding:32px 12px 24px;background:#fff;border-bottom:1px solid #e8eaed;text-align:center;border-radius: 6px;}
.hp-hero-inner{max-width:1200px;margin:0 auto;}
.hp-hero-title{font-size:26px;font-weight:700;color:#222;margin:0 0 8px;line-height:1.35;}
.hp-hero-sub{font-size:14px;color:#666;margin:0 0 20px;}
.hp-search{display:flex;max-width:520px;margin:0 auto 14px;}
.hp-search-input{flex:1;height:40px;padding:0 14px;border:2px solid #2563eb;border-right:0;border-radius:4px 0 0 4px;font-size:14px;outline:none;background:#fff;color:#333;}
.hp-search-btn{height:40px;padding:0 26px;background:#2563eb;color:#fff;border:0;border-radius:0 4px 4px 0;font-size:14px;cursor:pointer;white-space:nowrap;}
.hp-search-btn:hover{background:#1d4ed8;}
.hp-stats{display:flex;justify-content:center;flex-wrap:wrap;gap:8px 26px;margin-bottom:22px;font-size:13px;color:#666;}
.hp-stat b{color:#2563eb;font-size:16px;font-weight:700;margin-right:2px;}
.hp-entries{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;max-width:760px;margin:0 auto;}
.hp-entry{display:flex;align-items:center;gap:10px;padding:12px 14px;background:#fff;border:1px solid #e8eaed;border-radius:8px;text-decoration:none;transition:border-color .2s,background .2s;}
.hp-entry:hover{border-color:#2563eb;background:#f0f4ff;}
.hp-entry-ico{width:38px;height:38px;border-radius:9px;background:#f0f4ff;display:flex;align-items:center;justify-content:center;flex:none;}
.hp-entry-txt{display:flex;flex-direction:column;text-align:left;min-width:0;}
.hp-entry-txt b{font-size:14px;color:#222;font-weight:600;}
.hp-entry-txt i{font-size:12px;color:#999;font-style:normal;}
.hp-ico{width:20px;height:20px;display:block;background-repeat:no-repeat;background-position:center;background-size:contain;}
.hp-ico-tool{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='2' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E");}
.hp-ico-shop{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z'/%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M16 10a4 4 0 0 1-8 0'/%3E%3C/svg%3E");}
.hp-ico-news{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6'/%3E%3Cpath d='M8 13h8M8 17h5'/%3E%3C/svg%3E");}

/* ---------- 板块通用 ---------- */
.hp-sec{margin-top:10px;background-color: #ffffff;padding: 20px 20px;border-radius: 6px;border-bottom:1px solid #e8eaed;}
.hp-sec-hd{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px;}
.hp-sec-title{font-size:18px;font-weight:700;color:#222;margin:0;padding-left:10px;border-left:4px solid #2563eb;line-height:1.2;}
.hp-sec-more{font-size:13px;color:#666;white-space:nowrap;}
.hp-sec-more:hover{color:#2563eb;}
.hp-grid{display:grid;gap:12px;}

/* ---------- 分类 pills ---------- */
.hp-pills{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:14px;}
.hp-pill{font-size:13px;padding:5px 14px;border-radius:14px;background:#fff;border:1px solid #e8eaed;color:#333;transition:border-color .2s,color .2s,background .2s;}
.hp-pill:hover{border-color:#2563eb;color:#2563eb;background:#f0f4ff;}

/* ---------- AI 工具卡片 ---------- */
.hp-grid-tool{grid-template-columns:repeat(4,minmax(0,1fr));}
.hp-tool{display:flex;gap:10px;padding:12px;background:#fff;border:1px solid #e8eaed;border-radius:8px;text-decoration:none;transition:border-color .2s,box-shadow .2s;}
.hp-tool:hover{border-color:#2563eb;box-shadow:0 2px 8px rgba(37,99,235,.1);}
.hp-tool-logo{width:40px;height:40px;border-radius:9px;background:#f0f4ff;color:#2563eb;font-size:16px;font-weight:600;display:flex;align-items:center;justify-content:center;overflow:hidden;flex:none;}
.hp-tool-logo img{width:100%;height:100%;object-fit:cover;}
.hp-tool-body{min-width:0;flex:1;display:flex;flex-direction:column;gap:3px;}
.hp-tool-name{font-size:14px;font-weight:600;color:#222;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.hp-tool-slogan{font-size:12px;color:#666;line-height:1.55;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;min-height:2.2em;}
.hp-tool-meta{display:flex;align-items:center;gap:10px;font-size:12px;margin-top:2px;}
.hp-tool-rate{color:#f59e0b;font-style:normal;font-weight:600;}
.hp-tool-hits{color:#999;font-style:normal;}

/* ---------- 商品卡片 ---------- */
.hp-grid-product{grid-template-columns:repeat(4,minmax(0,1fr));}
.hp-card{display:block;background:#fff;border:1px solid #e8eaed;border-radius:8px;overflow:hidden;text-decoration:none;transition:border-color .2s,box-shadow .2s;}
.hp-card:hover{border-color:#2563eb;box-shadow:0 2px 8px rgba(37,99,235,.1);}
.hp-card-thumb{display:block;width:100%;padding-top:75%;position:relative;background:#f5f6f8;}
.hp-card-thumb img{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;}
.hp-card-body{display:block;padding:10px;}
.hp-card-name{display:block;font-size:13px;color:#333;line-height:1.5;height:2.95em;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;}
.hp-card-meta{display:flex;align-items:baseline;gap:6px;margin-top:6px;flex-wrap:wrap;}
.hp-price{color:#e60012;font-size:16px;font-weight:700;font-style:normal;}
.hp-price small{font-size:12px;font-weight:400;}
/* 价格模式（与 ProductService::pricePack() 的 price_mode 对应，色值同步商品列表页 news-shop-3.css）
   积分商品沿用默认红色，不在此覆盖 */
.hp-price.pm-free{color:#10b981;font-size:15px;font-weight:600;}
.hp-price.pm-negotiable{color:#f59e0b;font-size:15px;font-weight:600;}
.hp-market{color:#999;font-size:12px;}
.hp-sales{color:#999;font-size:12px;font-style:normal;margin-left:auto;}

/* ---------- 资讯列表 ---------- */
.hp-news{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
.hp-news-item{display:flex;gap:12px;padding:12px;background:#fff;border:1px solid #e8eaed;border-radius:8px;text-decoration:none;transition:border-color .2s,box-shadow .2s;}
.hp-news-item:hover{border-color:#2563eb;box-shadow:0 2px 8px rgba(37,99,235,.1);}
.hp-news-thumb{width:112px;height:80px;flex:none;border-radius:6px;overflow:hidden;background:#f0f4ff;display:flex;align-items:center;justify-content:center;color:#2563eb;font-size:22px;font-weight:600;}
.hp-news-thumb img{width:100%;height:100%;object-fit:cover;}
.hp-news-body{min-width:0;flex:1;display:flex;flex-direction:column;gap:4px;}
.hp-news-title{font-size:14px;font-weight:600;color:#222;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.hp-news-desc{font-size:12px;color:#666;line-height:1.6;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;}
.hp-news-meta{font-size:12px;color:#999;margin-top:auto;}

/* ---------- 搜索结果页 ---------- */
.hp-sp-form{max-width:560px;margin:0 auto 14px;}
.hp-sp-sum{text-align:center;font-size:13px;color:#666;margin:0 0 4px;}
.hp-sp-sum b{color:#2563eb;}
.hp-empty{text-align:center;padding:36px 12px;background:#fff;border:1px solid #e8eaed;border-radius:8px;}
.hp-empty-title{font-size:15px;font-weight:600;color:#222;margin:0 0 6px;}
.hp-empty-tip{font-size:13px;color:#999;margin:0 0 16px;}
.hp-empty-links{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;}
.hp-empty-links a{font-size:13px;padding:6px 16px;border-radius:16px;border:1px solid #e8eaed;color:#333;}
.hp-empty-links a:hover{border-color:#2563eb;color:#2563eb;background:#f0f4ff;}

/* ---------- 响应式 ---------- */
@media (max-width:900px){
  .hp-grid-tool{grid-template-columns:repeat(2,minmax(0,1fr));}
  .hp-grid-product{grid-template-columns:repeat(2,minmax(0,1fr));}
  .hp-news{grid-template-columns:1fr;}
  .hp-entries{grid-template-columns:1fr;}
  .hp-hero-title{font-size:20px;}
  .hp-hero{padding:24px 12px 20px;}
}
@media (max-width:520px){
  .hp-grid-tool{grid-template-columns:1fr;}
  .hp-search-input{font-size:13px;}
  .hp-search-btn{padding:0 16px;}
}
