/* Catalogue front page, country pages and search; loaded after catalog.css. */

.cx-hero { max-width: 820px; }
.cx-section { margin: 8px 0 30px; }
.cx-section > h2, .cx-part > h2, .cx-popular > h2 { margin-bottom: 14px; }

.cx-search { position: relative; display: flex; gap: 8px; margin-top: 18px; max-width: 640px; }
.cx-search input {
  flex: 1;
  min-width: 0;
  min-height: 56px;
  font: inherit;
  font-size: 1.05rem;
  color: var(--ink);
  background: #fff;
  border: 0;
  border-radius: 999px;
  padding: 0 24px;
  box-shadow: var(--shadow);
}
.cx-search input::placeholder { color: var(--soft); }
.cx-search-go {
  min-height: 56px;
  border: 0;
  border-radius: 999px;
  padding: 0 28px;
  background: linear-gradient(var(--indigo-a), var(--indigo-b));
  box-shadow: 0 16px 30px rgba(48, 34, 160, 0.32);
  color: #fff;
  font: 800 1.02rem/1 var(--round);
  cursor: pointer;
}
.cx-search-go:hover { filter: brightness(1.08); }
.cx-suggest {
  position: absolute;
  z-index: 8;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 22px 48px rgba(24, 52, 102, 0.18);
  max-height: 420px;
  overflow: auto;
}
.cx-suggest a, .cx-results a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  padding: 10px 14px;
  border-radius: 14px;
}
.cx-suggest a:hover, .cx-suggest a.is-active, .cx-results a:hover { background: #f1f5fc; text-decoration: none; }
.cx-suggest small, .cx-results small { color: var(--soft); font-size: .84rem; white-space: nowrap; }
.cx-suggest em {
  display: inline-block;
  min-width: 58px;
  margin-right: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef3fd;
  color: var(--muted);
  font-style: normal;
  font-size: .74rem;
  font-weight: 700;
  text-align: center;
}
.cx-suggest-city em { background: var(--mint); color: #1d6b3e; }
.cx-suggest-country em { background: var(--lilac); color: #4b3ddb; }
.cx-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }

.cx-chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.cx-chips a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--ink-strong);
  font-weight: 700;
  padding: 8px 16px 8px 10px;
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
}
.cx-chips a:hover { text-decoration: none; box-shadow: var(--shadow); }
.cx-popular { margin: 0 0 34px; }

.cx-part { margin: 0 0 34px; }
.cx-country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  align-items: start;
}
.cx-country {
  background: var(--card);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.cx-country summary {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 12px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
}
.cx-country summary::-webkit-details-marker { display: none; }
.cx-country summary::after {
  content: "";
  grid-column: 3;
  grid-row: 1 / span 2;
  width: 10px;
  height: 10px;
  border-right: 2.5px solid var(--soft);
  border-bottom: 2.5px solid var(--soft);
  transform: rotate(45deg);
  transition: transform .2s ease;
}
.cx-country[open] summary::after { transform: rotate(-135deg); }
.cx-country summary:hover { background: #fafcff; }
.cx-flag {
  grid-row: 1 / span 2;
  width: 34px;
  height: 24px;
  border-radius: 6px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(16, 34, 79, .08);
}
.cx-chips .cx-flag { width: 24px; height: 17px; border-radius: 4px; }
.cx-flag-blank { display: inline-block; background: #e3eefb; }
.cx-country-name { font: 900 1.08rem/1.2 var(--round); color: var(--ink-strong); }
.cx-country-meta { color: var(--soft); font-size: .84rem; }
.cx-country-body { padding: 0 18px 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.cx-country-open { display: inline-block; margin-top: 12px; font-weight: 700; }

.cx-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cx-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5fc;
  color: var(--ink);
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .92rem;
}
.cx-links a:hover { background: #e4ecfb; text-decoration: none; }
.cx-count { color: var(--soft); font-size: .78rem; font-weight: 600; }
.cx-city-card h3 { font: 900 1.12rem/1.2 var(--round); }
.cx-button-inline { width: auto; display: inline-flex; padding: 13px 28px; }

@media (max-width: 640px) {
  .cx-search input, .cx-search-go { min-height: 50px; }
  .cx-search-go { padding: 0 18px; }
  .cx-country-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .cx-country summary::after { transition: none; }
}
