/**
 * Live Stores — homepage section + /examples directory.
 * Refined light editorial commerce (lm-* tokens).
 */

/* —— Homepage / shared section —— */
.section-live-stores {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 12% 0%, rgba(204, 251, 241, 0.4), transparent 58%),
    radial-gradient(ellipse 55% 45% at 95% 15%, rgba(254, 243, 199, 0.28), transparent 55%),
    linear-gradient(180deg, var(--lm-paper) 0%, var(--lm-cream) 48%, var(--lm-mist) 100%);
}

.section-live-stores__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.32;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.028) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, #000 15%, transparent 78%);
}

.section-live-stores__inner {
  position: relative;
  z-index: 1;
}

.section-live-stores__head {
  max-width: 40rem;
  margin-inline: auto;
  text-align: center;
}

.section-live-stores__more {
  margin: clamp(1.75rem, 3.5vw, 2.25rem) 0 0;
  text-align: center;
}

.section-live-stores--page .section-live-stores__head {
  display: none;
}

/* —— Directory —— */
.live-stores-directory {
  background: linear-gradient(180deg, var(--lm-cream) 0%, #fff 14%, #fff 100%);
  padding-bottom: clamp(0.5rem, 1.5vw, 1rem);
}

.section-live-stores--city {
  position: relative;
  scroll-margin-top: var(--landing-header-offset, 5.5rem);
  padding-block: clamp(2rem, 4vw, 2.75rem);
  background: transparent;
}

.section-live-stores--city + .section-live-stores--city {
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.live-stores-city-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
  margin-bottom: clamp(1.25rem, 2.5vw, 1.65rem);
}

.live-stores-city-head__title {
  margin: 0;
  font-family: var(--lm-font-display);
  font-size: clamp(1.4rem, 2.8vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--lm-ink);
  line-height: 1.15;
}

.live-stores-city-head__blurb {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--lm-ink-soft);
}

.live-stores-city-head__count {
  flex-shrink: 0;
  padding: 0.32rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--lm-accent-deep);
  background: var(--lm-accent-muted);
  border-radius: 999px;
}

/* —— Grid —— */
.live-stores-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.35rem);
  margin-top: clamp(1.75rem, 3.5vw, 2.5rem);
  align-items: stretch;
}

.live-stores-directory .live-stores-grid {
  margin-top: 0;
}

.live-stores-grid--compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* —— Card —— */
.live-store-card {
  min-width: 0;
  height: 100%;
}

.live-store-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 1px 2px rgba(12, 18, 34, 0.04), 0 8px 24px rgba(12, 18, 34, 0.05);
  overflow: hidden;
  transition:
    transform 0.3s var(--lm-ease-out, cubic-bezier(0.22, 1, 0.36, 1)),
    box-shadow 0.3s ease,
    border-color 0.25s ease;
}

.live-store-card__link:hover {
  transform: translateY(-5px);
  border-color: rgba(13, 148, 136, 0.28);
  box-shadow: 0 12px 32px rgba(13, 148, 136, 0.12), 0 4px 12px rgba(12, 18, 34, 0.06);
}

