@charset "UTF-8";

:root{
  --bg:#f4fbf7;
  --card:#ffffff;
  --text:#123b2a;
  --muted:#5a7a6a;
  --primary:#3bb27a;
  --primary-2:#2a9d6a;
  --border:rgba(18,59,42,.12);
  --shadow:0 10px 30px rgba(18,59,42,.08);
  --radius:16px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC","Hiragino Sans GB","Microsoft YaHei", sans-serif;
  background:var(--bg);
  color:var(--text);
}
a{color:inherit; text-decoration:none}
img{max-width:100%; display:block}

.container{
  width:min(980px, 100%);
  margin:0 auto;
  padding:12px 12px 88px;
}

.row{display:flex; gap:12px}
.col{flex:1}

.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}

.flat-card{
  background:linear-gradient(135deg, rgba(59,178,122,.16), rgba(59,178,122,.06));
  border:1px solid rgba(59,178,122,.25);
  border-radius:var(--radius);
  padding:14px;
}
.flat-card .title{font-weight:700; font-size:16px}
.flat-card .sub{margin-top:6px; font-size:12px; color:var(--muted)}

.section{margin-top:12px}

.search{
  display:flex;
  gap:10px;
  background:var(--card);
  border:1px solid var(--border);
  border-radius:999px;
  padding:10px 12px;
  align-items:center;
  box-shadow:var(--shadow);
}
.search input{
  border:none;
  outline:none;
  width:100%;
  font-size:14px;
  background:transparent;
  color:var(--text);
}
.btn{
  border:none;
  background:var(--primary);
  color:#fff;
  border-radius:999px;
  padding:10px 14px;
  font-weight:700;
  cursor:pointer;
}
.btn-icon{
  width:40px;
  height:34px;
  padding:0;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
}
.btn-icon svg{display:block}
.btn-icon img{width:18px;height:18px;display:block;filter:brightness(0) invert(1)}
.btn:active{transform:translateY(1px)}
.btn-ghost{
  background:transparent;
  border:1px solid var(--border);
  color:var(--text);
}

.filters{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  max-width:100%;
  position:relative;
}
.filters select{
  appearance:auto;
  -webkit-appearance:menulist-button;
  border:1px solid var(--border);
  background:var(--card);
  color:var(--text);
  border-radius:12px;
  height:40px;
  padding:0 12px;
  min-width:140px;
  box-shadow:var(--shadow);
  position:relative;
  z-index:1;
}

.carousel{
  position:relative;
  overflow:hidden;
  border-radius:var(--radius);
  border:1px solid var(--border);
  background:var(--card);
  box-shadow:var(--shadow);
}
.carousel-track{
  display:flex;
  overflow:auto;
  scroll-snap-type:x mandatory;
  scrollbar-width:none;
}
.carousel-track::-webkit-scrollbar{display:none}
.carousel-item{
  flex:0 0 100%;
  scroll-snap-align:start;
}
.carousel-item img{
  width:100%;
  height:180px;
  object-fit:cover;
}
.dots{
  position:absolute;
  left:0; right:0;
  bottom:10px;
  display:flex;
  justify-content:center;
  gap:6px;
}
.dot{
  width:8px; height:8px;
  border-radius:50%;
  background:rgba(255,255,255,.55);
  border:1px solid rgba(0,0,0,.08);
}
.dot.active{background:rgba(255,255,255,.95)}

