/* ==========================================================================
   Himalayan Trails — inner page chrome shared by every non-home route
   ========================================================================== */

.ht-page-head {
  padding-block: clamp(2.5rem, 1.75rem + 3vw, 4.5rem) clamp(1.5rem, 1rem + 2vw, 2.5rem);
  background: var(--ht-surface-alt);
  border-bottom: 1px solid var(--ht-border-soft);
}

.ht-page-head .ht-section-heading {
  margin-top: var(--ht-space-3);
}

/* ---- Breadcrumbs --------------------------------------------------------- */

.ht-breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ht-space-2);
  font-size: var(--ht-text-sm);
  color: var(--ht-text-muted);
}

.ht-breadcrumbs li + li::before {
  content: "/";
  margin-right: var(--ht-space-2);
  color: var(--ht-stone-400);
}

.ht-breadcrumbs a:hover {
  color: var(--ht-accent);
}

.ht-breadcrumbs [aria-current="page"] {
  color: var(--ht-text-soft);
  font-weight: 500;
}

/* ---- Listing controls ---------------------------------------------------- */

.ht-filters {
  margin-bottom: var(--ht-space-6);
}

.ht-result-count {
  margin-bottom: var(--ht-space-8);
  font-size: var(--ht-text-base);
  color: var(--ht-text-muted);
}

.ht-empty {
  display: grid;
  gap: var(--ht-space-5);
  justify-items: start;
  max-width: 40rem;
  padding: var(--ht-space-10) var(--ht-space-8);
  background: var(--ht-surface-alt);
  border: 1px dashed var(--ht-border);
  border-radius: var(--ht-radius-lg);
}

.ht-empty .ht-section-intro {
  margin-top: 0;
}

/* ---- In-progress page ----------------------------------------------------
   A real, styled page rather than a 404 for routes whose module is scheduled
   for a later phase. Deliberately honest about what it is. */

.ht-pending {
  display: grid;
  gap: var(--ht-space-6);
  justify-items: start;
  max-width: 46rem;
  padding-block: clamp(3rem, 2rem + 5vw, 6rem);
}

.ht-pending__list {
  display: grid;
  gap: var(--ht-space-3);
}

.ht-pending__list li {
  display: flex;
  align-items: flex-start;
  gap: var(--ht-space-3);
  color: var(--ht-text-soft);
}

.ht-pending__list svg {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
  color: var(--ht-accent);
}

/* ---- Live filtering ------------------------------------------------------ */

/* The submit button is only redundant once the filter module has taken over. */
.ht-filters[data-live="true"] .ht-filters__submit {
  display: none;
}

.ht-results-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--ht-space-3);
  margin-bottom: var(--ht-space-8);
}

.ht-results-bar .ht-result-count {
  margin-bottom: 0;
}

.ht-filters__reset {
  border-bottom-color: transparent;
}

.ht-filters__reset:not(:disabled) {
  border-bottom-color: currentColor;
}

.ht-filters__reset:disabled {
  color: var(--ht-text-muted);
  cursor: default;
  opacity: 0.6;
}

/* Loading state: the previous results stay readable and in place, dimmed, so
   the page never collapses to a spinner and jumps. */
[data-results][aria-busy="true"] {
  opacity: 0.45;
  transition: opacity var(--ht-duration-fast) var(--ht-ease);
  pointer-events: none;
}

[data-results] {
  transition: opacity var(--ht-duration-base) var(--ht-ease);
}

[data-results]:focus {
  outline: none;
}

.ht-results-error {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ht-space-3);
  margin-top: var(--ht-space-6);
  padding: var(--ht-space-4) var(--ht-space-5);
  border-radius: var(--ht-radius-md);
  background: var(--ht-danger-soft);
  color: var(--ht-danger);
  font-size: var(--ht-text-base);
}

.ht-results-error .ht-link {
  color: inherit;
}

/* ==========================================================================
   Secondary pages — rentals, gallery, safety, about, reviews, FAQs, contact
   ========================================================================== */

/* ---- Filter chips (albums, treks) ---------------------------------------- */

.ht-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ht-space-2);
  margin-bottom: var(--ht-space-8);
}

.ht-chip-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 var(--ht-space-5);
  border: 1px solid var(--ht-border-soft);
  border-radius: 999px;
  background: var(--ht-surface-card);
  color: var(--ht-text);
  font-size: var(--ht-text-sm);
  font-weight: 600;
  text-decoration: none;
  transition: border-color var(--ht-duration-fast) var(--ht-ease), background-color var(--ht-duration-fast) var(--ht-ease);
}

.ht-chip-link:hover { border-color: var(--ht-stone-400); }

.ht-chip-link.is-active {
  background: var(--ht-pine-900);
  border-color: var(--ht-pine-900);
  color: var(--ht-text-inverse);
}

/* ---- Gallery page grid ---------------------------------------------------- */

.ht-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--ht-space-4);
}

@media (min-width: 48rem) {
  .ht-gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ht-space-5); }
}

