/* view-mode-boulevard.css */
/* =========================================
   ESTILOS PARA VISTAS EN BOULEVARD
   ========================================= */

/* Contenedor principal de productos */

/* =========================================
   VISTA FULL (Completa)

.view-mode-full {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
   ========================================= */

.view-mode-full .product-card {
  display: flex;
  flex-direction: column;
}

.view-mode-full .product-image-container {
  height: 260px;
}

/* =========================================
   VISTA MINI (Cuadrícula compacta)
   ========================================= */
.view-mode-mini {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
}

.view-mode-mini .product-card {
  display: flex;
  flex-direction: column;
}

.view-mode-mini .product-image-container {
  height: 180px;
}

.view-mode-mini .product-info-details {
  padding: 12px;
}

.view-mode-mini .product-title {
  font-size: 0.95rem;
  height: 2.4em;
  overflow: hidden;
  margin-bottom: 8px;
}

.view-mode-mini .product-desc,
.view-mode-mini .product-promotion,
.view-mode-mini .product-meta,
.view-mode-mini .contact-grid,
.view-mode-mini .actions-footer {
  display: none;
}

.view-mode-mini .product-price-main {
  font-size: 1.1rem;
  text-align: center;
  display: block;
  margin-top: 8px;
}

/* =========================================
   VISTA MICRO (Lista horizontal)
   ========================================= */
.view-mode-micro {
  grid-template-columns: 1fr;
  gap: 12px;
}

.view-mode-micro .product-card {
  display: flex;
  flex-direction: row;
  height: auto;
  align-items: center;
  gap: 15px;
}

.view-mode-micro .product-image-container {
  width: 140px;
  height: 140px;
  border-bottom: none;
  border-right: 1px solid #eee;
  flex-shrink: 0;
}

.view-mode-micro .product-info-details {
  flex: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.view-mode-micro .product-title {
  font-size: 1rem;
  margin: 0;
}

.view-mode-micro .product-desc,
.view-mode-micro .product-meta .badge,
.view-mode-micro .product-promotion {
  display: none;
}

.view-mode-micro .product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.8rem;
}

.view-mode-micro .contact-grid {
  display: none;
}

.view-mode-micro .actions-footer {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

/* =========================================
   TARJETA EXPANDIDA TEMPORALMENTE (para mini/micro)
   ========================================= */
.product-card.temp-full {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 10000;
  background: #000000;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  border-radius: 16px;
  animation: modalExpand 0.2s ease-out;
  cursor: default;
  margin: 0;
}

.product-card.temp-full::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: -1;
  animation: fadeIn 0.2s ease-out;
}

.product-card.temp-full .product-image-container {
  height: 350px;
}

.product-card.temp-full .product-desc,
.product-card.temp-full .product-promotion,
.product-card.temp-full .product-meta,
.product-card.temp-full .contact-grid,
.product-card.temp-full .actions-footer {
  display: flex !important;
  flex-wrap: wrap;
}

.product-card.temp-full .product-info-details {
  padding: 20px;
}

.product-card.temp-full .product-title {
  font-size: 1.5rem;
  height: auto;
}

/* Animaciones */
@keyframes modalExpand {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* =========================================
   BOTONES DE CONTROL DE VISTA (Estilo boulevard)
   ========================================= */
.view-selector-compact {
  display: flex;
  gap: 8px;
  background: #f0f2f5;
  padding: 4px;
  border-radius: 12px;
}

.view-selector-compact .view-btn {
  background: transparent;
  border: none;
  padding: 4px 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  color: #666;
  font-size: 0.8rem;
}

.view-selector-compact .view-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #333;
}

.view-selector-compact .view-btn.active {
  background: #2b7cff;
  color: white;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
  .view-mode-full {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    padding: 15px;
  }
  
  .view-mode-mini {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    padding: 12px;
  }
  
  .view-mode-micro .product-card {
    height: auto;
  }
  
  .view-mode-micro .product-image-container {
    width: 100px;
    height: 100px;
  }
  
  .product-card.temp-full {
    width: 95%;
    max-height: 85vh;
  }
  
  .product-card.temp-full .product-image-container {
    height: 250px;
  }
}

@media (max-width: 480px) {
  .view-mode-full .product-image-container {
    height: 200px;
  }
  
  .view-mode-mini .product-image-container {
    height: 140px;
  }
  
  .view-mode-micro .product-card {
    height: auto;
  }
  
  .view-mode-micro .product-image-container {
    width: 80px;
    height: 80px;
  }
}
