/* ==========================================================================
   MACHU PICCHU TRAVEL CATALEYA — DESTINATIONS LISTING PAGE
   Hybrid layout: category tabs + filterable grid (Category / Price / Duration).
   Brand tokens inherited from app.css (:root --tayra-*).
   ========================================================================== */

.dest-page {
  background-color: var(--tayra-color-bg);
  font-family: var(--tayra-font-body);
  color: var(--tayra-color-body);
}

/* ---------- HERO BANNER ---------- */
.dest-hero {
  background-size: cover;
  background-position: center;
  padding: 6.5rem 0 4.5rem;
  text-align: center;
  color: var(--tayra-color-white);
}

.dest-hero-title {
  font-family: var(--tayra-font-heading);
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  margin: 0 0 0.85rem;
  color: var(--tayra-color-white);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

.dest-breadcrumbs {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--tayra-font-heading);
  font-size: 0.85rem;
  font-weight: 600;
}

.dest-breadcrumbs a {
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.2s;
}

.dest-breadcrumbs a:hover { color: var(--tayra-color-secondary); }
.dest-breadcrumbs .bc-sep { color: var(--tayra-color-secondary); }
.dest-breadcrumbs .bc-current { color: var(--tayra-color-white); }

/* ---------- SHELL ---------- */
.dest-shell {
  padding-top: 2.5rem;
  padding-bottom: 5rem;
}

/* ---------- CATEGORY TABS ---------- */
.dest-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--tayra-color-border);
}

.dest-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--tayra-color-surface);
  border: 1.5px solid var(--tayra-color-border);
  color: var(--tayra-color-heading);
  font-family: var(--tayra-font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.5rem 1.05rem;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.22s ease;
}

.dest-tab:hover {
  border-color: var(--tayra-color-secondary);
  color: var(--tayra-color-primary);
  transform: translateY(-1px);
}

.dest-tab.is-active {
  background: var(--tayra-color-primary);
  border-color: var(--tayra-color-primary);
  color: var(--tayra-color-white);
  box-shadow: 0 6px 16px rgba(11, 122, 62, 0.25);
}

.dest-tab-count {
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(11, 122, 62, 0.1);
  color: var(--tayra-color-primary);
  padding: 0.05rem 0.5rem;
  border-radius: 50px;
  min-width: 1.5rem;
  text-align: center;
}

.dest-tab.is-active .dest-tab-count {
  background: rgba(255, 255, 255, 0.22);
  color: var(--tayra-color-white);
}

/* ---------- INTRO ---------- */
.dest-intro {
  max-width: 820px;
  margin: 0 0 2rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--tayra-color-muted);
}

/* ---------- LAYOUT ---------- */
.dest-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 2.25rem;
  align-items: start;
}

/* ---------- SIDEBAR ---------- */
.dest-filter-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  justify-content: center;
  background: var(--tayra-color-primary);
  color: var(--tayra-color-white);
  border: none;
  font-family: var(--tayra-font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  cursor: pointer;
  margin-bottom: 1rem;
}

.dest-filters {
  background: var(--tayra-color-surface);
  border: 1px solid var(--tayra-color-border);
  border-radius: 18px;
  padding: 1.5rem 1.4rem;
  box-shadow: 0 8px 25px rgba(11, 122, 62, 0.05);
  position: sticky;
  top: 1.5rem;
}

.dest-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--tayra-color-divider);
}

.dest-filter-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--tayra-font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--tayra-color-heading);
  margin: 0;
}

.dest-filter-title svg { color: var(--tayra-color-primary); }

.dest-reset {
  background: none;
  border: none;
  color: var(--tayra-color-muted);
  font-family: var(--tayra-font-body);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.2s;
}

.dest-reset:hover { color: var(--tayra-color-error); }

.dest-filter-block {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--tayra-color-divider);
}
.dest-filter-block:last-child { border-bottom: none; padding-bottom: 0.25rem; }

.dest-filter-heading {
  font-family: var(--tayra-font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--tayra-color-primary);
  margin: 0 0 0.85rem;
}

/* Checkbox lists */
.dest-check-list { list-style: none; margin: 0; padding: 0; }

.dest-check-item { margin-bottom: 0.35rem; }

