/* ========================================
   VILLA DETAIL PAGE STYLES
   ======================================== */

/* ✅ IMPORTANT: evita overflows por padding */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Header styling for detail pages - force dark background from start */
body.is-villa-detail .header {
  background-color: hsla(215, 80%, 15%, 0.95) !important;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  padding: var(--space-3) 0 !important;
}

/* Loading State */
.villa-detail__loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 40px 20px;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #2c5aa0;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.villa-detail__error {
  text-align: center;
  padding: 60px 20px;
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.villa-detail__error h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #333;
}

/* Breadcrumb */
.breadcrumb {
  background: #f8f9fa;
  padding: 15px 0;
  margin-top: 80px;
}

.breadcrumb .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.breadcrumb a {
  color: #2c5aa0;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb span {
  color: #666;
}

/* Gallery Section */
.villa-gallery {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto 60px;
  padding: 0 20px;
}

.villa-gallery__main {
  position: relative;
  width: 100%;
  height: 600px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
  touch-action: pan-y pinch-zoom; /* Allow vertical scroll and pinch zoom */
  user-select: none; /* Prevent text selection during swipe */
}

.villa-gallery__main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.villa-gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.villa-gallery__nav:hover {
  background: white;
  transform: translateY(-50%) scale(1.1);
}

.villa-gallery__nav--prev { left: 20px; }
.villa-gallery__nav--next { right: 20px; }

.villa-gallery__thumbnails {
  position: relative;
  overflow: hidden;
  padding: 0 40px;
  min-height: 140px;
}

.villa-gallery__thumbnails-container {
  display: flex;
  gap: 15px;
  transition: transform 0.3s ease;
  overflow-x: hidden;
  width: max-content;
}

.villa-gallery__thumbnail {
  flex: 0 0 150px;
  width: 150px;
  height: 120px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.3s ease;
  border: 3px solid transparent;
  background: #f0f0f0;
}

.villa-gallery__thumbnail:hover,
.villa-gallery__thumbnail.active {
  opacity: 1;
  border-color: #2c5aa0;
}

.villa-gallery__thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumbnails-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.thumbnails-nav:hover {
  background: white;
  transform: translateY(-50%) scale(1.1);
}

.thumbnails-nav--prev { left: 5px; }
.thumbnails-nav--next { right: 5px; }

.thumbnails-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.thumbnails-nav:disabled:hover {
  transform: translateY(-50%) scale(1);
}

/* Villa Info Section */
.villa-info {
  padding: 40px 0 80px;
  background: white;
}

.villa-info__grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 60px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.villa-info__title {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 20px;
  line-height: 1.2;
  overflow-wrap: anywhere; /* ✅ evita títulos que empujen ancho */
}

.villa-info__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid #e0e0e0;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  color: #555;
}

.meta-item svg { color: #2c5aa0; }

.villa-info__description h2,
.villa-info__amenities h2,
.villa-info__house-rules h2,
.villa-info__location-map h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  margin-bottom: 20px;
  color: #1a1a1a;
  overflow-wrap: anywhere; /* ✅ */
}

.villa-info__description { margin-bottom: 50px; }

.villa-info__description p {
  line-height: 1.8;
  color: #555;
  margin-bottom: 15px;
}

.villa-info__house-rules { margin-bottom: 50px; }

.house-rules__content {
  background-color: #f9f9f9;
  border-left: 4px solid #2c5aa0;
  padding: 20px;
  border-radius: 4px;
  line-height: 1.8;
  color: #555;
}

.house-rules__content p {
  margin-bottom: 12px;
}

.house-rules__content p:last-child {
  margin-bottom: 0;
}

.house-rules__content.is-clamped {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  overflow: hidden;
}

.villa-info__amenities { margin-bottom: 50px; }

.amenities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
}

.amenity-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  font-size: 14px;
}

.amenity-item svg {
  color: #2c5aa0;
  flex-shrink: 0;
}

.location-map {
  width: 100%;
  height: 300px;
  background: #f0f0f0;
  border-radius: 12px;
  overflow: hidden;
}

.location-map iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 12px;
}

.location-map-link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
}

.location-map-link:hover {
  text-decoration: none;
}

