/**
 * Tours Archive Modern Design
 * Referans görsele uygun, widget'larla uyumlu
 * @package WP_SEO_Tour_System
 */

/* ===== RESET & BASE ===== */
.tours-archive-wrapper {
  width: 100%;
  background: #f1f7fb;
  padding: 40px 0;
  min-height: 0;
  overflow-x: clip;
}

.tours-archive-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== HEADER ===== */
.tours-archive-header {
  text-align: center;
  margin-bottom: 50px;
}

.tours-archive-title {
  font-size: 48px;
  font-weight: 700;
  color: #2c3e50;
  margin: 0 0 12px;
  letter-spacing: -0.5px;
}

.tours-archive-subtitle {
  font-size: 18px;
  color: #7f8c8d;
  margin: 0;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* ===== CATEGORY SEO (footer area) ===== */
.tours-category-seo {
  width: 100%;
  margin-top: clamp(32px, 5vw, 56px);
  padding: clamp(28px, 4vw, 48px) 0 clamp(40px, 6vw, 64px);
  background: #f1f7fb;
  border-top: 1px solid rgba(44, 62, 80, 0.08);
  box-sizing: border-box;
}

.tours-category-seo__inner {
  width: 100%;
  max-width: var(--wp-seo-tour-content-max, 1400px);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
  text-align: left;
  box-sizing: border-box;
}

.tours-category-seo__title {
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 700;
  color: #2c3e50;
  margin: 0 0 14px;
  letter-spacing: -0.5px;
  line-height: 1.25;
}

.tours-category-seo__description {
  font-size: clamp(15px, 1.6vw, 18px);
  color: #5d6d7e;
  line-height: 1.7;
  max-width: 100%;
}

.tours-category-seo__description p {
  margin: 0 0 1em;
}

.tours-category-seo__description p:last-child {
  margin-bottom: 0;
}

.tours-category-seo__description a {
  color: #007bff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tours-category-seo__description a:hover,
.tours-category-seo__description a:focus-visible {
  color: #7a1a2f;
}

.tours-category-seo__description strong,
.tours-category-seo__description b {
  font-weight: 700;
  color: #2c3e50;
}

.tours-category-seo__description ul,
.tours-category-seo__description ol {
  margin: 0 0 1em;
  padding-left: 1.25em;
}

/* ===== MAIN LAYOUT ===== */
.tours-archive-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: start;
}

/* ===== SIDEBAR FILTERS ===== */
@media (min-width: 1025px) {
  .tours-mobile-toolbar,
  .tour-filter-backdrop,
  .filters-drawer-footer {
    display: none !important;
  }

  .tours-filters-sidebar {
    position: sticky;
    top: 20px;
    transform: none;
    visibility: visible;
    pointer-events: auto;
  }
}

.tours-filters-sidebar {
  position: sticky;
  top: 20px;
  height: fit-content;
}

.filters-panel {
  background: #ffffff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid #ecf0f1;
}

.filters-title {
  font-size: 20px;
  font-weight: 700;
  color: #2c3e50;
  margin: 0;
}

.clear-all-btn {
  background: #007bff;
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.clear-all-btn:hover,
.clear-all-btn:focus-visible {
  background: #7a1a2f;
  transform: translateY(-1px);
}

/* Filter Section */
.filter-section {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #ecf0f1;
}

.filter-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.filter-section-title {
  font-size: 15px;
  font-weight: 600;
  color: #34495e;
  margin: 0 0 12px;
  display: block;
}

.filter-section-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Filter Items */
.filter-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
  font-size: 14px;
  color: #555;
}

.filter-item:hover {
  background: #f8f9fa;
}

.filter-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #007bff;
  flex-shrink: 0;
}

.filter-label {
  flex: 1;
}

.filter-count {
  font-size: 12px;
  color: #999;
  font-weight: 500;
}

/* Price range (noUiSlider) */
.price-slider-container {
  padding: 4px 8px 8px;
}

.price-slider-values {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #2c3e50;
}

.tour-price-slider {
  margin: 8px 6px 4px;
}

.tours-archive-wrapper .noUi-target {
  background: #e8ecef;
  border: none;
  box-shadow: none;
  height: 6px;
}

.tours-archive-wrapper .noUi-connect {
  background: #007bff;
}

.tours-archive-wrapper .noUi-handle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #007bff;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(153, 32, 59, 0.35);
  cursor: pointer;
}