.dest-check-item label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--tayra-color-body);
  padding: 0.35rem 0.4rem;
  border-radius: 8px;
  transition: background 0.18s;
}

.dest-check-item label:hover { background: var(--tayra-color-surface-alt); }

.dest-check-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 1.5px solid var(--tayra-color-border);
  border-radius: 5px;
  background: var(--tayra-color-surface);
  cursor: pointer;
  position: relative;
  transition: all 0.18s;
}

.dest-check-item input[type="checkbox"]:checked {
  background: var(--tayra-color-primary);
  border-color: var(--tayra-color-primary);
}

.dest-check-item input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1.5px;
  width: 5px;
  height: 9px;
  border: solid var(--tayra-color-white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.dest-check-name { flex: 1; }

.dest-check-count {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--tayra-color-muted);
  background: var(--tayra-color-surface-alt);
  padding: 0.05rem 0.5rem;
  border-radius: 50px;
}

.dest-check-item input:checked ~ .dest-check-count {
  background: rgba(11, 122, 62, 0.12);
  color: var(--tayra-color-primary);
}

/* ---------- PRICE DUAL RANGE ---------- */
.dest-price-slider { padding: 0.25rem 0.15rem; }

.dest-range-track {
  position: relative;
  height: 5px;
  background: var(--tayra-color-border);
  border-radius: 50px;
  margin: 0.6rem 0 1.1rem;
}

.dest-range-fill {
  position: absolute;
  height: 100%;
  background: var(--tayra-color-secondary);
  border-radius: 50px;
}

.dest-range-inputs {
  position: relative;
  height: 0;
}

.dest-range {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  top: -1.65rem;
  left: 0;
  width: 100%;
  height: 5px;
  background: none;
  pointer-events: none;
  margin: 0;
}

.dest-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  pointer-events: auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--tayra-color-white);
  border: 3px solid var(--tayra-color-primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.dest-range::-moz-range-thumb {
  pointer-events: auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--tayra-color-white);
  border: 3px solid var(--tayra-color-primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.dest-price-values {
  display: flex;
  justify-content: space-between;
  font-family: var(--tayra-font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--tayra-color-heading);
}

/* ---------- MAIN ---------- */
.dest-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
  padding: 0.9rem 1.15rem;
  background: var(--tayra-color-surface);
  border: 1px solid var(--tayra-color-border);
  border-radius: 14px;
}

.dest-results-count {
  margin: 0;
  font-size: 0.9rem;
  color: var(--tayra-color-muted);
}

.dest-results-count #dest-visible-count {
  font-family: var(--tayra-font-heading);
  font-weight: 800;
  color: var(--tayra-color-primary);
}

.dest-toolbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dest-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.dest-sort-label {
  font-size: 0.82rem;
  color: var(--tayra-color-muted);
  white-space: nowrap;
}

.dest-sort select {
  font-family: var(--tayra-font-body);
  font-size: 0.85rem;
  color: var(--tayra-color-heading);
  border: 1.5px solid var(--tayra-color-border);
  border-radius: 10px;
  padding: 0.45rem 2rem 0.45rem 0.8rem;
  background: var(--tayra-color-surface)
    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='%230B7A3E' stroke-width='3'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E")
    no-repeat right 0.7rem center;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.dest-sort select:focus {
  outline: none;
  border-color: var(--tayra-color-secondary);
}

.dest-view-toggle {
  display: inline-flex;
  border: 1.5px solid var(--tayra-color-border);
  border-radius: 10px;
  overflow: hidden;
}

.dest-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 36px;
  background: var(--tayra-color-surface);
  border: none;
  color: var(--tayra-color-muted);
  cursor: pointer;
  transition: all 0.18s;
}

.dest-view-btn + .dest-view-btn { border-left: 1.5px solid var(--tayra-color-border); }
.dest-view-btn:hover { color: var(--tayra-color-primary); }
.dest-view-btn.is-active { background: var(--tayra-color-primary); color: var(--tayra-color-white); }

/* ---------- GRID ---------- */
.dest-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}

/* Cards hidden by filtering / pagination */
.dest-card[hidden] { display: none !important; }

.dest-card { position: relative; }

/* Card eyebrow (category) */
.dest-card-eyebrow {
  display: inline-block;
  font-family: var(--tayra-font-heading);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tayra-color-secondary-dark);
  margin-bottom: 0.4rem;
}

