/* ==========================================================================
   Roger Editor — bloque "Productos destacados" (carrusel infinito).
   Réplica 1:1 de la tarjeta de producto (.product-card) y del carrusel
   (.destacados-carrusel/.destacados-track) de assets/css/style.css del
   prototipo, usando las variables ya compartidas del tema (--fg, --border,
   --color-primary, etc. ya existen globalmente, no hace falta redeclararlas
   acá como en los widgets escopados). */

.roger-editor-seccion-productos .product-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform .25s, box-shadow .25s;
  display: flex;
  flex-direction: column;
}
.roger-editor-seccion-productos .product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.roger-editor-seccion-productos .product-media {
  position: relative;
  aspect-ratio: 1/1;
  background: var(--bg-muted);
}
.roger-editor-seccion-productos .product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.roger-editor-seccion-productos .product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--color-sale);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}
.roger-editor-seccion-productos .product-fav {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-plum);
  cursor: pointer;
  transition: background .2s, color .2s;
}
.roger-editor-seccion-productos .product-fav:hover { background: #fff; }
.roger-editor-seccion-productos .product-fav.activo { color: var(--color-primary); }
.roger-editor-seccion-productos .product-fav.activo svg { fill: var(--color-primary); }

.roger-editor-seccion-productos .product-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.roger-editor-seccion-productos .product-cat {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--fg);
}
.roger-editor-seccion-productos .product-name {
  font-size: 13.5px;
  font-weight: 400;
  color: var(--fg-muted);
  line-height: 1.35;
  min-height: 36px;
  text-decoration: none;
}
.roger-editor-seccion-productos .product-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: auto;
}
.roger-editor-seccion-productos .price-now { font-size: 18px; font-weight: 700; color: var(--color-primary); }
.roger-editor-seccion-productos .price-before { font-size: 13px; color: var(--fg-muted); text-decoration: line-through; }

.roger-editor-seccion-productos .btn-add {
  margin-top: 10px;
  width: 100%;
  padding: 10px;
  background: #fff;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.roger-editor-seccion-productos .btn-add svg { flex-shrink: 0; }
.roger-editor-seccion-productos .btn-add:hover { background: var(--color-primary); color: #fff; }

/* ---------- Encabezado de sección ---------- */
.roger-editor-seccion-productos-encabezado { display: flex; justify-content: space-between; align-items: flex-end; }

/* ---------- Carrusel infinito ---------- */
.destacados-carrusel {
  position: relative;
  overflow: hidden;
  padding: 8px 0 20px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
}
.destacados-track {
  display: flex;
  width: max-content;
  gap: 24px;
}
.destacados-track .product-card {
  flex: 0 0 270px;
  width: 270px;
}

.destacados-arrow {
  position: absolute;
  top: calc(50% - 20px);
  transform: translateY(-50%);
  z-index: 4;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  color: var(--color-plum);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.destacados-arrow:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.destacados-arrow.prev { left: 4px; }
.destacados-arrow.next { right: 4px; }

.destacados-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}
.destacados-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: all .3s ease;
  cursor: pointer;
}
.destacados-dot:hover { background: var(--color-rose); }
.destacados-dot.activo { background: var(--color-primary); width: 22px; border-radius: 4px; }

@media (max-width: 640px) {
  .destacados-arrow { display: none; }
}
