/* ==========================================================================
   Tours page
   ========================================================================== */
.tours-grid-section {
  padding: 24px 0 72px;
}

.tours-grid-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.tours-sort-select {
  display: flex;
  align-items: center;
  gap: 20px;
}

.tours-sort-select label {
  display: block;
  font-size: 14px;
}

.tours-sort-select .dropdown-input {
  position: relative;
  flex: 1;
}

.tours-sort-select .custom-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 36px;
}

.tours-sort-select svg {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}


/* ==========================================================================
   Layout & Sections
   ========================================================================== */
.tours-search-section {
  padding: 24px 0 72px;
}

.tours-search-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.tours-search-sidebar {
  position: sticky;
  top: 24px;
}

.tours-search-results {
  min-width: 0;
}

.tours-search-results-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.tours-search-results-header {
  margin: 0;
}

.tours-search-results-header .tours-search-meta {
  text-align: left;
}

.tours-search-meta {
  margin: 0;
  color: #212121;
  font-size: 18px;
  margin-bottom: 20px;
}

.tours-search-count {
  color: #6b6b6b;
  font-size: 14px;
}

.tour-search-container {
  margin-bottom: 30px;
}

.tour-search-container .search-bar-container {
  padding: 0;
  max-width: 500px;
}

.tour-search-container .search-bar-lg .search-input {
  height: 56px;
}

/* ==========================================================================
   Toolbar & Inputs
   ========================================================================== */
.tours-search-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.tours-search-toolbar-button {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  color: #212121;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}

.tours-search-toolbar-button:hover {
  border-color: #b7559b;
}

.tours-search-toolbar-button[data-price-filter-open] {
  display: none;
}

.tours-search-toolbar-button svg {
  flex: 0 0 auto;
}

.tours-search-input {
  flex: 1;
  text-align: left;
}

/* ==========================================================================
   Sort Menu Dropdown
   ========================================================================== */
.tours-search-sort {
  position: relative;
}

.tours-search-sort-menu {
  position: absolute;
  top: calc(100% + 2px);
  right: 0;
  width: 100%;
  padding: 8px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0px 10px 40px 0px rgba(0, 0, 0, 0.05);
  z-index: 20;
  min-width: 211px;
}

.tours-search-sort-menu[hidden] {
  display: none;
}

.tours-search-sort-option {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #212121;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.tours-search-sort-option:hover, 
.tours-search-sort-option.is-active {
  background: #f5f5f5;
}

.tours-search-sort-option.is-active::after {
  content: '✓';
  font-weight: 700;
}

/* ==========================================================================
   Price Filter Sidebar Component
   ========================================================================== */
.tours-price-filter {
  position: relative;
  padding: 20px;
  border: 1px solid #E7E6E6;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0px 10px 40px 0px rgba(0, 0, 0, 0.05);
}

.tours-price-filter-title {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
}

.tours-price-filter-close {
  display: none;
}

/* Range Slider */
.tours-price-filter-slider-wrap {
  margin-top: 14px;
}

.tours-price-filter-slider {
  position: relative;
  height: 30px;
  margin-bottom: 18px;
}

.tours-price-filter-track,
.tours-price-filter-range-fill {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 4px;
  border-radius: 999px;
}

.tours-price-filter-track {
  background: #e8e8e8;
}

.tours-price-filter-range-fill {
  background: #b7559b;
  left: var(--range-left, 0%);
  right: calc(100% - var(--range-right, 100%));
}

.tours-price-filter-slider input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  margin: 0;
  background: transparent;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
}

.tours-price-filter-slider input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  background: transparent;
}

.tours-price-filter-slider input[type="range"]::-moz-range-track {
  height: 4px;
  background: transparent;
}

.tours-price-filter-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  pointer-events: auto;
  width: 24px;
  height: 24px;
  margin-top: -10px;
  border-radius: 50%;
  border: 3px solid #b7559b;
  background: #fff;
  box-shadow: 0 2px 10px rgba(17, 24, 39, 0.12);
  cursor: pointer;
}

.tours-price-filter-slider input[type="range"]::-moz-range-thumb {
  pointer-events: auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 3px solid #b7559b;
  background: #fff;
  box-shadow: 0 2px 10px rgba(17, 24, 39, 0.12);
  cursor: pointer;
}