/* Card meta (location + duration) */
.dest-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  margin: 0 0 0.7rem;
}

.dest-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--tayra-color-muted);
}

.dest-meta-item svg { color: var(--tayra-color-primary-light); flex-shrink: 0; }

/* Sale / featured badge variants */
.dest-badge-sale { background: var(--tayra-color-secondary) !important; color: #143321 !important; }
.dest-badge-featured { background: var(--tayra-color-warning) !important; color: #3a2c00 !important; }

/* Card overlay link (whole card clickable) */
.tayra-card-overlay-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.dest-card .tour-card-title a,
.dest-card .tour-card-btn { position: relative; z-index: 2; }
/* Keep the wishlist absolutely positioned (top-right); only lift its stacking. */
.dest-card .dest-wishlist { z-index: 2; }

/* Ensure price html doesn't inherit odd colors */
.dest-card .price-value .woocommerce-Price-amount {
  font-family: var(--tayra-font-heading);
  font-weight: 800;
  color: var(--tayra-color-primary);
}
.dest-card .price-value del { color: var(--tayra-color-muted); font-size: 0.85rem; opacity: 0.7; }
.dest-card .price-value ins { text-decoration: none; }

/* Wishlist heart */
.dest-wishlist {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: none;
  cursor: pointer;
  color: var(--tayra-color-muted);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  transition: all 0.2s;
}

.dest-wishlist svg { fill: none; stroke: currentColor; stroke-width: 2; }
.dest-wishlist:hover { color: var(--tayra-color-error); transform: scale(1.08); }
.dest-wishlist.is-active { color: var(--tayra-color-error); }
.dest-wishlist.is-active svg { fill: currentColor; stroke: currentColor; }

/* ---------- LIST VIEW ---------- */
.dest-grid.is-list { grid-template-columns: 1fr; gap: 1.25rem; }

.dest-grid.is-list .dest-card {
  flex-direction: row;
}

.dest-grid.is-list .tour-card-media {
  width: 320px;
  flex: 0 0 320px;
  aspect-ratio: auto;
}

.dest-grid.is-list .tour-card-body { padding: 1.5rem 1.75rem; }
.dest-grid.is-list .tour-card-excerpt { -webkit-line-clamp: 2; }

/* ---------- EMPTY STATE ---------- */
.dest-empty {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--tayra-color-muted);
}
.dest-empty svg { color: var(--tayra-color-border); margin-bottom: 1rem; }
.dest-empty h3 {
  font-family: var(--tayra-font-heading);
  font-size: 1.35rem;
  color: var(--tayra-color-heading);
  margin: 0 0 0.5rem;
}
.dest-empty p { margin: 0 0 1.5rem; }
.dest-empty .top-bar-cta-btn { margin-left: 0; }

/* ---------- LOAD MORE ---------- */
.dest-load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 2.75rem;
}

.dest-load-more { margin-left: 0; padding: 0.7rem 1.9rem; }
.dest-load-more[hidden] { display: none; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
  .dest-layout { grid-template-columns: 240px 1fr; gap: 1.75rem; }
  .dest-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .dest-layout { grid-template-columns: 1fr; }
  .dest-filter-toggle { display: flex; }
  .dest-filters {
    position: static;
    display: none;
  }
  .dest-filters.is-open { display: block; }
  .dest-grid.is-list .tour-card-media { width: 200px; flex-basis: 200px; }
}

@media (max-width: 620px) {
  .dest-hero { padding: 5rem 0 3.25rem; }
  .dest-grid { grid-template-columns: 1fr; }
  .dest-toolbar { flex-direction: column; align-items: stretch; }
  .dest-toolbar-right { justify-content: space-between; }
  .dest-grid.is-list .dest-card { flex-direction: column; }
  .dest-grid.is-list .tour-card-media { width: 100%; flex-basis: auto; aspect-ratio: 4 / 3.2; }
}

/* ==========================================================================
   Category hubs (inc/hub.php): key data, comparison table, guide, FAQ
   ========================================================================== */
.hub-section {
  padding: 3rem 0;
  background: linear-gradient(180deg, #EEF9E6 0%, #FFFFFF 55%);
}

.hub-faq {
  background: #FFFFFF;
  padding-top: 2.5rem;
}

.hub-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
  margin: 0 0 2.5rem;
  padding: 0;
  list-style: none;
}

