/* ===================================
   Property Cards & Listings
   Modern Card Design System
   =================================== */

/* ============ Property Section ============ */
.sale_section {
  background: #ffffff;
  padding: 64px 0;
}

.sale_section .heading_container {
  align-items: center;
  margin-bottom: 48px;
  text-align: center;
}

.sale_section .heading_container h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: #0f2481;
  margin-bottom: 12px;
  position: relative;
  display: inline-block;
}

.sale_section .heading_container h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #0f2481, #3554d1);
  border-radius: 2px;
}

.sale_section .heading_container p {
  color: #444;
  font-size: 1.1rem;
  line-height: 1.7;
  max-width: 600px;
  margin: 20px auto 0;
}

/* ============ Property Cards Container ============ */
.sale_container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 32px;
  padding: 0;
  width: 100%;
}

/* ============ Modern Property Card ============ */
.property-card {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(15, 36, 129, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid #e6eaf3;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 450px;
  height: auto;
}

.property-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0px;
  background: linear-gradient(90deg, #0f2481, #3554d1);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  z-index: 2;
}

.property-card:hover::before {
  transform: scaleX(1);
}

.property-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(15, 36, 129, 0.18);
  border-color: #b3c0e6;
}

/* ============ Property Slider ============ */
.property-slider {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  height: 280px;
  min-height: 280px;
  background: #f0f4ff;
  width: 100%;
}

.property-slider .carousel,
.property-slider .carousel-inner,
.property-slider .carousel-item {
  height: 100% !important;
  width: 100% !important;
  position: relative;
}

.property-slider .carousel-item img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  transition: transform 0.5s ease;
  display: block;
}

.property-card:hover .property-slider .carousel-item.active img {
  transform: scale(1.05);
}

/* ============ Modern Carousel Progress Bar ============ */
.property-slider .carousel-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  z-index: 5;
  overflow: hidden;
}

.property-slider .carousel-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #3554d1, #0f2481);
  width: 100%;
  animation: progressSlide 4s linear infinite;
  transform-origin: left;
}

@keyframes progressSlide {
  0% { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

.property-slider .carousel:hover .carousel-progress-bar {
  animation-play-state: paused;
}

/* ============ Modern Carousel Navigation ============ */
.property-slider .carousel-nav-modern {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 36, 129, 0.85);
  backdrop-filter: blur(8px);
  padding: 6px 10px;
  border-radius: 25px;
  z-index: 4;
  opacity: 0;
  transition: all 0.3s ease;
}

.property-card:hover .carousel-nav-modern {
  opacity: 1;
}

/* Navigation Buttons */
.property-slider .carousel-nav-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 12px;
}

.property-slider .carousel-nav-btn:hover {
  background: #ffffff;
  color: #0f2481;
  transform: scale(1.1);
}

.property-slider .carousel-nav-btn:active {
  transform: scale(0.95);
}

/* Carousel Dots Container */
.property-slider .carousel-dots {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px;
}

/* Modern Dot Indicators */
.property-slider .carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
}

.property-slider .carousel-dot:hover {
  background: rgba(255, 255, 255, 0.7);
  transform: scale(1.2);
}

.property-slider .carousel-dot.active {
  width: 18px;
  border-radius: 10px;
  background: #ffffff;
}

/* Image Counter Badge */
.property-slider .image-counter {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(15, 36, 129, 0.85);
  backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 4px;
}

.property-slider .image-counter i {
  font-size: 0.7rem;
}

/* Hide old carousel controls */
.property-slider .carousel-indicators {
  display: none !important;
}

.property-slider .carousel-control-prev,
.property-slider .carousel-control-next {
  display: none !important;
}

/* ============ Property Detail Box ============ */
.property-card .detail-box {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.property-card .detail-box h6 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #0f2481;
  margin-bottom: 12px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 50px;
}