.tours-archive-wrapper .noUi-handle::before,
.tours-archive-wrapper .noUi-handle::after {
  display: none;
}

.tours-grid.is-loading {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.tour-filter-error {
  grid-column: 1 / -1;
  padding: 12px 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #991b1b;
  font-size: 14px;
}

/* ===== MAIN CONTENT ===== */
.tours-archive-main {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.tours-archive-layout {
  min-width: 0;
}

.tours-results-header {
  margin-top: 6px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.tours-count {
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
}

.tours-desktop-sort-btn {
  display: none;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #111827;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tours-desktop-sort-btn:hover,
.tours-desktop-sort-btn:focus-visible {
  background: #fdf2f4;
  border-color: #007bff;
  color: #007bff;
  outline: none;
}

.tours-desktop-sort-btn svg {
  width: 18px;
  height: 18px;
}

@media (min-width: 1025px) {
  .tours-desktop-sort-btn {
    display: inline-flex;
  }
}

@media (max-width: 1024px) {
  .tours-desktop-sort-btn {
    display: none !important;
  }
}

.tours-view-toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* ===== TOURS GRID ===== */
.tours-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: -24px;
  margin-bottom: 40px;
  align-items: stretch;
  width: 100%;
  min-width: 0;
}

/* Grid cells — equal width, no overflow blowout */
.tours-grid > .tour-card-dual {
  grid-column: auto;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

/* Tour Card Item */
.tour-card-item {
  width: 100%;
  max-width: 100%;
  height: 100%;
  display: flex;
  min-height: 0;
  min-width: 0;
}

.tour-card-dual {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
}

.tour-card-dual__grid {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
}

.tour-card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 420px;
  box-sizing: border-box;
}

/* List view uses horizontal layout — no fixed card height */
.tours-view--list .tour-card {
  min-height: 0;
  height: auto;
}

.tour-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Tour Card Image */
.tour-card-image {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #e0e0e0;
}

.tour-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.tour-card:hover .tour-card-img {
  transform: scale(1.05);
}

.tour-card-img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
}

/* Tour Badge */
.tour-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.tour-badge-sold {
  background: rgba(220, 53, 69, 0.9);
  color: #ffffff;
}

/* Tour Card Body */
.tour-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tour-card-title {
  font-size: 18px;
  font-weight: 700;
  color: #2c3e50;
  margin: 0 0 12px;
  line-height: 1.4;
  min-height: 2.8em;
}

.tour-card-title a {
  color: #2c3e50;
  text-decoration: none;
  transition: color 0.2s ease;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.tour-card-title a:hover {
  color: #8b7355;
}

/* Tour Meta */
.tour-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #7f8c8d;
  flex-wrap: wrap;
}

.tour-category-badge {
  background: #f0f4ff;
  color: #8b7355;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 12px;
}

.tour-duration-info {
  display: flex;
  align-items: center;
  gap: 4px;
}

.icon-clock {
  flex-shrink: 0;
}

/* Tour Description */
.tour-card-description {
  font-size: 14px;
  color: #555;
  line-height: 1.5;
  margin: 0 0 16px;
  flex: 1;
}

.tour-card-tooltips {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 4.35em;
  overflow: hidden;
}

.tour-card-tooltips li {
  position: relative;
  padding-left: 14px;
  font-size: 13px;
  line-height: 1.45;
  color: #5a6c7d;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
}

.tour-card-tooltips li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #007bff;
}

/* Tour Card Footer */
.tour-card-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid #ecf0f1;
  margin-top: auto;
  flex-shrink: 0;
}

.tour-price-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

/* Discount block — archive cards */
.tour-price-deal {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(153, 32, 59, 0.08) 0%, rgba(153, 32, 59, 0.03) 100%);
  border: 1px solid rgba(153, 32, 59, 0.18);
  max-width: 100%;
}

.tour-price-deal__badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #007bff;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.4;
}

.tour-price-deal__amounts {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 8px;
}

.tour-price-deal__was {
  font-size: 13px;
  color: #95a5a6;
  text-decoration: line-through;
  font-weight: 500;
}

.tour-price-deal__now {
  font-size: 22px;
  font-weight: 800;
  color: #007bff;
  line-height: 1.1;
}

.tour-price-deal__save {
  font-size: 11px;
  font-weight: 600;
  color: #007bff;
  background: rgba(153, 32, 59, 0.1);
  padding: 3px 8px;
  border-radius: 6px;
}