/* Price Input Fields */
.tours-price-filter-fields {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tours-price-filter-input-wrap {
  position: relative;
  flex: 1;
}

.tours-price-filter-prefix {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #212121;
  font-size: 15px;
  pointer-events: none;
}

.tours-price-filter-field {
  width: 100%;
  height: 38px;
  padding: 0 14px 0 34px;
  border: 1px solid #d8d8d8;
  border-radius: 8px;
  font-size: 15px;
  color: #212121;
  background: #fff;
}

.tours-price-filter-field:focus {
  outline: none;
  border-color: #b7559b;
}

.tours-price-filter-separator {
  color: #9a9a9a;
  font-weight: 600;
  flex: 0 0 auto;
}

.tours-price-filter-reset {
  display: inline-flex;
  margin-top: 14px;
  color: #6b6b6b;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.tours-price-filter-reset:hover {
  color: #212121;
}

/* ==========================================================================
   Grid & Tour Cards
   ========================================================================== */
.tours-search-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.tours-card:hover {
  opacity: 0.8;
}

.tour-image {
  height: 212px;
}

.tour-title {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 10px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tour-review {
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 4px;
  line-height: 1;
}

.tour-description {
  margin-top: 8px;
  font-size: 14px;
  color: #6B6B6B;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 3em;
}

.tour-footer {
  /* Hook style element */
}

.tour-price-label {
  font-size: 14px;
}

.tour-price-value {
  font-size: 15px;
  font-weight: 600;
  color: #212121;
}

.tours-search-empty {
  padding: 28px;
  background: #fff;
  border: 1px solid #E0E0E0;
  border-radius: 16px;
  color: #666;
}

/* ==========================================================================
   Responsive Media Queries
   ========================================================================== */

/* Tablets / Small Desktops */
@media (max-width: 1024px) {
  .tours-search-layout {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 20px;
  }

  .tour-image {
    height: 180px;
  }
}

/* Mobile landscape / Large Phablets */
@media (max-width: 768px) {
  .tours-grid-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .tours-sort-form {
    max-width: none;
    min-width: 0;
  }

  .tours-search-results-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .tours-search-meta {
    text-align: left;
  }

  .tours-search-layout {
    grid-template-columns: 1fr;
  }

  .tours-search-sidebar {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: none;
    padding: 0;
    background: rgba(17, 24, 39, 0.45);
  }

  .tours-search-sidebar.is-open {
    display: block;
  }

  .tours-price-filter {
    width: min(100%, 360px);
    height: 100%;
    margin-left: auto;
    border-radius: 16px 0 0 16px;
    overflow-y: auto;
  }

  .tours-price-filter-close {
    position: sticky;
    top: 0;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    padding: 0 0 12px;
    border: 0;
    background: #fff;
    color: #212121;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    z-index: 1;
  }

  .tours-search-count {
    order: 2;
  }

  .tour-search-container {
    margin-bottom: 16px;
  }

  .tours-search-toolbar {
    width: 100%;
    margin-left: 0;
    gap: 8px;
  }

  .tours-search-toolbar-button {
    height: 40px;
    font-size: 13px;
  }

  .tours-search-toolbar-button[data-price-filter-open] {
    display: inline-flex;
  }

  .tour-content {
    padding: 11px;
  }

  .tour-title {
    font-size: 15px;
  }

  .tour-price-value {
    font-size: 14px;
  }

  .tours-price-filter-reset {
    border: 1px solid #b7559b;
    padding: 6px 12px;
    border-radius: 8px;
    color: #b7559b;
    text-align: center;
  }
}

/* Mobile Portrait */
@media (max-width: 600px) {
  .tours-search-section {
    padding-top: 16px;
  }

  .tour-image {
    height: 140px;
  }

  .tour-footer {
    text-align: left;
  }

  .tours-price-filter-fields {
    gap: 8px;
  }

  .tours-search-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .tours-search-meta {
    font-size: 16px;
  }

  .tours-search-sort-menu {
    min-width: 220px;
  }
}

/* Tiny Screen Smart Phones */
@media (max-width: 320px) {
  .tours-search-grid {
    grid-template-columns: repeat(1, 1fr);
  }
}