/* ==========================================================================
   DELTA TRAVEL - TOUR CARDS & FILTER TABS (tour-cards.css)
   ========================================================================== */

/* ==========================================================================
   BỐ CỤC CATALOG: MẶC ĐỊNH TOUR FULL WIDTH - BẤM "BỘ LỌC" MỚI SỔ RA & ĐẨY TOUR SANG PHẢI
   ========================================================================== */
.tour-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 1.05rem;
  border: 1.5px solid #000000;
  border-radius: 9999px;
  background: #ffffff;
  color: #000000;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Đẩy số lượng tour ra giữa, phần sắp xếp nằm bên phải */
.tours-control-bar #tourResultCount {
  margin-right: auto;
}

.tour-filter-toggle:hover,
.tour-filter-toggle[aria-expanded="true"] {
  background: #000000;
  border-color: #000000;
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.tour-filter-toggle .tour-filter-caret {
  font-size: 0.75rem;
  transition: transform 0.3s ease;
}

.tour-filter-toggle[aria-expanded="true"] .tour-filter-caret {
  transform: rotate(180deg);
}

.tour-catalog-layout {
  --tour-filter-width: 320px;
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  margin-left: 0;
  margin-right: 0;
}

/* Sidebar không dùng gutter để panel sát mép trái, danh sách tour vẫn giữ gutter chuẩn */
.tour-catalog-layout > .tour-sidebar-col {
  padding-left: 0;
  padding-right: 0;
  margin-bottom: 0;
}

/* Panel bộ lọc: thu gọn về 0 khi đóng, mở rộng khi bấm nút */
.tour-sidebar-col {
  flex: 0 0 auto;
  width: 0;
  max-width: 0;
  overflow: hidden;
  overflow: clip;
  opacity: 0;
  margin-right: 0;
  transition: width 0.38s cubic-bezier(0.16, 1, 0.3, 1),
    max-width 0.38s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.25s ease,
    margin-right 0.38s cubic-bezier(0.16, 1, 0.3, 1);
}

.tour-catalog-layout.filter-open .tour-sidebar-col {
  width: var(--tour-filter-width);
  max-width: var(--tour-filter-width);
  overflow: visible;
  opacity: 1;
  margin-right: 1.75rem;
}

/* Giữ panel đúng bề rộng để nội dung không bị dồn chữ trong lúc chuyển động */
.tour-sidebar-col > .tour-filter-sidebar {
  width: var(--tour-filter-width);
}

/* Danh sách tour luôn chiếm trọn phần còn lại */
.tour-content-col {
  flex: 1 1 0%;
  width: auto;
  max-width: none;
  min-width: 0;
}

@media (min-width: 1400px) {
  .tour-catalog-layout {
    --tour-filter-width: 340px;
  }
}

@media (max-width: 991.98px) {
  .tour-catalog-layout {
    flex-direction: column;
  }
  .tour-sidebar-col {
    display: none;
    width: 100%;
    max-width: 100%;
    overflow: visible;
    opacity: 1;
    margin-right: 0;
  }
  .tour-catalog-layout.filter-open .tour-sidebar-col {
    display: block;
    width: 100%;
    max-width: 100%;
    margin-right: 0;
    margin-bottom: 1.5rem;
  }
  .tour-sidebar-col > .tour-filter-sidebar {
    width: 100%;
    position: static;
    max-height: none;
    overflow: visible;
  }
}

.tour-filter-sidebar {
  position: sticky;
  top: 85px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.35rem;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px) saturate(160%) brightness(1.02);
  -webkit-backdrop-filter: blur(10px) saturate(160%) brightness(1.02);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-xl);
  box-shadow: 
    0 15px 40px -10px rgba(0, 0, 0, 0.05),
    0 0 0 1px rgba(255, 255, 255, 0.9) inset;
  scrollbar-width: thin;
  scrollbar-color: rgba(203, 213, 225, 0.7) transparent;
}

