/* ============================================
   GoCheckin Rewards – Trending Nearby Page
   ============================================ */

/* ---- Slide-in overlay ---- */
.trending-page {
  position: absolute;
  inset: 0;
  z-index: var(--z-index-page);
  background: var(--gradient-header);
  transform: translateX(100%);
  transition: var(--transition-slide);
  will-change: transform;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.trending-page.open {
  transform: translateX(0);
}

/* ---- Fixed top ---- */
.trending-fixed {
  flex-shrink: 0;
}

/* ---- Header row: back | title | search ---- */
.trending-header {
  padding: var(--space-10) var(--space-5) 0;
  display: flex;
  align-items: center;
  gap: 0;
}

/* Glass buttons */
.trending-glass-btn {
  width: var(--space-8);
  height: var(--space-8);
  border-radius: var(--radius-2xl);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3);
  flex-shrink: 0;
  background: var(--color-button-glass);
  box-shadow: var(--shadow-glass-btn);
  color: var(--color-content-main);
  transition: var(--transition-fade);
  backdrop-filter: var(--backdrop-blur-xs);
  -webkit-backdrop-filter: var(--backdrop-blur-xs);
}

.trending-glass-btn:hover { opacity: 0.8; }

.trending-header-title {
  flex: 1;
  text-align: center;
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  color: var(--color-content-main);
  line-height: var(--line-height-xl);
}

/* ---- Filter chips (horizontal scroll, glass) ---- */
.trending-filters-wrap {
  margin-top: var(--space-5);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  padding: 0 var(--space-5);
  -webkit-overflow-scrolling: touch;
}

.trending-filters-wrap::-webkit-scrollbar { display: none; }

.trending-filters {
  display: flex;
  gap: var(--space-3);
  width: max-content;
}

.trending-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 20px var(--space-3) var(--space-5);
  border-radius: var(--radius-2xl);
  border: none;
  cursor: pointer;
  font-family: var(--font-family);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  color: var(--color-content-main);
  line-height: var(--line-height-m);
  white-space: nowrap;
  background: var(--color-button-glass);
  box-shadow: var(--shadow-glass-btn);
  backdrop-filter: var(--backdrop-blur-xs);
  -webkit-backdrop-filter: var(--backdrop-blur-xs);
  transition: var(--transition-fade);
}

.trending-filter-chip:hover { opacity: 0.8; }

.trending-filter-chip .icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ---- Scrollable store list ---- */
.trending-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  padding: var(--space-5) var(--space-5) var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  -webkit-overflow-scrolling: touch;
}

.trending-scroll::-webkit-scrollbar { display: none; }

/* ---- Store card (horizontal) ---- */
.trending-store-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding-right: var(--space-5);
  background: var(--color-on-primary);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition-fade);
}

.trending-store-card:hover { opacity: 0.9; }

/* Square thumbnail */
.trending-store-img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
  border-radius: var(--radius-xl);
  background: var(--neutral-20);
}

/* Info column */
.trending-store-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: var(--space-4) 0;
  min-width: 0;
}

.trending-store-name {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-content-main);
  line-height: var(--line-height-m);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Rating + distance row */
.trending-store-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.trending-store-star {
  width: var(--space-5);
  height: var(--space-5);
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.trending-store-score {
  font-size: var(--font-size-s);
  color: var(--color-content-main);
  line-height: var(--line-height-s);
}

.trending-store-count {
  font-size: var(--font-size-s);
  color: var(--color-content-main);
  opacity: 0.6;
  line-height: var(--line-height-s);
}

.trending-store-dot {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--color-content-main);
  opacity: 0.4;
  flex-shrink: 0;
}

.trending-store-dist {
  font-size: var(--font-size-s);
  color: var(--color-content-main);
  opacity: 0.6;
  line-height: var(--line-height-s);
}

/* Category tags row */
.trending-store-cats {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.trending-store-cat {
  font-size: var(--font-size-s);
  color: var(--color-content-main);
  line-height: var(--line-height-s);
}

.trending-store-cat-dot {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--color-content-main);
  opacity: 0.4;
  flex-shrink: 0;
}
