
#products.section {
  padding: 40px 0;
}

.section-title p {
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 1rem;
}

#filtros-container {
  background: #fff;
  border: 1px solid #e9ecef;
}

#filtros-container input.form-control,
#filtros-container select.form-select {
  border-radius: 8px;
  font-size: 0.95rem;
}

#filtros-container input.form-control:focus,
#filtros-container select.form-select:focus {
  border-color: #ed1c24;
  box-shadow: 0 0 0 0.25rem rgba(237, 28, 36, 0.15);
}

#contador-resultados {
  font-weight: 500;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 5px;
}

#productosTabs {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  overflow: hidden;
}

#productosTabs .nav-link {
  border: none;
  border-radius: 0;
  color: #495057;
  padding: 12px 15px;
  font-weight: 500;
  transition: all 0.2s ease;
  border-bottom: 1px solid #e9ecef;
}

#productosTabs .nav-link:last-child {
  border-bottom: none;
}

#productosTabs .nav-link:hover {
  background: #e9ecef;
  color: #ed1c24;
}

#productosTabs .nav-link.active {
  background: #fff;
  color: #ed1c24;
  border-left: 4px solid #ed1c24;
  font-weight: 600;
}

.tab-content {
  min-height: 300px;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 15px;
}

.list-group-item {
  border-left: none;
  border-right: none;
  border-top: none;
  border-bottom: 1px solid #f1f1f1;
  padding: 15px 10px;
  transition: background-color 0.2s;
}

.list-group-item:last-child {
  border-bottom: none;
}

.list-group-item:hover {
  background-color: #fcfcfc;
}

.list-group-item h5 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #212529;
  margin-bottom: 4px;
}

.list-group-item small.text-muted {
  font-size: 0.85rem;
  color: #6c757d;
  line-height: 1.4;
}

.list-group-item .badge.bg-secondary {
  font-size: 0.75rem;
  font-weight: normal;
}

.btn-group {
  align-items: center;
}

.btn-success {
  white-space: nowrap;
  min-width: 80px;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.qty-input {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  text-align: center;
  width: 60px !important;
  max-width: 60px;
}

/* --- Estados Vacíos o Errores --- */
.sin-resultados,
.alert-warning,
.alert-danger {
  text-align: center;
  padding: 30px;
  border-radius: 8px;
}

@media (max-width: 991px) {

  /* Tabs horizontales en tablet/móvil */
  #productosTabs {
    flex-direction: row;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 5px;
    margin-bottom: 20px;
  }

  #productosTabs .nav-link {
    border-left: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    margin-right: 5px;
    padding: 10px 15px;
  }

  #productosTabs .nav-link.active {
    border-left: none;
    border-bottom: 2px solid #ed1c24;
  }

  /* Ajuste de layout en lista para móviles */
  .list-group-item {
    flex-direction: column;
    align-items: flex-start !important;
  }

  .btn-group {
    width: 100%;
    justify-content: flex-end;
    margin-top: 10px;
  }
}

@media (max-width: 575px) {
  #filtros-container .row {
    flex-direction: column;
    gap: 10px;
  }

  #filtros-container .col-md-6,
  #filtros-container .col-md-2 {
    width: 100%;
  }

  #contador-resultados {
    text-align: left;
    margin-top: 5px;
    display: inline-block;
  }

  .tab-content {
    padding: 10px;
  }
}

.loading-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  color: #6c757d;
}

.spinner-border {
  width: 3rem;
  height: 3rem;
  color: #ed1c24;
  /* Azul Bootstrap */
  margin-bottom: 1rem;
  animation: spin 1s linear infinite;
}

.loading-text {
  font-size: 1.1rem;
  font-weight: 500;
}

#productosContent.loading {
  opacity: 0.5;
  pointer-events: none;
}

#buscador {
  max-width: 600px;
}

.prod-img-wrapper {
  position: relative;
  display: inline-block;
  width: 120px;
  height: 120px;
  margin-right: 15px;
  cursor: pointer;
}

.prod-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.2s ease;
}

.prod-img-wrapper:hover img {
  transform: scale(1.05);
}

.prod-img-wrapper::after {
  content: "\F3E3";
  font-family: "bootstrap-icons";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.prod-img-wrapper:hover::after {
  opacity: 1;
}

.prod-img-wrapper {
  position: relative;
  display: inline-block;
  width: 120px;
  height: 120px;
  margin-right: 15px;
  cursor: pointer;
}

.prod-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.2s ease;
}

.prod-img-wrapper:hover img {
  transform: scale(1.05);
}

.prod-img-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0) 50%,
    rgba(255, 255, 255, 0.8) 50%,
    rgba(255, 255, 255, 0.8) 100%
  );
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.prod-img-wrapper:hover::before {
  opacity: 1;
}