/* Unified property card
   Source of truth for property, commodity, landing, and developer asset cards.
   This is the V19 landing card promoted to the shared platform card. */

.property-grid {
  align-items: stretch;
}

.property-grid-item {
  display: flex;
  width: 344px;
}

.property-card {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 344px;
  min-width: 320px;
  height: 100%;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  border: none;
  border-radius: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  opacity: 0;
  pointer-events: auto;
  animation: fadeInUp 0.6s ease-out forwards;
  animation-fill-mode: forwards;
  transition:
    transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.4s ease;
}

.property-card:hover,
.property-card.loaded:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
  opacity: 1;
  pointer-events: auto;
}

.property-card.loaded {
  opacity: 1;
}

.property-card:nth-child(1) { animation-delay: 0.05s; }
.property-card:nth-child(2) { animation-delay: 0.1s; }
.property-card:nth-child(3) { animation-delay: 0.15s; }
.property-card:nth-child(4) { animation-delay: 0.2s; }
.property-card:nth-child(5) { animation-delay: 0.25s; }
.property-card:nth-child(6) { animation-delay: 0.3s; }
.property-card:nth-child(7) { animation-delay: 0.35s; }
.property-card:nth-child(8) { animation-delay: 0.4s; }
.property-card:nth-child(9) { animation-delay: 0.45s; }
.property-card:nth-child(10) { animation-delay: 0.5s; }
.property-card:nth-child(11) { animation-delay: 0.55s; }
.property-card:nth-child(12) { animation-delay: 0.6s; }
.property-card:nth-child(n + 13) { animation-delay: 0.65s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.property-gallery {
  position: relative;
  width: 344px;
  height: 248px;
  overflow: hidden;
  flex: none;
  border-radius: 24px 24px 0 0;
}

.property-image-container {
  position: relative;
  width: 344px;
  height: 248px;
  overflow: hidden;
}

.property-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 344px !important;
  height: 248px !important;
  object-fit: cover;
  object-position: center;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  opacity: 0;
  transform: scale(1.05);
  pointer-events: none;
  image-rendering: -webkit-optimize-contrast;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform, opacity;
  transition:
    opacity 0.4s ease-in-out,
    transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.property-image.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.property-image--fallback {
  background-color: #ffffff !important;
  background-size: 58% auto !important;
}

img.property-image--fallback {
  object-fit: contain !important;
  padding: 48px;
  background: #ffffff;
}

.property-card:hover .property-image.active {
  transform: scale(1.05);
}

.property-nav-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  opacity: 0;
  transform: translateY(-50%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition:
    opacity 0.3s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.property-nav-prev {
  left: 12px;
}

.property-nav-next {
  right: 12px;
}

.property-nav-arrow:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: translateY(-50%) scale(1.1);
}

.property-nav-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

.property-image-container:hover .property-nav-arrow,
.property-image-container:focus-within .property-nav-arrow {
  opacity: 1;
}

.property-dots {
  position: absolute;
  left: 50%;
  bottom: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: 120px;
  height: 8px;
  gap: 6px;
  transform: translateX(-50%);
}

.property-dot {
  box-sizing: border-box;
  width: 6px;
  height: 6px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.property-dot:hover,
.property-dot:focus-visible {
  background: rgba(255, 255, 255, 0.9);
}

.property-dot.active {
  width: 20px;
  background: #03FF88;
  box-shadow: 0 1px 3px rgba(3, 255, 136, 0.3);
}

.property-badge {
  box-sizing: border-box;
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: auto;
  min-height: 0;
  padding: 3px 6px;
  border: none;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  line-height: 1;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.badge-text,
.property-badge .badge-text {
  margin: 0;
  color: #0000FF;
  font-family: 'TT Norms Pro', sans-serif;
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-icon,
.badge-icon-wrapper {
  flex: none;
}

.badge-icon {
  width: 20px;
  height: 20px;
}

.badge-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}

.badge-icon-wrapper img {
  width: 14px;
  height: 14px;
}

.property-content {
  box-sizing: border-box;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  gap: 12px;
  padding: 18px 20px 20px;
  overflow: hidden;
}

.card-meta-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 24px;
  gap: 0;
  overflow: hidden;
  flex-wrap: nowrap;
}

.card-meta-item {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 5px;
  color: #667085;
  font-family: 'TT Norms Pro', sans-serif;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  flex-shrink: 0;
}

.card-meta-item:last-child {
  flex-shrink: 1;
  text-overflow: ellipsis;
}

.card-meta-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-meta-item svg,
.card-meta-item img {
  flex-shrink: 0;
}

.card-meta-divider {
  width: 1px;
  height: 16px;
  margin: 0 8px;
  background: #E5E7EB;
  flex-shrink: 0;
}

.property-categories,
.commodity-categories {
  display: flex;
  align-items: center;
  width: 100%;
  height: 32px;
  gap: 4px;
}

.property-category,
.commodity-categories .property-category {
  display: flex;
  align-items: center;
  width: auto;
  height: 32px;
  gap: 4px;
  padding: 4px 0;
  border-radius: 16px;
  flex: none;
}

.category-icon {
  width: 24px;
  height: 24px;
  flex: none;
}

.category-icon.rented-icon,
.category-icon.location-icon {
  width: 16px;
  height: 16px;
}

.category-text {
  color: #414651;
  font-family: 'TT Norms Pro', sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  text-align: center;
}

.category-separator,
.commodity-categories .category-separator {
  width: 2px;
  height: 20px;
  margin: 0 12px;
  background: #d9d9d9;
  flex: none;
}

.property-heading {
  display: flex;
  align-items: flex-start;
  width: 100%;
  min-height: 0;
  gap: 16px;
}

.property-title {
  display: -webkit-box;
  width: 100%;
  margin: 0;
  overflow: hidden;
  color: #181D27;
  font-family: 'TT Norms Pro', sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 24px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.arrow-wrapper {
  display: flex;
  flex: none;
  width: 24px;
  height: 28px;
  padding-top: 4px;
}

.arrow-icon {
  width: 24px;
  height: 24px;
  flex: none;
}

.property-pricing {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  gap: 8px;
  overflow: hidden;
  box-sizing: border-box;
}

.price-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: auto;
  gap: 8px;
  margin-bottom: 16px;
}

.property-price {
  width: auto;
  min-width: auto;
  height: auto;
  margin: 0;
  color: #0000FF;
  font-family: 'TT Norms Pro', sans-serif;
  font-size: 24px;
  font-weight: 800;
  line-height: 30px;
  white-space: nowrap;
}

.funded-percentage {
  width: auto;
  min-width: auto;
  height: auto;
  margin: 0;
  color: #667085;
  font-family: 'TT Norms Pro', sans-serif;
  font-size: 11px;
  font-weight: 400;
  line-height: 20px;
  text-align: right;
  white-space: nowrap;
}

.property-progress {
  display: flex;
  align-items: flex-start;
  width: 100%;
  height: 4px;
  padding: 0;
  overflow: hidden;
  border-radius: 99px;
  background: #F3F4F6;
  box-sizing: border-box;
}

.progress-bar,
.ds-progress__fill {
  height: 100%;
  min-width: 0;
  border-radius: 99px;
  background: var(--progress-fill-bg, #98FB96);
  transition: width 0.6s ease;
}

.investment-details {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  width: 100%;
  gap: 10px;
  margin-top: 16px;
  padding: 16px 0 0;
  border: none;
  border-top: 1px dotted #D1D5DB;
  border-radius: 0;
  background: transparent;
  box-sizing: border-box;
}

.investment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 16px;
  gap: 8px;
}

.investment-label {
  max-width: 70%;
  overflow: hidden;
  color: #9CA3AF;
  font-family: 'TT Norms Pro', sans-serif;
  font-size: 9px;
  font-weight: 500;
  line-height: 18px;
  letter-spacing: 0.05em;
  text-align: left;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.investment-value {
  color: #0000FF;
  font-family: 'TT Norms Pro', sans-serif;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: right;
  white-space: nowrap;
}

.property-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  isolation: isolate;
}

.property-card-link:hover,
.property-card-link:focus,
.property-card-link:visited {
  color: inherit;
  text-decoration: none;
}

.property-card-link:focus-visible {
  outline: 2px solid #0000FF;
  outline-offset: 4px;
  border-radius: 16px;
}

.property-card-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  z-index: -1;
  width: 80%;
  height: 50px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.22);
  filter: blur(22px);
  opacity: 0;
  transform: scaleX(0.85) scaleY(0.6) translateY(-8px);
  transition:
    opacity 0.55s cubic-bezier(0.23, 1, 0.32, 1),
    transform 0.55s cubic-bezier(0.23, 1, 0.32, 1);
}