.location-map-link:hover .location-map-placeholder {
  background: #f0f0f9;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.location-map-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #666;
  height: 100%;
  width: 100%;
  padding: 30px;
  transition: all 0.3s ease;
  gap: 12px;
}

.location-map-placeholder p {
  margin: 0;
  text-align: center;
}

.location-map-placeholder svg {
  color: #2c5aa0;
  margin-bottom: 10px;
}

/* Booking Card (Sidebar) */
.villa-info__sidebar { position: relative; }

.booking-card {
  position: sticky;
  top: 100px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  margin-bottom: 30px;
  max-width: 100%; /* ✅ */
}

.booking-card__price {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.price-label {
  display: block;
  font-size: 14px;
  color: #666;
  margin-bottom: 5px;
}

.price-value {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 600;
  color: #2c5aa0;
}

.price-value small {
  font-size: 1rem;
  color: #666;
}

.booking-card__form .form-group { margin-bottom: 20px; }

.booking-card__form label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
}

.booking-card__form input,
.booking-card__form select {
  width: 100%;
  max-width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.booking-card__form input:focus,
.booking-card__form select:focus {
  outline: none;
  border-color: #2c5aa0;
}

.booking-summary {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 14px;
  color: #555;
}

.summary-row--total {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #ddd;
  font-weight: 600;
  font-size: 16px;
  color: #1a1a1a;
}

.booking-card__note {
  text-align: center;
  font-size: 13px;
  color: #666;
  margin-top: 15px;
}

.booking-card__contact {
  text-align: center;
  margin-top: 25px;
  padding-top: 25px;
  border-top: 1px solid #e0e0e0;
}

.booking-card__contact p {
  margin-bottom: 8px;
  font-size: 14px;
  color: #666;
}

.booking-card__contact a {
  color: #2c5aa0;
  text-decoration: none;
  font-weight: 600;
}

.booking-card__contact a:hover { text-decoration: underline; }

/* Availability Calendar */
.availability-calendar {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 25px;
  max-width: 100%; /* ✅ */
}

.availability-calendar h3 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: #1a1a1a;
}

.calendar { min-height: 200px; }

.calendar-loading {
  text-align: center;
  color: #666;
  padding: 40px 20px;
}

/* Reviews Section */
.villa-reviews {
  background: #f8f9fa;
  padding: 80px 0;
}

.villa-reviews h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  margin-bottom: 40px;
  text-align: center;
  color: #1a1a1a;
  overflow-wrap: anywhere; /* ✅ */
}

.reviews-summary {
  max-width: 800px;
  margin: 0 auto 50px;
  text-align: center;
}

