.tina-tabs {
  display: flex;
  gap: 1em;
  margin-bottom: 1em;
}

.tina-tab {
  padding: 0.5em 1em;
  border: 1px solid #ccc;
  border-radius: 5px;
  background: #f9f9f9;
  cursor: pointer;
}

.tina-tab.active {
  background: #e0e0e0;
  font-weight: bold;
}

.tina-listings {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 1rem;
  margin: 2rem 0;
}

.tina-icons {
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: #999;
  display: flex;
  gap: 0.5em;
  z-index: 999;
}

/* Each listing */
.tina-listing {
  flex: 0 1 calc(33.333% - 1rem);
  display: flex;
  flex-direction: column;
  justify-content: stretch;
  box-sizing: border-box;
  border: 1px solid #ddd;
  background: #fff;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.tina-listing article {
  display: flex;
  flex-direction: column;
  justify-content: stretch;
  height: 100%;
}

.tina-listing:hover {
  border-color: #0073aa;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  cursor: pointer;
}

.tina-listing:nth-last-child(1):nth-child(3n + 1) {
  margin-right: auto;
}

.tina-image {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.tina-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.tina-listing:hover .tina-image img {
  transform: scale(1.05);
}

.stretched-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  text-indent: -9999px;
  white-space: nowrap;
  overflow: hidden;
}

.tina-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1rem;
  gap: 0.5rem;
}

.tina-info p {
  font-size: 0.9rem;
  margin: 0 0 0.25rem;
  line-height: 1.3;
}

.tina-info .tina-contact {
  font-size: 0.75rem;
  margin-top: auto;
  color: #999;
  z-index: 999;
}

.tina-info .tina-price {
  font-weight: 500;
}

.tina-info h3 {
  line-height: 1.2;
  font-size: 1.05rem;
  letter-spacing: normal;
  font-weight: 500;
  margin: 0;
  z-index: 999;
}

.tina-property-map {
  width: calc(100% - 1rem);
  margin-top: 2rem;
  height: 70vh;
  min-height: 400px;
  overflow: hidden;
}

.leaflet-popup-content {
  width: 200px !important;
  max-width: 90vw;
}

.leaflet-popup-content .tina-popup {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.2;
}

.tina-popup img {
  width: 200px;
  height: 150px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.tina-popup a {
  font-weight: bold;
  text-decoration: none;
  color: #0073aa;
}

.tina-popup a:hover {
  text-decoration: underline;
}

.tina-popup .tina-listings-button {
  display: block;
  padding: 10px 0;
}

.leaflet-popup-content .tina-popup p {
  margin: 0;
}

.tina-trans-type-badge {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 0.75rem;
  font-weight: bold;
  padding: 0.25rem 0.5rem;
  color: #fff;
  z-index: 2;
}

.tina-trans-type-badge.for-sale {
  background-color: #1766a6;
  /* TINA dark blue */
}

.tina-trans-type-badge.to-let {
  background-color: #00adf0;
  /* TINA lighter blue */
}

.tina-featured-badge {
  position: absolute;
  bottom: 0rem;
  left: 0rem;
  right: 0rem;
  background: rgba(130, 3, 97, 0.7);
  color: white;
  font-weight: 500;
  font-size: 0.85rem;
  line-height: 1.2;
  padding: 0.5em 1.1em;
  z-index: 1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.tina-featured-badge.badge-featured {
  background: rgba(253, 209, 0, 0.8);
  color: black;
}
.tina-featured-badge.badge-under-offer {
  background-color: rgba(130, 3, 97, 0.8);
  color: #fff;
}

ul.tina-listings {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tina-listings-button {
  margin-top: auto !important;
}

.tina-listings-button a,
.tina-external-link-button a {
  background-color: var(--link_color);
  color: white;
  border: none;
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tina-listing:hover .tina-listings-button a,
.tina-external-link-button a:hover {
  background-color: rgba(253, 209, 0);
  color: black;
}

@media (max-width: 1200px) {
  .tina-listing {
    flex: 1 1 calc(50% - 1rem);
  }
}

@media (max-width: 640px) {
  .tina-listing {
    flex: 1 1 100%;
  }
}

.tina-label {
  font-size: 0.8rem;
  display: inline-block;
  min-width: 30%;
  max-width: 8rem;
  color: #999;
}
.tina-pagination {
  margin: 2rem 0;
  text-align: center;
}
.tina-pagination .page-numbers {
  display: inline-block;
  margin: 0 0.25rem;
  padding: 0.5em 0.75em;
  background: #eee;
  color: #333;
  text-decoration: none;
  border-radius: 4px;
  line-height: 1;
}
.tina-pagination .current {
  background: #0073aa;
  color: #fff;
  font-weight: bold;
}
.tina-pagination .page-numbers:hover {
  background: #ccc;
}

/* Filter bar */
.tina-filter-bar {
  display: flex;
  gap: 1rem;
  margin: 0 1rem 1rem 0;
  flex-wrap: wrap;
  align-items: start;
  background: #1766a6;
  padding: 0.5rem;
}

.tina-price-input {
  width: 5rem !important;
}

.tina-price-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.tina-price-symbol {
  position: absolute;
  font-size: 0.75rem;
  left: 0.1rem;
  top: -0.5rem;
  color: #333;
  pointer-events: none;
}

.tina-filter-left {
  display: inline-flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  width: calc(100% - 7rem);
}

.tina-filter-left input,
.tina-filter-left select {
  padding: 0.6rem 0.4rem;
  height: auto;
}

.tina-filter-right {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  width: 6rem;
}

.tina-view-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #70d6fe;
  background: #1766a6;
  color: #70d6fe;
  padding: 0.4rem 0.6rem;
  width: 2.75rem;
  height: 2.75rem;
  cursor: pointer;
  font-size: 1.1rem;
}

.tina-view-toggle.active {
  color: #fff;
  background-color: #00adf0;
  border-color: #00adf0;
}

.tina-filter-submit,
.tina-filter-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #fad100;
  color: #fff;
  width: 2.75rem;
  height: 2.75rem;
  cursor: pointer;
  text-decoration: none;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.tina-filter-submit {
  background: #fad100;
  color: #1766a6;
  border-color: #fad100;
}

.tina-filter-reset {
  background: #1766a6;
  border-color: #70d6fe;
  color: #70d6fe;
}

.tina-filter-reset:hover,
.tina-view-toggle:hover,
.tina-filter-submit:hover {
  color: #fff;
  border-color: #fff;
}

.tina-filter-submit:hover {
  background: white;
  color: #0073aa;
}

.tina-filter-bar input[type='text']:focus,
.tina-filter-bar select:focus,
.tina-filter-submit:focus,
.tina-filter-reset:focus,
.tina-view-toggle:focus {
  outline: 3px solid #fad100;
  outline-offset: 2px;
}

.tina-filter-left input,
.tina-filter-left select,
.tina-view-toggle,
.tina-filter-submit,
.tina-filter-reset {
  min-height: 44px;
  /* meets WCAG touch target */
}

.tina-filter-error {
  margin: 0.5rem 0;
  padding: 0.5rem 0.75rem;
  border: 1px solid #b30000;
  background: #ffecec;
}

/* visually hidden but accessible */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* keep keyboard focus obvious */
:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* optional: align price inputs neatly on one line */
.tina-price-fieldset,
.tina-view-toggles {
  border: 0;
  margin: 0;
  padding: 0;
  display: inline-flex;
  gap: 0.5rem;
}
.tina-price-wrap {
  display: inline-flex;
  align-items: center;
}
.tina-price-input {
  max-width: 8rem;
}
