@media (max-width: 768px) {
  .stat-value {
    font-size: 2rem;
  }
  .current-price {
    font-size: 1.5rem;
  }
}

.stat-card {
  background: white;
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  height: 100%;
}
.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-shadow-hover);
}
.stat-label {
  color: #6c757d;
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: #667eea;
  margin-top: 0.5rem;
}
.search-card {
  background: white;
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  margin-bottom: 1.5rem;
}
.search-input {
  border: 2px solid #e9ecef;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: border-color 0.2s;
}
.search-input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}
.sort-select {
  border: 2px solid #e9ecef;
  border-radius: 0 10px 10px 0;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  background-color: #f8f9fa;
  min-width: 180px;
  transition: all 0.2s;
}
.sort-select:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
  background-color: white;
}
.input-group .search-input {
  border-radius: 0;
  border-left: none;
  border-right: none;
}
.product-card::after {
  content: '';
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  color: #6c757d;
  opacity: 0;
  transition: opacity 0.3s;
}
.product-card:hover::after {
  opacity: 1;
}
.product-card:last-child {
  border-bottom: none;
}
.price-history {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 1.5rem;
  margin-top: 1rem;
  display: none;
  animation: slideDown 0.3s ease;
}
.price-history.active {
  display: block;
}
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.price-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.price-stat-item {
  background: white;
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
}
.price-stat-label {
  font-size: 0.85rem;
  color: #6c757d;
  margin-bottom: 0.5rem;
}
.price-stat-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: #667eea;
}
.price-stat-value.lowest {
  color: #28a745;
}
.price-stat-value.highest {
  color: #dc3545;
}
.chart-wrapper {
  background: white;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}
.lowest-price-badge {
  display: inline-block;
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-left: 0.5rem;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
.price-history-item {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem;
  border-bottom: 1px solid #dee2e6;
}
.price-history-item:last-child {
  border-bottom: none;
}
.spinner-border-custom {
  width: 3rem;
  height: 3rem;
  border-width: 0.3rem;
}
.loading-container {
  background: white;
  border-radius: 15px;
  padding: 3rem;
  box-shadow: var(--card-shadow);
  text-align: center;
}
.empty-state {
  text-align: center;
  padding: 3rem;
  color: #6c757d;
}
.empty-state i {
  font-size: 4rem;
  margin-bottom: 1rem;
  color: #dee2e6;
}
.alert-custom {
  border-radius: 10px;
  border: none;
  box-shadow: var(--card-shadow);
}
.pagination-info {
  color: #6c757d;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}
/* main.css - estilos compartidos para reportes y viewer */
:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --card-shadow-hover: 0 8px 12px rgba(0, 0, 0, 0.15);
}
body {
  background: var(--primary-gradient);
  min-height: 100vh;
  padding: 20px 0;
}
.products-container {
  background: white;
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
}
.product-card {
  border: none;
  border-bottom: 1px solid #e9ecef;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  border-left: 3px solid transparent;
}
.product-card:hover {
  background-color: #f8f9fa;
  border-left-color: #667eea;
  transform: translateX(5px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.product-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #212529;
  margin-bottom: 0.5rem;
}
.product-sku {
  display: inline-block;
  background: #e7f3ff;
  color: #0066cc;
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-family: 'Courier New', monospace;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.current-price {
  font-size: 1.8rem;
  font-weight: 700;
  color: #667eea;
}
.price-badge {
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
}
.price-up {
  background-color: #fee;
  color: #dc3545;
}
.price-down {
  background-color: #d4edda;
  color: #28a745;
}
.price-stable {
  background-color: #e9ecef;
  color: #6c757d;
}
.product-url {
  font-size: 0.85rem;
  color: #6c757d;
  margin-top: 0.5rem;
  word-break: break-all;
}
.pagination-container {
  text-align: center;
  padding: 2rem 1rem;
  border-top: 1px solid #e9ecef;
  margin-top: 1rem;
}
.load-more-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s;
  margin-bottom: 1rem;
}
.load-more-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(102, 126, 234, 0.3);
  color: white;
}
.load-more-btn:disabled {
  background: #6c757d;
  transform: none;
  box-shadow: none;
  cursor: not-allowed;
}
.main-header {
  background: white;
  border-radius: 15px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  margin-bottom: 2rem;
}
.main-header h1, .main-header h2 {
  color: #667eea;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.main-header .subtitle {
  color: #6c757d;
  font-size: 1.1rem;
}
