/* Estilos específicos para la página de productos */

/* Page Header */
.page-header {
  background: linear-gradient(135deg, #4a6de5 0%, #667eea 100%);
  color: white;
  padding: 60px 0 40px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  font-size: 14px;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.3s;
}

.breadcrumb a:hover {
  color: white;
}

.breadcrumb span {
  margin: 0 10px;
  color: rgba(252, 250, 250, 0.952);
}

.page-header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  font-weight: 700;
}

.page-header p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
}

/* Active navigation link */
.nav-menu a.active {
  color: #4a6de5;
  font-weight: 600;
}

/* Filters Section */
.filters-section {
  background-color: #f8f9fa;
  padding: 30px 0;
  border-bottom: 1px solid #eee;
}

.filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.filters-header h3 {
  font-size: 1.3rem;
  color: #333;
}

.filters-toggle {
  display: none;
  background: none;
  border: 1px solid #ddd;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  color: #666;
}

.filters-toggle i {
  margin-right: 8px;
}

.filters-content {
  display: flex;
  gap: 40px;
  align-items: center;
}

.filter-group {
  display: flex;
  flex-direction: column;
}

.filter-group h4 {
  font-size: 1rem;
  margin-bottom: 15px;
  color: #333;
  font-weight: 600;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-option {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
}

.filter-option input[type="checkbox"] {
  margin-right: 8px;
  accent-color: #4a6de5;
}

.filter-option span {
  color: #666;
  transition: color 0.3s;
}

.filter-option:hover span {
  color: #333;
}

/* Price Range */
.price-range {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 200px;
}

.price-range input[type="range"] {
  width: 100%;
  accent-color: #4a6de5;
}

.price-values {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #666;
}

/* Sort Select */
#sort-select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: white;
  font-size: 14px;
  color: #666;
  min-width: 180px;
}

/* Products Grid Section */
.products-grid-section {
  padding: 40px 0 60px;
}

.products-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.results-count {
  font-size: 14px;
  color: #666;
}

.view-toggle {
  display: flex;
  gap: 5px;
}

.view-btn {
  width: 40px;
  height: 40px;
  border: 1px solid #ddd;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  border-radius: 4px;
}

.view-btn:hover,
.view-btn.active {
  background-color: #4a6de5;
  color: white;
  border-color: #4a6de5;
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-bottom: 50px;
}

.products-grid.list-view {
  grid-template-columns: 1fr;
}

.products-grid.list-view .product-card {
  display: flex;
  align-items: center;
  padding: 20px;
}

.products-grid.list-view .product-image {
  width: 200px;
  height: 150px;
  margin-right: 20px;
  flex-shrink: 0;
}

.products-grid.list-view .product-info {
  flex: 1;
}

.products-grid.list-view .product-info p {
  min-height: auto;
  margin-bottom: 10px;
}

/* Enhanced Product Card */
.product-card {
  border: 1px solid #eee;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  background: white;
  position: relative;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  border-color: #4a6de5;
}

.product-image {
  position: relative;
  height: 250px;
  overflow: hidden;
}

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

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

/* Product Badges */
.product-badges {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 2;
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
  text-transform: uppercase;
  margin-right: 5px;
}

.badge.new {
  background-color: #28a745;
  color: white;
}

.badge.sale {
  background-color: #e74c3c;
  color: white;
}

.badge.bestseller {
  background-color: #f39c12;
  color: white;
}

/* Product Actions */
.product-actions {
  position: absolute;
  top: 15px;
  right: 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.3s ease;
}

.product-card:hover .product-actions {
  opacity: 1;
  transform: translateX(0);
}

.action-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.action-btn:hover {
  background: #4a6de5;
  color: white;
  transform: scale(1.1);
}

/* Enhanced Product Info */
.product-info {
  padding: 25px 20px;
}

.product-category {
  font-size: 12px;
  color: #4a6de5;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.product-info h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: #333;
  font-weight: 600;
  line-height: 1.3;
}

.product-info p {
  color: #666;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 15px;
  min-height: 60px;
}

/* Product Rating */
.product-rating {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.stars {
  display: flex;
  margin-right: 8px;
}

.stars i {
  color: #ffc107;
  font-size: 14px;
  margin-right: 2px;
}

.stars i.far {
  color: #ddd;
}

.rating-count {
  font-size: 12px;
  color: #666;
}

/* Enhanced Product Price */
.product-price {
  font-size: 1.4rem;
  font-weight: 700;
  color: #4a6de5;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.original-price {
  font-size: 1rem;
  color: #999;
  text-decoration: line-through;
  font-weight: 400;
}

/* Enhanced Add to Cart Button */
.product-info .btn {
  width: 100%;
  padding: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.product-info .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(74, 109, 229, 0.3);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 40px;
}

.pagination-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  border: 1px solid #ddd;
  background: white;
  color: #666;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
}

.pagination-btn:hover:not(:disabled) {
  background-color: #4a6de5;
  color: white;
  border-color: #4a6de5;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-numbers {
  display: flex;
  align-items: center;
  gap: 5px;
}

.pagination-number {
  width: 40px;
  height: 40px;
  border: 1px solid #ddd;
  background: white;
  color: #666;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.pagination-number:hover,
.pagination-number.active {
  background-color: #4a6de5;
  color: white;
  border-color: #4a6de5;
}

.pagination-dots {
  color: #666;
  margin: 0 5px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
  }
}

@media (max-width: 768px) {
  .page-header {
    padding: 40px 0 30px;
    text-align: center;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  .filters-toggle {
    display: flex;
    align-items: center;
  }

  .filters-content {
    display: none;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
  }

  .filters-content.active {
    display: flex;
  }

  .filter-group {
    width: 100%;
  }

  .filter-options {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 15px;
  }

  .products-header {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
  }

  .products-grid.list-view .product-card {
    flex-direction: column;
    text-align: center;
  }

  .products-grid.list-view .product-image {
    width: 100%;
    height: 200px;
    margin-right: 0;
    margin-bottom: 15px;
  }

  .pagination {
    flex-wrap: wrap;
    gap: 8px;
  }

  .pagination-btn {
    padding: 8px 12px;
    font-size: 13px;
  }

  .pagination-number {
    width: 35px;
    height: 35px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 2fr;
    gap: 15px;
  }

  .product-card {
    margin: 0 10px;
  }

  .pagination-numbers {
    display: none;
  }
}

/* Loading States */
.products-grid.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #4a6de5;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
