*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --red: #e60012;
  --red-light: #ff4d4f;
  --orange: #ff6a00;
  --text: #1a1a1a;
  --text-secondary: #666;
  --text-muted: #999;
  --border: #eee;
  --bg: #f5f5f5;
  --tab-height: 56px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  padding-bottom: calc(var(--tab-height) + var(--safe-bottom));
}

.page {
  max-width: 480px;
  margin: 0 auto;
  background: #fff;
}

.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 750 / 520;
  overflow: hidden;
  background: #222;
}

.hero-slider {
  width: 100%;
  height: 100%;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.hero-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
}

.dot.active {
  background: #fff;
  width: 8px;
  border-radius: 4px;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 3;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.35) 0%, transparent 100%);
}

.location-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  color: #fff;
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 500;
}

.icon-loc {
  width: 16px;
  height: 16px;
}

.icon-arrow {
  width: 14px;
  height: 14px;
  opacity: 0.8;
}

.search-bar {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 20px;
  padding: 7px 14px;
  min-width: 0;
}

.icon-search {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-bar input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: var(--text);
  width: 100%;
}

.search-bar input::placeholder {
  color: var(--text-muted);
}

.category-tabs {
  display: flex;
  align-items: stretch;
  background: #fff;
  padding: 16px 0;
}

.category-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  padding: 0 12px;
}

.category-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  color: var(--text);
}

.category-icon svg {
  width: 100%;
  height: 100%;
}

.category-text h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.category-text p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.category-divider {
  width: 1px;
  background: var(--border);
  align-self: stretch;
  margin: 4px 0;
}

.promo-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 12px 10px;
  padding: 10px 14px;
  background: linear-gradient(90deg, #e60012, #ff3344);
  border-radius: 8px;
}

.promo-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.promo-text {
  flex: 1;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.promo-btn {
  flex-shrink: 0;
  border: none;
  background: #fff8e7;
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 20px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  -webkit-tap-highlight-color: transparent;
}

.filter-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.2s;
}

.filter-bar.is-stuck {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.filter-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 4px;
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.filter-item:active {
  color: var(--red);
}

.merchant-list {
  background: #fff;
}

.merchant-list--empty {
  min-height: calc(100vh - 320px);
  min-height: calc(100dvh - 320px);
}

.merchant-card {
  display: flex;
  align-items: stretch;
  gap: 12px;
  padding: 14px 12px;
  border-bottom: 1px dashed #e8e8e8;
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.merchant-card:active {
  background: #fafafa;
}

.merchant-card:last-child {
  border-bottom: none;
}

.merchant-thumb {
  width: 88px;
  min-height: 88px;
  align-self: stretch;
  border-radius: 6px;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
}

.merchant-body {
  flex: 1;
  min-width: 0;
}

.merchant-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.merchant-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.merchant-hours {
  font-size: 12px;
  color: var(--orange);
  white-space: nowrap;
  flex-shrink: 0;
}

.merchant-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.merchant-meta span + span::before {
  content: '·';
  margin: 0 4px;
  color: #ccc;
}

.package-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.package-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  line-height: 1.4;
}

.package-tag {
  flex-shrink: 0;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  white-space: nowrap;
}

.package-price {
  flex-shrink: 0;
  color: var(--red);
  font-weight: 700;
  font-size: 14px;
}

.package-name {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 480px;
  margin: 0 auto;
  height: calc(var(--tab-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  display: flex;
  align-items: center;
  background: #fff;
  border-top: 1px solid var(--border);
  z-index: 200;
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 10px;
  padding: 4px 0;
  -webkit-tap-highlight-color: transparent;
}

.tab-item svg {
  width: 22px;
  height: 22px;
}

.tab-item.active {
  color: var(--red);
}

.tab-item.active svg {
  stroke: var(--red);
  fill: var(--red);
}

.tab-item:not(.active) svg {
  fill: none;
}

.loading-tip {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 14px;
}
