/* Properties Page Styles - Inspired by Solmar Rentals */

/* Force full-width on body and html for properties page */
body:has(.properties-hero) {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden !important;
}

html:has(.properties-hero) {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden !important;
}

/* Header - Fixed on properties page (when .properties-hero exists) */
body:has(.properties-hero) header {
  position: fixed !important;
  background-color: rgba(0, 0, 0, 0.95) !important;
  backdrop-filter: blur(10px);
  z-index: 1000;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  left: 0 !important;
  right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body:has(.properties-hero) .header-container {
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 !important;
  padding-left: 50px;
  padding-right: 50px;
  box-sizing: border-box;
}

/* Hero Section for Properties */
.properties-hero {
  position: relative;
  width: 100vw !important;
  max-width: 100% !important;
  height: 60vh;
  min-height: 60vh;
  left: 0 !important;
  right: 0 !important;
  margin: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding: 0 !important;
  padding-top: 80px !important; /* Space for fixed header */
  overflow: hidden;
}

.properties-hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

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

.properties-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(215, 201, 163, 0.7), rgba(234, 229, 220, 0.8));
  z-index: 1;
}

.properties-hero-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 2;
  padding: 40px 50px;
  max-width: 100% !important;
  margin: 0 !important;
  box-sizing: border-box;
}

.properties-hero-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.35),
    rgba(0, 0, 0, 0.15),
    rgba(0, 0, 0, 0.05)
  );
  z-index: -1;
  pointer-events: none;
}

.properties-hero-content h1 {
  font-family: var(--font-title);
  font-size: 4rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 25px;
  text-shadow: 0 4px 25px rgba(0, 0, 0, 0.6), 0 2px 10px rgba(0, 0, 0, 0.4);
  letter-spacing: 2px;
}

.properties-hero-content p {
  font-family: var(--font-body);
  font-size: 1.3rem;
  color: #FFFFFF;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  max-width: 100% !important;
  width: 100%;
  line-height: 1.7;
  font-weight: 400;
  padding: 0 50px;
  box-sizing: border-box;
}

.properties-collection-intro {
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: #FFFFFF;
  text-shadow: 0 3px 15px rgba(0, 0, 0, 0.6), 0 1px 5px rgba(0, 0, 0, 0.4);
  max-width: 100% !important;
  width: 100%;
  line-height: 1.6;
  font-weight: 400;
  padding: 0 50px;
  box-sizing: border-box;
  margin-top: 20px;
  margin-bottom: 0;
  opacity: 0.95;
}

/* Filters Section - Style Solmar */
.properties-filters {
  background-color: #FFFFFF;
  padding: 25px 0;
  width: 100vw !important;
  max-width: 100% !important;
  left: 0 !important;
  right: 0 !important;
  margin: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.filters-container {
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 50px;
  display: flex;
  overflow: visible !important;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  box-sizing: border-box;
}

.filters-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-btn {
  padding: 9px 20px;
  background-color: #FFFFFF;
  border: 2px solid #EAE5DC;
  border-radius: 25px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: #5E5643;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  white-space: nowrap;
}

.filter-btn:hover {
  background-color: #EDE7DE;
  border-color: #B59A6A;
  color: #5E5643;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.filter-btn.active {
  background-color: #B59A6A;
  color: #FFFFFF;
  border-color: #B59A6A;
  box-shadow: 0 4px 15px rgba(181, 154, 106, 0.3);
}

.filter-price-btn {
  padding: 9px 22px;
  background-color: #B59A6A;
  border: none;
  border-radius: 25px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: #FFFFFF;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(181, 154, 106, 0.25);
  white-space: nowrap;
}

.filter-price-btn:hover {
  background-color: #A68A5A;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(181, 154, 106, 0.35);
}

/* Price Filter Dropdown */
.price-filter-wrapper {
  position: relative;
  display: inline-block;
  overflow: visible !important;
}

.price-filter-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background-color: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 100;
  overflow: hidden;
}

