/* Sección principal */
.most-downloaded-section {
  padding: 2rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.most-downloaded-title {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: #2c3e50;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Cuadrícula de productos */
.most-downloaded-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.8rem;
  justify-items: center;
}

/* Tarjeta de producto */
.most-downloaded-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
  max-width: 300px;
  display: flex;
  flex-direction: column;
}

.most-downloaded-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
}

/* Imagen del producto */
.card-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background-color: #f4f6f8;
}

.card-placeholder {
  width: 100%;
  height: 180px;
  background-color: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-style: italic;
}

/* Contenido de la tarjeta */
.card-content {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.product-type {
  font-size: 0.85rem;
  font-weight: 600;
  color: #3498db;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2c3e50;
  margin: 0;
  line-height: 1.4;
}

.product-stats {
  font-size: 0.95rem;
  color: #7f8c8d;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Botón "View" */
.view-button {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background: #3498db;
  color: white;
  text-decoration: none;
  font-weight: 600;
  border-radius: 8px;
  text-align: center;
  transition: background 0.3s ease;
  align-self: flex-start;
}

.view-button:hover {
  background: #2980b9;
}

/* Mensaje cuando no hay productos */
.no-products {
  text-align: center;
  font-size: 1.2rem;
  color: #7f8c8d;
  margin-top: 2rem;
}

/* ======== Most Downloaded Slider ======== */
.most-downloaded-section {
  position: relative;
  padding: 3rem 1.5rem;
  background: linear-gradient(135deg, #fafafa, #f0f0f0);
  overflow: hidden;
}

.most-downloaded-title {
  text-align: center;
  font-size: 6rem;
  font-weight: 900;
  margin-bottom: 2rem;
  text-align: left;
  color: #0f0f0f;
}

.most-downloaded-slider-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.most-downloaded-slider {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  gap: 1.5rem;
  padding: 1rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: none; /* Firefox */
}

.most-downloaded-slider::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

.most-downloaded-card {
  flex: 0 0 280px;
  background: white;
  border-radius: 1rem;
  overflow: visible;      
  position: relative;       
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  scroll-snap-align: start;
  transition: transform 0.3s ease;
}


.most-downloaded-card:hover {
  transform: translateY(-6px);
}

.card-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card-placeholder {
  width: 100%;
  height: 180px;
  background: #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
}

.card-content {
  padding: 1rem;
}

.product-type {
  font-size: 0.9rem;
  color: #888;
}

.product-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0.5rem 0;
}

.product-stats {
  color: #f5a623;
  font-size: 0.9rem;
}

.view-button {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.6rem 1rem;
  background: #007bff;
  color: white;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.3s ease;
}

.view-button:hover {
  background: #0056b3;
}

/* Flechas */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: white;
  border: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  width: 45px;
  height: 45px;
  cursor: pointer;
  font-size: 1.5rem;
  transition: background 0.3s;
  z-index: 10;
}

.slider-btn:hover {
  background: #007bff;
  color: white;
}

.prev-btn {
  left: 1rem;
}

.next-btn {
  right: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  .most-downloaded-card {
    flex: 0 0 85%;
  }

  .slider-btn {
    width: 38px;
    height: 38px;
    font-size: 1.2rem;
  }
}

@media (max-width: 768px) {
  .most-downloaded-title {
    font-size: 1.8rem;
  }

  .most-downloaded-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.2rem;
  }

  .card-image,
  .card-placeholder {
    height: 150px;
  }

  .product-title {
    font-size: 1.15rem;
  }
}

@media (max-width: 480px) {
  .most-downloaded-title {
    font-size: 1.5rem;
  }

  .most-downloaded-grid {
    grid-template-columns: 1fr;
    padding: 0 0.5rem;
  }

  .most-downloaded-card {
    max-width: none;
  }
}
