/* ==========================================================================
   LLV Shopping Portal — landing.css
   Styles for [vida_shop_landing] shortcode only.
   Depends on vida-shop.css being loaded first (shares CSS variables + tiles).
   ========================================================================== */

/* ── Wrapper ─────────────────────────────────────────────────────────────── */
.llv-landing {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  font-family: inherit;
}

/* ── Page Header ─────────────────────────────────────────────────────────── */
.llv-landing__header {
  text-align: center;
  margin-bottom: 24px;
}

.llv-landing__title {
  font-size: clamp(16px, 2.2vw, 22px);
  font-weight: 700;
  color: var(--llv-navy);
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

/* Search form */
.llv-landing__search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

.llv-landing__search-input {
  flex: 1 1 200px;
  max-width: 320px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--llv-border);
  border-radius: var(--llv-radius);
  font-size: 14px;
  color: var(--llv-text);
  background: var(--llv-white);
  outline: none;
  transition: border-color 0.15s;
}
.llv-landing__search-input:focus {
  border-color: var(--llv-navy);
}

.llv-landing__country-select {
  flex: 0 0 auto;
  height: 42px;
  padding: 0 10px;
  border: 1px solid var(--llv-border);
  border-radius: var(--llv-radius);
  font-size: 14px;
  color: var(--llv-text);
  background: var(--llv-white);
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s;
}
.llv-landing__country-select:focus {
  border-color: var(--llv-navy);
}

.llv-landing__search-btn {
  height: 42px;
  padding: 0 22px;
  background: var(--llv-navy);
  color: var(--llv-white);
  border: none;
  border-radius: var(--llv-radius);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}
.llv-landing__search-btn:hover {
  background: var(--llv-gold);
}

/* ── Section shared ──────────────────────────────────────────────────────── */
.llv-landing__section {
  margin-bottom: 40px;
}

/* ── Most Click Section ──────────────────────────────────────────────────── */
.llv-most-click__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--llv-gold);
}

.llv-most-click__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--llv-navy);
  margin: 0;
  white-space: nowrap;
}

/* Compact A-Z nav inside the Most Click header */
.llv-az-nav--compact {
  flex: 1 1 auto;
  margin-bottom: 0;
  padding: 0;
  border-bottom: none;
  gap: 3px;
}

.llv-az-nav--compact .llv-az-nav__btn {
  width: 30px;
  height: 30px;
  font-size: 13px;
}

/* Most-Click grid uses same tile styles but auto-cols */
.llv-merchant-grid--most-click {
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 480px) {
  .llv-merchant-grid--most-click { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 700px) {
  .llv-merchant-grid--most-click { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 900px) {
  /* Show up to most_click_limit columns, capped at 5 */
  .llv-merchant-grid--most-click { grid-template-columns: repeat(5, 1fr); }
}

/* ── All Store Section ───────────────────────────────────────────────────── */
.llv-all-stores__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--llv-navy);
  margin: 0 0 16px;
}

/* Grid inherits existing .llv-merchant-grid responsive rules */

/* ── Merchant tile tweaks for landing ───────────────────────────────────── */
.llv-landing .llv-merchant-tile__name {
  font-weight: 600;
  font-size: 13px;
  color: var(--llv-navy);
  margin-bottom: 4px;
  line-height: 1.3;
}

.llv-landing .llv-merchant-tile__name a {
  color: inherit;
  text-decoration: none;
}
.llv-landing .llv-merchant-tile__name a:hover {
  text-decoration: underline;
  color: var(--llv-gold);
}

.llv-landing .llv-merchant-tile__rate {
  font-size: 13px;
  color: var(--llv-navy);
  margin-bottom: 8px;
}

.llv-landing .llv-merchant-tile__link {
  font-size: 12px;
  font-weight: 600;
  color: var(--llv-navy);
  text-decoration: underline;
  margin-top: auto;
}
.llv-landing .llv-merchant-tile__link:hover {
  color: var(--llv-gold);
}

/* Loading state for AJAX grid refresh */
#llv-store-grid.llv-is-loading {
  opacity: 0.4;
  pointer-events: none;
  transition: opacity 0.2s;
}

/* ── Mobile adjustments ──────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .llv-most-click__header {
    flex-direction: column;
    align-items: flex-start;
  }
  .llv-az-nav--compact {
    width: 100%;
  }
  .llv-landing__search-form {
    flex-direction: column;
    align-items: stretch;
  }
  .llv-landing__search-input,
  .llv-landing__country-select,
  .llv-landing__search-btn {
    max-width: none;
    width: 100%;
  }
}