/* 1) Autoriser le dropdown à "déborder" au-dessus du reste */
.properties-filters,
.filters-container,
.filters-buttons,
.price-filter-wrapper {
  overflow: visible !important;
}

/* 2) Créer une couche au-dessus de la grille */
.price-filter-wrapper {
  position: relative !important;
  z-index: 10000 !important;
}

/* 3) Le menu doit être au-dessus de tout */
#filterCollectionMenu {
  position: absolute !important;
  top: calc(100% + 10px) !important;
  left: 0 !important;
  z-index: 20000 !important;
  display: none;
  background: #fff !important;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18) !important;
  min-width: 220px;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: all 0.3s ease;
  overflow: visible;
}

.price-filter-wrapper.is-open #filterCollectionMenu {
  display: block;
}

/* 4) Si ta grille/cards ont un z-index, on les remet "normal" */
.properties-section,
.properties-grid,
.property-card {
  z-index: auto !important;
}

/* Règle obsolète supprimée - on utilise maintenant .price-filter-wrapper.is-open #filterCollectionMenu */

.price-filter-option {
  display: block;
  width: 100%;
  padding: 12px 20px;
  background-color: #FFFFFF;
  border: none;
  text-align: left;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: #5E5643;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.price-filter-option:last-child {
  border-bottom: none;
}

.price-filter-option:hover {
  background-color: #FAF8F5;
  color: #B59A6A;
}

.price-filter-option.active {
  background-color: #EDE7DE;
  color: #B59A6A;
  font-weight: 600;
}

/* Properties Section */
.properties-section {
  background-color: #FAF8F5;
  padding: 50px 0;
  width: 100vw !important;
  max-width: 100% !important;
  left: 0 !important;
  right: 0 !important;
  margin: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  min-height: 60vh;
}

.properties-container {
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 50px;
  box-sizing: border-box;
}

.properties-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

/* Property Card - Style Solmar */
.property-card {
  background-color: #fdfaf5;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease-in-out;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.property-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

/* SOLEA 2: Entire card clickable */
.property-card-clickable {
  cursor: pointer;
}

.property-card-clickable:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.property-image {
  width: 100%;
  height: 260px;
  background-color: #DCD3C3;
  position: relative;
  overflow: hidden;
  border-radius: 0;
  margin: 0;
}

/* Image Slider */
.property-slider {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.property-slider-images {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.5s ease;
}

.property-slider-image {
  min-width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background-color: #DCD3C3;
  transition: opacity 0.5s ease;
}

/* ============================================================================
   SLIDER GÉNÉRIQUE POUR TOUS LES LOGEMENTS
   ============================================================================
   Basé sur Solea 2 - Utilise translateX uniquement
   Système scalable - Même structure pour tous les logements
   ============================================================================ */

.property-slider {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.property-slider .property-slider-images {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.5s ease;
  will-change: transform;
}

.property-slider .property-slider-image {
  min-width: 100%;
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  object-fit: cover;
  display: block;
  /* AUCUNE règle opacity, position, z-index, display:none */
  transition: none !important;
  opacity: 1 !important;
}

.property-slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1 !important;
  z-index: 20 !important;
  font-size: 32px !important;
  font-weight: 300 !important;
  color: #ffffff !important;
  width: auto !important;
  height: auto !important;
  border-radius: 0 !important;
  backdrop-filter: none !important;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5) !important;
  transition: transform 0.2s ease;
}

/* SOLEA 2 – CARD SLIDER REFERENCE (FINAL) */
/* Flèches blanches, plus grandes, toujours visibles - CONSERVER design actuel */
.solea2-nav {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  color: #ffffff !important;
  font-size: 32px !important;
  font-weight: 300 !important;
  opacity: 1 !important;
  width: auto !important;
  height: auto !important;
  border-radius: 0 !important;
  backdrop-filter: none !important;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5) !important;
  z-index: 20 !important;
}

