/* ── GLOBAL: remove blue tap flash & hide scrollbar ── */
html {
  overflow-y: scroll;
  scrollbar-width: none;       /* Firefox */
}

html::-webkit-scrollbar {
  display: none;               /* Chrome / Safari / Edge */
}

* {
  -webkit-tap-highlight-color: transparent;
}

/* ── BODY & PAGE PADDING ── */
body {
  font-family: var(--font);
  background: var(--bg);
  padding-top: calc(14px + 40px + 12px);
  padding-bottom: calc(var(--nav-h) + var(--nav-bottom) + 16px);
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── THREE FLOATING TOP PILLS ── */

.ls-pill-row {
  display: flex;
  align-items: center;
  gap: 8px;
  position: fixed;
  top: 14px;
  left: 14px;
  right: 14px;
  z-index: 100;
}

.ls-pill {
  background: #FFFFFF;
  border: 1.5px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ls-pill--circle {
  width: 40px;
  height: 40px;
  border-radius: 50px;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.12s;
}

.ls-pill--circle:hover  { background: var(--bg); }
.ls-pill--circle:active { transform: scale(0.92); }

.ls-pill--title {
  flex: 1;
  height: 40px;
  border-radius: 50px;
  gap: 7px;
  padding: 0 16px;
}

.ls-pill--title span {
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
  font-family: var(--font);
}

.ls-pill--cart { position: relative; }

.ls-cart-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: var(--yellow);
  color: var(--navy);
  font-size: 8px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  font-family: var(--font);
  line-height: 1;
}

/* ── PAGE CONTENT ── */
.ls-page-content { padding-top: 4px; }

/* ── CATEGORY FILTER STRIP ── */
.ls-cat-strip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  background: var(--bg);
}

.ls-cat-strip::-webkit-scrollbar { display: none; }

.ls-cat-pill {
  flex-shrink: 0;
  height: 34px;
  padding: 0 14px;
  border-radius: 50px;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.ls-cat-pill:hover {
  border-color: var(--teal);
  color: var(--navy);
}

.ls-cat-pill.active {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--navy);
  font-weight: 700;
}

.ls-cat-pill .cat-pill-emoji {
  font-size: 13px;
  line-height: 1;
}


.ls-search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--muted-lt);
}

.ls-search-input {
  width: 100%;
  padding: 10px 34px 10px 32px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  font-size: 13px;
  color: var(--navy);
  font-family: var(--font);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.ls-search-input:focus        { border-color: var(--teal); }
.ls-search-input::placeholder { color: var(--muted-lt); }

.ls-search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  padding: 0;
  transition: background 0.12s;
}

.ls-search-clear.visible { display: flex; }
.ls-search-clear:hover   { background: var(--muted-lt); }

/* ── SEARCH WRAP INSIDE PILL ROW ── */
.ls-search-wrap {
  position: relative;
}

.ls-pill-row .ls-search-wrap {
  flex: 1;
}

/* ── STATUS FILTER INSIDE PILL ROW ── */
.ls-pill-row .ls-status-filter {
  height: 40px;
  flex-shrink: 0;
}

/* ── STATUS FILTER TOGGLE ── */
.ls-status-filter {
  background: var(--card);
  border: 1.5px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 50px;
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--font);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.ls-status-filter.filter-open {
  background: var(--green-lt);
  border-color: var(--green);
  color: var(--green);
}

/* ══════════════════════════════════════════════
   SHOPS GRID — 2-column square cards on mobile
   ══════════════════════════════════════════════ */
.ls-shops-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 0 16px;
}

/* ── SHOP CARD (square) ── */
.shop-card {
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--card);
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  animation: shopCardIn 0.28s ease both;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  /* default border — overridden by status classes */
  border: 1.5px solid var(--border);
}

.shop-card:hover  { transform: translateY(-2px) scale(1.01); box-shadow: 0 8px 24px rgba(0,0,0,0.15); }
.shop-card:active { transform: scale(0.97); }

/* ── STATUS BORDER COLOURS ── */
.shop-card.card-open   { border-color: var(--green); }
.shop-card.card-closed { border-color: var(--red); }

/* Closed-today: red border + dimmed */
.shop-card.shop-closed-today {
  border-color: var(--red);
  opacity: 0.62;
}