/* ============ Property Tags ============ */
.property-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.property-tags .badge {
  background: linear-gradient(135deg, #0f2481, #3554d1);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: 600;
  border: none;
  letter-spacing: 0.3px;
  transition: all 0.2s ease;
}

.property-tags .badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 36, 129, 0.3);
}

/* ============ Property Info ============ */
.property-info {
  margin-top: auto;
  padding-top: 16px;
  border-top: 2px solid #e6eaf3;
}

.property-info>div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  color: #444;
  font-size: 0.95em;
  transition: all 0.2s ease;
}

.property-info>div:hover {
  background: #f8f9ff;
  padding-left: 8px;
  padding-right: 8px;
  border-radius: 8px;
  margin-left: -8px;
  margin-right: -8px;
}

.property-info>div span:first-child {
  display: flex;
  align-items: center;
  color: #666;
  font-weight: 500;
}

.property-info>div span:first-child i {
  margin-right: 8px;
  color: #3554d1;
  font-size: 1.1em;
}

.property-info>div span:last-child {
  color: #0f2481;
  font-weight: 600;
}

/* Location Link */
.property-info>div span[style*="text-decoration:underline"] {
  cursor: pointer;
  transition: color 0.2s ease;
}

.property-info>div span[style*="text-decoration:underline"]:hover {
  color: #3554d1 !important;
}

/* Starting Price Highlight */
.property-info>div:nth-child(3) span:last-child {
  font-size: 1.15em;
  color: #0f2481;
  font-weight: 700;
}

/* ============ Quick View Overlay (Optional Enhancement) ============ */
.property-card .quick-view-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 36, 129, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 10;
}

.property-card:hover .quick-view-overlay {
  opacity: 1;
  pointer-events: auto;
}

.quick-view-overlay .view-btn {
  background: white;
  color: #0f2481;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.quick-view-overlay .view-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
  background: #3554d1;
  color: white;
}

