/* =========================================================
   Laghuna nursery archive - design from CategoryPage.jsx
   Uses tokens from laghuna-design-tokens.css.
   ========================================================= */

/* ----- Reset within the archive shell only ----- */
.lh-archive *, .lh-archive *::before, .lh-archive *::after { box-sizing: border-box; }
.lh-archive {
  margin: 0;
  background: var(--bg-page);
  color: var(--fg-2);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.lh-archive img, .lh-archive svg { max-width: 100%; display: block; }
.lh-ic { width: 16px; height: 16px; display: inline-block; flex-shrink: 0; }

/* ─────────────────────────────────────────────  Header  ──── */
.lh-header {
  position: sticky; top: 0; z-index: 40;
  height: 72px;
  background: rgba(251, 248, 243, 0.88);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.lh-header__inner {
  max-width: var(--container-xl);
  margin: 0 auto;
  height: 100%;
  padding: 0 32px;
  display: flex; align-items: center; gap: 32px;
}
.lh-header__logo {
  display: inline-flex; align-items: center;
  text-decoration: none; color: var(--ink-900);
}
.lh-header__logo:hover { text-decoration: none; }
.lh-header__logo svg { display: block; }
.lh-header__nav {
  display: flex; gap: 4px; flex: 1;
}
.lh-navlink {
  padding: 8px 14px;
  border-radius: var(--r-md);
  font-size: 14px; font-weight: 500;
  color: var(--fg-2);
  text-decoration: none;
  transition: background var(--dur-base) var(--ease-out);
}
.lh-navlink:hover { background: var(--ink-100); text-decoration: none; }
.lh-navlink.is-active { color: var(--ink-900); background: var(--ink-100); }
.lh-navlink.is-disabled { color: var(--fg-4); cursor: default; }
.lh-navlink.is-disabled:hover { background: transparent; }
.lh-header__actions {
  display: flex; align-items: center; gap: 12px;
}
.lh-locale {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 14px;
  background: transparent; border: 0;
  font-family: var(--font-sans);
  font-size: 14px; font-weight: 500; color: var(--fg-2);
  cursor: pointer;
}

/* ─────────────────────────────────────────────  Buttons  ──── */
.lh-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  font-family: var(--font-sans); font-weight: 600;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--dur-base) var(--ease-out), border-color var(--dur-base);
  white-space: nowrap;
  letter-spacing: -0.005em;
}
.lh-btn--sm { height: 36px; padding: 0 14px; font-size: 14px; }
.lh-btn--md { height: 44px; padding: 0 18px; font-size: 15px; }
.lh-btn--lg { height: 52px; padding: 0 22px; font-size: 16px; }
.lh-btn--full { width: 100%; }
.lh-btn--primary { background: var(--teal-700); color: #fff; }
.lh-btn--primary:hover { background: var(--teal-800); color: #fff; text-decoration: none; }
.lh-btn--secondary { background: var(--white); color: var(--ink-900); border-color: var(--border-default); }
.lh-btn--secondary:hover { background: var(--ink-100); color: var(--ink-900); text-decoration: none; }

/* ─────────────────────────────────────────────  Shell  ──── */
.lh-shell {
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 24px 32px 56px;
}

/* ─────────────────────────────────────────────  Breadcrumbs  ──── */
.lh-breadcrumbs {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--fg-3);
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.lh-breadcrumbs a {
  color: var(--fg-3);
  text-decoration: none;
}
.lh-breadcrumbs a:hover { color: var(--ink-900); text-decoration: underline; }
.lh-brc-sep { color: var(--fg-4); }
.lh-brc-current { color: var(--fg-2); font-weight: 500; }

/* ─────────────────────────────────────────────  Page header  ──── */
.lh-page-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
}
.lh-page-header h1 {
  font-family: var(--font-display);
  font-size: var(--fs-h1); line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  font-weight: 500;
  margin: 0 0 8px; color: var(--ink-900);
}
.lh-page-header__meta {
  margin: 0; color: var(--fg-3); font-size: 15px;
}
.lh-page-header__count { color: var(--fg-2); font-weight: 500; }
.lh-page-header__controls {
  display: flex; align-items: center; gap: 12px;
}

/* View toggle */
.lh-viewtoggle {
  display: flex;
  border: 1px solid var(--border-default);
  border-radius: 10px;
  padding: 3px;
  background: var(--white);
}
.lh-viewtoggle button {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-700);
  border: 0;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 13px; font-weight: 500;
  text-transform: capitalize;
}
.lh-viewtoggle button.is-active { background: var(--ink-900); color: #fff; }
.lh-viewtoggle button.is-disabled { color: var(--fg-4); cursor: not-allowed; }

/* Sort form */
.lh-sortform select {
  height: 40px;
  padding: 0 36px 0 14px;
  border-radius: 10px;
  border: 1px solid var(--border-default);
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231C1917' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 12px center;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink-900);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  outline: none;
}

/* ─────────────────────────────────────────────  Chip row  ──── */
.lh-chiprow {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin: 16px 0;
}
.lh-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px;
  border-radius: var(--r-pill);
  font-family: var(--font-sans);
  font-size: 14px; font-weight: 500;
  background: var(--white);
  color: var(--ink-900);
  border: 1px solid var(--border-default);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--dur-base) var(--ease-out);
}
.lh-chip:hover { background: var(--ink-100); color: var(--ink-900); text-decoration: none; }
.lh-chip--ghost { background: var(--white); }
.lh-chip--active {
  background: var(--ink-900); color: #fff; border-color: var(--ink-900);
}
.lh-chip--active:hover { background: var(--ink-700); color: #fff; }
.lh-chip__x {
  margin-left: 4px;
  font-size: 16px; line-height: 1;
  opacity: 0.7;
}
.lh-clear {
  margin-left: 4px;
  padding: 0 12px; height: 36px;
  display: inline-flex; align-items: center;
  background: transparent; border: 0;
  color: var(--fg-3); font-size: 14px; font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}
.lh-clear:hover { color: var(--ink-900); text-decoration: underline; }
/* Hint text shown in chip row when no filters are active */
.lh-chip-hint {
  display: inline-flex; align-items: center;
  height: 36px; padding: 0 12px;
  font-size: 13px; color: var(--fg-4);
  font-style: italic;
}

/* ─────────────────────────────────────────────  Results grid  ──── */
.lh-results {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  padding-top: 8px;
}

/* ─── Sidebar filter ─── */
.lh-sidebar { position: relative; }
.lh-filters {
  position: sticky;
  top: calc(72px + 16px);
}
.lh-facet {
  padding: 20px 0;
  border-bottom: 1px solid var(--hairline);
}
.lh-facet__title {
  font-size: 14px; font-weight: 600;
  color: var(--ink-900);
  margin-bottom: 12px;
}
.lh-facet__row {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0;
  cursor: pointer;
  font-size: 14px; color: var(--fg-2);
}
.lh-facet__row input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--teal-700);
  cursor: pointer;
  margin: 0;
}
.lh-facet__label { flex: 1; }
.lh-facet__count { color: var(--fg-4); font-size: 13px; }

