/* ============================================
   GoCheckin Rewards – Explore Page
   ============================================ */

/* ---- Full-page tab screens (fade in/out) ---- */
.page-screen {
  position: absolute;
  inset: 0;
  z-index: 25;
  background: var(--color-surface, #f3f0f4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 44px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  /* visibility:hidden also disables descendants that re-enable pointer-events
     (e.g. the floating "Add Card" / "View Map" buttons), so a hidden page can't
     intercept taps meant for the visible page beneath it. The 0.2s delay lets
     the opacity fade-out finish before the page is fully hidden. */
  transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}

.page-screen.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transition: opacity 0.2s ease, visibility 0s;
}

/* ---- Header ---- */
.explore-header {
  padding: var(--space-5) var(--space-4) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.explore-title {
  font-size: var(--font-size-2xl, 28px);
  font-weight: var(--font-weight-bold);
  color: var(--color-content-main);
  line-height: 40px;
}

/* ---- Gradient search bar ---- */
.explore-search-wrap {
  background: linear-gradient(-76deg,
    #ffb1eb 1.4%,
    #ff9e9e 25.7%,
    #ecd316 50%,
    #8eecff 74.3%,
    #d698ff 98.6%
  );
  padding: 2px;
  border-radius: var(--radius-full);
}

.explore-search-inner {
  background: var(--color-sub-surface, #fcfcfc);
  border-radius: var(--radius-full);
  padding: 8px var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: text;
}

.explore-search-icon {
  width: 20px;
  height: 20px;
  color: var(--color-content-muted);
  flex-shrink: 0;
}

.explore-search-placeholder {
  flex: 1;
  font-size: 14px;
  color: var(--color-content-muted);
  line-height: 20px;
}

.explore-search-chevron {
  width: 20px;
  height: 20px;
  color: var(--color-content-muted);
  flex-shrink: 0;
}

/* ---- Scrollable body ---- */
.explore-scroll-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}
.explore-scroll-area::-webkit-scrollbar { display: none; }

/* ---- Section ---- */
.explore-section {
  padding: 0 var(--space-4);
  margin-bottom: 40px;
}

.explore-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 28px;
  margin-bottom: var(--space-4);
}

.explore-section-title {
  font-size: 20px;
  font-weight: var(--font-weight-bold);
  color: var(--color-content-main);
  line-height: 28px;
  white-space: nowrap;
}

.explore-section-link {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 14px;
  color: var(--color-content-muted);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-family);
  padding: 0;
  white-space: nowrap;
}

.explore-section-link .icon {
  width: 20px;
  height: 20px;
}

/* ---- Service chips ---- */
.explore-services {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
  margin: 0 calc(-1 * var(--space-4));
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}
.explore-services::-webkit-scrollbar { display: none; }

.explore-service-chip {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px 20px 8px var(--space-4);
  border: 1px solid rgba(100, 100, 108, 0.2);
  border-radius: 20px;
  background: none;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: var(--font-weight-medium, 500);
  color: var(--color-content-main);
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}

.explore-service-chip:hover { background: var(--neutral-10); }

.explore-service-chip.active {
  background: var(--color-content-main);
  border-color: var(--color-content-main);
  color: #fcfcfc;
}

.explore-service-chip .icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* ---- Horizontal scroll row ---- */
.explore-h-scroll {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
  margin: 0 calc(-1 * var(--space-4));
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}
.explore-h-scroll::-webkit-scrollbar { display: none; }

/* ---- Store card ---- */
.explore-store-card {
  flex-shrink: 0;
  width: 160px;
  border-radius: 20px;
  box-shadow: 0px 1px 2px 0px rgba(113, 113, 113, 0.1);
  display: flex;
  flex-direction: column;
  /* gap: 8px; */
  cursor: pointer;
  overflow: hidden;
}

.explore-card-photo {
  width: 100%;
  height: 160px;
  /* border-radius: 16px; */
  position: relative;
  overflow: hidden;
  background: var(--neutral-20);
  flex-shrink: 0;
}

