/* TỨ PHỦ — Global Heritage Search */

.gs-hero {
  position: relative;
  overflow: hidden;
}

.gs-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 58% 48% at 50% 0%, rgba(196, 154, 89, 0.16), transparent 58%),
    radial-gradient(ellipse 40% 40% at 90% 80%, rgba(116, 43, 50, 0.18), transparent 52%);
  pointer-events: none;
}

.gs-search-shell {
  position: relative;
  max-width: 44rem;
  margin-top: 1.25rem;
}

.gs-search-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 3.25rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(196, 154, 89, 0.4);
  background: rgba(53, 35, 38, 0.95);
  padding: 0.35rem 0.45rem 0.35rem 0.85rem;
}

.gs-search-bar:focus-within {
  border-color: #c49a59;
  box-shadow: 0 0 0 3px rgba(196, 154, 89, 0.15);
}

.gs-search-bar input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #f4e6d1;
  font-size: 1rem;
  outline: none;
}

.gs-search-bar input::placeholder {
  color: rgba(213, 186, 153, 0.65);
}

.gs-icon-btn,
.gs-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  border-radius: 0.55rem;
  border: 0;
}

.gs-icon-btn {
  width: 2.5rem;
  background: transparent;
  color: #d5ba99;
}

.gs-icon-btn:hover,
.gs-icon-btn:focus-visible {
  color: #e4c58c;
  outline: none;
}

.gs-submit {
  background: #742b32;
  color: #f4e6d1;
  padding: 0 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.gs-submit:hover,
.gs-submit:focus-visible {
  background: #913c43;
  outline: none;
}

.gs-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 30;
  border-radius: 0.85rem;
  border: 1px solid rgba(98, 68, 60, 0.55);
  background: #2a1a1c;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  max-height: 22rem;
  overflow: auto;
  display: none;
}

.gs-suggest.is-open {
  display: block;
}

.gs-suggest-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  padding: 0.7rem 0.85rem;
  border: 0;
  border-bottom: 1px solid rgba(98, 68, 60, 0.35);
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.gs-suggest-item:last-child {
  border-bottom: 0;
}

.gs-suggest-item:hover,
.gs-suggest-item:focus,
.gs-suggest-item.is-active {
  background: rgba(116, 43, 50, 0.35);
  outline: none;
}

.gs-tabs {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  -webkit-overflow-scrolling: touch;
}

.gs-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  min-height: 2.35rem;
  border-radius: 999px;
  border: 1px solid rgba(98, 68, 60, 0.55);
  background: rgba(42, 26, 28, 0.85);
  color: #d5ba99;
  padding: 0.3rem 0.8rem;
  font-size: 0.8rem;
}

.gs-tab:hover,
.gs-tab:focus-visible,
.gs-tab.is-active {
  border-color: #c49a59;
  color: #f4e6d1;
  outline: none;
}

.gs-tab.is-active {
  background: rgba(116, 43, 50, 0.45);
}

.gs-tab-count {
  font-size: 0.7rem;
  opacity: 0.85;
}

.gs-workspace {
  display: grid;
  gap: 1rem;
}

@media (min-width: 1024px) {
  .gs-workspace {
    grid-template-columns: 260px minmax(0, 1fr);
    align-items: start;
  }
}

.gs-filters {
  border-radius: 0.85rem;
  border: 1px solid rgba(98, 68, 60, 0.55);
  background: rgba(42, 26, 28, 0.9);
  padding: 1rem;
}

.gs-filters-desktop {
  display: none;
}

@media (min-width: 1024px) {
  .gs-filters-desktop {
    display: block;
    position: sticky;
    top: calc(var(--header-h, 64px) + 1rem);
  }
}

.gs-field + .gs-field {
  margin-top: 0.85rem;
}

.gs-field label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #d5ba99;
}

.gs-field input,
.gs-field select {
  width: 100%;
  min-height: 2.35rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(98, 68, 60, 0.55);
  background: rgba(53, 35, 38, 0.9);
  color: #f4e6d1;
  padding: 0.35rem 0.6rem;
  font-size: 0.85rem;
}

.gs-field input:focus,
.gs-field select:focus {
  outline: none;
  border-color: #c49a59;
}

.gs-check-list {
  display: grid;
  gap: 0.35rem;
  max-height: 12rem;
  overflow: auto;
}