.reviews-summary__score {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.score-value {
  font-size: 4rem;
  font-weight: 700;
  color: #2c5aa0;
  display: block;
  margin-bottom: 10px;
}

.score-stars {
  color: #ffa500;
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.score-label {
  color: #666;
  font-size: 14px;
}

.reviews-list {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  gap: 20px;
}

.review-card {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.review-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
}

.review-card__author strong {
  display: block;
  font-size: 16px;
  color: #1a1a1a;
  margin-bottom: 5px;
}

.review-card__date { font-size: 13px; color: #999; }
.review-card__rating { color: #ffa500; font-size: 1.1rem; }

.review-card__text {
  color: #555;
  line-height: 1.7;
}

/* REVIEWS CAROUSEL */
.reviews-list {
  width: 100%;
  display: flex;
  justify-content: center;
}

.reviews-carousel {
  position: relative;
  width: 100%;
  max-width: 1200px;
  padding: 0 60px;
}

.reviews-carousel__track { overflow: hidden; width: 100%; }

.reviews-carousel__slides {
  display: flex;
  gap: 20px;
  transition: transform 0.4s ease-in-out;
}

.reviews-carousel__slides .review-card {
  flex: 0 0 calc(33.333% - 14px);
  min-width: 0;
}

.review-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.review-nav:hover:not(:disabled) {
  background: #2c5aa0;
  color: white;
  border-color: #2c5aa0;
}

.review-nav:hover:not(:disabled) svg { stroke: white; }

.review-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.review-nav--prev { left: 0; }
.review-nav--next { right: 0; }

.reviews-empty,
.reviews-error,
.reviews-loading {
  text-align: center;
  padding: 60px 20px;
  color: #666;
  font-size: 1.1rem;
}

.reviews-error { color: #e74c3c; }

@media (max-width: 1024px) {
  .reviews-carousel__slides .review-card { flex: 0 0 calc(50% - 10px); }
}

@media (max-width: 768px) {
  .reviews-carousel { padding: 0 18px; } /* ✅ reduce padding para evitar overflow */
  .reviews-carousel__slides { gap: 0; }
  .reviews-carousel__slides .review-card { flex: 0 0 100%; }
  .review-nav { width: 40px; height: 40px; }
}

/* Similar Villas */
.similar-villas {
  padding: 80px 0;
  background: white;
}

.similar-villas h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  margin-bottom: 40px;
  text-align: center;
  color: #1a1a1a;
  overflow-wrap: anywhere; /* ✅ */
}

.villas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .villa-info__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .villa-info__sidebar { position: relative; }
  .booking-card { position: relative; top: 0; }
}

@media (max-width: 768px) {
  .villa-gallery__main { height: 400px; }
  .villa-info__title { font-size: 2rem; }
  .amenities-grid { grid-template-columns: 1fr; }
  .breadcrumb { margin-top: 60px; }
}

/* MODALS */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.modal.is-open { display: block; }

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
}

.modal__panel {
  position: relative;
  width: min(720px, calc(100% - 24px));
  max-height: calc(100vh - 80px);
  margin: 40px auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  overflow: hidden;
}

.modal__title {
  margin: 0;
  padding: 18px 20px;
  border-bottom: 1px solid #eee;
  font-size: 18px;
}

.modal__close {
  position: absolute;
  right: 10px;
  top: 8px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font-size: 28px;
  line-height: 40px;
  cursor: pointer;
}

.modal__body {
  padding: 14px 20px 20px;
  overflow: auto;
  max-height: calc(100vh - 160px);
}

.modal__amenities {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 520px) {
  .modal__amenities { grid-template-columns: 1fr; }
}

.modal__amenity-item{
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid #eee;
  border-radius: 12px;
}

.modal__amenity-icon{
  font-size: 18px;
  line-height: 1;
}

/* Calendar */
.cal-legend{
  display:flex;
  gap:16px;
  align-items:center;
  font-size:13px;
  color:#666;
  margin-bottom:12px;
}

.dot{
  display:inline-block;
  width:10px;
  height:10px;
  border-radius:50%;
  margin-right:6px;
  vertical-align:middle;
  background:#ccc;
}
.dot--avail{ background:#2ecc71; }
.dot--unavail{ background:#e74c3c; }

.cal-grid{
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  gap:8px;
}

.cal-day{
  border:1px solid #e6e6e6;
  border-radius:10px;
  padding:10px 8px;
  display:flex;
  flex-direction:column;
  gap:8px;
  background:#fff;
}

.cal-day__dot{ width:10px; height:10px; border-radius:50%; }

.cal-day.is-available .cal-day__dot{ background:#2ecc71; }
.cal-day.is-unavailable .cal-day__dot{ background:#e74c3c; }

.cal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e0e0e0;
}

.cal-header__month {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
}

.cal-nav-btn {
  background: transparent;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a1a1a;
  min-width: 36px;
  height: 36px;
}

.cal-nav-btn:hover {
  background: #f5f5f5;
  border-color: #ccc;
}

.cal-day--empty {
  background: transparent;
  border: none;
  padding: 0;
}

.cal-day.is-available {
  cursor: pointer;
  background: #f9fafb;
  border-color: #e0e0e0;
  transition: all 0.2s ease;
}

.cal-day.is-available:hover {
  border-color: var(--color-accent, #4fa3d1);
  box-shadow: 0 2px 8px rgba(79, 163, 209, 0.15);
  background: #fff;
}

.cal-day.is-unavailable,
.cal-day.is-past {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f8f8f8;
}

.cal-day.is-selected {
  border-color: var(--color-accent, #4fa3d1);
  box-shadow: 0 0 0 2px hsla(185, 70%, 45%, 0.2);
  background: #fff;
}

.cal-day.is-in-range {
  background: hsla(185, 70%, 45%, 0.08);
  border-color: var(--color-accent, #4fa3d1);
}

/* Footer fix */
body.is-villa-detail .footer { color: #ffffff; }

body.is-villa-detail .footer__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

body.is-villa-detail .footer__grid { margin-bottom: 32px; }

body.is-villa-detail .footer__title,
body.is-villa-detail .footer h4 {
  color: #ffffff !important;
  font-weight: 700;
}

body.is-villa-detail .footer p {
  color: #ffffff !important;
  opacity: 0.9;
}

body.is-villa-detail .footer a {
  color: #ffffff !important;
  opacity: 0.85;
  text-decoration: none;
}

body.is-villa-detail .footer a:hover { opacity: 1; }

body.is-villa-detail .footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.25);
  padding-top: 14px;
  margin-top: 24px;
  text-align: center;
}

/* Description clamp + Read more */
.villa-info__description-text.is-clamped{
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 10;
  overflow: hidden;
}

.villa-info__readmore{
  margin-top: 14px;
  border: 0;
  background: transparent;
  color: #2c5aa0;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.villa-info__readmore:hover{ opacity: .85; }

/* ======================================================
   ✅ FIX DEFINITIVO: nada se corta en móvil (detail page)
   Pegar AL FINAL del CSS
   ====================================================== */

@media (max-width: 768px) {

  /* 1) evita scroll horizontal sí o sí */
  html, body {
    width: 100%;
    overflow-x: hidden !important;
  }

  /* 2) todo en el detail no puede medir más de la pantalla */
  body.is-villa-detail * {
    max-width: 100%;
    box-sizing: border-box;
  }

  /* 3) el grid y sus hijos deben poder encoger (IMPORTANTÍSIMO) */
  .villa-info__grid,
  .villa-info__grid > * {
    min-width: 0 !important;
  }

  /* 4) wrappers principales a 100% */
  .villa-detail,
  .villa-detail__content,
  .villa-gallery,
  .villa-info,
  .villa-info__main,
  .villa-info__sidebar,
  .booking-card,
  .availability-calendar,
  .amenities-grid,
  .location-map,
  .reviews-carousel,
  .reviews-carousel__track,
  .reviews-carousel__slides,
  .similar-villas,
  .villas-grid {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* 5) containers: a veces el “container” global mete márgenes raros */
  .villa-detail .container,
  .breadcrumb .container,
  .villa-info__grid {
    padding-left: 16px !important;
    padding-right: 16px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* 6) textos y títulos: que hagan wrap siempre */
  body.is-villa-detail h1,
  body.is-villa-detail h2,
  body.is-villa-detail h3,
  body.is-villa-detail p,
  body.is-villa-detail a,
  body.is-villa-detail span {
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }

  /* 7) calendario: que la grid no "empuje" más ancho y sea más compacto */
  .cal-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  .cal-day {
    padding: 6px 4px !important;
    gap: 4px !important;
  }

  .cal-day__dot {
    width: 6px !important;
    height: 6px !important;
  }

  .cal-day__number {
    font-size: 12px !important;
    line-height: 1.2 !important;
  }

  /* 8) gallery main: reducir altura en mobile */
  .villa-gallery__main {
    height: 350px !important;
    margin-bottom: 12px !important;
  }

  /* 9) thumbnails: ajustar para mostrar 3 en lugar de 2 */
  .villa-gallery__thumbnails {
    padding: 0 30px !important;
    min-height: 110px !important;
    overflow: visible !important;
  }

  .villa-gallery__thumbnails-container {
    width: max-content !important;
    gap: 10px !important;
  }

  .villa-gallery__thumbnail {
    flex: 0 0 90px !important;
    width: 90px !important;
    height: 90px !important;
  }

  .thumbnails-nav {
    width: 30px !important;
    height: 30px !important;
  }

  /* 10) imágenes siempre responsive */
  img, svg {
    max-width: 100% !important;
    height: auto !important;
  }
}
/* ========================================
   REVIEWS – Pixel-perfect (como tu ejemplo ES)
   ======================================== */

/* 1) Tarjeta de puntuación: estrecha + centrada */
.villa-reviews .reviews-summary{
  display:flex;
  justify-content:center;
  margin: 0 auto 28px; /* separación con el carrusel */
}

.villa-reviews .reviews-summary__score{
  width: min(560px, 92%);   /* 👈 más estrecha */
  padding: 34px 28px;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(0,0,0,.06);
  background:#fff;
  text-align:center;        /* 👈 centrado */
}

/* Número + estrellas + contador centrados y con aire */
.villa-reviews .score-value{
  display:block;
  font-size: 56px;
  font-weight: 700;
  margin: 0 0 10px;
}

.villa-reviews .score-stars{
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1;
}

.villa-reviews .score-label{
  margin: 0;
  font-size: 13px;
  opacity: .85;
}

/* 2) Separación clara entre resumen y carrusel */
.villa-reviews .reviews-list{
  margin-top: 22px;   /* 👈 evita que “se pegue” al resumen */
  padding-top: 10px;
}

/* 3) Tarjetas de reseña: tamaño “bonito” y no gigantes */
.reviews-carousel{
  max-width: 1040px;        /* 👈 algo más estrecho que 1200 */
  margin: 0 auto;
  padding: 0 64px;          /* deja espacio a flechas */
}

.reviews-carousel__slides{
  gap: 18px;                /* 👈 separación entre cards */
  align-items: stretch;
}

/* Card compacta y con altura controlada */
.reviews-carousel__slides .review-card{
  flex: 0 0 calc(33.333% - 12px);
  border-radius: 14px;
  padding: 18px 18px 16px;
  box-shadow: 0 10px 24px rgba(0,0,0,.06);
  min-height: 190px;        /* 👈 evita “tarjetas eternas” */
  max-height: 230px;        /* 👈 controla altura */
  overflow: hidden;         /* 👈 recorta contenido */
}

/* Header: nombre + rating alineados */
.review-card__header{
  align-items: flex-start;
  margin-bottom: 10px;
}

.review-card__author strong{
  font-size: 15px;
}

.review-card__date{
  font-size: 12px;
  opacity: .75;
}

/* Texto con clamp (como “bonito”, no infinito) */
.review-card__text{
  font-size: 14px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 4;     /* 👈 4 líneas y “…” */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Flechas: tamaño y posición como tu captura */
.review-nav{
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(0,0,0,.10);
}

.review-nav--prev{ left: 8px; }
.review-nav--next{ right: 8px; }

/* Responsive */
@media (max-width: 1024px){
  .reviews-carousel__slides .review-card{
    flex: 0 0 calc(50% - 10px);
    max-height: 240px;
  }
  .reviews-carousel{
    padding: 0 56px;
  }
}

@media (max-width: 768px){
  .villa-reviews .reviews-summary__score{
    width: min(520px, 92%);
    padding: 26px 18px;
  }
  .villa-reviews .score-value{ font-size: 46px; }

  .reviews-carousel{
    padding: 0 52px;
  }
  .reviews-carousel__slides{
    gap: 12px;
  }
  .reviews-carousel__slides .review-card{
    flex: 0 0 100%;
    min-height: 170px;
    max-height: 220px;
  }
}

.villa-reviews .reviews-summary{
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 28px;
  padding: 0;
}

.villa-reviews .reviews-summary__score{
  margin: 0 auto;
  text-align: center;
}


.villa-reviews .reviews-summary__score *{
  text-align: center;
}



.villa-reviews .reviews-summary__score{
  width: min(780px, 100%);  
  max-width: 100%;
  padding: 56px 24px;
}

@media (max-width: 768px){
  .villa-reviews .reviews-summary__score{
    width: min(520px, 100%);
    padding: 44px 18px;
  }
}
/* ✅ Reseñas: texto un poco más pequeño */
.review-card__text{
  font-size: 0.92rem;   /* prueba 0.9rem si lo quieres más */
  line-height: 1.45;
}

.review-card__date{
  font-size: 0.78rem;
}

.review-card__author strong{
  font-size: 0.95rem;
}
/* ✅ Reseñas colapsadas por defecto */
.review-card{
  cursor: pointer;
}

.review-card__text{
  display: -webkit-box;
  -webkit-line-clamp: 4;      /* nº de líneas visibles */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ✅ Cuando está expandida */
.review-card.is-expanded .review-card__text{
  -webkit-line-clamp: unset;
  overflow: visible;
}

/* Opcional: feedback visual */
.review-card.is-expanded{
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
/* Hover suave SIN azul */
.review-card{
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}

@media (hover: hover) and (pointer: fine){
  .review-card:hover{
    transform: scale(1.01);            /* un pelín más grande */
    box-shadow: 0 10px 24px rgba(0,0,0,0.08);
  }
}

/* Texto: por defecto truncado */
.review-card__text{
  font-size: 14px;                     /* un poquito más pequeño */
  line-height: 1.6;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;               /* 4 líneas (ajusta si quieres) */
  overflow: hidden;
}

/* Al abrir: se estira hacia abajo y muestra todo el texto */
.review-card.is-expanded{
  transform: scale(1.02);
  box-shadow: 0 14px 34px rgba(0,0,0,0.10);
}

.review-card.is-expanded .review-card__text{
  -webkit-line-clamp: unset;
  display: block;
  overflow: visible;
}
/* ✅ FIX: al expandir, NO recortar la card */
.review-card.is-expanded{
  overflow: visible !important;
  max-height: none !important;
}



/* (por si algún padre también recorta) */
.villa-reviews .reviews-list{
  overflow: visible;
}

/* Reviews Loading State */
.reviews-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  min-height: 300px;
  text-align: center;
}

.reviews-loading .spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #2c5aa0;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.reviews-loading p {
  font-size: 16px;
  color: #666;
  margin: 0;
}

/* Minimum Stay Notice */
.minimum-stay-notice {
  background: #e8f4f8;
  border-left: 3px solid #1e5f7a;
  padding: 12px 16px;
  margin-bottom: 16px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: #1e5f7a;
}

.minimum-stay-notice .icon {
  font-size: 1.2rem;
}


/* ========================================
   ✅ FIX CARRUSEL REVIEWS (no se corta)
   - Quitamos gap del track
   - Usamos margin en cada card
   - Track con padding para que no se coma bordes/sombras
   ======================================== */

   .reviews-carousel__track{
    overflow: hidden;
    width: 100%;
    padding: 0 10px;
  }
  
  .reviews-carousel__slides{
    gap: 0 !important;
    margin: 0 -10px;
    will-change: transform;
  }
  
  .reviews-carousel__slides .review-card{
    padding: 18px;
    margin: 0 10px;
    flex: 0 0 calc(33.333% - 20px);
    min-width: 0;
    box-sizing: border-box;
  }
  
  /* Tablet */
  @media (max-width: 1024px){
    .reviews-carousel__slides .review-card{
      flex: 0 0 calc(50% - 20px);
    }
  }
  
  /* Móvil */
  @media (max-width: 768px){
    .reviews-carousel{
      padding: 0 52px;
    }
  
    .reviews-carousel__track{
      padding: 0 6px;
    }
  
    .reviews-carousel__slides{
      margin: 0 -6px;
    }
  
    .reviews-carousel__slides .review-card{
      margin: 0 6px;
      flex: 0 0 calc(100% - 12px);
    }
  
    .review-nav{
      touch-action: manipulation;
    }
  }
  
  .review-nav--prev{ left: 8px; }
  .review-nav--next{ right: 8px; }
  
  
 /* ========================================
   ✅ THUMBNAILS CAROUSEL (flechas desktop + móvil)
   ======================================== */

.villa-gallery__thumbnails{
  position: relative;
  overflow: hidden;        /* ✅ viewport recorta */
  padding: 0 40px;         /* ✅ hueco flechas */
  min-height: 120px;       /* ✅ evita que colapse */
}

/* Track */
.villa-gallery__thumbnails-container{
  display: flex;
  flex-wrap: nowrap;       /* ✅ 1 sola fila */
  gap: 12px;

  width: max-content;      /* ✅ ancho = todas las miniaturas */
  max-width: none;

  transition: transform .3s ease;
  will-change: transform;
}

/* Thumbnail */
.villa-gallery__thumbnail{
  flex: 0 0 auto;
  width: 150px;
  height: 120px;

  cursor: pointer;
  pointer-events: auto;

  border-radius: 8px;
  overflow: hidden;
}

/* Imagen dentro de thumbnail */
.villa-gallery__thumbnail img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;          /* ✅ evita huecos raros */
}

/* Flechas encima (clicables SIEMPRE) */
.thumbnails-nav{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;            /* ✅ por si hay overlays */

  width: 35px;
  height: 35px;

  display: flex;
  align-items: center;
  justify-content: center;

  pointer-events: auto;    /* ✅ importante */
  touch-action: manipulation;
}

.thumbnails-nav--prev{ left: 6px; }
.thumbnails-nav--next{ right: 6px; }

/* Disabled */
.thumbnails-nav:disabled{
  opacity: .3;
  cursor: not-allowed;
}

/* Mobile */
@media (max-width: 768px){
  .villa-gallery__thumbnails{
    padding: 0 36px;       /* un pelín menos */
    min-height: 90px;      /* ✅ estable en móvil */
  }

  .villa-gallery__thumbnails-container{
    gap: 10px;             /* coincide con tu JS móvil */
  }

  .villa-gallery__thumbnail{
    width: 90px;
    height: 70px;
  }

  .thumbnails-nav{
    width: 32px;
    height: 32px;
  }
}
/* =========================================================
   ✅ FIX DEFINITIVO MINI-CARRUSEL (móvil + desktop con flechas)
   - IMPORTANTE: pegar al FINAL del CSS (último bloque)
   ========================================================= */

   #thumbnails.villa-gallery__thumbnails{
    position: relative;
    overflow: hidden !important;
    padding: 0 40px !important;
    min-height: 90px;
  }
  
  #thumbnailsCarousel.villa-gallery__thumbnails-container{
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
  
    width: max-content !important;
    max-width: none !important;
  
    /* ✅ CLAVE: NO dejar que otra regla te pise el transform */
    transform: translate3d(0,0,0);
    transition: transform .3s ease !important;
    will-change: transform;
  }
  
  #thumbnailsCarousel .villa-gallery__thumbnail{
    flex: 0 0 auto !important;
    width: 90px !important;
    height: 70px !important;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    pointer-events: auto !important;
  }
  
  #thumbnailsCarousel .villa-gallery__thumbnail img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  
  /* Flechas SIEMPRE encima y clicables */
  #thumbnails .thumbnails-nav{
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 9999 !important;
  
    width: 32px !important;
    height: 32px !important;
  
    display: flex !important;
    align-items: center;
    justify-content: center;
  
    pointer-events: auto !important;
    touch-action: manipulation;
  }
  
  #thumbnails .thumbnails-nav--prev{ left: 6px !important; }
  #thumbnails .thumbnails-nav--next{ right: 6px !important; }
  
  #thumbnails .thumbnails-nav:disabled{
    opacity: .3;
    cursor: not-allowed;
  }

 /* ✅ FORCE show currency switcher on villa detail */
#header .header__actions {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

#header #currencySwitcher {
  display: inline-flex !important;
  align-items: center !important;
  position: relative !important;
  z-index: 9999 !important;
}

#header #currencySwitcher .currency-switcher__btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

/* ===============================
   FIX espacio blanco galería mobile
   =============================== */

   @media (max-width: 768px) {

    /* contenedor principal de la galería */
    .villa-gallery,
    .villa-gallery__wrapper,
    .villa-detail__gallery {
      margin-bottom: 0 !important;
      padding-bottom: 0 !important;
    }
  
    /* imagen principal */
    .villa-gallery__main,
    .villa-gallery__main-image {
      margin-bottom: 8px !important; /* antes era enorme */
    }
  
    /* miniaturas */
    .villa-gallery__thumbs,
    .villa-gallery__thumbnails {
      margin-top: 4px !important;
      padding-top: 0 !important;
    }
  }

  @media (max-width: 768px) {
    .villa-gallery__main,
    .villa-gallery__main-image {
      min-height: auto !important;
      aspect-ratio: 16 / 10; /* más compacto en móvil */
    }
  }

/* Touch device optimizations for swipe gestures */
@media (hover: none) and (pointer: coarse) {
  /* Touch device specific styles */
  .villa-gallery__nav {
    opacity: 0.8; /* Slightly more subtle on touch devices */
  }
}