.explore-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.explore-card-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0) 19%);
  border-radius: 16px;
  pointer-events: none;
}

.explore-card-distance {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(252, 252, 252, 0.15);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: var(--radius-full);
  padding: 4px 8px;
  z-index: 1;
}

.explore-card-distance .icon {
  width: 12px;
  height: 12px;
  color: #fcfcfc;
}

.explore-card-dist-text {
  font-size: 10px;
  color: #fcfcfc;
  line-height: 14px;
}

.explore-card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 16px 16px 16px;
  background: white;
}

.explore-card-name-row {
  /* display: flex;
  align-items: center;
  justify-content: space-between; */
}

.explore-card-name {
  font-size: 14px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-content-main);
  line-height: 20px;
  white-space: nowrap;
}

.explore-card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
}

.explore-card-stars {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  color: var(--color-content-main);
}

.explore-card-stars .star--full {
  color: var(--color-primary);
  font-size: 10px;
}

.explore-card-rating-score {
  font-size: 10px;
  color: var(--color-content-main);
  line-height: 14px;
}

.explore-card-rating-count {
  font-size: 10px;
  color: var(--color-content-main);
  opacity: 0.6;
  line-height: 14px;
}

.explore-card-address {
  font-size: 12px;
  color: var(--color-content-main);
  opacity: 0.7;
  line-height: 16px;
  white-space: nowrap;
}

.explore-card-cats {
  display: flex;
  align-items: center;
  gap: 4px;
}

.explore-card-cat {
  font-size: 12px;
  color: var(--color-content-muted);
  line-height: 16px;
  white-space: nowrap;
}

.explore-cat-dot {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--color-content-muted);
  flex-shrink: 0;
}

/* ---- Available Now card ---- */
.explore-avail-card {
  flex-shrink: 0;
  width: 280px;
  border-radius: 16px;
  box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  overflow: hidden;
  background: #fcfcfc;
}

/* Photo area */
.explore-avail-photo {
  width: 100%;
  height: 160px;
  position: relative;
  overflow: hidden;
  background: var(--neutral-20);
  flex-shrink: 0;
}

.explore-avail-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Subtle top gradient overlay */
.explore-avail-photo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0) 19%);
  pointer-events: none;
  z-index: 1;
}

/* Location + distance pill (glass) */
.explore-avail-loc {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(252, 252, 252, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 99px;
  padding: 4px 8px;
}

.explore-avail-loc .icon {
  width: 12px;
  height: 12px;
  color: #fcfcfc;
  flex-shrink: 0;
}

.explore-avail-loc-text {
  font-size: 10px;
  color: #fcfcfc;
  line-height: 14px;
  white-space: nowrap;
}

.explore-avail-loc-dot {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(252, 252, 252, 0.7);
  flex-shrink: 0;
}

/* Pagination dots */
.explore-avail-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 4px;
}

.explore-avail-dot {
  height: 6px;
  border-radius: 3px;
  background: rgba(252, 252, 252, 0.9);
}

.explore-avail-dot.active {
  width: 18px;
}

.explore-avail-dot:not(.active) {
  width: 6px;
  opacity: 0.5;
}

/* Info section */
.explore-avail-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 16px 16px;
  background: #fcfcfc;
}

/* Name + rating row */
.explore-avail-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.explore-avail-name {
  font-size: 16px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-content-main);
  line-height: 24px;
  white-space: nowrap;
}

.explore-avail-rating {
  display: flex;
  align-items: center;
  gap: 4px;
}

.explore-avail-rating-inner {
  display: flex;
  align-items: center;
  gap: 2px;
}

.explore-avail-star {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
}

.explore-avail-score {
  font-size: 12px;
  color: var(--color-content-main);
  line-height: 16px;
}

.explore-avail-count {
  font-size: 12px;
  color: var(--color-content-main);
  opacity: 0.6;
  line-height: 16px;
}

/* Categories row */
.explore-avail-cats {
  display: flex;
  align-items: center;
  gap: 4px;
}