.live-store-card__link:focus-visible {
  outline: 2px solid var(--lm-accent, #0d9488);
  outline-offset: 3px;
}

.live-store-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  height: 11.5rem;
  min-height: 11.5rem;
  max-height: 11.5rem;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(
      145deg,
      var(--live-store-primary, #111827) 0%,
      color-mix(in srgb, var(--live-store-primary, #111827) 62%, var(--live-store-accent, #0d9488)) 100%
    );
  flex-shrink: 0;
}

.live-store-card__cover {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.45s var(--lm-ease-out, cubic-bezier(0.22, 1, 0.36, 1));
}

.live-store-card__media img.live-store-card__cover,
.live-store-card__media img.live-store-card__logo {
  max-width: none;
}

.live-store-card__cover--fallback {
  background:
    linear-gradient(
      145deg,
      var(--live-store-primary, #111827) 0%,
      color-mix(in srgb, var(--live-store-primary, #111827) 62%, var(--live-store-accent, #0d9488)) 100%
    );
}

.live-store-card__link:hover .live-store-card__cover:not(.live-store-card__cover--fallback) {
  transform: scale(1.05);
}

.live-store-card__media-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.42) 100%);
  pointer-events: none;
  z-index: 1;
}

.live-store-card__live-pill {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.62rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #047857;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

.live-store-card__live-pill::before {
  content: '';
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: #10b981;
  animation: live-store-pulse 1.8s ease infinite;
}

.live-store-card__brand {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  z-index: 3;
}

.live-store-card__logo,
.live-store-card__logo-fallback {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.75rem;
  object-fit: cover;
  display: block;
  border: 2.5px solid #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  background: #fff;
}

.live-store-card__logo-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--lm-font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  background: var(--live-store-accent, #0d9488);
}

/* Product thumbs */
.live-store-card__thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
  padding: 0.55rem 0.65rem 0;
  background: #fff;
  flex-shrink: 0;
  min-height: 4.35rem;
}

.live-store-card__thumb {
  aspect-ratio: 1;
  border-radius: 0.45rem;
  overflow: hidden;
  background: var(--lm-mist, #f1f5f9);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.live-store-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.live-store-card__link:hover .live-store-card__thumb img {
  transform: scale(1.06);
}

.live-store-card__thumb--empty {
  background: linear-gradient(145deg, #f1f5f9, #e2e8f0);
}

.live-store-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.45rem;
  padding: 0.9rem 1.05rem 1.15rem;
}

.live-store-card__meta-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
}

.live-store-card__title {
  margin: 0;
  font-family: var(--lm-font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--lm-ink);
  line-height: 1.2;
}

.live-store-card__type {
  flex-shrink: 0;
  padding: 0.22rem 0.55rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--lm-accent-deep);
  background: var(--lm-accent-muted);
  border-radius: 999px;
}

.live-store-card__desc {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--lm-ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.live-store-card__stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
}

.live-store-card__stats li {
  display: inline-flex;
  align-items: center;
}

.live-store-card__stats li:not(:last-child)::after {
  content: '·';
  margin-inline: 0.5rem;
  color: #cbd5e1;
  font-weight: 400;
}

.live-store-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: 0.45rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--lm-accent-deep);
  transition: gap 0.22s ease;
}

.live-store-card__link:hover .live-store-card__cta,
.live-store-card__link:focus-visible .live-store-card__cta {
  gap: 0.55rem;
}

@keyframes live-store-pulse {
  0%,
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.45); }
  55% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

/* —— Empty —— */
.live-stores-empty {
  max-width: 26rem;
  margin: 2rem auto 0;
  padding: 2rem 1.5rem;
  text-align: center;
  border-radius: 1rem;
  background: #fff;
  border: 1px dashed var(--lm-border, #e2e8f0);
}

.live-stores-empty__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 0.85rem;
  border-radius: 0.75rem;
  background: var(--lm-accent-muted);
  color: var(--lm-accent-deep);
}

.live-stores-empty h3 {
  margin: 0 0 0.35rem;
  font-family: var(--lm-font-display);
  font-size: 1.2rem;
  color: var(--lm-ink);
}

.live-stores-empty p {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--lm-ink-soft);
}

/* —— Hero —— */
.landing-subpage-hero--live-stores {
  position: relative;
  overflow: hidden;
  padding: clamp(5rem, 10vw, 5.75rem) 0 clamp(1.35rem, 2.5vw, 1.85rem);
  text-align: center;
  background:
    radial-gradient(ellipse 80% 55% at 50% -8%, rgba(204, 251, 241, 0.55), transparent 58%),
    radial-gradient(ellipse 42% 36% at 100% 30%, rgba(254, 243, 199, 0.3), transparent 55%),
    var(--lm-cream, #faf8f5);
}

.landing-subpage-hero--live-stores::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.26;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.03) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse 85% 70% at 50% 18%, #000 12%, transparent 75%);
}

.landing-subpage-hero--live-stores .landing-subpage-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 44rem;
  margin-inline: auto;
}

.landing-subpage-hero__title {
  margin: 0.4rem 0 0.65rem;
  font-family: var(--lm-font-display);
  font-size: clamp(1.95rem, 4.6vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--lm-ink);
  text-wrap: balance;
}

.landing-subpage-hero__lead {
  margin: 0 auto;
  max-width: 34rem;
  font-size: clamp(0.98rem, 1.7vw, 1.1rem);
  line-height: 1.6;
  color: var(--lm-ink-soft);
}

/* Search — dedicated class, no seo-landing conflict */
.live-stores-search {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  max-width: 32rem;
  margin: 1.4rem auto 0;
  padding: 0.35rem 0.35rem 0.35rem 0.85rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 1px 2px rgba(12, 18, 34, 0.04), 0 10px 28px rgba(12, 18, 34, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.live-stores-search:focus-within {
  border-color: rgba(13, 148, 136, 0.4);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.14), 0 10px 28px rgba(12, 18, 34, 0.05);
}

.live-stores-search__icon {
  display: inline-flex;
  color: #94a3b8;
  flex-shrink: 0;
}

.live-stores-search__input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
  padding: 0.65rem 0.4rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--lm-ink);
}

