/* Estilos para los nuevos tabs de productos */
.product-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid #e5e7eb;
}

.product-tabs .tab-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  background-color: transparent;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: #6b7280;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
}

.product-tabs .tab-btn:hover {
  color: #111827;
}

.product-tabs .tab-btn.active {
  color: #4f46e5;
  border-bottom-color: #4f46e5;
}

/* Subcategory tabs */
.subcategory-tabs {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 0.5rem;
  background-color: #f9fafb;
  border-radius: 0.5rem;
}

.subcategory-tabs .subtab-btn {
  padding: 0.5rem 1rem;
  border: 1px solid #e5e7eb;
  background-color: white;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
}

.subcategory-tabs .subtab-btn:hover {
  color: #111827;
  border-color: #d1d5db;
  background-color: #f3f4f6;
}

.subcategory-tabs .subtab-btn.active {
  color: white;
  background-color: #4f46e5;
  border-color: #4f46e5;
}

/* Modal Styles - Diseño Corporativo */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 1rem;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background-color: white;
  border-radius: 1rem;
  max-width: 1000px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.95);
  transition: transform 0.3s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-overlay.active .modal-container {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: white;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: #9ca3af;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.modal-close-btn:hover {
  background-color: #f3f4f6;
  color: #111827;
}

.modal-content-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem;
  padding: 2rem;
}

/* Columna Izquierda - Imagen y Info Básica */
.modal-left {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.modal-product-image {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: 0.75rem;
  background-color: #f3f4f6;
}

.modal-product-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: #dbeafe;
  color: #2563eb;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 0.375rem;
  margin-bottom: 0.5rem;
}

.modal-product-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #111827;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.modal-product-subtitle {
  font-size: 0.95rem;
  color: #6b7280;
  margin-bottom: 1.5rem;
}

.modal-download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  background-color: #4f46e5;
  color: white;
  text-decoration: none;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
}

.modal-download-btn:hover {
  background-color: #4338ca;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.modal-info-badges {
  display: flex;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

.modal-info-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.modal-info-badge-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.modal-info-badge-icon.performance {
  background-color: #dbeafe;
  color: #2563eb;
}

.modal-info-badge-icon.warranty {
  background-color: #d1fae5;
  color: #059669;
}

.modal-info-badge-text {
  display: flex;
  flex-direction: column;
}

.modal-info-badge-label {
  font-size: 0.7rem;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.modal-info-badge-value {
  font-weight: 600;
  color: #111827;
}

/* Columna Derecha - Especificaciones */
.modal-right {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.modal-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.modal-section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.modal-section-icon {
  font-size: 1.25rem;
  color: #4f46e5;
}

.modal-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.modal-spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.modal-spec-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.modal-spec-label {
  font-size: 0.75rem;
  color: #9ca3af;
  font-weight: 500;
}

.modal-spec-value {
  font-size: 0.95rem;
  color: #111827;
  font-weight: 600;
}

/* Tarjetas Destacadas (RAM y Almacenamiento) */
.modal-highlight-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.modal-highlight-card {
  background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
  border: 1.5px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.modal-highlight-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.modal-highlight-card-icon {
  font-size: 1.1rem;
  color: #4f46e5;
}

.modal-highlight-card-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.modal-highlight-card-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: #111827;
  line-height: 1;
}

.modal-highlight-card-subtitle {
  font-size: 0.8rem;
  color: #9ca3af;
  margin-top: 0.25rem;
}

/* Badges de Puertos */
.modal-ports-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.modal-port-badge {
  padding: 0.375rem 0.75rem;
  background-color: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  font-size: 0.8rem;
  color: #4b5563;
  font-weight: 500;
}

/* Lista de especificaciones */
.modal-spec-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.modal-spec-list li {
  font-size: 0.9rem;
  color: #4b5563;
  padding-left: 1.25rem;
  position: relative;
}

.modal-spec-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #4f46e5;
  font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
  .modal-content-wrapper {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }

  .modal-spec-grid {
    grid-template-columns: 1fr;
  }

  .modal-highlight-cards {
    grid-template-columns: 1fr;
  }

  .modal-product-title {
    font-size: 1.5rem;
  }

  .modal-close-btn {
    top: 1rem;
    right: 1rem;
  }
}


/* Estilos para las tarjetas de productos dinámicas */
.product-card {
  background: white;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  transform: translateY(-4px);
}

.product-card .product-media {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  background-color: #f3f4f6;
}

.product-card .product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

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

.product-card .badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background-color: #4f46e5;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  z-index: 10;
}

.product-card .card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-card .product-category {
  font-size: 0.75rem;
  font-weight: 600;
  color: #4f46e5;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.product-card .product-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  min-height: 2.8em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card .product-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
  flex-grow: 1;
}

.product-card .product-features li {
  font-size: 0.875rem;
  color: #6b7280;
  padding: 0.375rem 0;
  border-bottom: 1px solid #f3f4f6;
}

.product-card .product-features li:last-child {
  border-bottom: none;
}

.product-card .product-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 1rem;
}

.product-card .product-cta {
  display: inline-block;
  width: 100%;
  padding: 0.75rem 1.5rem;
  background-color: #4f46e5;
  color: white;
  text-align: center;
  text-decoration: none;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.product-card .product-cta:hover {
  background-color: #4338ca;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* Grid de productos */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .product-card .product-media {
    height: 200px;
  }
}