/* Listings from the Cloudflare worker. Palette matches the live site:
   cream #F6F3EC, taupe #AC9C8C, ink #25221F. */

.vk-listings {
  width: 100%;
  color: #25221f;
  font-family: "EB Garamond", Palatino, serif;
}

section:has(.vk-listings),
section:has(.vk-listings) .fluid-engine,
section:has(.vk-listings) .sqs-code-container,
section:has(.vk-listings) .sqs-block-content {
  overflow: visible !important;
  height: auto !important;
}

.vk-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-end;
  margin: 0 0 1.5rem;
}

.vk-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 9.5rem;
  flex: 1 1 9.5rem;
}

.vk-field span {
  font-family: Poppins, "Helvetica Neue", sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ac9c8c;
}

.vk-field select,
.vk-field input[type="number"] {
  appearance: none;
  background: #f6f3ec;
  border: 0;
  border-bottom: 1px solid #ac9c8c;
  color: #25221f;
  font-family: "EB Garamond", Palatino, serif;
  font-size: 1.05rem;
  padding: 0.45rem 0.15rem;
  width: 100%;
}

.vk-field select {
  background: #f6f3ec url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2325221F' stroke-width='1.2'/%3E%3C/svg%3E") no-repeat right 0.7rem center;
  padding-right: 1.6rem;
}

.vk-check {
  flex-direction: row;
  align-items: center;
  min-width: 6rem;
  gap: 0.55rem;
  padding-bottom: 0.35rem;
}

.vk-check input {
  width: 1rem;
  height: 1rem;
  accent-color: #25221f;
}

.vk-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}

.vk-toolbar .vk-filters {
  flex: 1 1 640px;
  margin-bottom: 0;
}

.vk-view-toggle,
.vk-sat {
  display: inline-flex;
  border: 1px solid #ac9c8c;
}

.vk-view-toggle button,
.vk-sat button {
  font-family: Poppins, sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: transparent;
  color: #25221f;
  border: 0;
  padding: 0.65rem 0.9rem;
  cursor: pointer;
}

.vk-view-toggle button.is-on,
.vk-sat button.is-on {
  background: #25221f;
  color: #f6f3ec;
}

.vk-layout.is-map {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 0.8rem;
  min-height: 70vh;
  margin-top: 0.4rem;
}

.vk-layout.is-map .vk-list-pane {
  overflow: auto;
  max-height: 70vh;
  padding-right: 0.2rem;
}

.vk-layout.is-map .vk-grid {
  grid-template-columns: 1fr;
}

.vk-map-pane {
  display: none;
  position: relative;
  min-height: 420px;
  background: #f6f3ec;
}

.vk-layout.is-map .vk-map-pane {
  display: block;
}

#vkMap {
  position: absolute;
  inset: 0;
}

.vk-sat {
  position: absolute;
  left: 0.6rem;
  bottom: 0.6rem;
  z-index: 2;
  background: #f6f3ec;
}

.vk-map-error[hidden] {
  display: none !important;
}

.vk-map-error:not([hidden]) {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  background: rgba(246, 243, 236, 0.92);
}

.vk-count {
  font-family: Poppins, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: #ac9c8c;
  margin: 0 0 1rem;
}

.vk-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.6rem 1.25rem;
}

.vk-featured .vk-grid {
  margin-top: 0.5rem;
}

.vk-card {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  background: transparent;
  min-width: 0;
}

.vk-card:hover .vk-card-price {
  color: #ac9c8c;
}

.vk-card-photo {
  aspect-ratio: 3 / 2;
  background: #e7e1d6;
  overflow: hidden;
}

.vk-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vk-card-body {
  padding: 0.85rem 0.1rem 0.2rem;
}

