/* ============================================================
   企业店铺首页 · 样式表
   ------------------------------------------------------------
   0. 变量 & 基础重置
   1. 通用工具类
   2. 顶部地址栏
   3. 站点顶栏
   4. 店铺头部
   5. 店铺导航
   6. 首屏
   7. 为你推荐
   8. 页脚
   9. 响应式
   ------------------------------------------------------------
   改配色：只改 :root 里的 --brand
   改宽度：改 --container
   ============================================================ */

/* ---------- 0. 变量 & 基础重置 ---------- */
:root {
  --brand: #2f6fd0;
  /* 主色 */
  --brand-dark: #2559a8;
  /* 主色 hover */
  --brand-soft: #eef4fd;
  /* 主色浅底 */
  --text: #333;
  --text-2: #666;
  --text-3: #999;
  --line: #e6e6e6;
  --line-2: #f0f0f0;
  --bg: #f5f5f5;
  --radius: 4px;
  --container: 1200px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

img {
  border: 0;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
p {
  margin: 0;
}

img {
  display: block;
  max-width: 100%;
}

button,
input {
  font-family: inherit;
  font-size: inherit;
}

em {
  font-style: normal;
}

/* ---------- 1. 通用工具类 ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* 图片占位：图没放进来就是一块灰底 */
.ph {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #f0f1f3;
  color: #9aa0a6;
  font-size: 12px;
  text-align: center;
}

/* 下拉小三角 */
.caret {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 5px;
  vertical-align: middle;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
}

/* 导航图标占位方块：想上色就写 style="--c:#2f6fd0" */
.ico {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 5px;
  border-radius: 2px;
  vertical-align: -1px;
  background: var(--c, #ccd2da);
}

/* 数字小角标 */
.num {
  display: inline-block;
  min-width: 16px;
  padding: 0 4px;
  margin-left: 4px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  line-height: 16px;
  text-align: center;
  font-style: normal;
}

/* ---------- 2. 顶部地址栏 ---------- */
.browser-bar {
  padding-top: 8px;
  background: #dee1e6;
}

.browser-bar__inner {
  display: flex;
}

.browser-bar__tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 420px;
  padding: 9px 18px;
  border-radius: 8px 8px 0 0;
  background: #fff;
  font-size: 12px;
  color: #5f6368;
}

.browser-bar__lock {
  position: relative;
  flex: none;
  width: 11px;
  height: 8px;
  margin-top: 4px;
  border: 1.5px solid #9aa0a6;
  border-radius: 2px;
}

.browser-bar__lock::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -6px;
  transform: translateX(-50%);
  width: 7px;
  height: 6px;
  border: 1.5px solid #9aa0a6;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
}

.browser-bar__url {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ---------- 3. 站点顶栏 ---------- */
.topbar {
  background: #f7f7f7;
  border-bottom: 1px solid #ededed;
  font-size: 12px;
  color: var(--text-2);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 32px;
}

.topbar__nav {
  display: flex;
  align-items: center;
}

.topbar__nav li {
  display: flex;
  align-items: center;
}

.topbar__nav li+li::before {
  content: "";
  width: 1px;
  height: 11px;
  margin: 0 12px;
  background: #ddd;
}

.topbar__nav a:hover {
  color: var(--brand);
}

.sitebar {
  background: #fff;
  border-bottom: 1px solid #ededed;
  font-size: 12px;
  color: var(--text-2);
}

.sitebar__inner {
  display: flex;
  align-items: center;
  height: 38px;
}

.sitebar__nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.sitebar__nav a {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
}

.sitebar__nav a:hover {
  color: var(--brand);
}

/* ---------- 4. 店铺头部 ---------- */
.shop-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.shop-header__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 16px;
  padding-bottom: 14px;
}

/* 平台 / 站点标识（放文字或 <img> 都行） */
.site-logo {
  flex: none;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #444;
}

/* 店铺 LOGO + 公司信息 */
.shop-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.shop-logo {
  flex: none;
  width: 88px;
  height: 88px;
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
}

.shop-info {
  min-width: 0;
}

.shop-info__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.shop-info__name {
  font-size: 20px;
  font-weight: 700;
  color: #222;
  line-height: 1.3;
}

.shop-info__head .caret {
  color: #999;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 2px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.badge--primary {
  background: var(--brand);
  color: #fff;
}

.badge--plain {
  background: #f2f4f7;
  color: var(--text-2);
  border: 1px solid #e3e6ea;
}

.icon-chat {
  display: inline-flex;
  color: var(--brand);
  cursor: pointer;
}

/* 星级评分：只改 HTML 里 --score 的数值 */
.stars {
  position: relative;
  display: inline-block;
  font-family: SimSun, serif;
  font-size: 14px;
  letter-spacing: 1px;
  color: #dcdcdc;
}

.stars::before {
  content: "★★★★★";
}

.stars::after {
  content: "★★★★★";
  position: absolute;
  left: 0;
  top: 0;
  width: calc(var(--score, 5) / 5 * 100%);
  overflow: hidden;
  white-space: nowrap;
  color: var(--brand);
}

.shop-info__score {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
}

.shop-info__rates {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-3);
}

.shop-info__rates li span {
  color: var(--text-2);
}

.shop-info__rates li em {
  color: var(--brand);
}