/* Staggered entrance delays */
.shop-card:nth-child(1)  { animation-delay: 0.00s; }
.shop-card:nth-child(2)  { animation-delay: 0.05s; }
.shop-card:nth-child(3)  { animation-delay: 0.10s; }
.shop-card:nth-child(4)  { animation-delay: 0.15s; }
.shop-card:nth-child(5)  { animation-delay: 0.20s; }
.shop-card:nth-child(6)  { animation-delay: 0.25s; }
.shop-card:nth-child(7)  { animation-delay: 0.30s; }
.shop-card:nth-child(n+8){ animation-delay: 0.30s; }

/* ── LOGO — full-bleed background image ── */
.shop-logo-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Fallback when image fails to load */
.shop-logo-fallback-bg {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 800;
  color: var(--teal-dk);
  background: var(--teal-lt);
  font-family: var(--font);
  letter-spacing: -0.02em;
}

/* ── DARK GRADIENT OVERLAY ── */
.shop-card-overlay {
  position: absolute;
  inset: 0;
  /* heavy at bottom for readability, fades to subtle at top */
  background: linear-gradient(
    to top,
    rgba(8, 12, 20, 0.82) 0%,
    rgba(8, 12, 20, 0.32) 45%,
    rgba(8, 12, 20, 0.06) 75%,
    transparent 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px;
  box-sizing: border-box;
}

/* ── TOP ROW: inf badge + status dot ── */
.shop-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

/* ── INFO BADGE (replaces discount) ── */
.shop-inf-badge {
  background: var(--yellow);
  color: var(--navy);
  font-size: 9px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 100px;
  font-family: var(--font);
  line-height: 1.2;
  letter-spacing: 0.01em;
  max-width: 80%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── STATUS DOT (top-right corner) ── */
.shop-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
}

.shop-status-dot.dot-open   { background: var(--green); }
.shop-status-dot.dot-closed { background: var(--red); }
.shop-status-dot.dot-off    { background: rgba(255, 255, 255, 0.35); }

/* ── BOTTOM CONTENT STACK ── */
.shop-card-bottom {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ── SHOP NAME ── */
.shop-name {
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.25;
  font-family: var(--font);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* ── CATEGORY PILL (on dark overlay) ── */
.shop-category {
  display: inline-flex;
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: rgba(255, 255, 255, 0.88);
  font-size: 9px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.18);
  white-space: nowrap;
  font-family: var(--font);
  letter-spacing: 0.02em;
}

/* ── LOCATION ── */
.shop-location {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.65);
  font-family: var(--font);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── STATUS ROW: pill + hours ── */
.shop-status-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

/* ── STATUS PILL ── */
.shop-status-pill {
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font);
  flex-shrink: 0;
  line-height: 1.4;
}

.shop-status-pill.status-open {
  background: rgba(16, 185, 129, 0.22);
  color: #6EE7B7;
  border: 1px solid rgba(16, 185, 129, 0.38);
}

.shop-status-pill.status-closed {
  background: rgba(239, 68, 68, 0.22);
  color: #FCA5A5;
  border: 1px solid rgba(239, 68, 68, 0.38);
}

.shop-status-pill.status-off {
  background: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

/* ── OPERATING HOURS ── */
.shop-hours {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.52);
  font-family: var(--mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

/* ── EMPTY STATE ── */
.ls-empty-state {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 60px 24px;
}

.ls-empty-state.visible { display: flex; }

.ls-empty-emoji {
  font-size: 56px;
  line-height: 1;
  margin-bottom: 16px;
}

.ls-empty-heading {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 8px;
  font-family: var(--font);
}

.ls-empty-sub {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 240px;
  margin: 0 0 20px;
  font-family: var(--font);
}

.ls-empty-btn {
  background: var(--yellow);
  color: var(--navy);
  border: none;
  border-radius: 50px;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: opacity 0.15s;
}

.ls-empty-btn:hover { opacity: 0.88; }

/* ── ANIMATIONS ── */
@keyframes shopCardIn {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1;   transform: scale(1);   }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

.open-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #6EE7B7;
  animation: pulse-dot 2s infinite;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ── RESPONSIVE 640px ── */
@media (min-width: 640px) {
  .ls-shops-grid  {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 0 24px;
  }
}

/* ── RESPONSIVE 1024px ── */
@media (min-width: 1024px) {
  .ls-pill-row {
    max-width: 680px;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
  }

  .ls-cat-strip {
    max-width: 680px;
    margin: 0 auto;
    padding-left: 0;
    padding-right: 0;
  }

  .ls-page-content {
    max-width: 680px;
    margin: 0 auto;
  }

  .ls-shops-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
}
