/* 
   Style2.css - Específico para el Catálogo de Productos 
   *Depende de style.css para variables y componentes globales*
*/

/* Hero Catálogo */
.catalog-header {
  padding: 160px 5% 60px;
  background: linear-gradient(135deg, var(--bg-light), var(--bg-alt));
  text-align: center;
  border-bottom: 1px solid var(--glass-border);
}

.catalog-header h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
}

.catalog-header p {
  color: var(--text-muted);
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.15rem;
}

/* Category Tabs (Filtros) */
.categories-container {
  padding: 30px 5%;
  background: var(--bg-light);
  position: sticky;
  top: 75px;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: center;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}

.category-tab {
  padding: 10px 24px;
  background: var(--bg-alt);
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 50px;
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.category-tab:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-light);
}

.category-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 10px rgba(236,130,0,0.2);
}

/* Products Layout */
.products-container {
  padding: 60px 5% 100px;
  background: var(--bg-alt);
  min-height: 50vh;
}

/* Brand Section (Manejo de ocultamiento) */
.brand-section {
  display: none;
  animation: fadeIn 0.5s ease;
}

.brand-section.active-section {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.brand-title {
  font-size: 2rem;
  margin-bottom: 10px;
  color: var(--text-main);
  text-align: center;
}

.section-description {
  text-align: center;
  color: var(--text-muted);
  max-width: 800px;
  margin: 0 auto 50px auto;
  font-size: 1.05rem;
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1300px;
  margin: 0 auto;
}

.product-card {
  background: var(--bg-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.product-image {
  height: 260px;
  padding: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-info {
  padding: 25px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-info h2 {
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: var(--text-main);
}

.product-brief {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 20px;
  flex-grow: 1;
}

.view-details-btn {
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
  font-family: var(--font-heading);
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.view-details-btn:hover {
  background: var(--primary);
  color: #fff;
}

.hidden {
  display: none;
}

.empty-category {
  grid-column: 1 / -1;
  background: transparent;
  box-shadow: none;
  border: 2px dashed rgba(0,0,0,0.1);
  justify-content: center;
  align-items: center;
  min-height: 300px;
}

.empty-category:hover {
  transform: none;
  box-shadow: none;
  border-color: rgba(0,0,0,0.1);
}

.empty-message {
  text-align: center;
  color: var(--text-muted);
}

.empty-message i {
  font-size: 3rem;
  color: var(--primary-light);
  margin-bottom: 15px;
}

/* Modal Premium */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 10, 11, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.3s ease;
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
  opacity: 1;
}

.modal-content {
  background-color: var(--bg-light);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  position: relative;
  transform: scale(0.95);
  transition: transform 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  box-shadow: 0 25px 50px rgba(0,0,0,0.25);
}

.modal.show .modal-content {
  transform: scale(1);
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: #f1f2f6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
  color: var(--text-main);
}

.close-modal:hover {
  background: var(--primary);
  color: #fff;
}

/* Layout del Modal */
#modalContent {
  display: flex;
  width: 100%;
}

.modal-layout {
  display: flex;
  width: 100%;
}

.modal-image-panel {
  flex: 0 0 45%;
  background: #fff;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.modal-image-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-details-panel {
  flex: 1;
  padding: 40px 50px 40px 40px;
  overflow-y: auto;
  max-height: 90vh;
}

.modal-details-panel h2 {
  font-size: 2rem;
  margin-bottom: 5px;
  color: var(--text-main);
}

.modal-brand {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 25px;
  display: block;
}

.modal-desc {
  color: var(--text-muted);
  margin-bottom: 30px;
  font-size: 1rem;
  line-height: 1.6;
}

.spec-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.spec-list {
  list-style: none;
}

.spec-list li {
  margin-bottom: 10px;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  font-size: 0.95rem;
}

.spec-list li::before {
  content: '\f00c';
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  margin-right: 10px;
  color: var(--primary);
  margin-top: 2px;
}

/* DefList para Modales */
.spec-dl {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 10px 15px;
  margin-top: 15px;
}

.spec-dl dt {
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.9rem;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

.spec-dl dd {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  margin: 0;
}

.modal-actions {
  margin-top: 40px;
}

@media (max-width: 900px) {
  .modal-layout {
    flex-direction: column;
  }
  .modal-image-panel {
    padding: 30px;
    height: 250px;
  }
  .modal-details-panel {
    padding: 30px;
  }
}

@media (max-width: 768px) {
  .catalog-header h1 {
    font-size: 2.5rem;
  }
  .spec-dl {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .spec-dl dt {
    padding-bottom: 0;
    border: none;
    color: var(--primary);
  }
  .spec-dl dd {
    padding-top: 2px;
    margin-bottom: 8px;
  }
}