/* 247tickets — shared styles */

:root {
  --brand: #FF5500;
  --brand-dark: #cc4400;
  --bg: #f5f5f5;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-muted: #666666;
  --border: #e0e0e0;
  --radius: 10px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --nav-h: 60px;
  --bnav-h: 60px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  padding-top: var(--nav-h);
  padding-bottom: var(--bnav-h);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── Nav ── */
#main-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 16px;
}

.nav-logo { flex-shrink: 0; }
.nav-logo img { height: 32px; width: auto; display: block; }

/* Center: city dropdown + category links */
.nav-center {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  min-width: 0;
  margin: 0 8px;
}

.nav-city {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23666'/%3E%3C/svg%3E") no-repeat right 8px center;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 5px 24px 5px 10px;
  font-size: 0.8rem;
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  max-width: 130px;
}

.nav-categories {
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  flex: none;
  margin-left: 4px;
}

.nav-cat {
  font-size: 0.85rem;
  color: var(--text);
  padding: 0 10px;
  white-space: nowrap;
  line-height: var(--nav-h);
  transition: color 0.15s;
}
.nav-cat:hover { color: var(--brand); }

.nav-more-wrap { position: relative; flex-shrink: 0; margin-left: 0; }
.nav-more {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0 8px;
  line-height: var(--nav-h);
  letter-spacing: 1px;
}
.nav-more:hover { color: var(--brand); }

.nav-more-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 160px;
  z-index: 500;
  overflow: hidden;
}
.nav-more-menu.open { display: block; }
.nav-more-menu a {
  display: block;
  padding: 10px 16px;
  font-size: 0.85rem;
  color: var(--text);
  white-space: nowrap;
}
.nav-more-menu a:hover { background: var(--bg); color: var(--brand); }

@media (max-width: 767px) {
  .nav-categories { display: none; }
}

.nav-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.lang-toggle { display: flex; align-items: center; gap: 4px; font-size: 0.8rem; color: var(--text-muted); }
.lang-btn { font-size: 0.8rem; color: var(--text-muted); padding: 2px 4px; border-radius: 4px; transition: color 0.15s; }
.lang-btn.active { color: var(--brand); font-weight: 700; }

.nav-login {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand);
  padding: 6px 14px;
  border: 1.5px solid var(--brand);
  border-radius: 20px;
}

.nav-user { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; font-weight: 600; }
.nav-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: var(--bg); flex-shrink: 0; }
.nav-avatar-initials { background: var(--brand); color: #fff; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

/* ── Bottom Nav ── */
#bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bnav-h);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
}

.bnav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-muted);
  transition: color 0.15s;
}
.bnav-item.active { color: var(--brand); }
.bnav-icon { font-size: 1.2rem; line-height: 1; }
.bnav-label { font-size: 0.65rem; font-weight: 500; }

/* ── Page container ── */
.page { max-width: 960px; margin: 0 auto; padding: 0 0 16px; }

/* ── Banner Carousel ── */
.hero-carousel {
  display: block !important;
  position: relative;
  overflow: hidden;
  background: #222;
  width: 100%;
  height: 42vw !important;
  min-height: 200px !important;
}

.hero-track {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: flex;
  transition: transform 0.4s ease;
}

.hero-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  display: block;
}

.hero-slide-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(20px) brightness(0.5);
  transform: scale(1.1);
}

.hero-slide-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 24px 20px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
  color: #fff;
  z-index: 2;
}

.hero-caption h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 2px; }
.hero-caption p { font-size: 0.8rem; opacity: 0.9; }

.hero-dots {
  position: absolute;
  bottom: 10px;
  right: 12px;
  display: flex;
  gap: 5px;
}

.hero-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  transition: background 0.2s, width 0.2s;
}
.hero-dot.active { background: #fff; width: 18px; border-radius: 3px; }

.hero-btn {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.3);
  color: #fff;
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
}
.hero-btn.prev { left: 10px; }
.hero-btn.next { right: 10px; }

/* ── Mobile category grid ── */
.mobile-cat-grid {
  display: none;
}
@media (max-width: 767px) {
  .mobile-cat-grid {
    display: grid;
    grid-template-rows: repeat(2, auto);
    grid-auto-flow: column;
    grid-auto-columns: 80px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    gap: 4px;
    padding: 12px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
  }
  .mobile-cat-grid::-webkit-scrollbar { display: none; }
}
.mobile-cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
}
.mobile-cat-icon {
  font-size: 1.8rem;
  line-height: 1;
}
.mobile-cat-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
}

/* ── Filters ── */
.filters {
  background: var(--surface);
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.city-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23666'/%3E%3C/svg%3E") no-repeat right 10px center;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 6px 28px 6px 12px;
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
}