.hub-stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.1rem 1.25rem;
  background: var(--tayra-color-surface);
  border: 1px solid var(--tayra-color-border);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(30, 107, 26, 0.08);
}

.hub-stat-value {
  font-family: var(--tayra-font-heading);
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--tayra-color-primary-dark);
}

.hub-stat-label {
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--tayra-color-muted);
}

.hub-title {
  margin: 0 0 1.25rem;
  font-family: var(--tayra-font-heading);
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--tayra-color-heading);
}

.hub-table-wrap {
  overflow-x: auto;
  background: var(--tayra-color-surface);
  border: 1px solid var(--tayra-color-border);
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(30, 107, 26, 0.10);
}

.hub-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  line-height: 1.5;
}

.hub-table th,
.hub-table td {
  padding: 1rem 1.1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--tayra-color-divider);
}

.hub-table thead th {
  background: var(--tayra-color-surface-alt);
  font-family: var(--tayra-font-heading);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tayra-color-primary-dark);
  white-space: nowrap;
}

.hub-table tbody tr:last-child th,
.hub-table tbody tr:last-child td { border-bottom: 0; }

.hub-table tbody th a {
  font-family: var(--tayra-font-heading);
  font-weight: 700;
  color: var(--tayra-color-heading);
  text-decoration: none;
}

.hub-table tbody th a:hover { color: var(--tayra-color-primary); }

.hub-price { white-space: nowrap; }
.hub-price strong { display: block; font-size: 1.05rem; color: var(--tayra-color-primary-dark); }
.hub-price span { display: block; font-size: 0.78rem; color: var(--tayra-color-muted); }

.hub-row-link {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--tayra-color-primary);
  text-decoration: none;
}

.hub-body {
  max-width: 820px;
  margin-top: 2.75rem;
  font-size: 0.98rem;
  line-height: 1.75;
  color: var(--tayra-color-body);
}

.hub-body h2 {
  margin: 2.25rem 0 0.75rem;
  font-family: var(--tayra-font-heading);
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--tayra-color-heading);
}

.hub-body h2:first-child { margin-top: 0; }
.hub-body ul { padding-left: 1.2rem; }
.hub-body li { margin-bottom: 0.4rem; }
.hub-body a { color: var(--tayra-color-primary-dark); font-weight: 600; }

.hub-faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 860px;
}

.hub-faq-item {
  background: var(--tayra-color-surface);
  border: 1px solid var(--tayra-color-border);
  border-radius: 16px;
}

.hub-faq-item summary {
  position: relative;
  padding: 1rem 3rem 1rem 1.25rem;
  font-family: var(--tayra-font-heading);
  font-weight: 700;
  color: var(--tayra-color-heading);
  cursor: pointer;
  list-style: none;
}

.hub-faq-item summary::-webkit-details-marker { display: none; }

.hub-faq-item summary::after {
  content: '+';
  position: absolute;
  top: 50%;
  right: 1.1rem;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--tayra-color-primary);
}

.hub-faq-item[open] summary::after { content: '−'; }

.hub-faq-answer {
  padding: 0 1.25rem 1.1rem;
  line-height: 1.7;
  color: var(--tayra-color-body);
}

.hub-faq-answer p { margin: 0 0 0.6rem; }
.hub-faq-answer p:last-child { margin-bottom: 0; }

/* Phones: each row becomes a card */
@media (max-width: 760px) {
  .hub-section { padding: 2.25rem 0; }
  .hub-table-wrap { overflow: visible; background: none; border: 0; box-shadow: none; }
  .hub-table thead { display: none; }
  .hub-table,
  .hub-table tbody,
  .hub-table tr,
  .hub-table th,
  .hub-table td { display: block; width: 100%; }
  .hub-table tr {
    margin-bottom: 1rem;
    background: var(--tayra-color-surface);
    border: 1px solid var(--tayra-color-border);
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(30, 107, 26, 0.08);
    overflow: hidden;
  }
  .hub-table th,
  .hub-table td { padding: 0.7rem 1rem; }
  .hub-table tbody th { background: var(--tayra-color-surface-alt); }
  .hub-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--tayra-color-muted);
  }
  .hub-price { white-space: normal; }
}