.gs-check-list label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-size: 0.82rem;
  text-transform: none;
  letter-spacing: 0;
  color: #f4e6d1;
  cursor: pointer;
}

.gs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 2.1rem;
  padding: 0.35rem 0.7rem;
  border-radius: 0.45rem;
  border: 1px solid rgba(98, 68, 60, 0.6);
  background: rgba(42, 26, 28, 0.85);
  color: #d5ba99;
  font-size: 0.78rem;
}

.gs-btn:hover,
.gs-btn:focus-visible,
.gs-btn.is-active {
  border-color: #c49a59;
  color: #e4c58c;
  outline: none;
}

.gs-btn.is-active {
  background: rgba(116, 43, 50, 0.45);
  color: #f4e6d1;
}

.gs-btn.is-primary {
  border-color: transparent;
  background: #742b32;
  color: #f4e6d1;
}

.gs-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.gs-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  border-radius: 999px;
  border: 1px solid rgba(98, 68, 60, 0.55);
  background: rgba(42, 26, 28, 0.85);
  color: #d5ba99;
  padding: 0.25rem 0.7rem;
  font-size: 0.78rem;
}

.gs-chip button {
  margin-left: 0.35rem;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.gs-result {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: auto minmax(0, 1fr);
  border-radius: 0.85rem;
  border: 1px solid rgba(98, 68, 60, 0.55);
  background: rgba(42, 26, 28, 0.88);
  padding: 0.9rem 1rem;
}

.gs-result:hover,
.gs-result:focus-within {
  border-color: #c49a59;
}

.gs-thumb {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(98, 68, 60, 0.45);
  object-fit: cover;
  background: #352326;
}

.gs-type-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(98, 68, 60, 0.45);
  color: #e4c58c;
  background: rgba(53, 35, 38, 0.9);
}

.gs-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(98, 68, 60, 0.55);
  padding: 0.1rem 0.45rem;
  font-size: 0.65rem;
  color: #d5ba99;
}

.gs-mark {
  background: rgba(196, 154, 89, 0.4);
  color: inherit;
  border-radius: 0.15rem;
  padding: 0 0.1rem;
}

.gs-empty {
  border-radius: 0.85rem;
  border: 1px dashed rgba(98, 68, 60, 0.55);
  background: rgba(42, 26, 28, 0.55);
  padding: 1.5rem 1.1rem;
  text-align: center;
}

.gs-group {
  margin-bottom: 1.5rem;
}

.gs-group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.gs-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 1rem;
}

.gs-explore-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .gs-explore-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .gs-explore-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.gs-card {
  border-radius: 0.85rem;
  border: 1px solid rgba(98, 68, 60, 0.55);
  background: rgba(42, 26, 28, 0.88);
  padding: 1rem;
  color: inherit;
  text-align: left;
}

.gs-card:hover,
.gs-card:focus-within {
  border-color: #c49a59;
}

.gs-filter-drawer {
  position: fixed;
  inset: 0;
  z-index: 72;
  pointer-events: none;
}

.gs-filter-drawer.is-open {
  pointer-events: auto;
}

.gs-filter-drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(25, 15, 18, 0.72);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.gs-filter-drawer.is-open .gs-filter-drawer-overlay {
  opacity: 1;
}

.gs-filter-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(100%, 340px);
  transform: translateX(105%);
  background: #2a1a1c;
  border-left: 1px solid rgba(98, 68, 60, 0.55);
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

.gs-filter-drawer.is-open .gs-filter-drawer-panel {
  transform: translateX(0);
}

.gs-filter-drawer-body {
  overflow: auto;
  flex: 1;
  padding: 0.85rem;
}

/* Enhanced global overlay suggestions */
.search-overlay .gs-overlay-panel {
  width: 100%;
  max-width: 720px;
}

.search-overlay .gs-overlay-suggest {
  margin-top: 0.75rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(98, 68, 60, 0.55);
  background: #2a1a1c;
  max-height: min(50vh, 22rem);
  overflow: auto;
}

@media (max-width: 639px) {
  .search-overlay {
    align-items: stretch;
    padding: 0;
    padding-top: 0;
  }

  .search-overlay > div {
    max-width: none;
    min-height: 100%;
    padding: 1rem;
    background: #190f12;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gs-filter-drawer-overlay,
  .gs-filter-drawer-panel {
    transition: none;
  }
}
