/* ==========================================
   INTIKILLA AIRBNB - ESTILOS ESPECÍFICOS
   Sistema completo de listado y modal
   ========================================== */

/* ==========================================
   🏔️ AIRBNB HERO SECTION
   ========================================== */
.airbnb-hero {
  position: relative;
  height: 70vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  overflow: hidden;
  margin-top: 80px; /* Offset para navbar fijo */
}

.airbnb-hero .hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.airbnb-hero .hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.airbnb-hero .hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  z-index: 2;
}

.airbnb-hero .hero-content {
  position: relative;
  z-index: 10;
  color: var(--white);
  width: 100%;
}

/* 🍞 Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  opacity: 0.9;
}

.breadcrumbs a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: var(--transition);
}

.breadcrumbs a:hover {
  color: var(--white);
}

.breadcrumbs i {
  font-size: 12px;
  opacity: 0.6;
}

/* 🎯 Hero Content */
.airbnb-hero .hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  margin-bottom: 16px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.airbnb-hero .hero-subtitle {
  font-size: 1.3rem;
  margin-bottom: 40px;
  opacity: 0.95;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* 🔍 Search Bar */
.search-bar {
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-lg);
  padding: 20px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-xl);
  max-width: 800px;
  margin: 0 auto;
}

.search-input {
  position: relative;
  margin-bottom: 16px;
}

.search-input i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-500);
  font-size: 16px;
}

.search-input input {
  width: 100%;
  padding: 16px 16px 16px 48px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 16px;
  color: var(--gray-800);
  background: var(--white);
  transition: var(--transition);
}

.search-input input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-filters-quick {
  display: flex;
  gap: 12px;
}

.search-filters-quick select {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--gray-700);
  background: var(--white);
  cursor: pointer;
  transition: var(--transition);
}

.search-filters-quick select:focus {
  outline: none;
  border-color: var(--primary);
}

/* ==========================================
   📐 LAYOUT PRINCIPAL
   ========================================== */
.airbnb-main {
  padding: 80px 0;
  background: var(--gray-50);
}

.airbnb-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 40px;
  align-items: start;
}

/* ==========================================
   🗂️ SIDEBAR DE FILTROS
   ========================================== */
.filters-sidebar {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--gray-200);
}

.filters-header h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 8px;
}

.clear-filters {
  background: var(--gray-100);
  color: var(--gray-600);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.clear-filters:hover {
  background: var(--gray-200);
  color: var(--gray-800);
}

/* 📋 Filter Groups */
.filter-group {
  margin-bottom: 32px;
}

.filter-group h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 16px;
}

/* 💰 Price Range */
.price-range {
  space-y: 16px;
}

.price-inputs {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.price-inputs input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 14px;
  text-align: center;
}

.price-inputs span {
  color: var(--gray-500);
  font-weight: 500;
}

.price-slider input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--gray-200);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.price-slider input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.price-slider input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: none;
  box-shadow: var(--shadow-sm);
}

/* ✅ Checkbox Options */
.checkbox-option,
.radio-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.checkbox-option:hover,
.radio-option:hover {
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  padding-left: 8px;
  padding-right: 8px;
}

.checkbox-option input,
.radio-option input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.checkmark,
.radiomark {
  position: relative;
  width: 18px;
  height: 18px;
  border: 2px solid var(--gray-300);
  border-radius: 4px;
  transition: var(--transition);
  flex-shrink: 0;
}

.radiomark {
  border-radius: 50%;
}

.checkbox-option input:checked ~ .checkmark,
.radio-option input:checked ~ .radiomark {
  background: var(--primary);
  border-color: var(--primary);
}

.checkmark::after,
.radiomark::after {
  content: '';
  position: absolute;
  display: none;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.checkmark::after {
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: translate(-50%, -60%) rotate(45deg);
}

.radiomark::after {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
}

.checkbox-option input:checked ~ .checkmark::after,
.radio-option input:checked ~ .radiomark::after {
  display: block;
}

.checkbox-option i {
  color: var(--gray-500);
  width: 16px;
  text-align: center;
}

/* ==========================================
   📊 CONTENIDO PRINCIPAL
   ========================================== */
.products-main {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
}

/* 📋 Results Header */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--gray-200);
}

.results-info h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.results-count {
  color: var(--gray-600);
  font-size: 15px;
}

.results-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* 👁️ View Toggle */
.view-toggle {
  display: flex;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.view-btn {
  padding: 10px 14px;
  background: var(--white);
  color: var(--gray-600);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
}

.view-btn.active,
.view-btn:hover {
  background: var(--primary);
  color: var(--white);
}

/* 🔄 Sort Select */
.sort-select {
  padding: 10px 16px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--gray-700);
  background: var(--white);
  cursor: pointer;
  min-width: 200px;
}

.sort-select:focus {
  outline: none;
  border-color: var(--primary);
}

/* ==========================================
   🏠 PRODUCTS GRID
   ========================================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.products-grid.list-view {
  grid-template-columns: 1fr;
}

/* 🏡 Product Card */
.product-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-slow);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  position: relative;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary);
}

/* 🏷️ Product Badge */
.product-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--gradient-success);
  color: var(--white);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  z-index: 10;
  box-shadow: var(--shadow);
}

.product-badge.featured {
  background: var(--gradient-warning);
}

.product-badge.luxury {
  background: var(--gradient-danger);
}

/* 🖼️ Product Image */
.product-image {
  position: relative;
  height: 240px;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

/* ⭐ Rating Overlay */
.product-rating {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.8);
  color: var(--white);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  backdrop-filter: blur(10px);
}

.product-rating i {
  color: #fbbf24;
  font-size: 12px;
}