.explore-avail-cat {
  font-size: 12px;
  color: var(--color-content-main);
  opacity: 0.6;
  line-height: 16px;
}

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

/* Slots section */
.explore-avail-slots-label {
  font-size: 14px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-content-main);
  line-height: 20px;
}

.explore-avail-slots {
  display: flex;
  gap: 8px;
}

.explore-avail-slot {
  flex: 1;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  border: 1px solid rgba(100, 100, 108, 0.2);
  background: transparent;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-content-main);
  line-height: 20px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  padding: 10px 8px;
  white-space: nowrap;
}

.explore-avail-slot.selected {
  border-color: var(--color-primary, #a528e3);
  color: var(--color-primary, #a528e3);
}

/* Book button */
.btn-avail-book {
  width: 100%;
  padding: 10px 8px;
  border-radius: 99px;
  border: none;
  background: var(--color-primary, #a528e3);
  color: #fcfcfc;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  line-height: 20px;
  transition: opacity 0.15s;
}

.btn-avail-book:hover { opacity: 0.85; }

/* ---- Deal card (Best Deal for You) ---- */
.explore-deal-card {
  flex-shrink: 0;
  width: 240px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.explore-deal-photo {
  width: 100%;
  height: 268px;
  border-radius: 24px 24px 16px 16px;
  position: relative;
  overflow: hidden;
  background: var(--neutral-20);
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 8px;
}

.explore-deal-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.explore-deal-badge {
  position: relative;
  z-index: 1;
  width: 72px;
  height: 72px;
  background: #fff;
  clip-path: polygon(50% 0%, 61% 15%, 79% 9%, 76% 27%, 93% 33%, 83% 48%, 95% 59%, 79% 62%, 80% 80%, 63% 77%, 58% 94%, 44% 84%, 32% 95%, 28% 78%, 11% 79%, 14% 61%, 0% 54%, 13% 44%, 5% 29%, 22% 27%, 21% 10%, 38% 14%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 4px;
  flex-shrink: 0;
}

.explore-deal-badge-pct {
  font-size: 16px;
  font-weight: var(--font-weight-bold);
  color: var(--color-content-main);
  line-height: 1.2;
}

.explore-deal-badge-off {
  font-size: 12px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-content-main);
  line-height: 1;
}

.explore-deal-info {
  border-radius: 12px 12px 24px 24px;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.explore-deal-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.explore-deal-store {
  font-size: 14px;
  font-weight: var(--font-weight-semibold);
  color: #fcfcfc;
  line-height: 20px;
}

.explore-deal-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #fcfcfc;
  line-height: 16px;
}

.explore-deal-rating .star--full {
  font-size: 10px;
  color: #fff;
}

.explore-deal-loc-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.explore-deal-loc {
  font-size: 12px;
  color: rgba(252, 252, 252, 0.5);
  line-height: 16px;
}

.explore-deal-loc-dot {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(252, 252, 252, 0.5);
  flex-shrink: 0;
}

.explore-deal-divider {
  width: 32px;
  height: 1px;
  background: rgba(252, 252, 252, 0.4);
}

.explore-deal-service-name {
  font-size: 16px;
  font-weight: var(--font-weight-semibold);
  color: #fcfcfc;
  line-height: 24px;
}

.explore-deal-price-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}

.explore-deal-price {
  font-size: 20px;
  font-weight: var(--font-weight-bold);
  color: #fcfcfc;
  line-height: 28px;
}

.explore-deal-price-orig {
  font-size: 14px;
  color: rgba(252, 252, 252, 0.7);
  text-decoration: line-through;
  line-height: 20px;
}

.btn-deal-book {
  width: 100%;
  padding: 10px var(--space-6);
  background: var(--color-sub-surface, #fcfcfc);
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: var(--font-weight-semibold);
  color: #1b1c20;
  cursor: pointer;
  box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
  transition: opacity 0.15s;
}
.btn-deal-book:hover { opacity: 0.9; }

/* ---- Floating View Map FAB ---- */
.view-map-fab {
  position: absolute;
  bottom: calc(var(--nav-height, 72px) + 16px);
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  pointer-events: none;
  z-index: 35;
}

.view-map-btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-primary, #a528e3);
  color: #fcfcfc;
  border: none;
  border-radius: var(--radius-full, 99px);
  padding: 8px 24px 8px 20px;
  font-family: var(--font-family);
  font-size: 14px;
  line-height: 20px;
  font-weight: var(--font-weight-semibold, 600);
  cursor: pointer;
  box-shadow: 0px 4px 16px rgba(165, 40, 227, 0.35);
  transition: opacity 0.15s;
}
.view-map-btn:hover { opacity: 0.9; }
.view-map-btn svg { flex-shrink: 0; }

/* ---- Spacer for bottom nav ---- */
.explore-bottom-spacer {
  height: 100px;
  flex-shrink: 0;
}

/* ============================================
   Search Overlay
   ============================================ */

.search-overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  background: var(--color-surface, #f3f0f4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.search-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ---- Content wrapper ---- */
.srch-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 56px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---- Search bar pill (active: purple border + pink glow) ---- */
.srch-bar-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--color-on-primary, #fcfcfc);
  border: 1px solid var(--color-border-primary, #a528e3);
  border-radius: var(--radius-full);
  padding: 12px;
  box-shadow: 0 0 0 2px #e8b9ff, 0px 1px 2px rgba(113, 113, 113, 0.1);
  flex-shrink: 0;
}

.srch-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 2px;
  cursor: pointer;
  flex-shrink: 0;
  color: var(--color-content-main);
}
.srch-back-btn svg { width: 20px; height: 20px; }

.srch-bar-text {
  flex: 1;
  display: flex;
  align-items: center;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: var(--font-weight-regular, 400);
  color: var(--color-content-main);
  line-height: 20px;
  min-width: 0;
}

/* Blinking text cursor */
.srch-cursor {
  display: inline-block;
  width: 1.5px;
  height: 16px;
  background: var(--color-content-main);
  margin-left: 1px;
  animation: srch-blink 1s step-end infinite;
  vertical-align: middle;
  flex-shrink: 0;
}
@keyframes srch-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.srch-clear-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 2px;
  cursor: pointer;
  flex-shrink: 0;
}
.srch-clear-btn svg { width: 20px; height: 20px; }

/* ---- Location pill ---- */
.srch-loc-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--color-on-primary, #fcfcfc);
  border-radius: var(--radius-full);
  padding: 12px;
  box-shadow: 0px 1px 2px rgba(113, 113, 113, 0.1);
  flex-shrink: 0;
}
.srch-loc-icon { flex-shrink: 0; width: 24px; height: 24px; }
.srch-loc-label {
  flex: 1;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: var(--font-weight-regular, 400);
  color: var(--color-content-main);
  line-height: 20px;
}
.srch-loc-clear {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 2px;
  cursor: pointer;
  flex-shrink: 0;
}
.srch-loc-clear svg { width: 20px; height: 20px; }

/* ---- Suggestion list ---- */
.srch-suggestions {
  display: flex;
  flex-direction: column;
  gap: 16px;  /* Figma: gap-16 between items */
}

.srch-item {
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

/* icon/24px/search: 24px container = 2px padding + 20px icon */
.srch-item-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  padding: 2px;
  color: var(--color-content-main);
}
.srch-item-icon svg { width: 20px; height: 20px; display: block; }

/* text row: inline-flex so prefix + query chunk sit flush */
.srch-item-text {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-family);
  font-size: 14px;
  line-height: 20px;
  color: var(--color-content-main);
  white-space: nowrap;
}
/* prefix word + space before query chunk: gap-6px in Figma */
.srch-item-text .srch-prefix {
  margin-right: 6px;
}

/* typed "Mani" = regular */
.srch-q { font-weight: var(--font-weight-regular, 400); }
/* rest = bold */
.srch-r { font-weight: var(--font-weight-bold, 700); }