/* Location facet - radio-style links to the city archives */
.lh-facet__row--link { text-decoration: none; }
.lh-facet__row--link:hover .lh-facet__label { color: var(--teal-700); }
.lh-facet__row--link.is-active .lh-facet__label { color: var(--teal-700); font-weight: 600; }
.lh-facet__dot {
  width: 18px; height: 18px; flex: none;
  box-sizing: border-box;
  border-radius: 50%;
  border: 2px solid var(--hairline);
  background: #fff;
}
.lh-facet__row--link.is-active .lh-facet__dot {
  border-color: var(--teal-700);
  box-shadow: inset 0 0 0 3px #fff;
  background: var(--teal-700);
}
.lh-facet--actions {
  border-bottom: 0;
  padding-top: 24px;
  display: grid; gap: 10px;
}
.lh-link-muted {
  text-align: center;
  color: var(--fg-3); font-size: 13px;
  text-decoration: none;
}
.lh-link-muted:hover { color: var(--ink-900); text-decoration: underline; }

/* ─── Cards grid ─── */
.lh-cards-col { min-width: 0; }
.lh-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
@media (max-width: 1080px) {
  .lh-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .lh-cards { grid-template-columns: 1fr; }
  .lh-results { grid-template-columns: 1fr; }
  .lh-filters { position: static; }
}

/* ─── Card ─── */
.lh-card {
  background: var(--white);
  border: 1px solid var(--border-default);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
  box-shadow: var(--elev-1);
}
.lh-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--elev-2);
}
.lh-card__link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.lh-card__link:hover { color: inherit; text-decoration: none; }

