/* ========== 全局重置 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  font-size: 14px;
  color: #333;
  overflow: hidden;
}

/* ========== 地图容器 ========== */
#map-container {
  width: 100%;
  height: 100%;
}

/* ========== 顶部标题栏 ========== */
.header-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 20vh;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
}

.header-bar h1 {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 2px;
}

/* ========== POI 详情弹窗（底部抽屉） ========== */
.detail-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.detail-overlay.active {
  opacity: 1;
  visibility: visible;
}

.detail-drawer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2001;
  max-height: 75vh;
  background: #fff;
  border-radius: 16px 16px 0 0;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.detail-drawer.active {
  transform: translateY(0);
}

/* 拖拽指示条 */
.drawer-handle {
  width: 36px;
  height: 5px;
  background: #d1d1d6;
  border-radius: 3px;
  margin: 10px auto 6px;
  flex-shrink: 0;
}

/* 关闭按钮 */
.drawer-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 28px;
  height: 28px;
  border: none;
  background: #f0f0f0;
  border-radius: 50%;
  font-size: 16px;
  line-height: 28px;
  text-align: center;
  color: #666;
  cursor: pointer;
}

/* 内容区域 */
.drawer-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 16px 24px;
}

/* 店铺名 */
.poi-name {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 4px;
}

/* 地址 */
.poi-address {
  font-size: 13px;
  color: #999;
  margin-bottom: 12px;
}

/* 标签 */
.poi-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.poi-tag {
  display: inline-block;
  padding: 2px 10px;
  font-size: 12px;
  color: #07c160;
  background: rgba(7, 193, 96, 0.1);
  border-radius: 12px;
}

/* 图片轮播 */
.poi-images {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  margin-bottom: 14px;
  padding-bottom: 4px;
}

.poi-images::-webkit-scrollbar {
  display: none;
}

.poi-images img {
  width: 260px;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
  scroll-snap-align: start;
  background: #f5f5f5;
}

/* 介绍文字 */
.poi-desc {
  font-size: 15px;
  line-height: 1.7;
  color: #444;
  white-space: pre-wrap;
}

/* ========== 安全区域适配（iPhone 刘海/底部横条） ========== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .detail-drawer {
    padding-bottom: env(safe-area-inset-bottom);
  }
  .header-bar {
    padding-top: env(safe-area-inset-top);
    height: calc(50px + env(safe-area-inset-top));
  }
}