.tour-filter-sidebar::-webkit-scrollbar {
  width: 5px;
}
.tour-filter-sidebar::-webkit-scrollbar-thumb {
  background: rgba(203, 213, 225, 0.8);
  border-radius: 9999px;
}
.tour-filter-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

/* Quick filter tag chips */
.tour-quick-tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.quick-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  background: rgba(241, 245, 249, 0.85);
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.quick-tag-chip:hover {
  color: #0284c7;
  background: #e0f2fe;
  border-color: #bae6fd;
  transform: translateY(-1px);
}

/* Sidebar support card */
.sidebar-support-card {
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.55) 0%, rgba(241, 245, 249, 0.8) 100%);
  border: 1px solid rgba(251, 191, 36, 0.4);
}
.support-icon-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Sidebar trust commitments */
.sidebar-trust-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.45rem;
}

@media (max-height: 600px) and (min-width: 992px) {
  .tour-filter-sidebar {
    min-height: 0;
  }
}

.tour-filter-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1.1rem;
}

.tour-filter-heading h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.tour-filter-heading .btn {
  padding: 0;
  text-decoration: none;
}

.tour-filter-group {
  margin-bottom: 1rem;
}

.tour-filter-group .form-label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 700;
}

.tour-filter-pills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.filter-pill {
  justify-content: center;
  min-width: 0;
  padding: 0.65rem 0.5rem;
  border: 1px solid rgba(203, 213, 225, 0.7);
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.filter-pill:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: #38bdf8;
  color: #0284c7;
  transform: translateY(-1px);
}

.filter-pill.active {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.32);
}

.tour-filter-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.tour-filter-fields .tour-filter-group {
  margin-bottom: 0.85rem;
}

.tour-filter-sidebar .form-control,
.tour-filter-sidebar .form-select {
  min-height: 42px;
  border-color: #cbd5e1;
  font-size: 0.88rem;
}

.tour-filter-submit {
  width: 100%;
}

.tours-control-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.filter-pill:hover,
.filter-pill.active {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
  box-shadow: 0 4px 10px rgba(10, 77, 104, 0.25);
}

.filter-pill.pill-sale.active {
  background: #dc2626;
  border-color: #dc2626;
  box-shadow: 0 4px 10px rgba(220, 38, 38, 0.25);
}

.tour-sort-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tour-sort-wrapper label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.tour-sort-select {
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-color);
  padding: 0.45rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  background-color: #ffffff;
  cursor: pointer;
}

.tour-advanced-filters {
  margin: 0;
}

#tourFilterStatus:empty,
#tourActiveFilters:empty {
  display: none;
}

#tourFilterStatus[data-state="error"] {
  color: #b91c1c;
}

#tourFilterStatus[data-state="loading"] {
  color: var(--text-muted);
}

/* LIQUID GLASS CENTERED PAGINATION - CĂN GIỮA TUYỆT ĐỐI */
#tourPagination {
  margin: 3.5rem auto 1.5rem;
  width: 100%;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
}

.pagination-wrapper {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100%;
  margin: 0 auto !important;
  text-align: center !important;
}

.pagination-liquid {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.82) !important;
  backdrop-filter: blur(10px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(10px) saturate(160%) !important;
  border-radius: 24px !important;
  border: 1px solid rgba(255, 255, 255, 0.9) !important;
  box-shadow: 
    0 12px 30px -6px rgba(15, 23, 42, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.95) inset !important;
  margin: 0 !important;
  list-style: none !important;
}

.pagination-liquid .page-item {
  margin: 0 !important;
}

.pagination-liquid .page-link {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px;
  min-width: 44px;
  height: 44px;
  padding: 0 16px !important;
  justify-content: center !important;
  font-size: 0.95rem;
  font-weight: 700;
  color: #334155 !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 14px !important;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

.pagination-liquid .page-link:hover:not(:disabled) {
  background: rgba(2, 132, 199, 0.09) !important;
  color: #0284c7 !important;
  border-color: rgba(2, 132, 199, 0.25) !important;
  transform: translateY(-2px);
}

.pagination-liquid .page-item.active .page-link {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  color: #ffffff !important;
  border-color: #0284c7 !important;
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.38) !important;
  transform: translateY(-2px);
}