.lh-card__image {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--cream-100) 0%, var(--ink-100) 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* SVG placeholder - sits behind the <img>. Visible whenever the image
   fails to load (onerror hides the <img>) or hasn't loaded yet. */
.lh-card__placeholder {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 64px; height: 64px;
  color: var(--ink-400);
  opacity: 0.6;
}
/* The actual photo overlays the placeholder when it loads. */
.lh-card__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
}
.lh-card__photo.is-loaded { opacity: 1; }
.lh-card__body { padding: 20px; }
.lh-card__title {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 500;
  color: var(--ink-900);
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  line-height: 1.2;
}
.lh-card__loc {
  display: flex; align-items: center; gap: 6px;
  color: var(--fg-3); font-size: 13px;
  margin-bottom: 10px;
}
.lh-card__loc .lh-ic { width: 14px; height: 14px; }
.lh-card__rating {
  display: flex; align-items: center; gap: 6px;
  font-size: 14px;
  margin-bottom: 14px;
}
.lh-card__star { width: 14px; height: 14px; color: var(--amber-500); }
.lh-card__rating-num {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--ink-900);
}
.lh-card__rating-cnt { color: var(--fg-3); }
.lh-card__badges {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 14px;
}
.lh-card__foot {
  display: flex; align-items: baseline; justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
  gap: 8px;
}
.lh-card__price-num {
  font-size: 16px; font-weight: 600; color: var(--ink-900);
  font-variant-numeric: tabular-nums;
}
.lh-card__price-sub {
  font-size: 12px; color: var(--fg-3);
}

/* ─── Pills (small inline badges) ─── */
.lh-pill {
  display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 10px;
  border-radius: var(--r-pill);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.lh-pill--cream { background: var(--cream-100); color: var(--ink-700); }
.lh-pill--teal  { background: var(--teal-50);   color: var(--teal-800); }
.lh-pill--amber { background: #FBEFD8;          color: #8A5A10; }

/* Card hero ribbon */
.lh-badge {
  position: absolute; top: 12px; left: 12px;
  display: inline-flex; align-items: center; gap: 5px;
  height: 26px; padding: 0 12px;
  border-radius: var(--r-pill);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.01em;
}
.lh-badge--amber { background: #FBEFD8; color: #8A5A10; }
.lh-badge .lh-ic { width: 12px; height: 12px; }

/* ─── Empty state ─── */
.lh-empty {
  background: var(--white);
  border: 1px solid var(--border-default);
  border-radius: var(--r-lg);
  padding: 56px 24px;
  text-align: center;
}
.lh-empty h3 {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 500;
  color: var(--ink-900); margin: 0 0 8px;
}
.lh-empty p { color: var(--fg-3); margin: 0; }

/* ─── Load more ─── */
.lh-loadmore {
  display: flex; justify-content: center;
  margin-top: 48px;
}

/* ─────────────────────────────────────────────  Footer  ──── */
.lh-footer {
  background: var(--ink-900);
  color: var(--ink-300);
  margin-top: 96px;
}
.lh-footer__inner {
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 72px 32px 32px;
}
.lh-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 56px;
}
@media (max-width: 900px) {
  .lh-footer__grid { grid-template-columns: 1fr 1fr; }
}
.lh-footer__brand {
  margin-bottom: 12px;
}
.lh-footer__brand svg { display: block; }
.lh-footer__tagline {
  color: var(--ink-400);
  font-size: 14px; line-height: 1.6;
  max-width: 280px;
  margin: 0;
}
.lh-footer__h {
  color: #fff; font-weight: 600;
  font-size: 14px;
  margin-bottom: 16px;
}
.lh-footer__list {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 10px;
}
.lh-footer__list a {
  color: var(--ink-300);
  font-size: 14px;
  text-decoration: none;
}
.lh-footer__list a:hover { color: #fff; text-decoration: underline; }
.lh-footer__bottom {
  border-top: 1px solid #2A2623;
  padding-top: 24px;
  display: flex; justify-content: space-between;
  font-size: 13px; color: var(--ink-400);
  flex-wrap: wrap; gap: 12px;
}
.lh-footer__legal { display: flex; gap: 24px; }
.lh-footer__legal a { color: var(--ink-400); text-decoration: none; }
.lh-footer__legal a:hover { color: #fff; }