@media (min-width: 80rem) {
  .ht-gallery-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.ht-gallery-grid .ht-gallery-tile { width: 100%; }

.ht-gallery-tile__caption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 2;
  padding: var(--ht-space-6) var(--ht-space-4) var(--ht-space-3);
  background: linear-gradient(180deg, rgb(11 22 17 / 0) 0%, rgb(11 22 17 / 0.72) 100%);
  color: var(--ht-text-inverse);
  font-size: var(--ht-text-sm);
  text-align: left;
  pointer-events: none;
}

.ht-credits-note {
  margin-top: var(--ht-space-8);
  font-size: var(--ht-text-sm);
  color: var(--ht-text-soft);
}

/* ---- Rental page ----------------------------------------------------------- */

.ht-rental--page {
  flex-direction: column;
  align-items: stretch;
  gap: var(--ht-space-4);
}

.ht-rental--page .ht-rental__label { align-items: flex-start; }
.ht-rental--page .ht-rental__price { align-self: flex-end; }
.ht-rental__desc--full { white-space: normal; overflow: visible; text-overflow: clip; display: block; }
.ht-rental__photo { border-radius: var(--ht-radius-md); }

/* ---- Safety cards ---------------------------------------------------------- */

.ht-safety-card {
  padding: var(--ht-space-6);
  background: var(--ht-surface-card);
  border: 1px solid var(--ht-border-soft);
  border-radius: var(--ht-radius-lg);
}

.ht-safety-card__icon {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: var(--ht-space-4);
  border-radius: 50%;
  background: var(--ht-pine-100, #e3eee7);
  color: var(--ht-pine-700, #1f4a36);
}

.ht-safety-card__title {
  margin: 0 0 var(--ht-space-2);
  font-family: var(--ht-font-display);
  font-size: var(--ht-text-xl);
  font-weight: 500;
  line-height: 1.25;
}

.ht-safety-card p { margin: 0; color: var(--ht-text-soft); line-height: var(--ht-leading-normal); }

/* ---- FAQ page --------------------------------------------------------------- */

.ht-faq-page { display: grid; gap: var(--ht-space-8); }

@media (min-width: 62rem) {
  .ht-faq-page { grid-template-columns: 14rem minmax(0, 1fr); gap: var(--ht-space-12); align-items: start; }
  .ht-faq-page__nav { position: sticky; top: calc(var(--ht-header-main-h) + var(--ht-space-6)); }
}

.ht-faq-page__nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--ht-space-2); }

@media (min-width: 62rem) { .ht-faq-page__nav ul { flex-direction: column; } }

.ht-faq-page__nav a {
  display: block;
  padding: var(--ht-space-2) var(--ht-space-3);
  border-radius: var(--ht-radius-sm);
  color: var(--ht-text-soft);
  font-weight: 600;
  text-decoration: none;
}

.ht-faq-page__nav a:hover { background: var(--ht-surface-alt, var(--ht-stone-100)); color: var(--ht-text); }

.ht-faq-page__group + .ht-faq-page__group { margin-top: var(--ht-space-12); }
.ht-faq-page__group .ht-section-heading--sm { margin-bottom: var(--ht-space-4); }

/* ---- Contact page ---------------------------------------------------------- */

.ht-contact__cards { display: grid; gap: var(--ht-space-3); }

.ht-contact__card {
  display: flex;
  align-items: center;
  gap: var(--ht-space-4);
  padding: var(--ht-space-4) var(--ht-space-5);
  background: var(--ht-surface-card);
  border: 1px solid var(--ht-border-soft);
  border-radius: var(--ht-radius-md);
  color: var(--ht-text);
  text-decoration: none;
  line-height: 1.3;
}

.ht-contact__card svg { flex: none; width: 1.5rem; height: 1.5rem; color: var(--ht-clay-600); }
a.ht-contact__card:hover { border-color: var(--ht-stone-400); }

.ht-contact__label {
  display: block;
  font-size: var(--ht-text-2xs);
  font-weight: 600;
  letter-spacing: var(--ht-tracking-caps);
  text-transform: uppercase;
  color: var(--ht-text-soft);
}

.ht-map {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ht-space-4);
  min-height: 12rem;
  margin-top: var(--ht-space-6);
  padding: var(--ht-space-6);
  border: 1px dashed var(--ht-border-soft);
  border-radius: var(--ht-radius-lg);
  background: var(--ht-surface-card);
}

.ht-map iframe { width: 100%; height: 24rem; border: 0; border-radius: var(--ht-radius-md); }

/* ---- Credits --------------------------------------------------------------- */

.ht-credits { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--ht-space-3); }
.ht-credits li { padding-bottom: var(--ht-space-3); border-bottom: 1px solid var(--ht-border-soft); }
.ht-credits__file { display: block; font-weight: 600; }
.ht-credits__meta { display: block; font-size: var(--ht-text-sm); color: var(--ht-text-soft); }

/* ---- Review extras ----------------------------------------------------------- */

