/* === TARJETAS DE PROMOCIONES === */
.card-trasteros {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin: 2rem 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

/* Header */
.card-header {
  padding: 1.2rem 1.5rem;
  background: #f2f2f2;
  color: #292929;
  display: flex;
  flex-direction: column;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}
.card-header:hover {
  background: #e9e9e9;
}

/* Contenido animado */
.card-content {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.4s ease;
  padding: 16px;
  background: #f9fafb;
}

/* === GRID TRASTEROS MODIFICADO === */
.grid-trasteros {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  background: #f9fafb;
  padding: 10px 0;
}

.grid-trasteros .trastero {
  flex: 1 1 calc(25% - 12px);
  max-width: 180px;
  min-width: 120px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

/* Imagen del trastero */
.trastero-img {
  width: 100%;
  padding-top: 66.66%; /* 3:2 ratio */
  position: relative;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
  margin-bottom: 6px;
}
.trastero-img img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Número y detalles */
.trastero .num {
  font-size: 1.3rem;
  font-weight: 600;
  color: #333;
  margin: 6px 0 2px 0;
  text-align: center;
}
.trastero .m2,
.trastero .precio,
.trastero .estado {
  font-size: 0.9rem;
  text-align: center;
  margin: 2px 0;
}
.trastero .precio {
  font-weight: 600;
  color: #1a7e39;
}

/* Estados */
.trastero.disponible { background: #e8f7ef; border: 1px solid #b7e1c2; }
.trastero.reservado { background: #fff6e6; border: 1px solid #f5d29f; opacity: 0.9; }
.trastero.vendido { background: #fdecec; border: 1px solid #f0a8a8; opacity: 0.8; }

/* === BOTONES === */
.btn-solicitar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #292929;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 8px;
  cursor: pointer;
  font-size: 0.85rem;
  width: 100%;
  transition: background 0.3s ease;
}
.btn-solicitar:hover { background: #444; }
.btn-solicitar:disabled { background: #ccc; color: #666; cursor: not-allowed; }

/* === PAGINACIÓN === */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f9fafb;
}
.pagination button {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
}
.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* === MAPA === */
.map {
  padding: 16px;
  margin: 20px;
  background: #f9fafb;
  border-radius: 12px;
}
.map-container {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  border-radius: 12px;
  background: #f9fafb;
}
.map-container iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* === CARRUSEL === */
.carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 260px;
  border-radius: 14px;
  background: #f9fafb;
  margin-bottom: 1.5rem;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.carousel-inner {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.5s ease;
}

.carousel-item {
  flex: 0 0 100%;
  height: 100%;
}

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  border-radius: 14px;
}

/* Botones del carrusel */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.8);
  border: none;
  padding: 10px 12px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 24px;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: background 0.3s ease, transform 0.2s ease;
}
.carousel-btn:hover {
  background: rgba(255,255,255,1);
  transform: translateY(-50%) scale(1.1);
}
.carousel-btn.prev { left: 15px; }
.carousel-btn.next { right: 15px; }

/* === LIGHTBOX === */
.carousel-lightbox {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.carousel-lightbox.open {
  opacity: 1;
  pointer-events: all;
}
.carousel-lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
  cursor: zoom-out;
}

/* === EXPANSIÓN DETALLES === */
.card-trasteros[open] .card-content {
  max-height: 2000px;
  opacity: 1;
}

/* === MENÚ DE PROMOCIONES === */
.promociones-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 1.5rem;
  justify-content: center;
}

.promo-btn {
  background: #ffffff;
  border: 1px solid #ccc;
  border-radius: 12px;
  padding: 12px 20px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  font-size: 1.8rem;
  color: #333;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.promo-btn:hover {
  background: #f5f5f5;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.promo-btn.active {
  background: #555;
  color: #fff;
  border-color: #555;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Oculta los contenedores inactivos */
.promo-content {
  padding: 20px;
  display: none;
  border-radius: 16px;
  background: #f9fafb;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .grid-trasteros .trastero { flex: 1 1 calc(33.333% - 12px); }
}
@media (max-width: 600px) {
  .grid-trasteros .trastero { flex: 1 1 calc(50% - 12px); height: auto; }
  .trastero-img { padding-top: 75%; }
  .btn-solicitar { font-size: 0.75rem; }
  .carousel { height: 200px; margin-bottom: 1rem; }
  .carousel-btn { font-size: 20px; padding: 8px 10px; }
}