.price-label {
  font-size: 12px;
  color: #7f8c8d;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.price-value {
  font-size: 20px;
  font-weight: 700;
  color: #007bff;
}

/* Book Button */
.tour-book-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #007bff;
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.tour-book-btn:hover {
  background: #7a1a2f;
  transform: translateX(2px);
}

.icon-arrow {
  flex-shrink: 0;
}

/* Empty State */
.tours-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: #f1f7fb;
  border-radius: 12px;
}

.tours-empty-state p {
  font-size: 18px;
  color: #7f8c8d;
  margin: 0;
}

/* ===== PAGINATION ===== */
.tours-pagination {
  margin-top: clamp(28px, 4vw, 48px);
  width: 100%;
}

.tours-pagination .navigation,
.tours-pagination nav {
  width: 100%;
}

.tours-pagination .nav-links {
  display: flex;
  justify-content: center;
}

.tours-pagination ul.page-numbers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 1.5vw, 10px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.tours-pagination ul.page-numbers li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tours-pagination .page-numbers a,
.tours-pagination .page-numbers span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 clamp(12px, 2vw, 16px);
  border: 2px solid #007bff;
  border-radius: 10px;
  background: #007bff;
  color: #ffffff;
  text-decoration: none;
  font-size: clamp(14px, 1.6vw, 16px);
  font-weight: 700;
  line-height: 1.2;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.tours-pagination .page-numbers a:hover,
.tours-pagination .page-numbers a:focus-visible {
  background: #7a1a2f;
  border-color: #7a1a2f;
  color: #ffffff;
  transform: translateY(-1px);
}

.tours-pagination .page-numbers .current {
  background: #7a1a2f;
  border-color: #7a1a2f;
  color: #ffffff;
  cursor: default;
}

.tours-pagination .page-numbers .dots {
  min-width: auto;
  padding: 0 6px;
  border: none;
  background: transparent;
  color: #007bff;
  font-weight: 600;
}

.tours-pagination .page-numbers .prev,
.tours-pagination .page-numbers .next {
  gap: 4px;
  white-space: nowrap;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .tours-archive-title {
    font-size: 36px;
  }

  .tours-archive-layout {
    grid-template-columns: 240px 1fr;
    gap: 30px;
  }

  .tours-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

/* Mobile filter toolbar & drawer */
.tours-mobile-toolbar {
  display: none;
}

/* Sort drawer/backdrop: never show on desktop; mobile opens via .is-open */
.tours-sort-drawer {
  display: none;
}

/* Sort option list — base styles (desktop popover + mobile drawer) */
.tours-sort-drawer__body {
  padding: 12px 14px 14px;
  background: #ffffff;
}

.tours-sort-group {
  margin: 8px 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tours-sort-sep {
  height: 1px;
  background: #eef2f7;
  margin: 10px 0;
}

.tours-sort-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 8px;
  border-radius: 10px;
  cursor: pointer;
  box-sizing: border-box;
  transition: background 0.15s ease;
}

.tours-sort-option:hover {
  background: #f3f4f6;
}

.tours-sort-option input[type="radio"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #007bff;
}

.tours-sort-option__label {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.35;
}

/* Desktop sort dropdown (solid panel, anchored to Sort button) */
/* NOTE: never use inset/top/left with !important here — JS sets position via inline styles */
@media (min-width: 1025px) {
  .tours-sort-drawer.is-desktop-popover {
    display: block !important;
    position: fixed !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    pointer-events: none;
    transform: none !important;
  }
}

.tours-sort-drawer.is-desktop-popover .tours-sort-drawer__panel {
  pointer-events: auto;
  width: 100%;
  max-width: 300px;
  margin: 0;
  background: #ffffff !important;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.16);
  overflow: hidden;
}

.tours-sort-drawer.is-desktop-popover .tours-sort-drawer__header {
  display: none;
}

.tours-sort-drawer.is-desktop-popover .tours-sort-drawer__body {
  padding: 12px 14px 14px;
  background: #ffffff !important;
}

.tour-sort-backdrop {
  display: none;
}

.tours-sort-drawer[hidden] {
  display: none !important;
}

.tour-filter-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(44, 62, 80, 0.45);
  z-index: 10090;
  opacity: 0;
  transition: opacity 0.25s ease;
  touch-action: none;
}

