/* ============================================================
   theme_pro 首页皮肤 home.css（v5 变量版）
   主色全部走 CSS 变量，一套 CSS 可给多套主题复用：
     --tp-main  主色（默认 #6FBE41）
     --tp-dark  深主色（按钮文字 / hover）
     --tp-light 浅主色（logo 渐变亮端）
     --tp-rgb   主色 RGB，用于半透明阴影
   换肤只需改 app/index/view/{theme}/index/index.html 顶部 <style>:root{}</style>
   对应模板：app/index/view/theme_pro/index/index.html（.tp- 前缀）
   主色：var(--tp-main,#6FBE41)（日用百货绿）
   断点：PC 四列商品 / 手机两列商品
   注意：本文件只管正文，底部导航栏(.tp-mnav)的样式在 inner.css 里，别混在一起
   ============================================================ */

.tp-wrap{max-width:1200px;margin:0 auto;padding:0 12px 20px;}
body{background:#f4f7f4;}

/* ---------- 顶栏：logo + 搜索 + 工具区 ---------- */
.tp-top{display:flex;align-items:center;gap:10px;padding:12px 0;background:#f4f7f4;position:sticky;top:0;z-index:99;}

/* logo：方块字标 + 文字，比纯文字更有品牌感；手机上只留方块字标 */
.tp-logo{display:flex;align-items:center;gap:8px;text-decoration:none;flex:0 0 auto;}
.tp-logoi{width:34px;height:34px;border-radius:10px;background:linear-gradient(135deg,var(--tp-light,#8bd15a),var(--tp-dark,#4FA330));color:#fff;font-style:normal;font-size:19px;font-weight:800;display:flex;align-items:center;justify-content:center;box-shadow:0 6px 14px rgba(var(--tp-rgb,111,190,65),.35);}
.tp-logot{font-size:20px;font-weight:800;color:var(--tp-dark,#4FA330);letter-spacing:1px;}

.tp-search{flex:1;display:flex;align-items:center;background:#fff;border-radius:999px;height:42px;padding:0 6px 0 14px;box-shadow:0 4px 14px rgba(0,0,0,.06);min-width:0;}
.tp-search .tp-sico{color:#b9c1bb;font-size:15px;margin-right:6px;}
.tp-search input{flex:1;min-width:0;border:0;outline:0;background:transparent;font-size:14px;color:#333;padding:0;}
.tp-search .tp-sbtn{border:0;background:var(--tp-main,#6FBE41);color:#fff;font-size:13px;font-weight:700;border-radius:999px;height:32px;padding:0 16px;cursor:pointer;flex:0 0 auto;}

/* 工具区：购物车（带数量角标）+ 个人中心 */
.tp-tools{display:flex;align-items:center;gap:8px;flex:0 0 auto;}
.tp-cart{position:relative;width:38px;height:38px;border-radius:50%;background:#fff;display:flex;align-items:center;justify-content:center;color:var(--tp-main,#6FBE41);font-size:17px;text-decoration:none;box-shadow:0 4px 14px rgba(0,0,0,.06);}
.tp-cnum{position:absolute;top:-4px;right:-3px;min-width:17px;height:17px;line-height:17px;padding:0 4px;border-radius:999px;background:#e02c08;color:#fff;font-size:11px;font-style:normal;font-weight:700;text-align:center;box-shadow:0 2px 6px rgba(224,44,8,.35);}
.tp-user{width:38px;height:38px;border-radius:50%;background:#fff;display:flex;align-items:center;justify-content:center;color:var(--tp-main,#6FBE41);font-size:17px;text-decoration:none;box-shadow:0 4px 14px rgba(0,0,0,.06);}

/* ---------- 热门搜索词条 ---------- */
.tp-hots{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:0 2px 10px;font-size:12.5px;color:#9aa19b;}
.tp-hots span{color:#b0b7b1;}
.tp-hots a{color:#5b6360;text-decoration:none;background:#fff;border-radius:999px;padding:3px 10px;box-shadow:0 2px 8px rgba(0,0,0,.04);}
.tp-hots a:hover{color:var(--tp-dark,#4FA330);box-shadow:0 3px 10px rgba(var(--tp-rgb,111,190,65),.22);}

/* ---------- 八大分类 ---------- */
.tp-cats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px 6px;background:#fff;border-radius:18px;padding:16px 6px 12px;margin-bottom:12px;box-shadow:0 6px 20px rgba(0,0,0,.05);}
.tp-cat{display:flex;flex-direction:column;align-items:center;gap:7px;text-decoration:none;}
.tp-ci{width:52px;height:52px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:20px;font-weight:800;font-style:normal;color:#fff;background:var(--tp-main,#6FBE41);box-shadow:0 6px 14px rgba(0,0,0,.12);text-shadow:0 1px 2px rgba(0,0,0,.12);}
.tp-c1{background:linear-gradient(135deg,#5b9cff,#2E70E1);}
.tp-c2{background:linear-gradient(135deg,#ff8f8a,#DB4E54);}
.tp-c3{background:linear-gradient(135deg,#d9a06a,#B16C34);}
.tp-c4{background:linear-gradient(135deg,#ff9ec4,#DB5A64);}
.tp-c5{background:linear-gradient(135deg,#e8c169,#C78733);}
.tp-c6{background:linear-gradient(135deg,#5fd7b4,#2DC196);}
.tp-c7{background:linear-gradient(135deg,#7fa8d6,#3D73A4);}
.tp-c8{background:linear-gradient(135deg,#ffb86b,#DB7437);}
.tp-cat span{font-size:12px;color:#41474a;font-weight:600;white-space:nowrap;}

/* ---------- 活动入口：砍价 / 拼单 ---------- */
.tp-acts{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin-bottom:12px;}
.tp-act{display:flex;align-items:center;justify-content:center;gap:6px;height:46px;border-radius:14px;color:#fff!important;font-size:14px;font-weight:700;text-decoration:none;box-shadow:0 6px 16px rgba(0,0,0,.10);letter-spacing:.5px;}
.tp-act i{font-size:16px;}
.tp-act.a1{background:linear-gradient(135deg,#ff5f6d 0%,#ff9966 100%);}
.tp-act.a2{background:linear-gradient(135deg,#ff8a00 0%,#ff5a1f 100%);}

/* ---------- 横幅 ---------- */
.tp-banner{border-radius:18px;overflow:hidden;margin-bottom:14px;box-shadow:0 8px 24px rgba(0,0,0,.08);}
.tp-banner img{width:100%;display:block;}

/* ---------- 商品楼层 ---------- */
.tp-floor{margin-bottom:16px;}
.tp-fh{display:flex;align-items:center;justify-content:space-between;padding:2px 4px 10px;}
/* 楼层标题左侧加一根绿色竖条做视觉锚点 */
.tp-fh b{font-size:17px;color:#1c2321;letter-spacing:.5px;padding-left:9px;border-left:3px solid var(--tp-main,#6FBE41);line-height:1.1;}
.tp-fh a{font-size:12.5px;color:#8a918c;text-decoration:none;}
.tp-fh a:hover{color:var(--tp-dark,#4FA330);}

.tp-goods{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;}
.tp-g{background:#fff;border-radius:14px;overflow:hidden;text-decoration:none;box-shadow:0 6px 18px rgba(0,0,0,.05);display:flex;flex-direction:column;transition:transform .18s ease,box-shadow .18s ease;}
.tp-g img{width:100%;aspect-ratio:1/1;object-fit:cover;display:block;background:#f2f4f2;}
.tp-gt{font-size:13px;color:#2b312e;line-height:1.4;padding:8px 9px 0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;height:37px;}
.tp-gp{padding:6px 9px 10px;color:#e02c08;font-size:16px;font-weight:800;}
.tp-gp em{font-style:normal;font-size:11px;font-weight:600;margin-right:1px;}

/* ---------- 回到顶部（仅手机端） ---------- */
.tp-gotop{display:none;}

/* ---------- 断点：≥769px 走 PC 版式 ---------- */
@media screen and (min-width:769px){
    .tp-goods{grid-template-columns:repeat(4,1fr);gap:14px;}
    .tp-ci{width:60px;height:60px;font-size:23px;}
    .tp-g:hover{transform:translateY(-4px);box-shadow:0 14px 28px rgba(0,0,0,.10);}
}

/* ---------- 断点：≤768px 走手机版式（顶栏精简、商品两列、出现回顶按钮） ---------- */
@media screen and (max-width:768px){
    .tp-wrap{padding:0 10px 16px;}
    .tp-top{padding:10px 0;gap:8px;}
    .tp-logot,.tp-user{display:none;}          /* 手机上藏文字 logo 和个人中心，给搜索框腾位置 */
    .tp-logoi{width:32px;height:32px;font-size:18px;}
    .tp-search{height:38px;padding:0 5px 0 12px;}
    .tp-search .tp-sbtn{height:29px;padding:0 13px;font-size:12.5px;}
    .tp-cart{width:35px;height:35px;font-size:16px;}
    .tp-hots{padding-bottom:8px;font-size:12px;}
    .tp-cats{gap:10px 4px;padding:12px 4px 10px;border-radius:14px;}
    .tp-ci{width:46px;height:46px;font-size:18px;}
    .tp-cat span{font-size:11.5px;}
    .tp-act{height:42px;font-size:13px;border-radius:12px;}
    .tp-banner{border-radius:14px;}
    .tp-fh b{font-size:15.5px;}
    .tp-gt{font-size:12.5px;height:35px;}
    .tp-gp{font-size:15px;}
    /* 回顶按钮：手机端滚动后浮出，位置不压底部导航栏（底栏 56px + 余量） */
    .tp-gotop.on{display:flex;align-items:center;justify-content:center;position:fixed;right:14px;bottom:72px;width:40px;height:40px;border-radius:50%;background:rgba(255,255,255,.95);color:var(--tp-dark,#4FA330);font-size:22px;text-decoration:none;box-shadow:0 6px 18px rgba(0,0,0,.16);z-index:120;}
}
.tp-floor-big{display:block;margin:0 0 12px;}
.tp-floor-big img{width:100%;height:240px;object-fit:cover;display:block;border-radius:12px;}
