/* ─── sold-listings-carousel.css ───────────────────────────────────────────
   Auto-scrolling flip-card carousel styles for getsetsold.ca
   Link this BEFORE sold-listings-carousel.js
   ────────────────────────────────────────────────────────────────────────── */

/* ── Carousel container ────────────────────────────────────────────────────── */
#listings {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  margin: 0 0 20px 0;
}
#listings::-webkit-scrollbar {
  display: none;
}
#listings.no-snap {
  scroll-snap-type: none !important;
}

/* ── Flip card shell ───────────────────────────────────────────────────────── */
.flip-card {
  flex: 0 0 auto;
  width: 335px;
  height: 300px;
  perspective: 1000px;
  cursor: pointer;
  scroll-snap-align: center;
}
.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}
.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

/* ── Front & Back shared ───────────────────────────────────────────────────── */
.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  background: white;
  color: black;
}

/* ── Front ─────────────────────────────────────────────────────────────────── */
.flip-card-front {
  background: #000;
  color: white;
}
.flip-card-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Back ──────────────────────────────────────────────────────────────────── */
.flip-card-back {
  transform: rotateY(180deg);
  padding: 20px;
  padding-top: 45px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

/* ── Ribbons ───────────────────────────────────────────────────────────────── */
.ribbon,
.ribbon-back {
  position: absolute;
  top: 12px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 20px;
  z-index: 2;
  color: white;
}
.ribbon      { left: 12px; }
.ribbon-back { right: 12px; }

.status-sold      .ribbon, .status-sold      .ribbon-back { background: #cc0000; }
.status-leased    .ribbon, .status-leased    .ribbon-back { background: #1976d2; }
.status-for-sale  .ribbon, .status-for-sale  .ribbon-back { background: #2e7d32; }
.status-for-lease .ribbon, .status-for-lease .ribbon-back { background: #ffb900; color: #000; }
.status-purchased .ribbon, .status-purchased .ribbon-back { background: #e71cf7; color: white; }

.flip-card.flipped .ribbon,
.flip-card.flipped .details-button,
.flip-card.flipped .feature-text {
  display: none;
}

/* ── Feature bubbles ───────────────────────────────────────────────────────── */
.feature-text {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  gap: 3px;
  z-index: 2;
}
.feature-item {
  background: white;
  color: #1a3454;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.feature-number { font-size: 10px; font-weight: 700; line-height: 1; }
.feature-label  { font-size: 8px;  line-height: 1;   margin-top: 2px; }

/* ── More Info button (front) ──────────────────────────────────────────────── */
.details-button {
  background: #1a3454;
  color: #fff;
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 20px;
  position: absolute;
  bottom: 12px;
  left: 12px;
  text-decoration: none;
  z-index: 2;
  cursor: pointer;
}

/* ── Price diff circle ─────────────────────────────────────────────────────── */
.price-diff-circle {
  position: absolute;
  top: 12px;
  left: 12px;
  background-color: #ffeb3b;
  color: #000;
  border-radius: 22px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: bold;
  text-align: center;
  min-width: 40px;
  line-height: 1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  z-index: 3;
}
.price-line-inline {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  display: flex;
  justify-content: space-between;
  line-height: 1;
}
.price-line {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  position: absolute;
  top: 12px;
}

/* ── Back content ──────────────────────────────────────────────────────────── */
.address {
  font-size: 14px;
  color: #444;
  margin: 0;
  line-height: 1.2;
}
.agent-details {
  display: flex;
  align-items: center;
  gap: 8px;
}
.agent-details img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.agent-text {
  font-size: 10px;
  color: black;
  line-height: 1.2;
  margin: 0;
}
.agent-text strong {
  font-size: 10px;
  color: black;
  display: block;
}
.agent-message {
  font-size: 13px;
  color: #1a3454;
  margin: 0;
  font-weight: 500;
  line-height: 1.2;
}
.divider {
  border: none;
  border-top: 1px solid #dadada;
  margin: 0;
}

/* ── Action buttons ────────────────────────────────────────────────────────── */
.agent-buttons,
.agent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  justify-content: flex-end;
}
.back-button {
  background: transparent;
  border: 1px solid #d5d5d5;
  font-size: 12px;
  color: #1a3454;
  padding: 8px 12px;
  border-radius: 22px;
  cursor: pointer;
  margin-right: auto;
  font-family: inherit;
  transition: background-color 0.3s ease;
}
.back-button:hover { background: #f0f0f0; }

.agent-call-btn,
.details-btn-back {
  background: #1a3454;
  color: white;
  padding: 8px 16px;
  border-radius: 22px;
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.agent-call-btn:hover,
.details-btn-back:hover { background: #12243b; }

/* ── Arrow nav buttons ─────────────────────────────────────────────────────── */
.swipe-indicator {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9999;
  background: white;
  color: #1a3454;
  border: none;
  padding: 4px 5px;
  border-radius: 8px;
  font-size: 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.swipe-left  { left: 10px; }
.swipe-right { right: 10px; }
.swipe-indicator:hover {
  background: #f0f0f0;
  color: #12243b;
}
@media (min-width: 768px) {
  .swipe-indicator { display: none; }
}

/* ── Skeleton shimmer ──────────────────────────────────────────────────────── */
.flip-card.skeleton { pointer-events: none; }
.skeleton-inner {
  width: 100%;
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
  background-size: 200% 100%;
  animation: carouselShimmer 1.4s infinite;
}
@keyframes carouselShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