.pagination-liquid .page-item.disabled .page-link {
  color: #94a3b8 !important;
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  pointer-events: none;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

/* TOUR CARD - APPLE LIQUID GLASS CARD */
.tour-card {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(24px) saturate(185%);
  -webkit-backdrop-filter: blur(24px) saturate(185%);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.85);
  overflow: hidden;
  box-shadow: 
    0 12px 35px -8px rgba(15, 23, 42, 0.06),
    0 0 0 1px rgba(255, 255, 255, 0.95) inset;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.tour-card:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(14, 165, 233, 0.4);
  box-shadow: 
    0 24px 50px -10px rgba(10, 77, 104, 0.16),
    0 0 0 1px rgba(14, 165, 233, 0.3) inset;
}

/* Khối ảnh đại diện tour */
.tour-card-thumb {
  position: relative;
  height: 220px;
  overflow: hidden;
  background-color: var(--bg-light);
}

.tour-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

/* Nhãn huy hiệu trên ảnh */
.tour-badge-group {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  z-index: 2;
}

.badge-tour {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  color: #ffffff;
  letter-spacing: 0.3px;
  backdrop-filter: blur(4px);
}

.badge-tour-sale {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}

.badge-tour-popular {
  background: linear-gradient(135deg, var(--secondary-color) 0%, #088395 100%);
  box-shadow: 0 2px 6px rgba(8, 131, 149, 0.4);
}

/* Nút thả tim yêu thích */
.btn-wishlist {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.15rem;
  cursor: pointer;
  z-index: 2;
  transition: var(--transition);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.btn-wishlist:hover,
.btn-wishlist.active {
  background: #ffffff;
  color: #ef4444;
  transform: scale(1.1);
}

/* Thẻ thời gian nổi dưới chân ảnh */
.tour-thumb-meta {
  position: absolute;
  bottom: 10px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
}

.tour-duration-tag {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.badge-tour-gallery {
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.badge-tour-gallery:hover {
  background: rgba(14, 165, 233, 0.9);
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.05);
}

.tour-seats-tag {
  background: rgba(239, 68, 68, 0.9);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
}

/* Thân thẻ tour (Card Body) */
.tour-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.tour-code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
}

.tour-code {
  color: var(--secondary-color);
  font-weight: 700;
  font-family: monospace;
  background: rgba(8, 131, 149, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.tour-region {
  color: var(--text-muted);
  font-weight: 600;
}

.tour-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.1rem;
}

.tour-title:hover {
  color: var(--secondary-color);
}

/* Thông tin chuyến đi */
.tour-specs {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 0.85rem;
}

.tour-spec-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tour-spec-item i {
  color: var(--secondary-color);
  width: 16px;
}

/* Đánh giá sao */
.tour-rating-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.stars-group {
  color: var(--gold-color);
  font-size: 0.85rem;
}

.rating-score {
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--text-main);
}

.rating-reviews {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* Giá tour */
.tour-price-box {
  margin-top: auto;
  margin-bottom: 1.15rem;
}

.tour-price-original {
  font-size: 0.85rem;
  color: var(--text-light);
  text-decoration: line-through;
  margin-bottom: 0.1rem;
}

.tour-price-current {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--accent-color);
  line-height: 1;
}

.tour-price-unit {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* Nút thao tác dưới thẻ */
.tour-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.btn-tour-detail {
  background: var(--bg-light);
  color: var(--primary-color);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.55rem 0.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-tour-detail:hover {
  background: rgba(10, 77, 104, 0.08);
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-tour-book {
  background: linear-gradient(135deg, var(--accent-color) 0%, #ff8c42 100%);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.55rem 0.5rem;
  border-radius: var(--radius-md);
  border: none;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.btn-tour-book:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(255, 107, 53, 0.45);
  color: #ffffff;
}