.property-card-link:hover::after {
  opacity: 1;
  transform: scaleX(0.85) scaleY(0.6) translateY(18px);
}

.property-title-link {
  color: inherit;
  text-decoration: none;
}

.property-title-link:hover,
.property-title-link:focus,
.property-title-link:visited {
  color: inherit;
  text-decoration: none;
}

.property-title-link:focus-visible {
  outline: 2px solid #0000FF;
  outline-offset: 3px;
  border-radius: 6px;
}

.myCtaSwiper .property-card {
  margin: 0;
  box-shadow: none;
  transform: none;
}

.property-card--funded {
  position: relative;
}

.property-card--funded .property-gallery .property-image {
  filter: saturate(0.85);
}

.property-card--funded .funded-percentage--complete {
  color: #03A770;
}

.ds-badge--funded {
  background: #03FF88;
  color: #003C2D;
  border-color: #03FF88;
}

.ds-badge--funded .badge-text {
  color: #003C2D;
  font-weight: 700;
}

.ds-progress__fill--complete {
  background: var(--progress-fill-bg, #98FB96);
}

.badge-standard,
.badge-freehold,
.badge-commercial,
.badge-shortterm,
.badge-flipping,
.badge-offplan,
.funding-progress,
.badge-commodity {
  border: none;
}

@media (prefers-reduced-motion: reduce) {
  .property-card,
  .property-card:hover,
  .property-image,
  .property-card:hover .property-image.active {
    animation: none;
    transition: none;
    transform: none;
  }

  .property-card {
    opacity: 1;
  }
}

@media (max-width: 767px) {
  .property-card,
  .property-gallery,
  .property-image-container,
  .property-image {
    width: 100% !important;
  }

  .property-card {
    min-width: 0;
    max-width: 100%;
  }

  .property-content {
    width: 100%;
    padding: 16px;
  }

  .property-nav-arrow {
    display: flex;
    opacity: 1;
  }
}
