/* R234 style.css — 小微线上店铺名片 */
:root {
  --contact-footer-h: 72px;
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --content-max-width: 480px;
  --card-radius: 14px;
  --gap: 12px;
  --primary: #E87722;
  --secondary: #2D3436;
  --accent: #FFB347;
  --success: #27AE60;
  --warning: #F39C12;
  --danger: #E74C3C;
  --bg: #FFF8F0;
  --card: #FFFFFF;
  --text: #2D3436;
  --text-secondary: #636E72;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  max-width: var(--content-max-width);
  margin: 0 auto;
  min-height: 100vh;
  line-height: 1.5;
}
body.has-contact-footer {
  padding-bottom: calc(var(--contact-footer-h) + var(--safe-area-bottom) + 56px);
}

#app { padding-bottom: 8px; }
.nav-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.06);
  position: sticky; top: 0; z-index: 50;
}
.nav-logo { font-weight: 700; font-size: 15px; flex: 1; text-align: center; }
.nav-btn { background: none; border: none; font-size: 18px; padding: 8px; cursor: pointer; }

.view-container { padding: 12px; min-height: 50vh; }
.page-title { font-size: 18px; margin-bottom: 12px; font-weight: 700; }

.bottom-nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--contact-footer-h) + var(--safe-area-bottom));
  width: 100%; max-width: var(--content-max-width); display: flex; background: var(--card);
  border-top: 1px solid rgba(0,0,0,.06); z-index: 90;
}
.bottom-tab {
  flex: 1; border: none; background: none; padding: 8px 2px; font-size: 10px;
  color: var(--text-secondary); cursor: pointer;
}
.bottom-tab.active { color: var(--primary); font-weight: 600; }
.bottom-tab span { display: block; margin-top: 2px; font-size: 11px; }