/* 右侧小图 */
.shop-header__promos {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.shop-header__promos a {
  width: 60px;
  height: 60px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* 店内搜索 */
.shop-search {
  flex: none;
  width: 330px;
}

.shop-search__tabs {
  display: flex;
  gap: 20px;
  margin-bottom: 9px;
  font-size: 13px;
  color: var(--text-2);
}

.shop-search__tabs .is-active {
  color: var(--brand);
  font-weight: 700;
}

.shop-search__form {
  display: flex;
  height: 38px;
  overflow: hidden;
  border: 2px solid var(--brand);
  border-radius: var(--radius);
  background: #fff;
}

.shop-search__form input {
  flex: 1;
  min-width: 0;
  padding: 0 12px;
  border: 0;
  outline: 0;
  color: var(--text);
}

.shop-search__form input::placeholder {
  color: #bbb;
}

.shop-search__form button {
  flex: none;
  width: 84px;
  border: 0;
  background: var(--brand);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
}

.shop-search__form button:hover {
  background: var(--brand-dark);
}

/* ---------- 5. 店铺导航 ---------- */
.shop-nav {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.shop-nav__inner {
  display: flex;
  align-items: center;
  height: 46px;
}

.shop-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 46px;
  padding: 0 24px;
  font-size: 14px;
  color: #444;
}

.shop-nav a:first-child {
  padding-left: 0;
}

.shop-nav a:hover {
  color: var(--brand);
}

.shop-nav a.is-active {
  color: var(--brand);
  font-weight: 700;
}

.shop-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--brand);
}

.shop-nav a.is-active:first-child::after {
  right: 24px;
}

/* ---------- 6. 首屏 ---------- */
.hero {
  padding: 22px 0;
  background: #3a3f46 url("images/hero-bg.svg") center / cover no-repeat;
}

.hero__inner {
  display: flex;
  align-items: stretch;
  min-height: 380px;
  overflow: hidden;
  border-radius: var(--radius);
}

/* 6-1 公司简介 */
.hero__intro {
  flex: none;
  width: 280px;
  display: flex;
  flex-direction: column;
  padding: 26px 24px 20px;
  background: #fff;
}

.hero__intro p {
  margin-bottom: 14px;
  font-size: 13px;
  line-height: 1.95;
  color: var(--text-2);
}

.hero__more {
  margin-top: auto;
  align-self: flex-end;
  font-size: 13px;
  color: var(--text-3);
}

.hero__more:hover {
  color: var(--brand);
}

/* 6-2 首屏主图 */
.hero__media {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  background: #2b2e33;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 6-3 服务面板 */
.hero__side {
  flex: none;
  width: 280px;
  display: flex;
  flex-direction: column;
  background: #2b2b2b;
  color: #fff;
}

.hero__tabs {
  display: flex;
  border-bottom: 1px solid #3d3d3d;
}

.hero__tabs a {
  position: relative;
  flex: 1;
  padding: 14px 0;
  text-align: center;
  font-size: 13px;
  color: #cfcfcf;
}

.hero__tabs a+a {
  border-left: 1px solid #3d3d3d;
}

.hero__tabs a:hover {
  color: #fff;
}

.hero__tabs a.is-active {
  color: var(--brand);
  font-weight: 700;
}

.hero__tabs a.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 30px;
  height: 2px;
  background: var(--brand);
}

.hero__panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px 22px;
}

.hero__panel-title {
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.hero__panel p {
  margin-bottom: 10px;
  padding-right: 10px;
  font-size: 13px;
  line-height: 2;
  color: #d6d6d6;
}

.btn-inquiry {
  align-self: center;
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 124px;
  height: 36px;
  padding: 0 20px;
  border: 1px solid #8a8a8a;
  border-radius: 3px;
  font-size: 13px;
  color: #fff;
}

.btn-inquiry:hover {
  background: var(--brand);
  border-color: var(--brand);
}

/* ---------- 7. 为你推荐 ---------- */
.recommend {
  margin-top: 14px;
  padding: 30px 0 40px;
  background: #fff;
}

.recommend__title {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  color: #333;
}

.recommend__sub {
  margin-top: 10px;
  font-size: 12px;
  text-align: center;
  color: #bbb;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-top: 26px;
}

.product-card {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7f8f9;
}

.product-card:hover {
  border-color: var(--brand);
}

.product-card__tag {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  padding: 2px 8px;
  border-radius: 2px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 12px;
  line-height: 18px;
}

/* ---------- 8. 页脚 ---------- */
.page-footer {
  margin-top: 14px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  background: #fff;
  text-align: center;
  font-size: 12px;
  color: #aaa;
}

/* ---------- 9. 响应式 ---------- */
@media (max-width: 1100px) {

  .hero__intro,
  .hero__side {
    width: 240px;
  }

  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .shop-header__inner {
    flex-wrap: wrap;
  }

  .shop-header__promos {
    margin-left: auto;
  }

  .shop-search {
    width: 100%;
    order: 5;
  }

  .hero__inner {
    flex-direction: column;
    min-height: 0;
  }

  .hero__intro,
  .hero__side {
    width: 100%;
  }

  .hero__media {
    height: 260px;
  }

  .hero__more {
    margin-top: 0;
  }

  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .site-logo {
    font-size: 16px;
  }

  .shop-logo {
    width: 64px;
    height: 64px;
  }

  .shop-info__name {
    font-size: 17px;
  }

  .shop-header__promos {
    display: none;
  }

  .sitebar__nav {
    display: none;
  }

  .browser-bar__tab {
    max-width: 100%;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}