.tour-filter-backdrop.is-visible {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

.tour-filter-backdrop:not(.is-visible) {
  pointer-events: none;
}

.tour-sort-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(44, 62, 80, 0.45);
  z-index: 10090;
  opacity: 0;
  transition: opacity 0.25s ease;
  touch-action: none;
}

.tour-sort-backdrop.is-visible {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

.tour-sort-backdrop:not(.is-visible) {
  pointer-events: none;
}

.filters-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filters-drawer-close {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #e0e6ea;
  border-radius: 8px;
  background: #fff;
  color: #2c3e50;
  cursor: pointer;
}

.filters-drawer-close:hover,
.filters-drawer-close:focus-visible {
  border-color: #007bff;
  color: #007bff;
}

.filters-drawer-footer {
  display: none;
}

.filters-apply-btn {
  width: 100%;
  min-height: 48px;
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  background: #007bff;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.filters-apply-btn:hover,
.filters-apply-btn:focus-visible {
  background: #7a1a2f;
}

/* Tablet + phone: drawer filters (desktop keeps sidebar in grid) */
@media (max-width: 1024px) {
  .tours-archive-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .tours-mobile-toolbar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
  }

  .tours-mobile-toolbar__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .tours-mobile-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 18px;
    border: 2px solid #007bff;
    border-radius: 10px;
    background: #fff;
    color: #007bff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    align-self: flex-start;
  }

  .tours-mobile-sort-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid #e0e6ea;
    border-radius: 12px;
    background: #fff;
    color: #2c3e50;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
  }

  .tours-mobile-sort-btn:hover,
  .tours-mobile-sort-btn:focus-visible {
    border-color: #007bff;
    color: #007bff;
    outline: none;
  }

  .tours-sort-drawer {
    position: fixed;
    inset: var(--tour-filter-drawer-top, 0px) 0 0 0;
    z-index: 10100;
    display: none;
    padding: 12px 12px 18px;
    box-sizing: border-box;
  }

  .tours-sort-drawer.is-open {
    display: block;
  }

  .tours-sort-drawer__panel {
    max-width: 520px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.16);
    overflow: hidden;
  }

  .tours-sort-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
  }

  .tours-sort-drawer__title {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: #1e3a5f;
  }

  .tours-sort-drawer__close {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid #e0e6ea;
    background: #fff;
    color: #2c3e50;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
    transition: border-color 0.2s ease, color 0.2s ease;
  }

  .tours-sort-drawer__close:hover,
  .tours-sort-drawer__close:focus-visible {
    border-color: #007bff;
    color: #007bff;
    outline: none;
  }

  .tours-sort-drawer__body {
    padding: 14px 16px 16px;
  }

  .tours-sort-group {
    margin: 10px 0 8px;
    font-size: 13px;
    font-weight: 800;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .tours-sort-sep {
    height: 1px;
    background: #eef2f7;
    margin: 12px 0;
  }

  .tours-sort-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s ease;
  }

  .tours-sort-option:hover {
    background: #f3f4f6;
  }

  .tours-sort-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #007bff;
  }

  .tours-sort-option__label {
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
  }

  .tours-mobile-filter-btn:hover,
  .tours-mobile-filter-btn:focus-visible {
    background: #007bff;
    color: #fff;
  }

  .tours-mobile-filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 11px;
    background: #007bff;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
  }

  .tours-mobile-categories {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    mask-image: linear-gradient(90deg, #000 92%, transparent);
  }

  .tours-category-chip {
    flex: 0 0 auto;
    padding: 8px 14px;
    border: 1px solid #dce4ea;
    border-radius: 20px;
    background: #fff;
    color: #34495e;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
  }

  .tours-category-chip.is-active,
  .tours-category-chip:hover,
  .tours-category-chip:focus-visible {
    border-color: #007bff;
    background: #007bff;
    color: #fff;
  }

  .tour-filter-backdrop {
    z-index: 10090;
  }

  #tour-filters-drawer.tours-filters-sidebar,
  .tours-filters-sidebar.filter-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    right: auto;
    width: min(92vw, 380px);
    max-width: 380px;
    height: 0;
    max-height: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    z-index: 10100;
    transform: none;
    transition: left 0.28s ease, box-shadow 0.28s ease, height 0s 0.28s;
    overflow: hidden;
    visibility: hidden;
    opacity: 1;
    pointer-events: none;
    display: block !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    box-shadow: none;
  }

  #tour-filters-drawer.tours-filters-sidebar.is-portaled.is-open,
  .tours-filters-sidebar.filter-sidebar.is-portaled.is-open {
    top: var(--tour-filter-drawer-top, 0);
    height: calc(100dvh - var(--tour-filter-drawer-top, 0px));
    max-height: calc(100dvh - var(--tour-filter-drawer-top, 0px));
  }

  #tour-filters-drawer.tours-filters-sidebar.is-open,
  .tours-filters-sidebar.filter-sidebar.is-open {
    left: 0;
    height: 100dvh;
    max-height: 100dvh;
    visibility: visible;
    pointer-events: auto;
    box-shadow: 4px 0 24px rgba(15, 23, 42, 0.18);
    transition: left 0.28s ease, box-shadow 0.28s ease;
  }

  .tours-filters-sidebar .filters-panel {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    max-height: 100%;
    border-radius: 0;
    padding-bottom: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tours-filters-sidebar .filters-drawer-footer {
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin-top: auto;
  }

  .filters-drawer-footer {
    display: block;
    flex-shrink: 0;
    padding: 16px 24px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #ecf0f1;
    background: #fff;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
  }

  .tours-filters-sidebar .filter-option {
    min-height: 44px;
    padding: 6px 0;
    align-items: center;
  }

  .tours-filters-sidebar .filter-checkbox {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }

  .tours-filters-sidebar .tour-price-slider {
    padding: 8px 4px 16px;
    touch-action: none;
  }

  /* Do not use overflow:hidden on body — breaks position:fixed drawer on iOS Safari */
  body.tour-filters-drawer-open {
    touch-action: none;
  }

  html.tour-filters-drawer-open {
    overscroll-behavior: none;
  }
}