.ht-quote__avatar { display: block; width: 3rem; height: 3rem; border-radius: 50%; overflow: hidden; flex: none; }
.ht-quote__avatar img { width: 100%; height: 100%; object-fit: cover; }
.ht-quote__stars { display: block; color: var(--ht-clay-600); font-size: var(--ht-text-sm); letter-spacing: 0.1em; }

/* ---- Pager ------------------------------------------------------------------- */

.ht-pager { margin-top: var(--ht-space-10); }
.ht-pager__nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--ht-space-3); }
.ht-pager__summary { color: var(--ht-text-soft); font-size: var(--ht-text-sm); }
.ht-pager .is-disabled { opacity: 0.5; pointer-events: none; }

/* ---- Customer account ---------------------------------------------------- */

.ht-account__card {
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  background: var(--ht-surface-card);
  border: 1px solid var(--ht-border-soft);
  border-radius: var(--ht-radius-lg);
  box-shadow: 0 1px 2px rgb(11 22 17 / 0.05), 0 24px 48px -28px rgb(11 22 17 / 0.25);
}

.ht-account__form { display: grid; gap: var(--ht-space-4); margin-top: var(--ht-space-6); }
.ht-account__switch { margin-top: var(--ht-space-5); font-size: var(--ht-text-sm); color: var(--ht-text-soft); }
.ht-account__actions { display: flex; flex-wrap: wrap; gap: var(--ht-space-3); margin-top: var(--ht-space-5); }
.ht-account__actions form { display: contents; }

.ht-check { display: flex; align-items: center; gap: var(--ht-space-3); font-size: var(--ht-text-sm); cursor: pointer; }
.ht-check input { width: 1.1rem; height: 1.1rem; accent-color: var(--ht-clay-600); }

.ht-field__error.is-visible { display: block; color: var(--ht-danger); font-size: var(--ht-text-sm); margin-top: var(--ht-space-1); }
.ht-field__help { margin: var(--ht-space-1) 0 0; font-size: var(--ht-text-xs); color: var(--ht-text-soft); }

.ht-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--ht-space-3);
  margin: 0 0 var(--ht-space-5);
  padding: var(--ht-space-4) var(--ht-space-5);
  border-radius: var(--ht-radius-md);
  border: 1px solid var(--ht-border-soft);
  background: var(--ht-surface-card);
  font-size: var(--ht-text-base);
}
.ht-notice p { margin: 0; }
.ht-notice--ok { border-color: var(--ht-success-soft, #dcfce7); background: var(--ht-success-soft, #dcfce7); color: var(--ht-success, #15803d); }
.ht-notice--warn { border-color: var(--ht-warning-soft, #fef3c7); background: var(--ht-warning-soft, #fef3c7); color: var(--ht-warning, #92400e); }
.ht-notice--error { border-color: var(--ht-danger-soft, #fee2e2); background: var(--ht-danger-soft, #fee2e2); color: var(--ht-danger, #b91c1c); }

.ht-bookings { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--ht-space-3); }
.ht-bookings__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--ht-space-3);
  padding: var(--ht-space-4) var(--ht-space-5);
  background: var(--ht-surface-card);
  border: 1px solid var(--ht-border-soft);
  border-radius: var(--ht-radius-md);
}
.ht-bookings__trek { margin: 0; font-weight: 600; }
.ht-bookings__meta { margin: var(--ht-space-1) 0 0; font-size: var(--ht-text-sm); color: var(--ht-text-soft); }
.ht-bookings__ref { font-family: ui-monospace, Menlo, Consolas, monospace; }

.ht-book-gate { display: grid; gap: var(--ht-space-3); }
.ht-book-gate__title { margin: 0; font-weight: 600; }
.ht-book-gate__text { margin: 0; color: var(--ht-text-soft); font-size: var(--ht-text-sm); }

.ht-utility-account { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 600; }

/* Collection chips on the listing head, and social links on the contact page. */
.ht-collections { display: flex; flex-wrap: wrap; gap: var(--ht-space-2); margin-top: var(--ht-space-5); }
.ht-collections__chip {
  display: inline-flex; align-items: center; min-height: 2.5rem; padding: 0 1rem;
  border: 1px solid var(--ht-border); border-radius: 999px;
  background: var(--ht-surface, #fff); color: var(--ht-text); text-decoration: none;
  font-size: var(--ht-text-sm); font-weight: 600; transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.ht-collections__chip:hover { border-color: var(--ht-pine-700, #1f4d3a); }
.ht-collections__chip.is-active { background: var(--ht-pine-900, #12231b); border-color: var(--ht-pine-900, #12231b); color: #fff; }
.ht-contact__social { display: flex; flex-wrap: wrap; gap: var(--ht-space-2); margin-top: var(--ht-space-4); }
.ht-contact__social a {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; padding: 0 .9rem 0 .7rem;
  border: 1px solid var(--ht-border); border-radius: 999px; color: var(--ht-text); text-decoration: none; font-size: var(--ht-text-sm); font-weight: 600;
}
.ht-contact__social a:hover { border-color: var(--ht-pine-700, #1f4d3a); }
.ht-contact__social .ht-i { width: 20px; height: 20px; }