.live-stores-search__input::placeholder {
  color: #94a3b8;
}

.live-stores-search__btn {
  flex-shrink: 0;
  border-radius: 999px !important;
  padding-inline: 1.2rem !important;
}

/* Region chips — nav, not ul */
.live-stores-regions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin: 1.15rem auto 0;
  max-width: 40rem;
}

.live-stores-regions__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--lm-ink-soft);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(12, 18, 34, 0.03);
  transition:
    transform 0.2s var(--lm-ease-out, ease),
    border-color 0.2s ease,
    color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.live-stores-regions__chip:hover,
.live-stores-regions__chip:focus-visible {
  color: var(--lm-accent-deep);
  border-color: rgba(13, 148, 136, 0.32);
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(13, 148, 136, 0.1);
}

.live-stores-regions__chip:focus-visible {
  outline: 2px solid var(--lm-accent);
  outline-offset: 2px;
}

.live-stores-regions__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--lm-accent-deep);
  background: var(--lm-accent-muted);
  border-radius: 999px;
}

.live-stores-results-meta {
  margin: 0.85rem auto 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748b;
}

.live-stores-results-meta a {
  color: var(--lm-accent-deep);
  font-weight: 700;
  text-decoration: none;
}

.live-stores-results-meta a:hover {
  text-decoration: underline;
}

/* —— CTA —— */
.section-live-stores-cta {
  padding-top: clamp(1rem, 2vw, 1.5rem);
  padding-bottom: clamp(3rem, 6vw, 4rem);
  background: #fff;
}

.live-stores-page-cta {
  text-align: center;
  max-width: 34rem;
  margin: 0 auto;
  padding: clamp(1.85rem, 4vw, 2.5rem) clamp(1.5rem, 3vw, 2rem);
  border-radius: 1rem;
  background:
    radial-gradient(ellipse 70% 80% at 50% 0%, rgba(204, 251, 241, 0.5), transparent 65%),
    var(--lm-cream, #faf8f5);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 1px 2px rgba(12, 18, 34, 0.04);
}

.live-stores-page-cta h2 {
  margin: 0 0 0.45rem;
  font-family: var(--lm-font-display);
  font-size: clamp(1.3rem, 2.5vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--lm-ink);
}

.live-stores-page-cta p {
  margin: 0 0 1.15rem;
  color: var(--lm-ink-soft);
  font-size: 0.9375rem;
  line-height: 1.55;
}

/* —— Responsive —— */
@media (max-width: 1024px) {
  .live-stores-grid,
  .live-stores-grid--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .live-store-card__media {
    height: 10.5rem;
    min-height: 10.5rem;
  }
}

@media (max-width: 640px) {
  .live-stores-grid,
  .live-stores-grid--compact {
    grid-template-columns: 1fr;
    gap: 0.95rem;
    max-width: 24rem;
    margin-inline: auto;
  }

  .live-store-card__media {
    height: 12rem;
    min-height: 12rem;
  }

  .live-store-card__logo,
  .live-store-card__logo-fallback {
    width: 3.25rem;
    height: 3.25rem;
  }

  .live-store-card__meta-row {
    flex-wrap: wrap;
  }

  .landing-subpage-hero--live-stores {
    padding-top: clamp(4.6rem, 14vw, 5.35rem);
  }

  .live-stores-search {
    flex-wrap: wrap;
    border-radius: 1rem;
    padding: 0.55rem;
    max-width: none;
  }

  .live-stores-search__icon {
    margin-inline-start: 0.35rem;
  }

  .live-stores-search__input {
    flex: 1 1 calc(100% - 2.5rem);
    padding: 0.55rem 0.35rem;
  }

  .live-stores-search__btn {
    width: 100%;
    justify-content: center;
  }

  .live-stores-regions {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-width: none;
    padding-bottom: 0.2rem;
    mask-image: linear-gradient(90deg, #000 90%, transparent);
  }

  .live-stores-regions::-webkit-scrollbar {
    display: none;
  }

  .live-stores-regions__chip {
    flex-shrink: 0;
  }

  .live-stores-city-head {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .live-store-card__link:hover {
    transform: none;
  }

  .live-store-card__link:hover .live-store-card__cover,
  .live-store-card__link:hover .live-store-card__thumb img {
    transform: none;
  }

  .live-store-card__live-pill::before {
    animation: none;
  }

  .live-stores-regions__chip:hover,
  .live-stores-regions__chip:focus-visible {
    transform: none;
  }
}