@media (max-width: 768px) {
  .tours-archive-container {
    padding: 0 15px;
  }

  .tours-archive-header {
    margin-bottom: 30px;
  }

  .tours-archive-title {
    font-size: 28px;
  }

  .tours-archive-subtitle {
    font-size: 16px;
  }

  .tours-category-seo__inner {
    padding-left: max(15px, env(safe-area-inset-left, 0px));
    padding-right: max(15px, env(safe-area-inset-right, 0px));
  }

  .tours-category-seo__title {
    font-size: 26px;
    margin-bottom: 12px;
  }

  .tours-category-seo__description {
    font-size: 15px;
    line-height: 1.65;
  }

  .tours-archive-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .tours-mobile-toolbar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
  }

  .tours-mobile-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 18px;
    border: 2px solid #007bff;
    border-radius: 10px;
    background: #fff;
    color: #007bff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    align-self: flex-start;
  }

  .tours-mobile-filter-btn:hover,
  .tours-mobile-filter-btn:focus-visible {
    background: #007bff;
    color: #fff;
  }

  .tours-mobile-filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 11px;
    background: #007bff;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
  }

  .tours-mobile-filter-btn:hover .tours-mobile-filter-badge,
  .tours-mobile-filter-btn:focus-visible .tours-mobile-filter-badge {
    background: #fff;
    color: #007bff;
  }

  .tours-mobile-categories {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }

  .tours-mobile-categories::-webkit-scrollbar {
    display: none;
  }

  .tours-category-chip {
    flex: 0 0 auto;
    padding: 8px 14px;
    border: 1px solid #dce4ea;
    border-radius: 20px;
    background: #fff;
    color: #34495e;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
  }

  .tours-category-chip.is-active,
  .tours-category-chip:hover,
  .tours-category-chip:focus-visible {
    border-color: #007bff;
    background: #007bff;
    color: #fff;
  }

  .tours-mobile-categories::after {
    content: '';
    flex: 0 0 8px;
  }

  /* Grid: single column on phones — avoids mixed full/half-width cards */
  .tours-view--grid.tours-grid,
  .tours-grid.tours-view--grid {
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(16px, 3vw, 20px);
  }

  .tours-view--list.tours-grid,
  .tours-grid.tours-view--list {
    display: flex;
    flex-direction: column;
    gap: clamp(16px, 3vw, 20px);
  }

  .tours-view--list.tours-grid > .tour-card-dual,
  .tours-grid.tours-view--list > .tour-card-dual {
    width: 100%;
    max-width: 100%;
    flex: 0 0 auto;
  }

  .tour-card {
    border-radius: 8px;
  }

  .tour-card-image {
    height: 160px;
  }

  .tour-card-body {
    padding: 16px;
  }

  .tour-card-title {
    font-size: 16px;
  }

  .tours-view--grid .tour-card {
    min-height: 0;
  }

  .tour-card-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .tour-price-deal {
    width: 100%;
  }

  .tour-price-deal__now {
    font-size: 20px;
  }

  .tour-book-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .tours-archive-title {
    font-size: 24px;
  }

  .filters-panel {
    padding: 16px;
  }

  .tour-card-image {
    height: 140px;
  }

  .tour-card-body {
    padding: 12px;
  }

  .tour-card-title {
    font-size: 15px;
  }

  .price-value {
    font-size: 18px;
  }
}