.card {
  background: var(--card); border-radius: var(--card-radius); padding: 14px; margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.btn {
  border: none; border-radius: 12px; padding: 12px 16px; font-size: 14px; cursor: pointer;
  text-decoration: none; display: inline-block; text-align: center;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-outline { background: var(--card); color: var(--text); border: 1px solid #ddd; }
.btn-block { display: block; width: 100%; margin-top: 8px; }

/* M1 Hero */
.shop-hero { margin-bottom: 12px; }
.hero-cover {
  border-radius: var(--card-radius); background-size: cover; background-position: center;
  position: relative; overflow: hidden; min-height: 140px;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.45), transparent 60%);
}
.hero-body { margin-top: -32px; position: relative; z-index: 2; }
.hero-logo { font-size: 40px; margin-bottom: 6px; }
.hero-logo img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; }
.hero-name { font-size: 22px; margin-bottom: 4px; }
.hero-tagline { color: var(--text-secondary); font-size: 14px; margin-bottom: 10px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.hero-announce { font-size: 13px; background: rgba(232,119,34,.1); padding: 8px 10px; border-radius: 8px; margin-top: 8px; }
.badge-industry, .badge-hours, .badge-rating {
  font-size: 11px; padding: 4px 8px; border-radius: 20px; background: #f1f3f5;
}
.badge-hours.open { background: #d8f5e4; color: #1e7e45; }
.badge-hours.closed { background: #ffe8e8; color: #c0392b; }
.badge-hours.pulse { animation: pulse 2s ease-in-out infinite; }
@keyframes heroIn {
  from { opacity: 0; transform: translateY(12px) scale(1.03); }
  to { opacity: 1; transform: none; }
}
.hero-animate .hero-body { animation: heroIn .45s ease-out; }

/* M2 Categories */
.cat-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; scrollbar-width: none; }
.cat-chip {
  flex: 0 0 auto; border: 1px solid #e9ecef; background: var(--card); border-radius: 20px;
  padding: 8px 14px; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.cat-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.cat-compact { margin-bottom: 0; }

/* Bento */
.bento-grid {
  display: grid; gap: 10px; margin-bottom: 12px;
  grid-template-columns: repeat(2, 1fr);
}
.bento-tile {
  background: var(--card); border-radius: var(--card-radius); padding: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.05); opacity: 0; transform: translateY(8px);
}
.bento-tile.tile-in { opacity: 1; transform: none; transition: all .35s ease; }
.tile-wide { grid-column: span 2; }
.tile-stat { text-align: center; }
.tile-stat strong { display: block; font-size: 20px; color: var(--primary); }
.tile-stat span { font-size: 11px; color: var(--text-secondary); }
.tile-title { font-size: 14px; margin-bottom: 8px; }
.quote-text { font-size: 13px; font-style: italic; color: var(--text-secondary); }
.quote-author { font-size: 12px; margin-top: 6px; text-align: right; }
.mini-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.mini-case {
  border: none; background: none; padding: 0; cursor: pointer; text-align: center;
}
.mini-case img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.mini-case span { font-size: 10px; display: block; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-more { border: none; background: none; color: var(--primary); font-size: 13px; margin-top: 8px; cursor: pointer; }

.showcase-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.showcase-head .page-title { margin-bottom: 0; }
.showcase-hint { font-size: 12px; color: var(--text-secondary); margin-bottom: 10px; }
.case-card { position: relative; }
.case-manage {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  display: flex; gap: 4px;
}
.case-act {
  width: 30px; height: 30px; border: none; border-radius: 8px;
  background: rgba(255,255,255,.92); box-shadow: 0 1px 4px rgba(0,0,0,.15);
  cursor: pointer; font-size: 14px; line-height: 1;
}
.case-act-del { background: rgba(255,235,235,.95); }
.form-field { display: block; margin-bottom: 12px; }
.form-field span { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; }
.form-input {
  width: 100%; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 10px;
  font-size: 14px; background: var(--card); color: var(--text);
}
.sf-preview { margin-bottom: 12px; text-align: center; }
.sf-preview img { max-width: 100%; max-height: 120px; border-radius: 10px; object-fit: cover; }
.modal-form .modal-box { max-width: 400px; }
.lb-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.lb-actions .btn-block { flex: 1 1 100%; }
.lb-meta { font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; }
.btn-sm { padding: 8px 12px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* M3 Showcase */
.case-grid { display: grid; gap: 10px; }
.case-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.case-card {
  background: var(--card); border-radius: var(--card-radius); overflow: hidden; border: none;
  text-align: left; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.06);
  opacity: 0; transform: translateY(10px);
}
.case-card.case-in { opacity: 1; transform: none; transition: all .35s ease; transition-delay: calc(var(--i) * 60ms); }
.case-img img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.case-info { padding: 10px; }
.case-info h3 { font-size: 14px; margin-bottom: 4px; }
.case-info p { font-size: 12px; color: var(--text-secondary); }
.case-price { color: var(--primary); font-weight: 600; font-size: 13px; }
.lightbox-img { width: 100%; border-radius: 10px; margin-bottom: 8px; }
.empty-hint { text-align: center; color: var(--text-secondary); padding: 24px; }

/* M4 Contact */
.contact-row { margin-bottom: 8px; font-size: 14px; }
.contact-row a { color: var(--primary); text-decoration: none; }
.contact-actions { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.cta-btn { animation: ctaPop 3s ease-in-out infinite; }
@keyframes ctaPop { 0%,100%{transform:scale(1)} 50%{transform:scale(1.02)} }
.contact-strip { display: flex; gap: 8px; }
.strip-btn {
  flex: 1; text-align: center; padding: 12px; border-radius: 12px; font-size: 14px;
  text-decoration: none; border: none; cursor: pointer; font-weight: 600;
}
.strip-btn.call { background: var(--primary); color: #fff; }
.strip-btn.wechat { background: #07c160; color: #fff; }
.strip-btn.nav { background: var(--secondary); color: #fff; }
.sticky-contact {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--contact-footer-h) + var(--safe-area-bottom) + 52px);
  width: calc(100% - 24px); max-width: calc(var(--content-max-width) - 24px); z-index: 80;
  background: var(--card); padding: 8px; border-radius: 14px; box-shadow: 0 4px 20px rgba(0,0,0,.12);
}
.sticky-contact.hidden { opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(20px); transition: all .3s; }
.wechat-qr { text-align: center; }
.wechat-qr img { max-width: 160px; border-radius: 8px; margin-top: 8px; }

/* M5 Hours */
.hours-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.hours-list { list-style: none; }
.hours-list li { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; border-bottom: 1px dashed #eee; }
.hours-note { font-size: 12px; color: var(--text-secondary); margin-top: 8px; }
@keyframes pulse { 50% { opacity: .55; } }

/* M6 Reviews */
.review-item { margin: 12px 0; padding-left: 10px; border-left: 3px solid var(--primary); }
.review-head { font-size: 13px; margin-bottom: 4px; }
.review-stars { color: #f5a623; margin-left: 6px; }

/* About */
.about-intro { font-size: 14px; line-height: 1.7; margin-bottom: 10px; }
.belief-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.belief-tag { background: rgba(232,119,34,.12); color: var(--primary); padding: 4px 10px; border-radius: 20px; font-size: 12px; }
.stats-row { display: flex; gap: 8px; margin-bottom: 12px; }
.stat-box { flex: 1; background: var(--card); border-radius: 12px; padding: 12px; text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.stat-box strong { display: block; font-size: 18px; color: var(--primary); }
.stat-box span { font-size: 11px; color: var(--text-secondary); }
.service-list { list-style: none; }
.service-row { display: flex; align-items: baseline; gap: 4px; font-size: 14px; padding: 6px 0; }
.svc-dots { flex: 1; border-bottom: 1px dotted #ccc; min-width: 20px; }
.svc-price { color: var(--primary); font-weight: 600; }
.svc-note { font-size: 11px; color: var(--text-secondary); margin: -4px 0 8px; list-style: none; }

/* M7 Settings */
.theme-grid, .preset-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.theme-swatch, .preset-btn {
  border: 2px solid #e9ecef; background: var(--card); border-radius: 10px; padding: 8px 12px;
  font-size: 12px; cursor: pointer;
}
.theme-swatch.active, .preset-btn.active { border-color: var(--primary); color: var(--primary); }
.swatch-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.hint { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }

/* Editor */
.edit-fab {
  position: fixed; right: 14px; bottom: calc(var(--contact-footer-h) + var(--safe-area-bottom) + 118px);
  z-index: 95; background: var(--secondary); color: #fff; border: none; border-radius: 24px;
  padding: 10px 14px; font-size: 12px; box-shadow: 0 4px 14px rgba(0,0,0,.2); cursor: pointer;
}
body.editor-active .editable-field { outline: 2px dashed var(--primary); outline-offset: 2px; cursor: pointer; }

/* P2 Poster */
.poster-preview { text-align: center; padding: 12px; background: var(--bg); border-radius: 12px; }
.poster-cover { height: 100px; background-size: cover; background-position: center; border-radius: 8px; margin-bottom: 8px; }
.poster-progress { height: 4px; background: #eee; border-radius: 2px; margin: 12px 0; overflow: hidden; }
.poster-bar { height: 100%; width: 0; background: var(--primary); transition: width 1.2s ease; }

/* Share page */
.share-main { padding: 16px; }
.share-landing-card { background: var(--card); border-radius: 16px; padding: 20px; box-shadow: 0 4px 20px rgba(0,0,0,.08); }
.share-cover { height: 120px; background-size: cover; background-position: center; border-radius: 12px; margin-bottom: 12px; }
.share-eyebrow { font-size: 13px; color: var(--text-secondary); margin-bottom: 4px; }
.share-tagline { color: var(--text-secondary); margin: 8px 0; }
.share-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0; }
.share-stat { text-align: center; background: var(--bg); padding: 10px; border-radius: 10px; }
.share-stat strong { display: block; font-size: 16px; color: var(--primary); }
.share-stat span { font-size: 11px; color: var(--text-secondary); }
.share-cta { margin: 12px 0; }
.share-qr-block { text-align: center; margin: 16px 0; }

/* Modal & Toast */
.modal-container.hidden { display: none; }
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal-box { background: var(--card); border-radius: 16px; padding: 16px; max-width: 360px; width: 100%; max-height: 85vh; overflow-y: auto; }
.modal-actions { display: flex; gap: 8px; margin-top: 12px; justify-content: flex-end; }
.toast-container { position: fixed; top: 60px; left: 50%; transform: translateX(-50%); z-index: 300; }
.toast-item {
  background: rgba(45,52,54,.92); color: #fff; padding: 10px 16px; border-radius: 20px;
  font-size: 13px; margin-bottom: 8px; opacity: 0; transform: translateY(-8px); transition: all .25s;
}
.toast-item.show { opacity: 1; transform: none; }
.toast-info { background: rgba(27,73,101,.92); }

/* Footer */
.contact-footer {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0;
  width: 100%; max-width: var(--content-max-width); background: var(--card);
  border-top: 1px solid #eee; padding: 8px 12px calc(8px + var(--safe-area-bottom)); z-index: 100;
}
.contact-footer__btns { display: flex; gap: 8px; }
.contact-footer__cta { flex: 1.2; background: var(--primary); color: #fff; text-align: center; padding: 10px; border-radius: 10px; text-decoration: none; font-size: 13px; }
.contact-footer__btn { flex: 1; background: #f1f3f5; border: none; border-radius: 10px; padding: 10px; font-size: 12px; text-decoration: none; color: var(--text); text-align: center; cursor: pointer; }
.contact-footer__brand { font-size: 10px; color: var(--text-secondary); text-align: center; margin-top: 6px; }

@media (max-width: 360px) {
  .mini-grid { grid-template-columns: repeat(2, 1fr); }
}