.vk-card-price {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: 1.7rem;
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.vk-card-address {
  font-family: "EB Garamond", Palatino, serif;
  font-size: 1.12rem;
  line-height: 1.35;
  margin-top: 0.25rem;
}

.vk-card-place,
.vk-card-meta {
  font-family: Poppins, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ac9c8c;
  margin-top: 0.35rem;
}

.vk-card-meta {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.vk-more {
  display: flex;
  justify-content: center;
  margin: 2rem 0 0.5rem;
}

.vk-more button,
.vk-cta,
.vk-back {
  font-family: "EB Garamond", Palatino, serif;
  font-size: 1rem;
  letter-spacing: 0.04em;
  background: transparent;
  color: #25221f;
  border: 1px solid #ac9c8c;
  padding: 0.7rem 1.6rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.vk-more button:hover,
.vk-cta:hover,
.vk-back:hover {
  background: #25221f;
  color: #f6f3ec;
  border-color: #25221f;
}

.vk-state {
  font-family: "EB Garamond", Palatino, serif;
  text-align: center;
  padding: 2.5rem 1rem;
  color: #25221f;
}

.vk-state h3 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: 2rem;
  margin: 0 0 0.4rem;
}

.vk-state p {
  margin: 0;
  color: #6b635a;
}

.vk-state.is-error p {
  color: #8a4a3a;
}

.vk-skel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.6rem 1.25rem;
}

.vk-skel i {
  display: block;
  aspect-ratio: 3 / 2;
  background: linear-gradient(90deg, #efeae2, #f6f3ec, #efeae2);
  background-size: 200% 100%;
  animation: vk-shimmer 1.2s ease-in-out infinite;
}

@keyframes vk-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.vk-detail {
  max-width: 1100px;
  margin: 0 auto;
}

.vk-back {
  margin-bottom: 1.25rem;
}

.vk-hero-photo {
  position: relative;
  background: #e7e1d6;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.vk-hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vk-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.4rem;
  height: 2.4rem;
  border: 0;
  background: rgba(246, 243, 236, 0.88);
  color: #25221f;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.vk-nav.prev { left: 0.6rem; }
.vk-nav.next { right: 0.6rem; }

.vk-photo-count {
  position: absolute;
  right: 0.7rem;
  bottom: 0.7rem;
  background: rgba(37, 34, 31, 0.72);
  color: #f6f3ec;
  font-family: Poppins, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.55rem;
}

.vk-thumbs {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  margin-top: 0.55rem;
  padding-bottom: 0.2rem;
}

.vk-thumbs button {
  border: 1px solid transparent;
  padding: 0;
  background: none;
  cursor: pointer;
  flex: 0 0 auto;
}

.vk-thumbs button.is-on {
  border-color: #ac9c8c;
}

.vk-thumbs img {
  width: 84px;
  height: 60px;
  object-fit: cover;
  display: block;
}

.vk-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: flex-end;
  margin: 1.4rem 0 1rem;
  flex-wrap: wrap;
}

.vk-detail-price {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  line-height: 1;
  margin: 0;
}

.vk-detail-address {
  font-size: 1.25rem;
  margin: 0.35rem 0 0;
}

.vk-detail-place {
  font-family: Poppins, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ac9c8c;
  margin: 0.3rem 0 0;
}

.vk-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem 1.2rem;
  margin: 1.2rem 0 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid #ac9c8c;
  border-bottom: 1px solid #ac9c8c;
}

.vk-fact span {
  display: block;
  font-family: Poppins, sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ac9c8c;
}

.vk-fact strong {
  font-family: "EB Garamond", Palatino, serif;
  font-weight: 500;
  font-size: 1.15rem;
}

.vk-detail h2 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: 1.8rem;
  margin: 1.4rem 0 0.4rem;
}

.vk-detail .vk-copy {
  font-size: 1.12rem;
  line-height: 1.7;
  margin: 0;
}

.vk-detail-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 1.6rem;
}

.vk-credit {
  font-family: Poppins, sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: #ac9c8c;
  margin-top: 1.4rem;
}

@media (max-width: 900px) {
  .vk-grid,
  .vk-skel,
  .vk-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vk-layout.is-map {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .vk-layout.is-map .vk-map-pane {
    height: 52vh;
    min-height: 280px;
    order: -1;
  }

  .vk-layout.is-map .vk-list-pane {
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 640px) {
  .vk-grid,
  .vk-skel,
  .vk-facts {
    grid-template-columns: 1fr;
  }
}

/* Active Listings page */
.vk-active-section { background: #fff; }
.vk-active-wrap {
  box-sizing: border-box;
  max-width: var(--sqs-site-max-width, 1500px);
  margin: 0 auto;
  padding: 90px clamp(20px, 4vw, 64px) 90px;
}
.vk-active-wrap .vk-active-title {
  text-align: center;
  margin: 0 0 2rem;
  white-space: pre-wrap;
}
.vk-active .vk-count { text-align: center; }
@media (max-width: 767px) {
  .vk-active-wrap { padding: 56px 6vw 56px; }
  .vk-active-wrap .vk-active-title { margin-bottom: 1.2rem; }
}