/* ===== Archive: favori her zaman görünür, süre rozeti çürük vişne ===== */
.tours-archive-wrapper .tour-card .tour-favorite-btn,
.tours-archive-wrapper .tour-card.hover-only .tour-favorite-btn,
.tours-archive-wrapper .tour-card:hover .tour-favorite-btn {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.tours-archive-wrapper .tour-card-meta .tour-duration-info {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border: 1.5px solid #007bff;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #007bff;
  background: transparent;
}

.tours-archive-wrapper .tour-duration-info .icon-clock {
  stroke: #007bff;
  color: #007bff;
}

@media (max-width: 768px) {
  .tours-results-header {
    margin-top: 26px;
  }

  .tours-grid {
    margin-top: -14px;
  }

  .tours-view--grid .tour-card:hover {
    transform: none;
  }
}

/* Tablet portrait: predictable 2-column grid (equal cards) */
@media (min-width: 769px) and (max-width: 1024px) {
  .tours-view--grid.tours-grid,
  .tours-grid.tours-view--grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

/* Archive: no phantom scroll past footer (closed drawer on body must not reserve height) */
body.post-type-archive-tour,
body.tax-tour_category {
  overflow-x: clip;
}

/* ===== Mobile: stop cards shifting right (grid + list) ===== */
@media (max-width: 768px) {
  body.post-type-archive-tour .wp-seo-tour-site-content,
  body.post-type-archive-tour .tours-archive-wrapper,
  body.post-type-archive-tour .tours-archive-container,
  body.post-type-archive-tour .tours-archive-layout,
  body.post-type-archive-tour .tours-archive-main,
  body.post-type-archive-tour .tours-results-header {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  body.post-type-archive-tour .tours-archive-container {
    padding-left: max(15px, env(safe-area-inset-left, 0px));
    padding-right: max(15px, env(safe-area-inset-right, 0px));
  }

  body.post-type-archive-tour .tours-grid.tour-results-container {
    display: grid !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-top: 0;
    padding: 0;
    box-sizing: border-box;
    overflow-x: clip;
    justify-items: stretch;
  }

  body.post-type-archive-tour .tours-grid > .tour-card-dual,
  body.post-type-archive-tour .tour-card-dual,
  body.post-type-archive-tour .tour-card-dual__grid,
  body.post-type-archive-tour .tour-card-item,
  body.post-type-archive-tour .tour-card-item .tour-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box;
  }

  body.post-type-archive-tour .tours-view--list .tour-card-dual__grid {
    overflow: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  body.post-type-archive-tour .tour-card-image,
  body.post-type-archive-tour .tour-card-img,
  body.post-type-archive-tour .tour-card-img-placeholder {
    max-width: 100%;
  }

  body.post-type-archive-tour .tour-card-title,
  body.post-type-archive-tour .tour-card-title a {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  body.post-type-archive-tour .tour-card-meta {
    max-width: 100%;
  }

  body.post-type-archive-tour .tour-duration-info {
    white-space: normal;
    max-width: 100%;
  }

  body.post-type-archive-tour .tour-card:hover,
  body.post-type-archive-tour .tour-book-btn:hover {
    transform: none;
  }

  body.post-type-archive-tour .tour-book-btn {
    max-width: 100%;
  }
}

body.post-type-archive-tour #page,
body.post-type-archive-tour .site,
body.post-type-archive-tour .site-main {
  min-height: 0;
  width: 100%;
  max-width: none;
}

body.post-type-archive-tour .tour-filter-backdrop:not(.is-visible) {
  display: none !important;
  height: 0 !important;
  pointer-events: none !important;
}
