.all-treks-hero {
  height: 350px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-image: url("https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?w=1800&q=80");
  background-size: cover;
  background-position: center;
}

.at-hero-content h1 {
  font-family: "Playfair Display", serif;
  font-size: 48px;
  color: var(--white);
  z-index: 2;
}

.at-hero-content p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  z-index: 2;
}

.trek-filter-bar {
  background: var(--light);
  padding: 30px 60px;
  border-bottom: 1px solid var(--border);
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.filter-row::-webkit-scrollbar {
  display: none;
}
.filter-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.ftab {
  padding: 10px 18px;
  border-radius: 30px;
  border: 1.5px solid var(--border);
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  transition: all 0.2s;
  width: auto;
}
.ftab:hover {
  border-color: var(--gold);
}
.ftab.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
  font-weight: 700;
}
.ftab-more {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  font-size: 14px;
  flex-shrink: 0;
}

.trek-search-input {
  flex: 1;
  padding: 12px 20px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  outline: none;
  font-family: "Inter", sans-serif;
}

.treks-grid-section {
  padding: 60px;
}

.grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  padding: 20px;
}
.trek-card {
  flex: 0 0 calc(25% - 15px);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 3px 16px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border);
  background: var(--white);
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  cursor: pointer;
}
.trek-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.14);
}
.tk-img {
  height: 200px;
  position: relative;
  overflow: hidden;
}
.tk-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.trek-card:hover .tk-img img {
  transform: scale(1.06);
}
.tk-loc {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(15, 31, 46, 0.88);
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.tk-body {
  padding: 16px 16px 18px;
}
.tk-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
  line-height: 1.3;
}
.tk-meta span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
.tk-meta span strong {
  color: var(--text);
}
.tk-btn {
  width: 100%;
  margin-top: 14px;
  padding: 10px;
  border: 1.5px solid var(--navy);
  color: var(--navy);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  border-radius: 7px;
  transition: all 0.2s;
}
.tk-btn:hover {
  background: var(--navy);
  color: var(--gold);
}
.tk-img img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.tk-price {
  margin-top: 10px;
  font-size: 14px;
  color: var(--navy);
}

.tk-price strong {
  color: var(--teal);
  font-size: 16px;
}

/* Ensure Trek Cards from the slider work in a grid */
.grid-layout .trek-card {
  flex: none; /* Override slider flex settings */
  width: 100%;
}

/* Media Query for smaller screens */
@media (max-width: 600px) {
  .treks-grid-section {
    padding: 20px 10px;
  }
  
  .grid-layout {
    gap: 15px;
    grid-template-columns: 1fr; /* Stack cards vertically on phones */
  }
}

/* Fixing the search and filter bar for mobile */
.trek-filter-bar {
  padding: 20px;
}

.filter-row {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding-bottom: 10px;
}

/* ══════════ TREK DETAILS PAGE (Shared) ══════════ */
.trek-details-hero {
  height: 500px;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 60px;
  color: var(--white);
  background-size: cover;
  background-position: center;
}

.td-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 31, 46, 0.9) 20%, transparent 80%);
}

.td-hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.td-breadcrumbs {
  font-size: 13px;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.7);
}

.td-breadcrumbs a:hover {
  color: var(--gold);
}

.td-title-row h1 {
  font-family: "Playfair Display", serif;
  font-size: 48px;
  margin-bottom: 8px;
}

.td-info-strip {
  background: var(--white);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  margin-top: -40px;
  position: relative;
  z-index: 10;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.td-qi {
  display: flex;
  align-items: center;
  gap: 12px;
}

.qi-ico {
  font-size: 24px;
  color: var(--gold);
}

.qi-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.qi-val {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
}

.td-main-layout {
  max-width: 1200px;
  margin: 40px auto;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
  padding: 0 20px;
}

.td-tabs {
  display: flex;
  gap: 30px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 30px;
  position: sticky;
  top: 72px;
  background: var(--white);
  z-index: 100;
  padding-top: 10px;
}

.td-t {
  padding: 15px 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  border-bottom: 3px solid transparent;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  cursor: pointer;
  transition: all 0.2s;
}

.td-t.active {
  color: var(--navy);
  border-bottom-color: var(--gold);
}

.td-panel {
  display: none;
}

.td-panel.active {
  display: block;
}

.td-section-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.td-text {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 24px;
}

/* Highlights Grid */
.td-highlights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 30px;
}

.tdh-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--light);
  padding: 14px;
  border-radius: 8px;
}

.tdh-ico {
  font-size: 20px;
}

.tdh-txt {
  font-size: 14px;
  font-weight: 600;
}

/* Booking Card */
.td-booking-card {
  position: sticky;
  top: 100px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.td-price-box {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.td-price-old {
  font-size: 14px;
  color: var(--muted);
  text-decoration: line-through;
}

.td-price-now {
  font-size: 28px;
  font-weight: 900;
  color: var(--navy);
}

.td-price-now span {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}

.td-form-group {
  margin-bottom: 16px;
}

.td-form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.td-select {
  width: 100%;
  padding: 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  outline: none;
}

.td-count-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.td-counter {
  display: flex;
  align-items: center;
  gap: 15px;
  background: var(--light);
  padding: 5px 15px;
  border-radius: 30px;
}

.td-counter button {
  background: none;
  border: none;
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
}

.td-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0;
  padding-top: 15px;
  border-top: 1px dashed var(--border);
}

.td-total-label {
  font-weight: 700;
  color: var(--navy);
}

.td-total-val {
  font-size: 20px;
  font-weight: 900;
  color: var(--gold2);
}

.td-book-btn {
  width: 100%;
  background: var(--navy);
  color: var(--gold);
  border: none;
  padding: 16px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 800;
  transition: all 0.2s;
}

.td-book-btn:hover {
  background: var(--teal);
  transform: translateY(-2px);
}

@media (max-width: 1024px) {
  .td-main-layout {
    grid-template-columns: 1fr;
  }
  .td-booking-card {
    position: static;
    margin-top: 30px;
  }
}

@media (max-width: 768px) {
  .trek-details-hero {
    height: 350px;
    padding: 30px 20px;
  }
  .td-title-row h1 {
    font-size: 32px;
  }
  .td-info-strip {
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    margin-top: -30px;
  }
  .td-qi {
    width: calc(50% - 10px);
  }
  .td-tabs {
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 0;
    top: 64px; /* Matches mobile navbar height */
  }
  .td-t {
    white-space: nowrap;
    font-size: 13px;
  }
  .td-highlights-grid {
    grid-template-columns: 1fr;
  }
  .td-section-title {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .td-qi {
    width: 100%;
  }
  .td-title-row h1 {
    font-size: 26px;
  }
  .td-booking-card {
    padding: 16px;
  }
  .td-price-now {
    font-size: 24px;
  }
}