.solea2-slider:hover .solea2-nav,
.solea2-nav:hover {
  opacity: 1 !important;
  transform: translateY(-50%) scale(1.15) !important;
  color: #ffffff !important;
}

/* Mobile: flèches toujours visibles pour Solea 2 */
@media (max-width: 768px) {
  .solea2-nav {
    opacity: 1 !important;
    font-size: 36px !important;
  }
}

.property-card:hover .property-slider-nav {
  opacity: 1 !important;
}

.property-slider-nav:hover {
  transform: translateY(-50%) scale(1.15) !important;
  color: #ffffff !important;
}

/* Flèches blanches pour Playa del Carmen - identiques à Cancun/Tulum */
body[data-city="playa-del-carmen"] .property-slider-nav {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  color: #ffffff !important; /* Blanc comme Cancun/Tulum */
  font-size: 32px !important; /* Plus grandes */
  font-weight: 300 !important;
  opacity: 1 !important; /* Toujours visibles */
  width: auto !important;
  height: auto !important;
  border-radius: 0 !important;
  backdrop-filter: none !important;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5) !important;
}

body[data-city="playa-del-carmen"] .property-card:hover .property-slider-nav {
  opacity: 1 !important;
}

body[data-city="playa-del-carmen"] .property-slider-nav:hover {
  color: #ffffff !important;
  transform: translateY(-50%) scale(1.15) !important; /* Agrandir au survol */
  background: none !important;
  background-color: transparent !important;
}

.property-slider-nav.prev {
  left: 10px;
}

.property-slider-nav.next {
  right: 10px;
}

.property-slider-indicators {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}

/* ============================================================================
   HARMONISATION SLIDER CARTES CLASSIQUES AVEC VILLAS DE LUXE
   ============================================================================
   Réutilise le style des villas de luxe mais adapté aux cartes plus petites
   Cible uniquement .property-card pour éviter d'impacter les pages luxe
   ============================================================================ */

/* Flèches harmonisées (style villas de luxe adapté) */
.property-card .villa-slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.85);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 10;
  font-size: 22px;
  color: #4b463e;
  backdrop-filter: blur(8px);
  font-weight: 300;
}

.property-card:hover .villa-slider-nav {
  opacity: 1;
}

.property-card .villa-slider-nav:hover {
  background-color: rgba(255, 255, 255, 0.95);
  transform: translateY(-50%) scale(1.1);
  color: #b59a6a;
}

.property-card .villa-slider-nav.prev {
  left: 8px;
}

.property-card .villa-slider-nav.next {
  right: 8px;
}

/* Dots harmonisés (style villas de luxe adapté) */
.property-card .villa-slider-indicators {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}

.property-card .villa-slider-indicators .slider-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.property-card .villa-slider-indicators .slider-dot.active {
  background-color: rgba(255, 255, 255, 0.95);
  width: 20px;
  border-radius: 4px;
}

.property-card .villa-slider-indicators .slider-dot:hover {
  background-color: rgba(255, 255, 255, 0.8);
}

/* Une seule image : pas de flèches ni dots */
.property-card .property-slider.property-slider--single .villa-slider-nav,
.property-card .property-slider.property-slider--single .villa-slider-indicators {
  display: none !important;
  pointer-events: none !important;
}

/* Mobile: flèches un peu plus visibles */
@media (max-width: 768px) {
  .property-card .villa-slider-nav {
    width: 32px;
    height: 32px;
    font-size: 20px;
    opacity: 0.7; /* Légèrement visibles sur mobile */
  }
  
  .property-card .villa-slider-indicators {
    bottom: 10px;
    gap: 5px;
  }
  
  .property-card .villa-slider-indicators .slider-dot {
    width: 6px;
    height: 6px;
  }
  
  .property-card .villa-slider-indicators .slider-dot.active {
    width: 18px;
  }
}

