/* =========================================================================
   Store location 页面：全屏地图 + 筛选浮层 + 门店详情卡
   PSD 基准 1920×976（页头之下），坐标按设计稿 px 绝对定位
   ========================================================================= */

/* ---------- 舞台：锁定地图宽高比，标记百分比定位才准确 ---------- */
.sl-stage {
  position: relative;
  width: 100%;
  min-height: 976px;
  height: 976px;
  overflow: hidden;
  background: #eef0f4;
}
/* ---------- 地图容器（真实英文地图：Leaflet + Esri） ---------- */
.sl-map {
  position: absolute; inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #eef0f4;
}
.sl-map .leaflet-container { background: #dce7f3; }
/* 底图调色：大幅压饱和 + 提亮，贴近设计稿的清爽白灰底 */
.sl-map .leaflet-tile-pane { filter: saturate(.34) brightness(1.12) contrast(.9); }
/* 版权署名：右下角小字，不抢视觉 */
.sl-map .leaflet-control-attribution {
  font-size: 10px; color: #98a2b3;
  background: rgba(255,255,255,.72);
  padding: 1px 6px; border-radius: 6px 0 0 0;
  margin: 0;
}
.sl-map .leaflet-control-attribution a { color: #98a2b3; }

/* ---------- 门店标记 ---------- */
.sl-mkwrap { background: none; border: none; }
.sl-mk {
  position: relative;
  width: 26px; height: 34px;
  cursor: pointer;
  transform: translateZ(0);
  transition: transform .25s cubic-bezier(.2,.8,.2,1), filter .25s;
  filter: drop-shadow(0 4px 6px rgba(16,24,40,.18));
}
.sl-mk svg { display: block; width: 100%; height: 100%; }
.sl-mk:hover { transform: scale(1.12) translateY(-2px); }
.sl-mk.on { transform: scale(1.18) translateY(-3px); }
.sl-mk .halo {
  position: absolute; left: 50%; top: 50%;
  width: 26px; height: 26px; margin: -13px 0 0 -13px;
  border-radius: 50%;
  border: 2px solid #ff6a00;
  opacity: 0;
  pointer-events: none;
}
.sl-mk.on .halo { animation: slPulse 1.9s ease-out infinite; }
@keyframes slPulse {
  0%   { transform: scale(.55); opacity: .85; }
  70%  { transform: scale(2.1);  opacity: 0; }
  100% { transform: scale(2.1);  opacity: 0; }
}

/* ---------- 左侧筛选浮层（设计稿 360,107 → 787,556） ---------- */
.sl-filter {
  position: absolute; left: 360px; top: 40px;
  width: 427px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 34px rgba(16,24,40,.10);
  z-index: 20;
  overflow: visible;
}
/* 顶部两个下拉入口 */
.sl-ftop {
  display: flex; align-items: center;
  height: 46px; padding: 0 20px 0 26px;
  position: relative;
}
.sl-fbtn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 34px; padding: 0 12px;
  border: none; background: none; cursor: pointer;
  font-size: 15px; color: #4c4d4f; font-family: inherit;
  border-radius: 8px;
  transition: background .2s, color .2s;
}
.sl-fbtn:hover, .sl-fbtn.open { background: #f5f6f8; color: var(--primary); }
.sl-fbtn .tri {
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #9a9c9f;
  transition: transform .22s;
}
.sl-fbtn.open .tri { transform: rotate(180deg); border-top-color: var(--primary); }
.sl-ftop .bar {
  width: 1px; height: 26px; background: #e6e8ec; margin: 0 26px 0 96px;
}

/* 下拉面板 */
.sl-drop {
  position: absolute; top: 52px;
  min-width: 190px; max-height: 260px; overflow-y: auto;
  background: #fff; border-radius: 10px;
  box-shadow: 0 8px 26px rgba(16,24,40,.14);
  padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: .18s ease;
  z-index: 40;
}
.sl-drop.open { opacity: 1; visibility: visible; transform: none; }
.sl-drop .it {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 9px 12px; border-radius: 8px;
  font-size: 14px; color: #4c4d4f; cursor: pointer;
}
.sl-drop .it:hover { background: #f5f6f8; }
.sl-drop .it.sel { color: var(--primary); font-weight: 600; background: #faf1ea; }

/* 搜索行 */
.sl-search {
  display: block; position: relative;
  margin: 39px 29px 0;
  width: 369px; height: 45px;
}
.sl-search input {
  width: 100%; height: 45px;
  border: 1px solid #e3e5e8; border-radius: 999px;
  padding: 0 54px 0 22px;
  font-size: 15px; color: #1c1c1c; background: #fff;
  outline: none; font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
}
.sl-search input::placeholder { color: #b9bcc0; }
.sl-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255,106,0,.12); }
.sl-search-go {
  position: absolute; right: 6px; top: 4px;
  width: 39px; height: 39px; border-radius: 50%;
  border: none; background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.sl-search-go:hover { transform: scale(1.05); box-shadow: 0 4px 14px rgba(255,106,0,.35); }

/* A-Z 字母索引 */
.sl-alpha {
  display: grid;
  grid-template-columns: repeat(10, 40px);
  gap: 3px 0;
  margin: 27px 0 0 10px;
}
.sl-alpha .lt {
  height: 24px; line-height: 24px; text-align: center;
  font-size: 12.5px; color: #3d3f42; cursor: pointer;
  border-radius: 6px;
  transition: color .18s, background .18s;
}
.sl-alpha .lt:hover { color: var(--primary); background: #faf1ea; }
.sl-alpha .lt.sel { color: #fff; background: var(--primary); font-weight: 600; }

/* Country / City 两列 */
.sl-cols {
  display: flex; margin: 12px 0 0;
  height: 202px;
  border-top: 1px solid #eceef1;
}
.sl-col { flex: 1; padding: 8px 0; overflow-y: auto; }
.sl-col:first-child { flex: 0 0 150px; }
.sl-col + .sl-col { border-left: 1px solid #eceef1; }
.sl-col-head {
  font-size: 14px; color: #4c4d4f; padding: 0 0 8px 20px;
  position: sticky; top: 0; background: #fff; z-index: 2;
}
.sl-col + .sl-col .sl-col-head { padding-left: 27px; }
.sl-col .row {
  padding: 2px 0 2px 20px;
  font-size: 13px; line-height: 1.4; color: #55575a; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .16s, background .16s;
}
.sl-col + .sl-col .row { padding-left: 27px; font-size: 14px; }
.sl-col .row:hover { color: var(--primary); background: #faf7f4; }
.sl-col .row.sel { color: var(--primary); font-weight: 600; background: #faf1ea; }
.sl-col .empty { padding: 8px 27px; font-size: 13px; color: #b9bcc0; }

/* ---------- 类型浮层（设计稿 792,164 → 1007,271） ---------- */
.sl-type {
  position: absolute; left: 792px; top: 97px;
  width: 215px; padding: 8px;
  background: #fff; border-radius: 10px;
  box-shadow: 0 10px 30px rgba(16,24,40,.12);
  z-index: 25;
}
.sl-type .it {
  padding: 5px 13px; border-radius: 8px;
  font-size: 14px; color: #55575a; cursor: pointer;
  transition: color .16s, background .16s;
  white-space: nowrap;
}
.sl-type .it:hover { background: #f5f6f8; color: var(--primary); }
.sl-type .it.sel { color: var(--primary); background: #fbf4ef; font-weight: 600; }

/* ---------- 统计卡（设计稿 360,575 → 787,863） ---------- */
.sl-total {
  position: absolute; left: 360px; top: 508px;
  width: 427px; height: 288px;
  background: #fff; border-radius: 12px;
  box-shadow: 0 10px 34px rgba(16,24,40,.10);
  z-index: 20;
  text-align: center;
}
/* logo 原图 106×35（比例 3.03:1），按高度定尺、宽度自适应，避免压扁变形 */
.sl-total .logo {
  display: block; margin: 24px auto 0;
  height: 20px; width: auto; max-width: 100%;
}
.sl-total h3 {
  margin: 12px 0 0; font-size: 22px; font-weight: 400; color: #1c1c1c;
  line-height: 1.2;
}
.sl-total .bar { height: 1px; background: #eceef1; margin: 22px 0 0; }
.sl-total .item { padding: 30px 0 0; }
.sl-total .item + .item { padding-top: 22px; }
.sl-total .lab { font-size: 15px; color: #4c4d4f; }
.sl-total .num {
  display: block; margin-top: 9px;
  font-size: 13px; color: #9c9d9d;
  font-variant-numeric: tabular-nums;
}

/* ---------- 门店详情卡（设计稿 844,680 → 1577,866） ---------- */
.sl-store {
  position: absolute; left: 844px; top: 613px;
  width: 733px; height: 186px;
  background: #fff; border-radius: 12px;
  box-shadow: 0 10px 34px rgba(16,24,40,.10);
  display: flex; align-items: flex-start;
  padding: 11px 12px;
  z-index: 26;
}
.sl-store .ph {
  width: 246px; height: 164px; flex: 0 0 246px;
  border-radius: 8px; overflow: hidden; background: #eef0f4;
}
.sl-store .ph img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  -webkit-user-drag: none; user-select: none;
}
.sl-store .body { padding: 27px 0 0 36px; flex: 1; min-width: 0; }
.sl-store .name {
  margin: 0; font-size: 20px; font-weight: 400; color: #1c1c1c;
  line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sl-store .line {
  display: flex; align-items: center; gap: 10px;
  margin-top: 13px; font-size: 15px; color: #55575a;
  min-width: 0;
}
.sl-store .line svg { flex: 0 0 auto; }
.sl-store .line .k { color: #55575a; white-space: nowrap; }
.sl-store .line .v { color: #1c1c1c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 切换门店时的内容淡入 */
.sl-store.swap .body, .sl-store.swap .ph { animation: slSwap .42s ease both; }
@keyframes slSwap {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- 入场动效 ---------- */
.js .sl-in { opacity: 0; }
.js .sl-in.in { animation: slIn .62s cubic-bezier(.2,.8,.2,1) both; }
/* 动画结束后强制落位，避免任何原因导致浮层停在起始态 */
.js .sl-in.settled { animation: none; opacity: 1; transform: none; }
@keyframes slIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 1439px) {
  .sl-filter { left: 18.75vw; }
  .sl-ftop { padding: 0 16px 0 20px; }
  .sl-ftop .bar { margin: 0 16px 0 34px; }
  .sl-type { left: calc(18.75vw + 440px); }
  .sl-total { left: 18.75vw; top: 515px; }
  .sl-store { left: calc(18.75vw + 485px); width: auto; right: 3vw; }
  .sl-store .body { padding-left: 30px; }
}
@media (max-width: 1279px) {
  .sl-filter, .sl-total { width: 380px; }
  .sl-search { margin: 30px 22px 0; width: calc(100% - 44px); }
  .sl-ftop { padding: 0 12px 0 16px; }
  .sl-ftop .bar { margin: 0 12px 0 18px; }
  .sl-fbtn { font-size: 14px; padding: 0 8px; gap: 6px; }
  .sl-type { left: calc(18.75vw + 393px); }
  .sl-store { left: calc(18.75vw + 438px); }
  .sl-fbtn { white-space: nowrap; }
}
@media (max-width: 1080px) {
  .sl-filter, .sl-total { width: 340px; }
  .sl-ftop { padding: 0 10px 0 12px; }
  .sl-ftop .bar { margin: 0 10px 0 12px; }
  .sl-fbtn { font-size: 13px; padding: 0 6px; gap: 5px; }
  .sl-alpha { grid-template-columns: repeat(9, 1fr); margin: 22px 20px 0; width: calc(100% - 40px); }
  .sl-type { left: calc(18.75vw + 353px); }
  .sl-store { left: calc(18.75vw + 383px); right: 3vw; padding: 10px; }
  .sl-store .ph { width: 180px; height: 120px; flex-basis: 180px; }
  .sl-store .body { padding-left: 20px; padding-top: 4px; }
  .sl-store .name { font-size: 17px; }
}
@media (max-width: 768px) {
  .sl-stage {
    aspect-ratio: auto; height: auto;
    display: flex; flex-direction: column;
    background: #fff;
  }
  .sl-map { position: relative; height: 78vw; flex: none; }

  .sl-filter {
    position: static; order: -1;
    width: auto; margin: 12px; max-height: none; overflow: visible;
  }
  .sl-ftop { padding: 0 10px; }
  .sl-ftop .bar { margin: 0 0 0 auto; flex: none; }
  .sl-ftop .sep { flex: none; }
  .sl-fbtn { font-size: 14px; padding: 0 8px; gap: 6px; white-space: nowrap; flex: none; }
  .sl-search { margin: 14px 12px 0; width: auto; }
  .sl-alpha {
    grid-template-columns: repeat(9, 1fr);
    margin: 16px 8px 0; width: auto; gap: 2px 0;
  }
  .sl-alpha .lt { font-size: 13px; }
  .sl-cols { height: auto; margin-top: 12px; }
  .sl-col:first-child { flex: 0 0 42%; }
  .sl-col .row { padding-left: 16px; }
  .sl-col-head { padding-left: 16px; }

  .sl-type { display: none; }
  .sl-total { display: none; }

  .sl-store {
    position: static; order: 2;
    width: auto; height: auto; margin: 0 12px 16px;
    flex-direction: column; padding: 10px;
  }
  .sl-store .ph { width: 100%; height: 44vw; flex: none; }
  .sl-store .body { padding: 12px 0 0; }
  .sl-store .name { font-size: 16px; white-space: normal; }
  .sl-store .line { margin-top: 10px; font-size: 13.5px; gap: 8px; }
  .sl-store .line .v { white-space: normal; }
  .sl-mk { width: 22px; height: 29px; }
}