/* ==========================================================================
   SHEENEFFECT — header brand slot (2026-12-04)
   页头工具栏最左侧加入品牌字标；搜索框在桌面端保持视觉居中，右侧工具组靠右。
   依赖：assets/css/style.css（须在其后加载）
   ========================================================================== */

/* 1. 桌面端三列栅格：品牌 | 搜索(560) | 工具组 */
.site-header .header-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 560px) minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  padding: 12px 0;
}

/* 2. 品牌字标 */
.ses-brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  flex: 0 0 auto;
  line-height: 0;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.ses-brand img {
  display: block;
  height: 28px;
  width: auto;
  transition: opacity .2s ease;
}
.ses-brand:hover img,
.ses-brand:focus-visible img { opacity: .82; }
.ses-brand:focus-visible { outline: 2px solid var(--rose, #c2185b); outline-offset: 6px; border-radius: 3px; }

/* 3. 搜索框：占满中列，不再依赖 flex + auto margin 居中 */
.site-header .header-top > .search {
  width: 100%;
  max-width: 560px;
  margin: 0;
  justify-self: center;
  grid-column: 2;
}

/* 4. 右侧工具组 */
.ses-head-tools {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 12px;
  min-width: 0;
}

/* 5. 中等屏（<1220px）：品牌列按内容定宽，搜索吃掉剩余空间 */
@media (max-width: 1220px) {
  .site-header .header-top {
    grid-template-columns: max-content minmax(0, 1fr) max-content;
    gap: 16px;
  }
  .ses-brand img { height: 24px; }
  .site-header .header-top > .search { max-width: none; }
}

/* 6. 平板/手机（<861px）：品牌与工具组一行，搜索独占第二行 */
@media (max-width: 860px) {
  .site-header .header-top {
    grid-template-columns: minmax(0, 1fr) max-content;
    grid-template-areas:
      "brand tools"
      "search search";
    row-gap: 10px;
    column-gap: 12px;
    padding: 10px 0 12px;
  }
  .ses-brand { grid-area: brand; }
  .ses-brand img { height: 22px; }
  .ses-head-tools { grid-area: tools; gap: 10px; }
  .site-header .header-top > .search {
    grid-area: search;
    max-width: none;
    justify-self: stretch;
  }
}

@media (max-width: 420px) {
  .ses-brand img { height: 19px; }
  .ses-head-tools { gap: 8px; }
}