/* 📝 Product Content */
.product-content {
  padding: 24px;
}

.product-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.product-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.product-subtitle {
  font-size: 14px;
  color: var(--gray-600);
}

.product-price {
  text-align: right;
}

.price-amount {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}

.price-unit {
  font-size: 12px;
  color: var(--gray-500);
  display: block;
}

/* 📋 Product Details */
.product-details {
  display: flex;
  gap: 20px;
  margin: 16px 0;
  color: var(--gray-600);
  font-size: 14px;
}

.product-detail {
  display: flex;
  align-items: center;
  gap: 6px;
}

.product-detail i {
  color: var(--gray-500);
  width: 14px;
  text-align: center;
}

/* 🎯 Product Amenities */
.product-amenities {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.amenity-tag {
  background: var(--gray-100);
  color: var(--gray-700);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.amenity-tag i {
  font-size: 10px;
  color: var(--gray-500);
}

/* 🎬 Product Actions */
.product-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.product-actions .btn {
  flex: 1;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  min-height: 44px;
}

/* ==========================================
   📄 LIST VIEW STYLES
   ========================================== */
.products-grid.list-view .product-card {
  display: grid;
  grid-template-columns: 300px 1fr;
  height: 200px;
}

.products-grid.list-view .product-image {
  height: 100%;
}

.products-grid.list-view .product-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 24px;
}

.products-grid.list-view .product-actions {
  margin-top: 16px;
}

.products-grid.list-view .product-actions .btn {
  flex: 0 0 auto;
  min-width: 120px;
}

/* ==========================================
   📄 PAGINACIÓN
   ========================================== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--gray-200);
}

.page-btn {
  background: var(--white);
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-btn:hover:not(:disabled) {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-numbers {
  display: flex;
  gap: 8px;
}

.page-number {
  width: 40px;
  height: 40px;
  border: 1px solid var(--gray-300);
  background: var(--white);
  color: var(--gray-700);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.page-number.active,
.page-number:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* ==========================================
   🖼️ MODAL SYSTEM
   ========================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  backdrop-filter: blur(5px);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 900px;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  transition: var(--transition);
  transform: translate(-50%, -50%) scale(0.9);
}

.modal-overlay.active .modal-container {
  transform: translate(-50%, -50%) scale(1);
}

.modal-header {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
}

.modal-close {
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.8);
  color: var(--white);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(10px);
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: scale(1.1);
}

.modal-content {
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

/* 📱 Loading States */
.loading-placeholder,
.modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--gray-600);
}

.loading-placeholder i,
.modal-loading i {
  font-size: 2rem;
  margin-bottom: 16px;
  color: var(--primary);
}

.loading-placeholder p,
.modal-loading p {
  font-size: 16px;
  font-weight: 500;
}

/* ==========================================
   📱 RESPONSIVE DESIGN
   ========================================== */

/* Tablet */
@media (max-width: 1024px) {
  .airbnb-layout {
    grid-template-columns: 280px 1fr;
    gap: 30px;
  }
  
  .filters-sidebar {
    padding: 24px;
  }
  
  .products-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
  }
  
  .search-filters-quick {
    flex-direction: column;
    gap: 8px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .airbnb-hero {
    height: 60vh;
    min-height: 400px;
    margin-top: 70px;
  }
  
  .airbnb-hero .hero-title {
    font-size: 2.2rem;
  }
  
  .airbnb-hero .hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 30px;
  }
  
  .search-bar {
    padding: 16px;
    margin: 0 16px;
  }
  
  .breadcrumbs {
    margin-bottom: 16px;
  }
  
  .airbnb-main {
    padding: 60px 0;
  }
  
  .airbnb-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .filters-sidebar {
    position: static;
    max-height: none;
    order: 2;
    margin-top: 30px;
  }
  
  .products-main {
    order: 1;
    padding: 24px;
  }
  
  .results-header {
    flex-direction: column;
    gap: 20px;
    align-items: stretch;
  }
  
  .results-controls {
    justify-content: space-between;
  }
  
  .products-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .products-grid.list-view .product-card {
    grid-template-columns: 1fr;
    height: auto;
  }
  
  .products-grid.list-view .product-image {
    height: 200px;
  }
  
  .product-actions {
    flex-direction: column;
  }
  
  .pagination {
    flex-direction: column;
    gap: 16px;
  }
  
  .page-numbers {
    order: -1;
  }
  
  .modal-container {
    width: 95%;
    max-height: 95vh;
  }
  
  .modal-header {
    top: 16px;
    right: 16px;
  }
  
  .modal-close {
    width: 36px;
    height: 36px;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .airbnb-hero {
    height: 50vh;
    min-height: 350px;
  }
  
  .search-bar {
    padding: 12px;
  }
  
  .search-input input {
    padding: 14px 14px 14px 44px;
    font-size: 14px;
  }
  
  .filters-sidebar {
    padding: 20px;
  }
  
  .products-main {
    padding: 20px;
  }
  
  .product-content {
    padding: 20px;
  }
  
  .product-details {
    flex-wrap: wrap;
    gap: 12px;
  }
  
  .view-toggle {
    display: none;
  }
  
  .sort-select {
    width: 100%;
    min-width: auto;
  }
  
  .page-numbers {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ==========================================
   🎨 ANIMATION ENHANCEMENTS
   ========================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.product-card {
  animation: fadeInUp 0.6s ease-out;
}

.filters-sidebar {
  animation: slideInLeft 0.6s ease-out;
}

.modal-content > * {
  animation: fadeInUp 0.4s ease-out;
}

/* ==========================================
   🎯 UTILITY CLASSES
   ========================================== */
.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.text-truncate-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}