/* Estilos para el Loop de Ofertas de ChollAmazon */

.chollamazon-deals-loop {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 0;
  padding: 0;
}

/* Responsive Grid */
@media (max-width: 1024px) {
  .chollamazon-deals-loop {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .chollamazon-deals-loop {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}

/* Deal Card Styles */
.deal-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.deal-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border-color: #f97316;
}

/* Deal Image */
.deal-image {
  position: relative;
  overflow: hidden;
  height: 200px;
  background: #f9fafb;
}

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

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

/* Deal Badges */
.deal-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 2;
}

.badge {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1;
  display: inline-block;
}

.badge-discount {
  background: #dc2626;
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
}

.badge-hot {
  background: linear-gradient(45deg, #ff6b35, #f7931e);
  color: #ffffff;
  animation: pulse 2s infinite;
  box-shadow: 0 2px 4px rgba(255, 107, 53, 0.4);
}

.badge-featured {
  background: #7c3aed;
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(124, 58, 237, 0.3);
}

.badge-category {
  background: #f3f4f6;
  color: #374151;
  font-size: 10px;
  font-weight: 500;
}

.badge-store {
  background: #1f2937;
  color: #ffffff;
  font-size: 10px;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Deal Timer/Shipping Info */
.deal-timer {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.8);
  color: #ffffff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.deal-timer i {
  font-size: 10px;
}

/* Deal Content */
.deal-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 12px;
}

/* Deal Header */
.deal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.deal-info {
  flex: 1;
  min-width: 0;
}

.deal-category {
  margin-bottom: 6px;
}

.deal-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.deal-title a {
  color: #1f2937;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.deal-title a:hover {
  color: #f97316;
}

/* Deal Voting */
.deal-voting {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 40px;
}

.vote-btn {
  background: #f3f4f6;
  border: none;
  width: 28px;
  height: 24px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 10px;
}

.vote-btn:hover {
  background: #e5e7eb;
  transform: scale(1.1);
}

.vote-btn.vote-up:hover {
  background: #dcfce7;
  color: #16a34a;
}

.vote-btn.vote-down:hover {
  background: #fef2f2;
  color: #dc2626;
}

.vote-btn:active {
  transform: scale(0.95);
}

.vote-count {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  min-height: 16px;
  display: flex;
  align-items: center;
}

/* Deal Price */
.deal-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.current-price {
  font-size: 18px;
  font-weight: 700;
  color: #16a34a;
}

.original-price {
  font-size: 14px;
  color: #6b7280;
  text-decoration: line-through;
}

/* Deal Meta */
.deal-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #6b7280;
}

.deal-store {
  display: flex;
  align-items: center;
  gap: 6px;
}

.deal-comments {
  font-size: 11px;
}

/* Deal Actions */
.deal-actions {
  margin-top: auto;
  padding-top: 8px;
}

.deal-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 16px;
  background: #f97316;
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.deal-button:hover {
  background: #ea580c;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
  color: #ffffff;
}

.deal-button:active {
  transform: translateY(0);
}

.deal-button i {
  font-size: 11px;
}

/* Loading States */
.deal-card.loading {
  opacity: 0.7;
  pointer-events: none;
}

.deal-card.loading::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

/* Animations */
.deal-card {
  animation: fadeInUp 0.6s ease forwards;
}

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

/* Vote Animation */
.vote-btn.voted {
  background: #16a34a;
  color: #ffffff;
  animation: voteSuccess 0.3s ease;
}

@keyframes voteSuccess {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

/* Responsive Adjustments */
@media (max-width: 640px) {
  .deal-content {
    padding: 12px;
    gap: 10px;
  }

  .deal-header {
    gap: 8px;
  }

  .deal-title {
    font-size: 13px;
  }

  .current-price {
    font-size: 16px;
  }

  .deal-button {
    padding: 8px 12px;
    font-size: 12px;
  }

  .deal-image {
    height: 160px;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .deal-card {
    background: #1f2937;
    border-color: #374151;
    color: #f9fafb;
  }

  .deal-title a {
    color: #f9fafb;
  }

  .deal-title a:hover {
    color: #f97316;
  }

  .vote-btn {
    background: #374151;
    color: #d1d5db;
  }

  .vote-btn:hover {
    background: #4b5563;
  }

  .badge-category {
    background: #374151;
    color: #d1d5db;
  }
}

/* Print Styles */
@media print {
  .deal-voting,
  .deal-actions {
    display: none;
  }

  .deal-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #000;
  }
}