.shop-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
}
.shop{
  overflow:hidden;
  border-radius:var(--radius);
  border:1px solid var(--border);
  background:var(--card);
  box-shadow:var(--shadow);
}
.shop .cover{
  width:100%;
  aspect-ratio: 4 / 3;
  background:rgba(59,178,122,.12);
}
.shop .cover img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.shop .body{padding:10px 10px 12px}
.shop .name{
  font-weight:800;
  font-size:14px;
  line-height:1.2;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.shop .loc{
  margin-top:6px;
  font-size:12px;
  color:var(--muted);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.shop .desc{
  margin-top:6px;
  font-size:12px;
  color:var(--muted);
  line-height:1.35;
  overflow:hidden;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}
.shop .tags{
  margin-top:8px;
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}
.shop .tag{
  font-size:11px;
  padding:5px 8px;
  border-radius:999px;
}

.bottom-nav{
  position:fixed;
  left:0; right:0;
  bottom:0;
  z-index:80;
  background:rgba(255,255,255,.92);
  border-top:1px solid var(--border);
  padding:10px 16px calc(10px + var(--safe-bottom));
  backdrop-filter: blur(8px);
}
.bottom-nav .wrap{
  width:min(980px, 100%);
  margin:0 auto;
  display:flex;
  justify-content:space-around;
  align-items:center;
}
.nav-item{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:4px;
  font-size:12px;
  color:var(--muted);
}
.nav-item.active{color:var(--primary-2); font-weight:700}
.nav-item img{width:20px; height:20px}

.float-btn{
  position:fixed;
  right:14px;
  bottom:15%;
  z-index:20;
  display:flex;
  align-items:center;
  background:var(--primary);
  color:#fff;
  width:46px;
  height:46px;
  padding:0;
  justify-content:center;
  border-radius:50%;
  box-shadow:var(--shadow);
  border:1px solid rgba(255,255,255,.35);
}
.float-btn img{width:18px; height:18px; filter:brightness(0) invert(1)}
.float-btn span{display:none}

.page-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 12px;
  width:min(980px, 100%);
  margin:0 auto;
  position:fixed;
  top:0;
  left:50%;
  transform:translateX(-50%);
  z-index:80;
  background:#f4fbf7;
  border-bottom:1px solid var(--border);
  backdrop-filter: blur(8px);
}
.back{
  border:1px solid var(--border);
  background:#dbf2e5;
  border-radius:12px;
  padding:5px 12px;
  box-shadow:var(--shadow);
}
.page-title{font-weight:800}

.shop-head{
  margin-top:12px;
  padding:0 12px;
  width:min(980px, 100%);
  margin-left:auto;
  margin-right:auto;
}
.page-top + .shop-head{margin-top:72px}
.square-carousel .carousel-item img{
  width:100%;
  aspect-ratio: 1 / 1;
  height:auto;
  object-fit:cover;
}
.shop-name{margin-top:10px; font-weight:900; font-size:25px}
.shop-addr{margin-top:6px; font-size:12px; color:var(--muted)}
.shop-desc{margin-top:8px; font-size:15px; color:var(--text); line-height:1.5}

.tags{margin-top:10px; display:flex; gap:8px; flex-wrap:wrap}
.tag{
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(59,178,122,.14);
  border:1px solid rgba(59,178,122,.22);
  color:var(--primary-2);
  font-weight:700;
}

@media (max-width: 520px){
  .filters{
    flex-wrap:nowrap;
    gap:8px;
    overflow:visible;
  }
  .filters select{
    flex:1 1 0;
    min-width:0;
    padding:9px 10px;
    font-size:12px;
    appearance:auto;
    -webkit-appearance:menulist-button;
  }
}

.media-grid{
  margin-top:12px;
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:10px;
}
.media-item{
  border-radius:14px;
  overflow:hidden;
  border:1px solid var(--border);
  background:var(--card);
  aspect-ratio: 1 / 1;
  cursor:pointer;
  position:relative;
}
.media-item img, .media-item video{
  width:100%;
  height:100%;
  object-fit:cover;
}
.media-item .play{
  position:absolute;
  inset:auto auto 10px 10px;
  background:rgba(0,0,0,.55);
  color:#fff;
  border-radius:999px;
  padding:6px 10px;
  font-size:12px;
}

.info{
  margin-top:12px;
  padding:12px;
}
.info .kv{
  display:grid;
  grid-template-columns:96px 1fr;
  gap:8px 10px;
  font-size:13px;
  color:var(--text);
}
.info .k{color:var(--muted)}

.action-bar{
  position:fixed;
  left:0; right:0;
  bottom:0;
  background:rgba(255,255,255,.92);
  border-top:1px solid var(--border);
  padding:10px 12px calc(10px + var(--safe-bottom));
  backdrop-filter: blur(8px);
}
.action-bar .wrap{
  width:min(980px, 100%);
  margin:0 auto;
  display:flex;
  gap:10px;
  align-items:center;
}
.action{
  flex:1;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:12px 10px;
  border-radius:14px;
  border:1px solid var(--border);
  background:var(--card);
  font-weight:800;
  color:var(--text);
}
.action.primary{
  flex:2;
  background:var(--primary);
  color:#fff;
  border:1px solid rgba(255,255,255,.35);
}

.modal-mask{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.35);
  z-index:120;
  display:none;
  align-items:flex-end;
  justify-content:center;
}
.modal{
  width:min(980px, 100%);
  background:var(--card);
  border-radius:18px 18px 0 0;
  border:1px solid var(--border);
  box-shadow:var(--shadow);
  padding:14px;
  
}
.modal h3{margin:0 0 10px; font-size:16px}
.modal .p{margin:0; color:var(--muted); font-size:13px; line-height:1.5}
.modal .actions{margin-top:12px; display:flex; gap:10px}
.modal .actions .btn{
  flex:1;
  padding:12px 12px;
  font-size:14px;
}
.toast{
  position:fixed;
  left:50%;
  transform:translateX(-50%);
  bottom:110px;
  background:rgba(18,59,42,.88);
  color:#fff;
  padding:10px 12px;
  border-radius:999px;
  font-size:12px;
  z-index:60;
  display:none;
}

@media (min-width: 960px){
  .container{padding-top:18px}
  .carousel-item img{height:260px}
}

@media (max-width: 560px){
  .filters{
    flex-wrap:nowrap;
    gap:8px;
    overflow:visible;
  }
  .filters select{
    flex:1 1 0;
    min-width:0;
    padding:9px 10px;
    font-size:12px;
    appearance:auto;
    -webkit-appearance:menulist-button;
  }
  .media-grid{grid-template-columns:repeat(3, minmax(0, 1fr))}
}

#customerMask{align-items:center}
#customerMask .modal{border-radius:18px}

#viewerMask{align-items:center}
#viewerMask .modal{
  border-radius:18px;
  max-height:calc(100vh - 24px);
  overflow:auto;
}
#viewerMask .modal > div:first-child{
  position:sticky;
  top:0;
  background:var(--card);
  padding-bottom:10px;
  z-index:1;
}
#viewerMask #viewerVideo{
  max-height:70vh;
  height:auto;
  object-fit:contain;
  background:#000;
}
#viewerMask #viewerImg{
  max-height:70vh;
  height:auto;
  object-fit:contain;
}

@media (max-width: 420px){
  .media-grid{grid-template-columns:repeat(2, minmax(0, 1fr))}
}