/* SOLEA 2 – TEMPLATE CARD REFERENCE */
/* Dots pour le slider Solea 2 */
.solea2-slider .slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 0 4px;
  display: inline-block;
}

.solea2-slider .slider-dot.active {
  background-color: rgba(255, 255, 255, 1);
  width: 10px;
  height: 10px;
}

.property-slider-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.3s ease;
}

.property-slider-dot.active {
  background-color: rgba(255, 255, 255, 0.9);
  width: 20px;
  border-radius: 3px;
}

.property-image::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(234, 229, 220, 0.1), rgba(215, 201, 163, 0.05));
  pointer-events: none;
  z-index: 1;
}

.property-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  text-align: center;
  align-items: center;
}

.property-name {
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 600;
  color: #5E5643;
  margin-bottom: 6px;
  line-height: 1.3;
}

.property-type {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: #7A6548;
  text-align: center;
  margin-bottom: 16px;
  font-weight: 400;
  margin-top: 0;
}

.property-collection {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: #7A6548;
  text-align: center;
  margin-bottom: 16px;
  margin-top: 4px;
  font-weight: 400;
  opacity: 0.75;
}

.property-location {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: #7A6548;
  text-align: center;
  margin-bottom: 12px;
  font-weight: 500;
}


.property-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
  flex-grow: 1;
  align-items: center;
}

.property-detail-item {
  font-family: var(--font-body);
  font-size: 1rem;
  color: #7A6548;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 400;
}

.property-detail-item span {
  font-weight: 400;
}

.property-collection-item {
  font-family: var(--font-body);
  font-size: 1rem;
  color: #7A6548;
  opacity: 0.75;
  font-weight: 400;
  margin-top: 2px;
}

.property-btn {
  width: 100%;
  padding: 14px 24px;
  background-color: #B59A6A;
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: auto;
  letter-spacing: 0.5px;
}

.property-btn:hover {
  background-color: #A68A5A;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(181, 154, 106, 0.4);
}

/* Responsive */
@media (max-width: 1200px) {
  .properties-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
  }
}


/* Mobile et Tablette: même comportement - 768px à 1024px = mobile */
@media (max-width: 1024px) {
  .properties-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  
  .properties-hero {
    height: 50vh;
    min-height: 400px;
    padding-top: 70px;
  }
  
  .properties-hero-content h1 {
    font-size: 2.2rem;
  }
  
  
  .properties-hero-content p {
    font-size: 1rem;
  }
  
  .properties-collection-intro {
    font-size: 0.9rem;
    padding: 0 20px;
    margin-top: 15px;
  }
  
  .properties-section {
    padding: 35px 0;
  }
  
  .properties-filters {
    padding: 20px 0;
  }
  
  .filters-container {
    flex-direction: column;
    align-items: center;
    padding: 0 20px;
    gap: 10px;
  }
  
  .filters-buttons {
    justify-content: center;
    gap: 8px;
  }
  
  .filter-btn {
    padding: 8px 16px;
    font-size: 12px;
  }
  
  .filter-price-btn {
    padding: 9px 18px;
    font-size: 12px;
  }
  
  .price-filter-dropdown {
    right: auto;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    min-width: 200px;
  }
  
  /* Règle obsolète supprimée - on utilise maintenant .price-filter-wrapper.is-open #filterCollectionMenu */
  
  .property-image {
    height: 240px;
  }
  
  .property-slider-nav {
    width: 35px;
    height: 35px;
    font-size: 16px;
  }
  
  /* Style léger pour les flèches sur mobile - Playa del Carmen */
  body[data-city="playa-del-carmen"] .property-slider-nav {
    width: auto !important;
    height: auto !important;
    font-size: 22px !important;
  }
  
  .properties-container {
    padding: 0 20px;
  }
  
  .properties-hero-content {
    padding: 40px 20px;
  }
  
  .properties-hero-content p {
    padding: 0 20px;
  }
  
  .property-name {
    font-size: 1.2rem;
  }
}