.cat-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
}
.cat-pills::-webkit-scrollbar { display: none; }

.pill {
  white-space: nowrap;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
  transition: all 0.15s;
}
.pill.active {
  border-color: var(--brand);
  color: var(--brand);
  background: #fff3ee;
}

/* ── Section headers ── */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 10px;
}

.section-head h2 {
  font-size: 1rem;
  font-weight: 700;
}

.section-head a {
  font-size: 0.8rem;
  color: var(--brand);
}

/* ── Featured horizontal scroll ── */
.featured-scroll {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  overflow-x: auto;
  padding: 0 16px 12px;
  scrollbar-width: none;
}
.featured-scroll::-webkit-scrollbar { display: none; }

.card-featured {
  min-width: 200px;
  max-width: 200px;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

@media (min-width: 600px) {
  .card-featured { min-width: 240px; max-width: 240px; }
}

.card-featured .card-img {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  background: #eee;
}

.card-featured .card-body {
  padding: 10px 12px 12px;
}

.card-featured .card-title {
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-featured .card-venue {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-featured .card-price {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--brand);
}

/* ── Events grid ── */
.events-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 16px;
}

@media (min-width: 600px) {
  .events-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .events-grid { grid-template-columns: repeat(4, 1fr); }
}

.card-event {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.card-event .card-img {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  background: #eee;
}

.card-event .card-body {
  padding: 8px 10px 10px;
}

.card-event .card-title {
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-event .card-venue {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-event .card-price {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand);
}

.card-sold-out .card-img { filter: grayscale(40%); }
.card-sold-out .card-price { color: var(--text-muted); text-decoration: line-through; }

.card-coming-soon-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #f97316;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 1;
  pointer-events: none;
}

.badge-sold-out {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  background: #999;
  color: #fff;
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 4px;
  vertical-align: middle;
}

/* ── Load more ── */
.load-more-wrap {
  text-align: center;
  padding: 20px 16px 8px;
}

.btn-load-more {
  display: inline-block;
  padding: 10px 32px;
  background: var(--surface);
  border: 1.5px solid var(--brand);
  color: var(--brand);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 24px;
  transition: all 0.15s;
}
.btn-load-more:active { background: #fff3ee; }

/* ── Skeleton loaders ── */
.skeleton {
  background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: 6px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.skeleton-img {
  width: 100%;
  aspect-ratio: 3/2;
  background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}

.skeleton-body { padding: 8px 10px 10px; }
.skeleton-line { height: 12px; border-radius: 4px; margin-bottom: 6px; }
.skeleton-line.w80 { width: 80%; }
.skeleton-line.w60 { width: 60%; }
.skeleton-line.w40 { width: 40%; }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: 10px; }

/* ── Buttons ── */
.btn-primary {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 12px 32px;
  border-radius: 28px;
  border: none;
  transition: background 0.15s;
}
.btn-primary:active { background: var(--brand-dark); }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: calc(var(--bnav-h) + 12px);
  left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 0.875rem;
  white-space: nowrap;
  z-index: 999;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.toast.show { opacity: 1; }

/* ── WeChat support button ── */
#support-btn {
  position: fixed;
  bottom: calc(var(--bnav-h) + 16px);
  right: 16px;
  width: 52px;
  height: 52px;
  background: var(--brand);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 200;
  box-shadow: 0 4px 12px rgba(255,85,0,0.4);
}
#support-btn svg {
  width: 26px;
  height: 26px;
  fill: white;
}
#support-popup {
  position: fixed;
  bottom: calc(var(--bnav-h) + 80px);
  right: 16px;
  width: 220px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  padding: 20px 16px 16px;
  z-index: 201;
  text-align: center;
  display: none;
}
#support-popup.open { display: block; }
#support-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #999;
  cursor: pointer;
  line-height: 1;
}
#support-popup img {
  width: 160px;
  height: 160px;
  margin: 0 auto 10px;
  display: block;
}
#support-popup p {
  font-size: 0.8rem;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 6px;
}
.support-wechat-id {
  font-weight: 700;
  color: var(--brand) !important;
  font-size: 0.85rem !important;
}
.support-email {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-top: 8px;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}
@media (min-width: 768px) {
  #support-btn { bottom: 24px; }
  #support-popup { bottom: 88px; }
}

/* ── Site footer ─────────────────────────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 24px 16px 100px;
  font-size: 0.72rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: 24px;
}
.footer-links a, .footer-icp a {
  color: var(--text-muted);
  text-decoration: none;
}
.footer-links a:hover, .footer-icp a:hover { color: var(--brand); }
.footer-sep { margin: 0 6px; }
.footer-contact { margin: 8px 0; }
.footer-icp { margin: 6px 0; }
.footer-copyright { margin-top: 4px; }