/* ============ Featured Badge ============ */
.property-card .featured-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: linear-gradient(135deg, #f9bc16, #f97616);
  color: white;
  padding: 8px 16px;
  border-radius: 25px;
  font-size: 0.85em;
  font-weight: 700;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(249, 188, 22, 0.4);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

/* ============ Responsive Adjustments ============ */
@media (max-width: 1200px) {
  .sale_container {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .sale_container {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 0 16px;
  }

  .property-card {
    max-width: 100%;
    height: auto;
    min-height: 520px;
  }

  .property-slider {
    height: 240px !important;
    min-height: 240px !important;
    max-height: 240px !important;
    width: 100% !important;
  }

  .property-slider .carousel-inner {
    height: 240px !important;
    width: 100% !important;
  }

  .property-slider .carousel-item {
    height: 240px !important;
    width: 100% !important;
  }

  .property-slider .carousel-item img {
    height: 240px !important;
    width: 100% !important;
    object-fit: cover !important;
  }

  .property-card .detail-box {
    padding: 20px;
  }

  .property-card .detail-box h6 {
    font-size: 1.15rem;
  }

  .sale_section .heading_container h2 {
    font-size: 2rem;
  }

  .sale_section .heading_container p {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .property-card {
    height: auto;
    min-height: 500px;
  }

  .property-slider {
    height: 220px !important;
    min-height: 220px !important;
    max-height: 220px !important;
    width: 100% !important;
  }

  .property-slider .carousel-inner {
    height: 220px !important;
    width: 100% !important;
  }

  .property-slider .carousel-item {
    height: 220px !important;
    width: 100% !important;
  }

  .property-slider .carousel-item img {
    height: 220px !important;
    width: 100% !important;
    object-fit: cover !important;
  }

  .property-card .detail-box {
    padding: 16px;
  }

  .property-info>div {
    font-size: 0.9em;
  }

  .property-tags .badge {
    font-size: 0.75em;
    padding: 5px 10px;
  }
}

@media (max-width: 360px) {
  .property-card {
    height: auto;
    min-height: 480px;
  }

  .property-slider {
    height: 200px !important;
    min-height: 200px !important;
    max-height: 200px !important;
    width: 100% !important;
  }

  .property-slider .carousel-inner {
    height: 200px !important;
    width: 100% !important;
  }

  .property-slider .carousel-item {
    height: 200px !important;
    width: 100% !important;
  }

  .property-slider .carousel-item img {
    height: 200px !important;
    width: 100% !important;
    object-fit: cover !important;
  }

  .property-card .detail-box {
    padding: 14px;
  }
}

/* Additional fixes for consistent sizing across all devices */
@media (max-width: 991px) {

  /* Disable hover effects on touch devices */
  .property-card:hover {
    transform: none;
  }

  .property-card:hover .property-slider .carousel-item.active img {
    transform: none;
  }

  /* Always show carousel navigation on touch devices */
  .property-slider .carousel-nav-modern {
    opacity: 1;
    padding: 5px 8px;
  }

  .property-slider .carousel-nav-btn {
    width: 26px;
    height: 26px;
    font-size: 11px;
  }

  .property-slider .carousel-dot {
    width: 5px;
    height: 5px;
  }

  .property-slider .carousel-dot.active {
    width: 14px;
  }
}

/* Ensure carousel transitions don't cause layout shift */
.property-slider .carousel-item.active,
.property-slider .carousel-item-next,
.property-slider .carousel-item-prev {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.property-slider .carousel-item {
  transition: transform 0.6s ease-in-out;
}

.property-slider .carousel-item-next:not(.carousel-item-left),
.property-slider .carousel-item-prev:not(.carousel-item-right) {
  transform: translateX(0);
}

/* ============ Property Detail Page Carousel ============ */
/* Ensure carousel slides are 100% width on property-details.html */

/* Carousel container styling */
.property-carousel-section #propertyBigCarousel {
  width: 100%;
}

.property-carousel-section .carousel-inner {
  width: 100%;
  position: relative;
}

/* Carousel items - ensure they fill container width */
.property-carousel-section .carousel-item {
  width: 100% !important;
  position: relative;
  display: none;
}

.property-carousel-section .carousel-item.active,
.property-carousel-section .carousel-item-next,
.property-carousel-section .carousel-item-prev {
  display: block;
  width: 100% !important;
}

.property-carousel-section .carousel-item.active,
.property-carousel-section .carousel-item-next.carousel-item-left,
.property-carousel-section .carousel-item-prev.carousel-item-right {
  width: 100% !important;
}

/* Images and videos - fill 100% width */
.property-carousel-section .carousel-item img,
.property-carousel-section .carousel-item video {
  width: 100% !important;
  max-width: 100% !important;
  display: block;
  margin: 0;
  padding: 0;
}

/* Ensure consistent width across all devices */
@media (max-width: 1200px) {

  .property-carousel-section #propertyBigCarousel,
  .property-carousel-section .carousel-inner,
  .property-carousel-section .carousel-item {
    width: 100% !important;
  }

  .property-carousel-section .carousel-item img,
  .property-carousel-section .carousel-item video {
    width: 100% !important;
    max-width: 100% !important;
  }
}

@media (max-width: 768px) {

  .property-carousel-section #propertyBigCarousel,
  .property-carousel-section .carousel-inner,
  .property-carousel-section .carousel-item {
    width: 100% !important;
  }

  .property-carousel-section .carousel-item img,
  .property-carousel-section .carousel-item video {
    width: 100% !important;
    max-width: 100% !important;
  }
}

@media (max-width: 480px) {

  .property-carousel-section #propertyBigCarousel,
  .property-carousel-section .carousel-inner,
  .property-carousel-section .carousel-item {
    width: 100% !important;
  }

  .property-carousel-section .carousel-item img,
  .property-carousel-section .carousel-item video {
    width: 100% !important;
    max-width: 100% !important;
  }
}